(function(g){var j="LWJQ 1.0.3 Copyright 2009 Darrin Yeager http://www.dyeager.org/ Licensed under BSD License";g.fn.LWJQ_tip=function(o){var o=g.extend({},g.fn.LWJQ_tip.defaults,o);return this.each(function(){g(this).css("cursor","help");g(this).hover(function(p){var q=new c();k(q,p.pageX,g(this).offset().top+this.offsetHeight,o.tip_width);e(g(this).attr("href"),q,"Information",o.defaultCSS,false)},function(){g("#LWJQ_tip").hide().remove()});g(this).click(function(p){p.preventDefault()})})};g.LWJQ_popupAJAX=function(o){var p=g.extend({},popup_defaults,o);var q=new c();if(typeof(p.url)=="undefined"){throw"URL must be given for AJAX popup"}k(q,p.x,p.y,p.width);e(p.url,q,p.title,p.defaultCSS,true)};g.LWJQ_popupText=function(o){var p=g.extend({},popup_defaults,o);var q=new c();k(q,p.x,p.y,p.width);i(p.text,q,p.title,p.defaultCSS,true)};function m(o){if(o.keyCode==27){g("#LWJQ_tip").hide().remove();g(document).unbind("keydown",m)}}function b(){g("#LWJQ_tip_title").after("

Close (or ESC)

");g("#LWJQ_tip_close_a").click(function(o){o.preventDefault();g("#LWJQ_tip").hide().remove();g(document).unbind("keydown",m)})}function h(){g("#LWJQ_tip").css({border:"2px solid black",backgroundColor:"#EEE"});g("#LWJQ_tip_close").css({backgroundColor:"#CCC",margin:0,padding:"3px",textAlign:"right",fontSize:"80%",fontFamily:"verdana,arial,sans-serif"});g("#LWJQ_tip_title").css({backgroundColor:"#555",color:"#FFF",padding:"2px",textAlign:"center",fontWeight:"bold"});g("#LWJQ_tip_text").css({padding:"4px"});g("#LWJQ_tip_loader").append("

Loading...

")}function e(o,s,p,q,r){g("#LWJQ_tip").remove();g("body").append("
"+p+"
");g("#LWJQ_tip").css({left:s.x+"px",top:s.y+"px",width:s.width+"px",position:"absolute",zIndex:100});if(r){b()}if(q){h()}g("#LWJQ_tip").show();g(document).bind("keydown",m);g("#LWJQ_tip_text").load(o)}function i(r,s,o,p,q){g("#LWJQ_tip").remove();g("body").append("
"+o+"
"+r+"
");g("#LWJQ_tip_text").html(r);g("#LWJQ_tip").css({left:s.x+"px",top:s.y+"px",width:s.width+"px",position:"absolute",zIndex:100});if(q){b()}if(p){h()}g("#LWJQ_tip").show();g(document).bind("keydown",m)}g.fn.LWJQ_tip.defaults={tip_width:550,defaultCSS:false};popup_defaults={x:10,y:10,width:g.fn.LWJQ_tip.defaults.tip_width,title:"Information",defaultCSS:g.fn.LWJQ_tip.defaults.defaultCSS};g.fn.LWJQ_accordion=function(o){var o=g.extend({},g.fn.LWJQ_accordion.defaults,o);return this.each(function(){g(this).children(o.header+" + div").hide();g(this).children(o.header).css("cursor","pointer");if(o.trigger==="hover"){g(this).children(o.header).hover(function(p){p.preventDefault();d(g(this),o.mode)})}else{g(this).children(o.header).click(function(p){p.preventDefault();d(g(this),o.mode)})}})};function d(r,p){if(p==="onetabopen"){var o=r.next();var q=o.siblings("div:visible");if(q.length){q.slideUp("normal",function(){o.slideToggle()})}else{o.slideToggle()}}else{r.next().slideToggle()}}g.fn.LWJQ_accordion.defaults={mode:"onetabopen",trigger:"click",header:"h3"};g.fn.LWJQ_tabs=function(o){var o=g.extend({},g.fn.LWJQ_tabs.defaults,o);return this.each(function(){var p=g(this);var q=g(this).find(":first-child");p.children("div").hide();p.children("ul + div").show();q.find("li").addClass(o.tabInactiveClassName);q.find("li:first-child").removeClass(o.tabInactiveClassName).addClass(o.tabActiveClassName);q.find("li").click(function(s){var r=g(this).children("a").attr("href");q.find("li").removeClass(o.tabActiveClassName).addClass(o.tabInactiveClassName);g(this).removeClass(o.tabInactiveClassName).addClass(o.tabActiveClassName);p.children("div:visible").hide();g(r).fadeIn();s.preventDefault()});q.find("li").hover(function(r){g(this).toggleClass(o.liHoverClassName)},function(r){g(this).toggleClass(o.liHoverClassName)})})};g.fn.LWJQ_tabs.defaults={liHoverClassName:"hover",tabActiveClassName:"tab-active",tabInactiveClassName:"tab-inactive"};g.fn.LWJQ_pullquote=function(o){var o=g.extend({},g.fn.LWJQ_pullquote.defaults,o);return this.each(function(){g("
").addClass(o.className).html(g("

").html(g(this).text())).prependTo(g(this).parent())})};g.fn.LWJQ_pullquote.defaults={className:"pullquote"};g.fn.LWJQ_endnotes=function(o){var o=g.extend({},g.fn.LWJQ_endnotes.defaults,o);var q="

{0}{1}

";var s="{0}";var r="noted";g(o.target).html("");var p=1;return this.each(function(){var t=(o.onCheckLink.call(this));if(g(this).hasClass(r)){t=false}g(this).addClass(r);if(t&&g(this).attr("href")){g(this).after(f(s,[p]));g(o.target).append(f(q,[p,n(g(this).attr("href"))]));p++}if(t&&g(this).attr("cite")){if(this.tagName.toLowerCase()==="blockquote"){g(this).find("q[cite],a[href]").each(function(){var v=(o.onCheckLink.call(this));if(g(this).hasClass(r)){v=false}g(this).addClass(r);if(v){g(this).after(f(s,[p]));var u=g(this).attr("href")?g(this).attr("href"):g(this).attr("cite");g(o.target).append(f(q,[p,n(u)]));p++}});if(g(this).find("p:last-child").length==1){g(this).find("p:last-child").append(f(s,[p]))}else{if(g(this).find("ul:last-child").length==1){g(this).find("ul:last-child li:last-child").append(f(s,[p]))}else{if(g(this).find("ol:last-child").length==1){g(this).find("ol:last-child li:last-child").append(f(s,[p]))}else{g(this).append(f(s,[p]))}}}}else{g(this).after(f(s,[p]))}g(o.target).append(f(q,[p,n(g(this).attr("cite"))]));p++}if(g("#LWJQ_endnoteheader").length==0){g(o.target).prepend("

"+o.title+"

")}})};g.fn.LWJQ_endnotes.defaults={onCheckLink:function(){return true},target:"#LWJQ_endnotes",title:"EndNotes"};function f(r,p){var o=p.length;for(var q=0;q(o-r-p)){s.x=r-s.width-10}else{s.x=r+10}if(s.x<0){s.x=3}if((s.x+s.width)>o){s.width=o-s.x-10}if((s.width/p)<0.7){a("** Fixing small pos.width Requested: "+p+" Calculated: "+s.width);s.width=(p>(o-30))?o*0.9:p;s.x=o*0.04;a("** Fixed - pos.width now: "+s.width)}s.y=q+3}function a(o){if(window.console&&window.console.log){window.console.log("LWJQ: "+o)}}})(jQuery);