(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
if(p==this){return false;}
var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};if(!$.browser.version)$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1];})(jQuery);;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' '))
.filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));})
.not('.'+c.bcClass)
.hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
.find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass)
.find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);(function(b){var a;b.fontAvailable=function(e){var d,c;if(!a){a=b(document.createElement("span")).css("visibility","hidden").css("position","absolute").css("top","-10000px").css("left","-10000px").html("abcdefghijklmnopqrstuvwxyz").appendTo(document.body)}d=a.css("font-family","__FAKEFONT__").width();c=a.height();a.css("font-family",e);return d!==a.width()||c!==a.height()}})(jQuery);var ISH={accordianList:function()
{var accordianItems=$('#accordian-list').find('li');accordianItems.each(function(i){accordianHeader=$(this).find(':header').detach().addClass('accordian-header');accordianHeader
.wrapInner('<a class="accordian-link" href="#accordian-'+$(this).index()+'" />');$(this).find('.accordian-wrap')
.attr('id','accordian-'+$(this).index()).slideToggle()
.before(accordianHeader);});$(accordianItems).find('a.accordian-link').live('click',function(e){e.preventDefault();var accordTarget=$(this).attr('href');if($(this).closest('li').hasClass('expanded'))
{$(accordTarget).slideUp('fast',function(){$(this).closest('li').removeClass('expanded')})}
else
{accordianItems.siblings('expanded')
.find('.accordian-wrap')
.slideUp('fast',function(){$(this).closest('li').removeClass('expanded');});$(accordTarget)
.slideToggle('fast',function(){$(this).closest('li').toggleClass('expanded');})}});},homeImages:function()
{$('#home-photos').find('img').css({'visibility':'visible'});$('#nav-photos').find('img').hide().css({'visibility':'visible'});$('#home-photos').cycle();$('#home-news-list').cycle({fx:'fade',timeout:5000,cleartypeNoBg:true});$('#site ul.nav').superfish({delay:1000,autoArrows:false,dropShadows:false,animation:{opacity:'show'},speed:500,onShow:function(){$('#home-welcome,#home-news').stop(true,true).hide();$('#home-photos').stop(true,true).hide().cycle('pause');$('#nav-photos')
.find('img')
.eq($(this).parent().index())
.animate({opacity:'show',zindex:100},{queue:false,duration:500,complete:function(){$('#nav-photos').find('img').not($(this)).animate({opacity:'hide',zindex:1},{duration:500});}});},onHide:function(){$('#home-photos').animate({opacity:'show'},{duration:1000,complete:function(){$('#nav-photos img').animate({opacity:'hide'},{duration:500})}}).cycle('resume');$('#home-welcome,#home-news').delay(1000).animate({opacity:'show'},{duration:500});}});},loadFonts:function(esrc)
{var e=document.createElement('script');e.src=esrc;e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e);},slideshows:function()
{var carousel_list=[];$('#viewer-detail').find('img').css({'visibility':'visible'});$('#viewer-detail')
.after('<ul id="image-nav"><li id="image-prev"><a href="#prev" class="ir">Previous<span></span></a></li><li id="image-next"><a href="#next" class="ir">next<span></span></a></li></ul>')
.after('<ul id="playback-nav"><li id="playback-play"><a href="#play" class="ir">Play<span></span></a></li><li id="playback-pause"><a href="#pause" class="ir">Pause<span></span></a></li></ul>')
.after('<ul id="viewer-nav"/>').cycle({speed:2000,pager:"#viewer-nav",pagerAnchorBuilder:function(idx,slide){var slideSrc=$(slide).find('img').attr('src');carousel_list.push('<li><a href="#"><img src="'+slideSrc+'" height="45" /></a></li>');return'<li><a href="#"><img src="'+slideSrc+'" height="45" /></a></li>';},prev:"#image-prev a",next:"#image-next a",prevNextClick:function(isNext,zeroBasedSlideIndex,slideElement){if(isNext){}
else{};},after:function(currSlideElement,nextSlideElement,options,forwardFlag){currSlideIndex=$(this).index();if(currSlideIndex!=0)
{$("#viewer-nav").jcarousel('next');}
else
{}}});$('#playback-pause').click(function(e){e.preventDefault();$("#viewer-detail").cycle('pause');});$('#playback-play').click(function(e){e.preventDefault();$("#viewer-detail").cycle('resume');});function carousel_itemLoadCallback(carousel,state)
{for(var i=carousel.first;i<=carousel.last;i++){if(carousel.has(i)){continue;}
if(i>carousel_list.length){break;}
carousel.add(i,carousel_list[i]);}}
$('#viewer-nav').jcarousel({size:carousel_list.length,itemLoadCallback:{onBeforeAnimation:carousel_itemLoadCallback},wrap:"both",scroll:1});},interiorNav:function()
{$('#site ul.nav').superfish({delay:300,pathLevels:1,autoArrows:false,dropShadows:false,onShow:function(){var parentLi=$(this).parent().index();if(parentLi==0)
{$("#header").find('#branding-logo').addClass('logo_hide');}},onHide:function(){$("#header").find('#branding-logo').removeClass('logo_hide');}});$("#page li a").each(function(i){var elHeight=$(this).height();if(elHeight>22)
{$(this).addClass('large')}
else
{$(this).addClass('small');}});},calloutHeight:function()
{var mainHeight=$("#main").height();var myHeight=$('#callout-wrap').height()
var myOffset=$("#callout-content").parent().parent().position();var addPadding=mainHeight-(myOffset.top+myHeight)+25;document.getElementById('callout-wrap').style.paddingBottom="20px";},navDropDown:function()
{var dropDownNav=$('#nav-dropdown');var dropDownNavItems=$('#nav-dropdown').find('li');if(dropDownNavItems.hasClass('here')||dropDownNavItems.hasClass('parent-here'))
{}
else
{dropDownNavItems.eq(0).addClass('here');}
dropDownNav.hover(function(){dropDownNav.addClass('sfHover');},function(){dropDownNav.removeClass('sfHover');});}};