
function get_habit_title(pid) {
	var header_html;

	if (pid == 'h1') {
		header_html = "Persisting";
	} else if (pid == 'h2') {
		header_html = "Managing Impulsivity";
	} else if (pid == 'h3') {
		header_html = "Listening To Others With Understanding and Empathy";
	} else if (pid == 'h4') {
		header_html = "Thinking Flexibly";
	} else if (pid == 'h5') {
		header_html = "Thinking About our Thinking<br />(Metacognition)";
	} else if (pid == 'h6') {
		header_html = "Striving For Accuracy and Precision";
	} else if (pid == 'h7') {
		header_html = "Questioning and Posing Problems";
	} else if (pid == 'h8') {
		header_html = "Applying Past Knowledge to New Situations";
	} else if (pid == 'h9') {
		header_html = "Thinking and Communicating with Clarity and Precision";
	} else if (pid == 'h10') {
		header_html = "Gathering Data through All Senses";
	} else if (pid == 'h11') {
		header_html = "Creating, Imagining, and Innovating";
	} else if (pid == 'h12') {
		header_html = "Responding with Wonderment and Awe";
	} else if (pid == 'h13') {
		header_html = "Taking Responsible Risks";
	} else if (pid == 'h14') {
		header_html = "Finding Humor";
	} else if (pid == 'h15') {
		header_html = "Thinking Interdependently";
	} else if (pid == 'h16') {
		header_html = "Learning Continuously";
	} 
	return header_html;

}


function get_habit_description(pid) {
	var content_html;

	// Set Text and Images to be displayed inside of modal popup:
	if (pid == 'h1') {
		content_html = '"Persistence is the twin sister of excellence.  One is a matter of quality; the other, a&nbsp;matter of time."';
	} else if (pid == 'h2') {
		content_html = '"<span style="letter-spacing:1px;">...goal directed self-imposed delay of</span> <span style="letter-spacing:1px;">gratification is perhaps the essence of</span> emotional self-regulation: the ability to deny impulse in the service of a goal, whether it be building a business, solving an algebraic equation, or pursuing the Stanley cup."';
	} else if (pid == 'h3') {
		content_html = '"Listening is the beginning of understanding...  <span style="letter-spacing:1px;">Wisdom is the reward for a lifetime of</span> listening.  Let the wise listen and add to their learning and let the discerning get guidance"';
	} else if (pid == 'h4') {
		content_html = '"If you never change your mind,<br />why have one?"';
	} else if (pid == 'h5') {
		content_html = '"When the mind is thinking<br />it is talking to itself."';
	} else if (pid == 'h6') {
		content_html = '"A man who has committed a mistake<br />and doesn\'t correct it is committing<br />another mistake."';
	} else if (pid == 'h7') {
		content_html = '"The formulation of a problem is often more <span style="letter-spacing:1px;">essential than its solution, which may</span><br /><span style="letter-spacing:1px;">be merely a matter of mathematical</span><br /> or experimental skill. To raise new questions, new possibilities, to regard old problems from a new angle, requires creative imagination and marks real advances..."';
	} else if (pid == 'h8') {
		content_html = '"I\'ve never made a mistake. I\'ve only learned from experience."';
	} else if (pid == 'h9') {
		content_html = '"I do not so easily think in words.... after being hard at work having arrived at results that are perfectly clear... I have to translate my thoughts in a language that does not<br />run evenly with them."';
	} else if (pid == 'h10') {
		content_html = '"Observe perpetually."';
	} else if (pid == 'h11') {
		content_html = '"The future is not some place we are going<br />to but one we are creating. The paths are<br />not to be found, but made, and the activity<br />of making them changes both the maker<br />and the destination."';
	} else if (pid == 'h12') {
		content_html = '"The most beautiful experience in the world<br />is the experience of the mysterious."';
	} else if (pid == 'h13') {
		content_html = '"There has been a calculated risk in every stage of American development - the pioneers <span style="letter-spacing:1px;">who were not afraid of the wilderness,</span> businessmen who were not afraid of failure, dreamers who were not afraid of action."';
	} else if (pid == 'h14') {
		content_html = '"Where do bees wait? At the buzz stop."';
	} else if (pid == 'h15') {
		content_html = '"Take care of each other. Share your energies <span style="letter-spacing:1px;">with the group. No one must feel alone,</span><br />cut off, for that is when you do not make it."';
	} else if (pid == 'h16') {
		content_html = '"Insanity is continuing to do the same thing over and over and expecting different results."';
	} 

	return content_html;

}


function get_habit_footer(pid) {
	var footer_html;

	if (pid == 'h1') {
		footer_html = "Marabel Morgan,<br />The Electric Woman";
	} else if (pid == 'h2') {
		footer_html = "Daniel Goleman Emotional<br />Intelligence (1995) p. 83";
	} else if (pid == 'h3') {
		footer_html = "Proverbs 1:5";
	} else if (pid == 'h4') {
		footer_html = "Edward deBono";
	} else if (pid == 'h5') {
		footer_html = "Plato";
	} else if (pid == 'h6') {
		footer_html = "Confucius";
	} else if (pid == 'h7') {
		footer_html = "Albert Einstein";
	} else if (pid == 'h8') {
		footer_html = "Thomas A. Edison";
	} else if (pid == 'h9') {
		footer_html = "Francis Galton<br />Geneticist";
	} else if (pid == 'h10') {
		footer_html = "Henry James";
	} else if (pid == 'h11') {
		footer_html = "John Schaar, Political Scientist,<br />University of Santa Clara<br />Author, Loyalty in America";
	} else if (pid == 'h12') {
		footer_html = "Albert Einstein";
	} else if (pid == 'h13') {
		footer_html = "Brooks Atkinson";
	} else if (pid == 'h14') {
		footer_html = "Andrew<br />Age 6";
	} else if (pid == 'h15') {
		footer_html = "Willie Unsoeld<br />Renowned Mountain Climber";
	} else if (pid == 'h16') {
		footer_html = "Albert Einstein";
	} 
	return footer_html;

}


// ========================  MENU ==========================

function get_modal_header(pid) {

	if (pid == 'art_costa') {
		header_html = "Art&nbsp;Costa<br />Director<br />Institute for Habits of Mind<br /><a href='mailto:artcosta@aol.com'>artcosta@aol.com</a>";
	} else if (pid == 'bena_kallick') {
		header_html = "Bena Kallick<br />Director<br />Institute for Habits of Mind<br /><a href='mailto:bkallick@aol.com'>bkallick@aol.com</a>";
	}

	return header_html;

}


function get_modal_content(pid) {


	// Set Text and Images to be displayed inside of modal popup:
	if (pid == 'art_costa') {
		content_html = "ARTHUR L. COSTA is an Emeritus Professor of Education at California State University, Sacramento and Cofounder of the Institute for Habits of Mind in Westport, Connecticut He has served as a classroom teacher, a curriculum consultant, and an assistant superintendent for instruction and as the Director of Educational Programs for the National Aeronautics and Space Administration.\
					He has made presentations and conducted workshops in all 50 states as well as Mexico, Central and South America, Canada, Australia, New Zealand, Africa, Europe, Asia and the Islands of the South Pacific.\
					Art has written and edited numerous books, including The School as a Home for the Mind, Techniques for Teaching Thinking (With Larry Lowery), and Cognitive Coaching (With Robert Garmston). He is editor of Developing Minds: a Resource Book for Teaching Thinking and coeditor of the Process as Content Trilogy, (With Rosemarie Liebmann), the four book developmental series, Habits of Mind, and Learning and Leading with Habits of Mind and Habits of Mind Across the Curriculum. His books have been translated into Arabic, Chinese, Italian, Spanish and Dutch.\
					Active in many professional organizations, Art served as president of the California Association for Supervision and Curriculum Development and was the National President of Association for Supervision and Curriculum Development, 1988 to 1989.";
	} else if (pid == 'bena_kallick') {
		content_html = "Bena Kallick, Ph.D is a private consultant providing services to school districts, state departments of education, professional organizations, and public agencies throughout the United States and abroad. Kallick received her doctorate in educational evaluation at Union Graduate School. Her areas of focus include group dynamics, creative and critical thinking, and alternative assessment strategies for the classroom. Some of her written work includes: Assessment in the Learning Organization (ASCD, 1998) , the Habits of Mind series (ASCD, 2000), Strategies for Self-Directed Learning (Corwin Press, 2004) , Learning and Leading with Habits of Mind (ASCD, 2008), Habits of Mind Across the Curriculum (ASCD, 2009) ( all co-authored with Arthur Costa), and Using Curriculum Mapping and Assessment to Improve Student Learning (Corwin Press, 2009, co-authored with Jeff Colosimo). Her works have been translated into Dutch, Chinese, Spanish, Italian, Hebrew, and Arabic.\
				  	Formerly a Teachers' Center director, Kallick also created a children's museum based on problem solving and invention. She was the coordinator of a high school alternative designed for at-risk students. She is co-founder of Performance Pathways, a company dedicated to providing easy to use software for curriculum mapping and assessment tracking and reporting, an integrated suite. She is presently a strategic advisor for SunGard Public Sector K-12 on behalf of Performance Plus, a transformational new products based on the work of Performance Pathways. She is known for her practical approach to making curriculum mapping and assessment a catalyst for improving teaching and learning.\
					Her work with Dr. Art Costa has led to the development of the Institute for Habits of Mind (www.instituteforhabitsofmind.com), an international institute that is dedicated to transforming schools into places where thinking and Habits of Mind are taught, practiced, valued and have become infused into the culture of the school and community. The Institute provides services and products to support bringing the Habits of Mind into the culture of schools and the communities they serve.\
					Kallick's teaching appointments have included Yale University School of Organization and Management, University of Massachusetts Center for Creative and Critical Thinking, and Union Graduate School. She was formerly on the Board of the Apple Foundation, the Board of Jobs for the Future and the Board for Learning Effects and Weston Woods Institute. She presently serves on the Board of Communities for Learning.";
	}

	return content_html;

}



//======================= Modal Window Popup =========================

/*
 * SimpleModal 1.4.1 - jQuery Plugin
 * http://www.ericmmartin.com/projects/simplemodal/
 * Copyright (c) 2010 Eric Martin (http://twitter.com/ericmmartin)
 * Dual licensed under the MIT and GPL licenses
 * Revision: $Id: jquery.simplemodal.js 261 2010-11-05 21:16:20Z emartin24 $
 */
(function(d){var k=d.browser.msie&&parseInt(d.browser.version)===6&&typeof window.XMLHttpRequest!=="object",m=d.browser.msie&&parseInt(d.browser.version)===7,l=null,f=[];d.modal=function(a,b){return d.modal.impl.init(a,b)};d.modal.close=function(){d.modal.impl.close()};d.modal.focus=function(a){d.modal.impl.focus(a)};d.modal.setContainerDimensions=function(){d.modal.impl.setContainerDimensions()};d.modal.setPosition=function(){d.modal.impl.setPosition()};d.modal.update=function(a,b){d.modal.impl.update(a,
b)};d.fn.modal=function(a){return d.modal.impl.init(this,a)};d.modal.defaults={appendTo:"body",focus:true,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:false,autoPosition:true,zIndex:1E3,close:true,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:true,overlayClose:false,position:null,
persist:false,modal:true,onOpen:null,onShow:null,onClose:null};d.modal.impl={d:{},init:function(a,b){var c=this;if(c.d.data)return false;l=d.browser.msie&&!d.boxModel;c.o=d.extend({},d.modal.defaults,b);c.zIndex=c.o.zIndex;c.occb=false;if(typeof a==="object"){a=a instanceof jQuery?a:d(a);c.d.placeholder=false;if(a.parent().parent().size()>0){a.before(d("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"}));c.d.placeholder=true;c.display=a.css("display");if(!c.o.persist)c.d.orig=
a.clone(true)}}else if(typeof a==="string"||typeof a==="number")a=d("<div></div>").html(a);else{alert("SimpleModal Error: Unsupported data type: "+typeof a);return c}c.create(a);c.open();d.isFunction(c.o.onShow)&&c.o.onShow.apply(c,[c.d]);return c},create:function(a){var b=this;f=b.getDimensions();if(b.o.modal&&k)b.d.iframe=d('<iframe src="javascript:false;"></iframe>').css(d.extend(b.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:f[0],width:f[1],zIndex:b.o.zIndex,top:0,left:0})).appendTo(b.o.appendTo);
b.d.overlay=d("<div></div>").attr("id",b.o.overlayId).addClass("simplemodal-overlay").css(d.extend(b.o.overlayCss,{display:"none",opacity:b.o.opacity/100,height:b.o.modal?f[0]:0,width:b.o.modal?f[1]:0,position:"fixed",left:0,top:0,zIndex:b.o.zIndex+1})).appendTo(b.o.appendTo);b.d.container=d("<div></div>").attr("id",b.o.containerId).addClass("simplemodal-container").css(d.extend(b.o.containerCss,{display:"none",position:"fixed",zIndex:b.o.zIndex+2})).append(b.o.close&&b.o.closeHTML?d(b.o.closeHTML).addClass(b.o.closeClass):
"").appendTo(b.o.appendTo);b.d.wrap=d("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(b.d.container);b.d.data=a.attr("id",a.attr("id")||b.o.dataId).addClass("simplemodal-data").css(d.extend(b.o.dataCss,{display:"none"})).appendTo("body");b.setContainerDimensions();b.d.data.appendTo(b.d.wrap);if(k||l)b.fixIE()},bindEvents:function(){var a=this;d("."+a.o.closeClass).bind("click.simplemodal",function(b){b.preventDefault();a.close()});
a.o.modal&&a.o.close&&a.o.overlayClose&&a.d.overlay.bind("click.simplemodal",function(b){b.preventDefault();a.close()});d(document).bind("keydown.simplemodal",function(b){if(a.o.modal&&b.keyCode===9)a.watchTab(b);else if(a.o.close&&a.o.escClose&&b.keyCode===27){b.preventDefault();a.close()}});d(window).bind("resize.simplemodal",function(){f=a.getDimensions();a.o.autoResize?a.setContainerDimensions():a.o.autoPosition&&a.setPosition();if(k||l)a.fixIE();else if(a.o.modal){a.d.iframe&&a.d.iframe.css({height:f[0],
width:f[1]});a.d.overlay.css({height:f[0],width:f[1]})}})},unbindEvents:function(){d("."+this.o.closeClass).unbind("click.simplemodal");d(document).unbind("keydown.simplemodal");d(window).unbind("resize.simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var a=this,b=a.o.position;d.each([a.d.iframe||null,!a.o.modal?null:a.d.overlay,a.d.container],function(c,h){if(h){var g=h[0].style;g.position="absolute";if(c<2){g.removeExpression("height");g.removeExpression("width");g.setExpression("height",
'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"');g.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"')}else{var e;if(b&&b.constructor===Array){c=b[0]?typeof b[0]==="number"?b[0].toString():b[0].replace(/px/,""):h.css("top").replace(/px/,"");c=c.indexOf("%")===-1?c+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':
parseInt(c.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';if(b[1]){e=typeof b[1]==="number"?b[1].toString():b[1].replace(/px/,"");e=e.indexOf("%")===-1?e+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':parseInt(e.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}}else{c=
'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';e='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}g.removeExpression("top");g.removeExpression("left");g.setExpression("top",
c);g.setExpression("left",e)}}})},focus:function(a){var b=this;a=a&&d.inArray(a,["first","last"])!==-1?a:"first";var c=d(":input:enabled:visible:"+a,b.d.wrap);setTimeout(function(){c.length>0?c.focus():b.d.wrap.focus()},10)},getDimensions:function(){var a=d(window);return[d.browser.opera&&d.browser.version>"9.5"&&d.fn.jquery<"1.3"||d.browser.opera&&d.browser.version<"9.5"&&d.fn.jquery>"1.2.6"?a[0].innerHeight:a.height(),a.width()]},getVal:function(a,b){return a?typeof a==="number"?a:a==="auto"?0:
a.indexOf("%")>0?parseInt(a.replace(/%/,""))/100*(b==="h"?f[0]:f[1]):parseInt(a.replace(/px/,"")):null},update:function(a,b){var c=this;if(!c.d.data)return false;c.d.origHeight=c.getVal(a,"h");c.d.origWidth=c.getVal(b,"w");c.d.data.hide();a&&c.d.container.css("height",a);b&&c.d.container.css("width",b);c.setContainerDimensions();c.d.data.show();c.o.focus&&c.focus();c.unbindEvents();c.bindEvents()},setContainerDimensions:function(){var a=this,b=k||m,c=a.d.origHeight?a.d.origHeight:d.browser.opera?
a.d.container.height():a.getVal(b?a.d.container[0].currentStyle.height:a.d.container.css("height"),"h");b=a.d.origWidth?a.d.origWidth:d.browser.opera?a.d.container.width():a.getVal(b?a.d.container[0].currentStyle.width:a.d.container.css("width"),"w");var h=a.d.data.outerHeight(true),g=a.d.data.outerWidth(true);a.d.origHeight=a.d.origHeight||c;a.d.origWidth=a.d.origWidth||b;var e=a.o.maxHeight?a.getVal(a.o.maxHeight,"h"):null,i=a.o.maxWidth?a.getVal(a.o.maxWidth,"w"):null;e=e&&e<f[0]?e:f[0];i=i&&i<
f[1]?i:f[1];var j=a.o.minHeight?a.getVal(a.o.minHeight,"h"):"auto";c=c?a.o.autoResize&&c>e?e:c<j?j:c:h?h>e?e:a.o.minHeight&&j!=="auto"&&h<j?j:h:j;e=a.o.minWidth?a.getVal(a.o.minWidth,"w"):"auto";b=b?a.o.autoResize&&b>i?i:b<e?e:b:g?g>i?i:a.o.minWidth&&e!=="auto"&&g<e?e:g:e;a.d.container.css({height:c,width:b});a.d.wrap.css({overflow:h>c||g>b?"auto":"visible"});a.o.autoPosition&&a.setPosition()},setPosition:function(){var a=this,b,c;b=f[0]/2-a.d.container.outerHeight(true)/2;c=f[1]/2-a.d.container.outerWidth(true)/
2;if(a.o.position&&Object.prototype.toString.call(a.o.position)==="[object Array]"){b=a.o.position[0]||b;c=a.o.position[1]||c}else{b=b;c=c}a.d.container.css({left:c,top:b})},watchTab:function(a){var b=this;if(d(a.target).parents(".simplemodal-container").length>0){b.inputs=d(":input:enabled:visible:first, :input:enabled:visible:last",b.d.data[0]);if(!a.shiftKey&&a.target===b.inputs[b.inputs.length-1]||a.shiftKey&&a.target===b.inputs[0]||b.inputs.length===0){a.preventDefault();b.focus(a.shiftKey?"last":
"first")}}else{a.preventDefault();b.focus()}},open:function(){var a=this;a.d.iframe&&a.d.iframe.show();if(d.isFunction(a.o.onOpen))a.o.onOpen.apply(a,[a.d]);else{a.d.overlay.show();a.d.container.show();a.d.data.show()}a.o.focus&&a.focus();a.bindEvents()},close:function(){var a=this;if(!a.d.data)return false;a.unbindEvents();if(d.isFunction(a.o.onClose)&&!a.occb){a.occb=true;a.o.onClose.apply(a,[a.d])}else{if(a.d.placeholder){var b=d("#simplemodal-placeholder");if(a.o.persist)b.replaceWith(a.d.data.removeClass("simplemodal-data").css("display",
a.display));else{a.d.data.hide().remove();b.replaceWith(a.d.orig)}}else a.d.data.hide().remove();a.d.container.hide().remove();a.d.overlay.hide();a.d.iframe&&a.d.iframe.hide().remove();setTimeout(function(){a.d.overlay.remove();a.d={}},10)}}}})(jQuery);

