var ycdwi=function(){var g,e=null,j=null,k=null,h=0,l=false,f=null,n=function(a){var b,d=$(this),c=d.data("slideIndex"),m=$(g[h]);if(isNaN(c)||c===h||l)return false;else{b=g[c];l=true}m.data("nextSlide",b).fadeOut(400,function(){var i=$(this);i.addClass("hide").css("display","block");$(i.data("nextSlide")).css("display","none").removeClass("hide").fadeIn(400,function(){l=false}).find("p.storyButton").css("display","none").fadeIn(400).end()}).find("p.storyButton").fadeOut(400,function(){$(this).css("display",
"block")}).end();$("ul#slideShowController").fadeOut(400,function(){$(this).fadeIn(400)});k.find("img").attr("src","/images/homepage/controller.gif").end();d.find("img").attr("src","/images/homepage/controller-active.gif").end().blur();h=c;if(a&&a.preventDefault){if(e){clearTimeout(e);e=null}a.preventDefault()}return false},o=function(){var a,b=h+1>=g.length?0:h+1;if(e){clearTimeout(e);e=null}$("ul#slideShowController a").each(function(){if($(this).data("slideIndex")===b&&typeof a==="undefined")a=
this});if(typeof a!=="undefined"){n.call(a);e=setTimeout(o,7E3)}},p=function(){var a=$(this);if(a.data("oTarget")){$(a.data("oTarget")).removeClass("hide");a.addClass("activeLink").blur()}},q=function(){var a=$(this);if(a.data("oTarget")){$(a.data("oTarget")).addClass("hide");a.removeClass("activeLink").blur()}},r=function(){var a=this.innerHTML.indexOf("View"),b,d="";if(a!==-1)b="Hide";else if((a=this.innerHTML.indexOf("Hide"))!==-1)b="View";else return;if(a>0)d+=this.innerHTML.slice(0,a);d+=b;if(a+
4<this.innerHTML.length)d+=this.innerHTML.slice(a+4);this.innerHTML=d},u=function(){var a=this,b=null;f||(f=$('<iframe id="menuIFrame" />').data("bDomOff",true).attr("src",'javascript:"";'));b=setTimeout(function(){var d=$(a).children("ul"),c=d.position(),m=c&&typeof c.left==="number"&&c.left>=0?c.left:-9999;c=c&&typeof c.top==="number"&&c.top>=0?c.top:-9999;var i=d.outerHeight(),s=d.outerWidth(),t=d.css("z-index")-1;if(b){clearTimeout(b);b=null}f.insertBefore(d).css({"background-color":"#FFFFFF",
height:i+"px",left:m+"px",position:"absolute",top:c+"px",width:s+"px","z-index":t}).data("bDomOff",false)},5)},v=function(){f&&!f.data("bDomOff")&&f.detach().data("bDomOff",true)};return function(){var a=$(document);a.find("a[rel=external],a[rel=pdf],a[rel=excel],a[rel=ppt],map#Map area").click(function(){window.open(this.href);return false}).end().find(".detailsBox,.answerBox").each(function(){var b="View "+this.className.replace(/(details|answer)Box/,function(d,c){return c.charAt(0).toUpperCase()+
c.slice(1)});$('<p class="detailLink"><a href="#">'+b+"</a></p>").find("a").toggle(p,q).data("oTarget",this).click(r).end().insertBefore(this)}).addClass("hide").end().find(".blinds").each(function(){var b=$(this),d=b.children().not(":first-child").wrapAll("<div />").addClass("hide");b.children().first().wrapInner('<a href="#" />').find("a").toggle(p,q).data("oTarget",d).end()}).end().find("ul#slideShow").each(function(){var b,d,c;j=$(this);g=j.children("li");k=$('<ul id="slideShowController" />').insertAfter(j);
b=0;for(d=g.length;b<d;b+=1){c=b>0?"/images/homepage/controller.gif":"/images/homepage/controller-active.gif";$('<li><a href="#"><img src="'+c+'" alt="Image #'+(b+1)+' Slide" height="25" width="25" /></a></li>').find("a").data("slideIndex",b).click(n).end().appendTo(k)}$(window).bind("load",function(){e=setTimeout(o,7E3)})}).end().find("input#sp-q").bind("focus",function(){this.value=this.value==="Enter Search Term"?"":this.value}).bind("blur",function(){this.value=this.value.replace(/^\s+|\s+$/g,
"").length>0?this.value:"Enter Search Term"}).val("Enter Search Term").end();typeof document.body.style.maxHeight==="undefined"&&a.find("ul#siteNav").children("li").hover(function(){$(this).addClass("navHover")},function(){$(this).removeClass("navHover")}).end();if(document.all&&!window.opera&&a.find("object,embed").length>0){a.find("ul#siteNav").children("li").hover(u,v).end();f=$('<iframe id="menuIFrame" />').data("bDomOff",true).attr("src",'javascript:"";')}typeof PHEAA!=="undefined"&&typeof PHEAA.Urchin!==
"undefined"&&PHEAA.Urchin.callUrchin(window.location.pathname+window.location.search+window.location.hash,"Page_Load")}}();$("document").ready(ycdwi);
