/* jQuery plugins (minimised) */

/* jQuery ifixpng plugin
 * Version 3.1.2  (2008/09/01)
 * http://plugins.jquery.com/project/iFixPng2
 */
(function($){$.ifixpng=function(customPixel){$.ifixpng.pixel=customPixel;};$.ifixpng.regexp={bg:/^url\(["']?(.*\.png([?].*)?)["']?\)$/i,img:/.*\.png([?].*)?$/i},$.ifixpng.getPixel=function(){return $.ifixpng.pixel||"images/pixel.gif";};var hack={base:$("base").attr("href"),ltie7:$.browser.msie&&$.browser.version<7,filter:function(src){return"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+src+"')";}};$.fn.ifixpng=hack.ltie7?function(){function fixImage(image,source,width,height,hidden){image.css({filter:hack.filter(source),width:width,height:height}).attr({src:$.ifixpng.getPixel()}).positionFix();}return this.each(function(){var $$=$(this);if($$.is("img")||$$.is("input")){var source,img;if(this.src&&this.src.match($.ifixpng.regexp.img)){source=(hack.base&&this.src.substring(0,1)!="/"&&this.src.indexOf(hack.base)===-1)?hack.base+this.src:this.src;if(!this.width||!this.height){$(new Image()).one("load",function(){fixImage($$,source,this.width,this.height);$(this).remove();}).attr("src",source);}else{fixImage($$,source,this.width,this.height);}}}else{if(this.style){var imageSrc=$$.css("backgroundImage");if(imageSrc&&imageSrc.match($.ifixpng.regexp.bg)&&this.currentStyle.backgroundRepeat=="no-repeat"){imageSrc=RegExp.$1;var x=this.currentStyle.backgroundPositionX||0,y=this.currentStyle.backgroundPositionY||0;if(x||y){var css={},img;if(typeof x!="undefined"){if(x=="left"){css.left=0;}else{if(x=="right"){css.right=$$.width()%2===1?-1:0;}else{css.left=x;}}}if(typeof y!="undefined"){if(y=="bottom"){css.bottom=$$.height()%2===1?-1:0;}else{if(y=="top"){css.top=0;}else{css.top=y;}}}img=new Image();$(img).one("load",function(){var x,y,expr={},prop;if(/center|%/.test(css.top)){expr.top="(this.parentNode.offsetHeight - this.offsetHeight) * "+(css.top=="center"?0.5:(parseInt(css.top)/100));delete css.top;}if(/center|%/.test(css.left)){expr.left="(this.parentNode.offsetWidth - this.offsetWidth) * "+(css.left=="center"?0.5:(parseInt(css.left)/100));delete css.left;}$$.positionFix().css({backgroundImage:"none"}).prepend($("<div></div>").css(css).css({width:this.width,height:this.height,position:"absolute",filter:hack.filter(imageSrc)}));if(expr.top||expr.left){var elem=$$.children(":first")[0];for(prop in expr){elem.style.setExpression(prop,expr[prop],"JavaScript");}}$(this).remove();});img.src=imageSrc;}else{$$.css({backgroundImage:"none",filter:hack.filter(imageSrc)});}}}}});}:function(){return this;};$.fn.positionFix=function(){return this.each(function(){var $$=$(this);if($$.css("position")!="absolute"){$$.css({position:"relative"});}});};})(jQuery);
//jScrollPane v1.2.3...
//(function(A){A.jScrollPane={active:[]};A.fn.jScrollPane=function(C){C=A.extend({},A.fn.jScrollPane.defaults,C);var B=function(){return false};return this.each(function(){var O=A(this);O.css("overflow","hidden");var X=this;if(A(this).parent().is(".jScrollPaneContainer")){var Ac=C.maintainPosition?O.position().top:0;var L=A(this).parent();var d=L.innerWidth();var Ad=L.outerHeight();var M=Ad;A(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown",L).remove();O.css({top:0})}else{var Ac=0;this.originalPadding=O.css("paddingTop")+" "+O.css("paddingRight")+" "+O.css("paddingBottom")+" "+O.css("paddingLeft");this.originalSidePaddingTotal=(parseInt(O.css("paddingLeft"))||0)+(parseInt(O.css("paddingRight"))||0);var d=O.innerWidth();var Ad=O.innerHeight();var M=Ad;O.wrap(A("<div></div>").attr({className:"jScrollPaneContainer"}).css({height:Ad+"px",width:d+"px"}));A(document).bind("emchange",function(Ae,Af,p){O.jScrollPane(C)})}if(C.reinitialiseOnImageLoad){var N=A.data(X,"jScrollPaneImagesToLoad")||A("img",O);var G=[];if(N.length){N.each(function(p,Ae){A(this).bind("load",function(){if(A.inArray(p,G)==-1){G.push(Ae);N=A.grep(N,function(Ag,Af){return Ag!=Ae});A.data(X,"jScrollPaneImagesToLoad",N);C.reinitialiseOnImageLoad=false;O.jScrollPane(C)}}).each(function(Af,Ag){if(this.complete||this.complete===undefined){this.src=this.src}})})}}var o=this.originalSidePaddingTotal;var l={height:"auto",width:d-C.scrollbarWidth-C.scrollbarMargin-o+"px"};if(C.scrollbarOnLeft){l.paddingLeft=C.scrollbarMargin+C.scrollbarWidth+"px"}else{l.paddingRight=C.scrollbarMargin+"px"}O.css(l);var m=O.outerHeight();var i=Ad/m;if(i<0.99){var H=O.parent();H.append(A("<div></div>").attr({className:"jScrollPaneTrack"}).css({width:C.scrollbarWidth+"px"}).append(A("<div></div>").attr({className:"jScrollPaneDrag"}).css({width:C.scrollbarWidth+"px"}).append(A("<div></div>").attr({className:"jScrollPaneDragTop"}).css({width:C.scrollbarWidth+"px"}),A("<div></div>").attr({className:"jScrollPaneDragBottom"}).css({width:C.scrollbarWidth+"px"}))));var z=A(">.jScrollPaneTrack",H);var P=A(">.jScrollPaneTrack .jScrollPaneDrag",H);if(C.showArrows){var g;var Ab;var S;var r;var j=function(){if(r>4||r%4==0){y(u+Ab*b)}r++};var K=function(p){A("html").unbind("mouseup",K);g.removeClass("jScrollActiveArrowButton");clearInterval(S)};var Z=function(){A("html").bind("mouseup",K);g.addClass("jScrollActiveArrowButton");r=0;j();S=setInterval(j,100)};H.append(A("<a></a>").attr({href:"javascript:;",className:"jScrollArrowUp"}).css({width:C.scrollbarWidth+"px"}).html("Scroll up").bind("mousedown",function(){g=A(this);Ab=-1;Z();this.blur();return false}).bind("click",B),A("<a></a>").attr({href:"javascript:;",className:"jScrollArrowDown"}).css({width:C.scrollbarWidth+"px"}).html("Scroll down").bind("mousedown",function(){g=A(this);Ab=1;Z();this.blur();return false}).bind("click",B));var Q=A(">.jScrollArrowUp",H);var J=A(">.jScrollArrowDown",H);if(C.arrowSize){M=Ad-C.arrowSize-C.arrowSize;z.css({height:M+"px",top:C.arrowSize+"px"})}else{var s=Q.height();C.arrowSize=s;M=Ad-s-J.height();z.css({height:M+"px",top:s+"px"})}}var w=A(this).css({position:"absolute",overflow:"visible"});var D;var Y;var b;var u=0;var V=i*Ad/2;var a=function(Ae,Ag){var Af=Ag=="X"?"Left":"Top";return Ae["page"+Ag]||(Ae["client"+Ag]+(document.documentElement["scroll"+Af]||document.body["scroll"+Af]))||0};var f=function(){return false};var v=function(){n();D=P.offset(false);D.top-=u;Y=M-P[0].offsetHeight;b=2*C.wheelSpeed*Y/m};var E=function(p){v();V=a(p,"Y")-u-D.top;A("html").bind("mouseup",T).bind("mousemove",h);if(A.browser.msie){A("html").bind("dragstart",f).bind("selectstart",f)}return false};var T=function(){A("html").unbind("mouseup",T).unbind("mousemove",h);V=i*Ad/2;if(A.browser.msie){A("html").unbind("dragstart",f).unbind("selectstart",f)}};var y=function(Ae){Ae=Ae<0?0:(Ae>Y?Y:Ae);u=Ae;P.css({top:Ae+"px"});var Af=Ae/Y;w.css({top:((Ad-m)*Af)+"px"});O.trigger("scroll");if(C.showArrows){Q[Ae==0?"addClass":"removeClass"]("disabled");J[Ae==Y?"addClass":"removeClass"]("disabled")}};var h=function(p){y(a(p,"Y")-D.top-V)};var q=Math.max(Math.min(i*(Ad-C.arrowSize*2),C.dragMaxHeight),C.dragMinHeight);P.css({height:q+"px"}).bind("mousedown",E);var k;var R;var I;var t=function(){if(R>8||R%4==0){y((u-((u-I)/2)))}R++};var Aa=function(){clearInterval(k);A("html").unbind("mouseup",Aa).unbind("mousemove",e)};var e=function(p){I=a(p,"Y")-D.top-V};var U=function(p){v();e(p);R=0;A("html").bind("mouseup",Aa).bind("mousemove",e);k=setInterval(t,100);t()};z.bind("mousedown",U);H.bind("mousewheel",function(Ae,Ag){v();n();var Af=u;y(u-Ag*b);var p=Af!=u;return !p});var F;var W;function c(){var p=(F-u)/C.animateStep;if(p>1||p<-1){y(u+p)}else{y(F);n()}}var n=function(){if(W){clearInterval(W);delete F}};var x=function(Af,p){if(typeof Af=="string"){$e=A(Af,O);if(!$e.length){return}Af=$e.offset().top-O.offset().top}H.scrollTop(0);n();var Ae=-Af/(Ad-m)*Y;if(p||!C.animateTo){y(Ae)}else{F=Ae;W=setInterval(c,C.animateInterval)}};O[0].scrollTo=x;O[0].scrollBy=function(Ae){var p=-parseInt(w.css("top"))||0;x(p+Ae)};v();x(-Ac,true);A("*",this).bind("focus",function(Ah){var Ag=A(this);var Aj=0;while(Ag[0]!=O[0]){Aj+=Ag.position().top;Ag=Ag.offsetParent()}var p=-parseInt(w.css("top"))||0;var Ai=p+Ad;var Af=Aj>p&&Aj<Ai;if(!Af){var Ae=Aj-C.scrollbarMargin;if(Aj>p){Ae+=A(this).height()+15+C.scrollbarMargin-Ad}x(Ae)}});if(location.hash){x(location.hash)}A(document).bind("click",function(Ae){$target=A(Ae.target);if($target.is("a")){var p=$target.attr("href");if(p.substr(0,1)=="#"){x(p)}}});A.jScrollPane.active.push(O[0])}else{O.css({height:Ad+"px",width:d-this.originalSidePaddingTotal+"px",padding:this.originalPadding});O.parent().unbind("mousewheel")}})};A.fn.jScrollPane.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false};A(window).bind("unload",function(){var C=A.jScrollPane.active;for(var B=0;B<C.length;B++){C[B].scrollTo=C[B].scrollBy=null}})})(jQuery);
//carousel...
//(function($){$.fn.carousel=function(params){var params=$.extend({direction:"horizontal",loop:false,dispItems:1,pagination:false,paginationPosition:"inside",nextBtn:"<span>Next</span>",prevBtn:"<span>Previous</span>",btnsPosition:"inside",nextBtnInsert:"appendTo",prevBtnInsert:"prependTo",autoSlide:false,autoSlideInterval:3000,delayAutoSlide:3000,combinedClasses:false,effect:"slide",slideEasing:"swing",animSpeed:"normal",equalWidths:"true",callback:function(){}},params);if(params.btnsPosition=="outside"){params.prevBtnInsert="insertBefore";params.nextBtnInsert="insertAfter";}return this.each(function(){var env={$elts:{},params:params,launchOnLoad:[]};env.$elts.carousel=$(this).addClass("js");env.$elts.content=$(this).children().css({position:"absolute",top:0});env.$elts.wrap=env.$elts.content.wrap('<div class="carousel-wrap"></div>').parent().css({overflow:"hidden",position:"relative"});env.steps={first:0,count:env.$elts.content.find(">*").length};env.steps.last=env.steps.count-1;env.$elts.prevBtn=$(params.prevBtn)[params.prevBtnInsert](env.$elts.carousel).addClass("carousel-control previous carousel-previous").data("firstStep",-(env.params.dispItems));env.$elts.nextBtn=$(params.nextBtn)[params.nextBtnInsert](env.$elts.carousel).addClass("carousel-control next carousel-next").data("firstStep",env.params.dispItems);initButtonsEvents(env,function(e){slide(e,this,env);});if(env.params.pagination){initPagination(env);}$(function(){var $firstItem=env.$elts.content.find(">*:eq(0)");env.itemWidth=$firstItem.outerWidth();if(params.direction=="vertical"){env.contentWidth=env.itemWidth;}else{if(params.equalWidths){env.contentWidth=env.itemWidth*env.steps.count;}else{env.contentWidth=(function(){var totalWidth=0;env.$elts.content.find(">*").each(function(){totalWidth+=$(this).outerWidth();});return totalWidth;})();}}env.$elts.content.width(env.contentWidth);env.itemHeight=$firstItem.outerHeight();if(params.direction=="vertical"){env.$elts.content.css({height:env.itemHeight*env.steps.count+"px"});env.$elts.content.parent().css({height:env.itemHeight*env.params.dispItems+"px"});}else{env.$elts.content.parent().css({height:env.itemHeight});}updateButtonsState(env);$.each(env.launchOnLoad,function(i,fn){fn();});if(env.params.autoSlide){window.setTimeout(function(){env.autoSlideInterval=window.setInterval(function(){env.$elts.nextBtn.click();},env.params.autoSlideInterval);},env.params.delayAutoSlide);}});});};function slide(e,btn,env){var $btn=$(btn);var newFirstStep=$btn.data("firstStep");env.params.callback(newFirstStep);switch(env.params.effect){case"no":if(env.params.direction=="vertical"){env.$elts.content.css("top",-(env.itemHeight*newFirstStep)+"px");}else{env.$elts.content.css("left",-(env.itemWidth*newFirstStep)+"px");}break;case"fade":if(env.params.direction=="vertical"){env.$elts.content.hide().css("top",-(env.itemHeight*newFirstStep)+"px").fadeIn(env.params.animSpeed);}else{env.$elts.content.hide().css("left",-(env.itemWidth*newFirstStep)+"px").fadeIn(env.params.animSpeed);}break;default:if(env.params.direction=="vertical"){env.$elts.content.stop().animate({top:-(env.itemHeight*newFirstStep)+"px"},env.params.animSpeed,env.params.slideEasing);}else{env.$elts.content.stop().animate({left:-(env.itemWidth*newFirstStep)+"px"},env.params.animSpeed,env.params.slideEasing);}}env.steps.first=newFirstStep;updateButtonsState(env);if(!!e.clientX&&env.autoSlideInterval){window.clearInterval(env.autoSlideInterval);}}function updateButtonsState(env){env.$elts.prevBtn.data("firstStep",env.steps.first-env.params.dispItems);env.$elts.nextBtn.data("firstStep",env.steps.first+env.params.dispItems);if(env.$elts.prevBtn.data("firstStep")<0){if(env.params.loop&&env.steps.count>env.params.dispItems){env.$elts.prevBtn.data("firstStep",env.steps.count-env.params.dispItems);env.$elts.prevBtn.trigger("enable");}else{env.$elts.prevBtn.trigger("disable");}}else{env.$elts.prevBtn.trigger("enable");}if(env.$elts.nextBtn.data("firstStep")>=env.steps.count){if(env.params.loop&&env.steps.count>env.params.dispItems){env.$elts.nextBtn.data("firstStep",0);env.$elts.nextBtn.trigger("enable");}else{env.$elts.nextBtn.trigger("disable");}}else{env.$elts.nextBtn.trigger("enable");}if(env.params.pagination){env.$elts.paginationBtns.removeClass("active").filter(function(){return($(this).data("firstStep")==env.steps.first);}).addClass("active");}}function initButtonsEvents(env,slideEvent){env.$elts.nextBtn.add(env.$elts.prevBtn).bind("enable",function(){var $this=$(this).bind("click",slideEvent).removeClass("disabled");if(env.params.combinedClasses){$this.removeClass("next-disabled previous-disabled");}}).bind("disable",function(){var $this=$(this).unbind("click").addClass("disabled");if(env.params.combinedClasses){if($this.is(".next")){$this.addClass("next-disabled");}else{if($this.is(".previous")){$this.addClass("previous-disabled");}}}});env.$elts.nextBtn.add(env.$elts.prevBtn).hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");});}function initPagination(env){env.$elts.pagination=$('<div class="center-wrap"><div class="carousel-pagination"><p></p></div></div>')[((env.params.paginationPosition=="outside")?"insertAfter":"appendTo")](env.$elts.carousel).find("p");env.$elts.paginationBtns=$([]);env.$elts.content.find("li").each(function(i){if(i%env.params.dispItems==0){env.$elts.paginationBtns=env.$elts.paginationBtns.add($('<a role="button"><span>'+(env.$elts.paginationBtns.length+1)+"</span></a>").data("firstStep",i));}});env.$elts.paginationBtns.appendTo(env.$elts.pagination);env.$elts.paginationBtns.slice(0,1).addClass("active");env.launchOnLoad.push(function(){env.$elts.paginationBtns.click(function(e){slide(e,this,env);this.blur();return false;});});}})(jQuery);
//superfish v1.4.8...
(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(){var 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);
//hoverIntent...
(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);
//cycle v2.34...
//(function($){var ver='2.34';if($.support==undefined){$.support={opacity:!($.browser.msie&&/MSIE 6.0/.test(navigator.userAgent))}}function log(){if(window.console&&window.console.log)window.console.log('[cycle] '+Array.prototype.join.call(arguments,''))};$.fn.cycle=function(options){if(this.length==0){log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this}var opt2=arguments[1];return this.each(function(){if(this.cycleStop==undefined)this.cycleStop=0;if(options===undefined||options===null)options={};if(options.constructor==String){switch(options){case'stop':this.cycleStop++;if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=0;$(this).removeData('cycle.opts');return;case'pause':this.cyclePause=1;return;case'resume':this.cyclePause=0;if(opt2===true){options=$(this).data('cycle.opts');if(!options){log('options not found, can not resume');return}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}go(options.elements,options,1,1)}return;default:options={fx:options}}}else if(options.constructor==Number){var num=options;options=$(this).data('cycle.opts');if(!options){log('options not found, can not advance slide');return}if(num<0||num>=options.elements.length){log('invalid slide index: '+num);return}options.nextSlide=num;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}go(options.elements,options,1,num>=options.currSlide);return}if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=0;this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log('terminating; too few slides: '+els.length);return}var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop)opts.countdown=opts.autostopCount||els.length;$cont.data('cycle.opts',opts);opts.container=this;opts.stopCount=this.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0});if(opts.continuous)opts.after.push(function(){go(els,opts,0,!opts.rev)});if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)clearTypeFix($slides);var cls=this.className;opts.width=parseInt((cls.match(/w:(\d+)/)||[])[1])||opts.width;opts.height=parseInt((cls.match(/h:(\d+)/)||[])[1])||opts.height;opts.timeout=parseInt((cls.match(/t:(\d+)/)||[])[1])||opts.timeout;if($cont.css('position')=='static')$cont.css('position','relative');if(opts.width)$cont.width(opts.width);if(opts.height&&opts.height!='auto')$cont.height(opts.height);if(opts.startingSlide)opts.startingSlide=parseInt(opts.startingSlide);if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++)opts.randomMap.push(i);opts.randomMap.sort(function(a,b){return Math.random()-0.5});opts.randomIndex=0;opts.startingSlide=opts.randomMap[0]}else if(opts.startingSlide>=els.length)opts.startingSlide=0;var first=opts.startingSlide||0;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css('z-index',z)});$(els[first]).css('opacity',1).show();if($.browser.msie)els[first].style.removeAttribute('filter');if(opts.fit&&opts.width)$slides.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')$slides.height(opts.height);if(opts.containerResize){var maxw=0,maxh=0;for(var i=0;i<els.length;i++){var $e=$(els[i]),w=$e.outerWidth(),h=$e.outerHeight();maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh}$cont.css({width:maxw+'px',height:maxh+'px'})}if(opts.pause)$cont.hover(function(){this.cyclePause++},function(){this.cyclePause--});var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init))init($cont,$slides,opts);else if(opts.fx!='custom')log('unknown transition: '+opts.fx);$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width()});opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(':eq('+first+')').css(opts.cssBefore);if(opts.cssFirst)$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String)opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);if(!opts.sync)opts.speed=opts.speed/2;while((opts.timeout-opts.speed)<250)opts.timeout+=opts.speed}if(opts.easing)opts.easeIn=opts.easeOut=opts.easing;if(!opts.speedIn)opts.speedIn=opts.speed;if(!opts.speedOut)opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=first;if(opts.random){opts.nextSlide=opts.currSlide;if(++opts.randomIndex==els.length)opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex]}else opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;var e0=$slides[first];if(opts.before.length)opts.before[0].apply(e0,[e0,e0,opts,true]);if(opts.after.length>1)opts.after[1].apply(e0,[e0,e0,opts,true]);if(opts.click&&!opts.next)opts.next=opts.click;if(opts.next)$(opts.next).bind('click',function(){return advance(els,opts,opts.rev?-1:1)});if(opts.prev)$(opts.prev).bind('click',function(){return advance(els,opts,opts.rev?1:-1)});if(opts.pager)buildPager(els,opts);opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount)opts.countdown++;els[prepend?'unshift':'push'](s);if(opts.els)opts.els[prepend?'unshift':'push'](s);opts.slideCount=els.length;$s.css('position','absolute');$s[prepend?'prependTo':'appendTo']($cont);if(prepend){opts.currSlide++;opts.nextSlide++}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)clearTypeFix($s);if(opts.fit&&opts.width)$s.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')$slides.height(opts.height);s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager)$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);if(typeof opts.onAddSlide=='function')opts.onAddSlide($s)};if(opts.timeout||opts.continuous)this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.continuous?10:opts.timeout+(opts.delay||0))})};function go(els,opts,manual,fwd){if(opts.busy)return;var p=opts.container,curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual)return;if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end)opts.end(opts);return}if(manual||!p.cyclePause){if(opts.before.length)$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd])});var after=function(){if($.browser.msie&&opts.cleartype)this.style.removeAttribute('filter');$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd])})};if(opts.nextSlide!=opts.currSlide){opts.busy=1;if(opts.fxFn)opts.fxFn(curr,next,opts,after,fwd);else if($.isFunction($.fn.cycle[opts.fx]))$.fn.cycle[opts.fx](curr,next,opts,after);else $.fn.cycle.custom(curr,next,opts,after,manual&&opts.fastOnEvent)}if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length)opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex]}else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1}if(opts.pager)$.fn.cycle.updateActivePagerLink(opts.pager,opts.currSlide)}if(opts.timeout&&!opts.continuous)p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},getTimeout(curr,next,opts,fwd));else if(opts.continuous&&p.cyclePause)p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},10)};$.fn.cycle.updateActivePagerLink=function(pager,currSlide){$(pager).find('a').removeClass('activeSlide').filter('a:eq('+currSlide+')').addClass('activeSlide')};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);if(t!==false)return t}return opts.timeout};function advance(els,opts,val){var p=opts.container,timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2)opts.randomIndex=els.length-2;else if(opts.randomIndex==-1)opts.randomIndex=els.length-1;opts.nextSlide=opts.randomMap[opts.randomIndex]}else if(opts.random){if(++opts.randomIndex==els.length)opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex]}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap)return false;opts.nextSlide=els.length-1}else if(opts.nextSlide>=els.length){if(opts.nowrap)return false;opts.nextSlide=0}}if(opts.prevNextClick&&typeof opts.prevNextClick=='function')opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,val>=0);return false};function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts)});$.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide)};$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a=(typeof opts.pagerAnchorBuilder=='function')?opts.pagerAnchorBuilder(i,el):'<a href="#">'+(i+1)+'</a>';if(!a)return;var $a=$(a);if($a.parents('body').length==0)$a.appendTo($p);$a.bind(opts.pagerEvent,function(){opts.nextSlide=i;var p=opts.container,timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0}if(typeof opts.pagerClick=='function')opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlide<i);return false});if(opts.pauseOnPagerHover)$a.hover(function(){opts.container.cyclePause++},function(){opts.container.cyclePause--})};function clearTypeFix($slides){function hex(s){var s=parseInt(s).toString(16);return s.length<2?'0'+s:s};function getBg(e){for(;e&&e.nodeName.toLowerCase()!='html';e=e.parentNode){var v=$.css(e,'background-color');if(v.indexOf('rgb')>=0){var rgb=v.match(/\d+/g);return'#'+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])}if(v&&v!='transparent')return v}return'#ffffff'};$slides.each(function(){$(this).css('background-color',getBg(this))})};$.fn.cycle.custom=function(curr,next,opts,cb,immediate){var $l=$(curr),$n=$(next);$n.css(opts.cssBefore);var speedIn=immediate?1:opts.speedIn;var speedOut=immediate?1:opts.speedOut;var easeIn=immediate?null:opts.easeIn;var easeOut=immediate?null:opts.easeOut;var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb)};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter)$l.css(opts.cssAfter);if(!opts.sync)fn()});if(opts.sync)fn()};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq('+opts.startingSlide+')').css('opacity',0);opts.before.push(function(){$(this).show()});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={opacity:0};opts.cssAfter={display:'none'};opts.onAddSlide=function($s){$s.hide()}}};$.fn.cycle.ver=function(){return ver};$.fn.cycle.defaults={fx:'fade',timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerEvent:'click',pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:'auto',startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:0,nowrap:0,fastOnEvent:0}})(jQuery);(function($){$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.top=next.offsetHeight;opts.animOut.top=0-curr.offsetHeight});opts.cssFirst={top:0};opts.animIn={top:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.top=0-next.offsetHeight;opts.animOut.top=curr.offsetHeight});opts.cssFirst={top:0};opts.animIn={top:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.left=next.offsetWidth;opts.animOut.left=0-curr.offsetWidth});opts.cssFirst={left:0};opts.animIn={left:0}};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.left=0-next.offsetWidth;opts.animOut.left=curr.offsetWidth});opts.cssFirst={left:0};opts.animIn={left:0}};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts,fwd){$(this).show();var currW=curr.offsetWidth,nextW=next.offsetWidth;opts.cssBefore=fwd?{left:nextW}:{left:-nextW};opts.animIn.left=0;opts.animOut.left=fwd?-currW:currW;$slides.not(curr).css(opts.cssBefore)});opts.cssFirst={left:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts,fwd){$(this).show();var currH=curr.offsetHeight,nextH=next.offsetHeight;opts.cssBefore=fwd?{top:-nextH}:{top:nextH};opts.animIn.top=0;opts.animOut.top=fwd?currH:-currH;$slides.not(curr).css(opts.cssBefore)});opts.cssFirst={top:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(curr).css('zIndex',1)});opts.onAddSlide=function($s){$s.hide()};opts.cssBefore={zIndex:2};opts.animIn={width:'show'};opts.animOut={width:'hide'}};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(curr).css('zIndex',1)});opts.onAddSlide=function($s){$s.hide()};opts.cssBefore={zIndex:2};opts.animIn={height:'show'};opts.animOut={height:'hide'}};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var w=$cont.css('overflow','visible').width();$slides.css({left:0,top:0});opts.before.push(function(){$(this).show()});opts.speed=opts.speed/2;opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(var i=0;i<$slides.length;i++)opts.els.push($slides[i]);for(var i=0;i<opts.startingSlide;i++)opts.els.push(opts.els.shift());opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());if(fwd)for(var i=0,len=opts.els.length;i<len;i++)$(opts.els[i]).css('z-index',len-i);else{var z=$(curr).css('z-index');$el.css('z-index',parseInt(z)+1)}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb)cb()})})};opts.onAddSlide=function($s){$s.hide()}};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH});opts.onAddSlide=function($s){$s.hide()};opts.cssFirst={top:0};opts.cssBefore={height:0};opts.animIn={top:0};opts.animOut={height:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(this).show();opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH});opts.onAddSlide=function($s){$s.hide()};opts.cssFirst={top:0};opts.cssBefore={top:0,height:0};opts.animOut={height:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW});opts.onAddSlide=function($s){$s.hide()};opts.cssBefore={width:0};opts.animIn={left:0};opts.animOut={width:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(this).show();opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW});opts.onAddSlide=function($s){$s.hide()};opts.cssBefore={left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.cssFirst={top:0,left:0};opts.cssAfter={display:'none'};opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore={width:0,height:0,top:next.cycleH/2,left:next.cycleW/2};opts.cssAfter={display:'none'};opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};$(curr).css('zIndex',2);$(next).css('zIndex',1)});opts.onAddSlide=function($s){$s.hide()}};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){opts.cssBefore={width:0,height:0,opacity:1,left:next.cycleW/2,top:next.cycleH/2,zIndex:1};opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH}});opts.animOut={opacity:0};opts.cssAfter={zIndex:0}};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css('overflow','hidden').width();$slides.show();opts.before.push(function(curr,next,opts){$(curr).css('zIndex',1)});opts.cssBefore={left:w,zIndex:2};opts.cssAfter={zIndex:1};opts.animIn={left:0};opts.animOut={left:w}};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css('overflow','hidden').height();$slides.show();opts.before.push(function(curr,next,opts){$(curr).css('zIndex',1)});opts.cssBefore={top:h,zIndex:2};opts.cssAfter={zIndex:1};opts.animIn={top:0};opts.animOut={top:h}};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css('overflow','hidden').height();var w=$cont.width();$slides.show();opts.before.push(function(curr,next,opts){$(curr).css('zIndex',1)});opts.cssBefore={top:h,left:w,zIndex:2};opts.cssAfter={zIndex:1};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w}};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){opts.cssBefore={left:this.cycleW/2,width:0,zIndex:2};opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};$(curr).css('zIndex',1)});opts.onAddSlide=function($s){$s.hide().css('zIndex',1)}};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){opts.cssBefore={top:this.cycleH/2,height:0,zIndex:2};opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};$(curr).css('zIndex',1)});opts.onAddSlide=function($s){$s.hide().css('zIndex',1)}};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){opts.cssBefore={left:next.cycleW/2,width:0,zIndex:1,display:'block'};opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};$(curr).css('zIndex',2)});opts.onAddSlide=function($s){$s.hide()};opts.cssAfter={zIndex:1,display:'none'}};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){opts.cssBefore={top:next.cycleH/2,height:0,zIndex:1,display:'block'};opts.animIn={top:0,height:this.cycleH};opts.animOut={top:curr.cycleH/2,height:0};$(curr).css('zIndex',2)});opts.onAddSlide=function($s){$s.hide()};opts.cssAfter={zIndex:1,display:'none'}};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||'left';var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.before.push(function(curr,next,opts){opts.cssBefore=opts.cssBefore||{};opts.cssBefore.zIndex=2;opts.cssBefore.display='block';if(d=='right')opts.cssBefore.left=-w;else if(d=='up')opts.cssBefore.top=h;else if(d=='down')opts.cssBefore.top=-h;else opts.cssBefore.left=w;$(curr).css('zIndex',1)});if(!opts.animIn)opts.animIn={left:0,top:0};if(!opts.animOut)opts.animOut={left:0,top:0};opts.cssAfter=opts.cssAfter||{};opts.cssAfter.zIndex=2;opts.cssAfter.display='none'};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||'left';var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.before.push(function(curr,next,opts){opts.cssBefore.display='block';if(d=='right')opts.animOut.left=w;else if(d=='up')opts.animOut.top=-h;else if(d=='down')opts.animOut.top=h;else opts.animOut.left=-w;$(curr).css('zIndex',2);$(next).css('zIndex',1)});opts.onAddSlide=function($s){$s.hide()};if(!opts.animIn)opts.animIn={left:0,top:0};opts.cssBefore=opts.cssBefore||{};opts.cssBefore.top=0;opts.cssBefore.left=0;opts.cssAfter=opts.cssAfter||{};opts.cssAfter.zIndex=1;opts.cssAfter.display='none'};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css('overflow','visible').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$(curr).css('zIndex',2);opts.cssBefore.display='block';if(!opts.animOut.left&&!opts.animOut.top)opts.animOut={left:w*2,top:-h/2,opacity:0};else opts.animOut.opacity=0});opts.onAddSlide=function($s){$s.hide()};opts.cssBefore={left:0,top:0,zIndex:1,opacity:1};opts.animIn={left:0};opts.cssAfter={zIndex:2,display:'none'}};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip))clip='rect(0px 0px '+h+'px 0px)';else if(/r2l/.test(opts.clip))clip='rect(0px '+w+'px '+h+'px '+w+'px)';else if(/t2b/.test(opts.clip))clip='rect(0px '+w+'px 0px 0px)';else if(/b2t/.test(opts.clip))clip='rect('+h+'px '+w+'px '+h+'px 0px)';else if(/zoom/.test(opts.clip)){var t=parseInt(h/2);var l=parseInt(w/2);clip='rect('+t+'px '+l+'px '+t+'px '+l+'px)'}}opts.cssBefore.clip=opts.cssBefore.clip||clip||'rect(0px 0px 0px 0px)';var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next)return;var $curr=$(curr).css('zIndex',2);var $next=$(next).css({zIndex:3,display:'block'});var step=1,count=parseInt((opts.speedIn/13))-1;function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)'});(step++<=count)?setTimeout(f,13):$curr.css('display','none')}f()});opts.cssAfter={};opts.animIn={left:0};opts.animOut={left:0}}})(jQuery);
//cycle lite...
(function(D){var A="Lite-1.0";D.fn.cycle=function(E){return this.each(function(){E=E||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var I=D(this);var J=E.slideExpr?D(E.slideExpr,this):I.children();var G=J.get();if(G.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+G.length)}return }var H=D.extend({},D.fn.cycle.defaults,E||{},D.metadata?I.metadata():D.meta?I.data():{});H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});var F=this.className;H.width=parseInt((F.match(/w:(\d+)/)||[])[1])||H.width;H.height=parseInt((F.match(/h:(\d+)/)||[])[1])||H.height;H.timeout=parseInt((F.match(/t:(\d+)/)||[])[1])||H.timeout;if(I.css("position")=="static"){I.css("position","relative")}if(H.width){I.width(H.width)}if(H.height&&H.height!="auto"){I.height(H.height)}var K=0;J.css({position:"absolute",top:0,left:0}).hide().each(function(M){D(this).css("z-index",G.length-M)});D(G[K]).css("opacity",1).show();if(D.browser.msie){G[K].style.removeAttribute("filter")}if(H.fit&&H.width){J.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){J.height(H.height)}if(H.pause){I.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}D.fn.cycle.transitions.fade(I,J,H);J.each(function(){var M=D(this);this.cycleH=(H.fit&&H.height)?H.height:M.height();this.cycleW=(H.fit&&H.width)?H.width:M.width()});J.not(":eq("+K+")").css({opacity:0});if(H.cssFirst){D(J[K]).css(H.cssFirst)}if(H.timeout){if(H.speed.constructor==String){H.speed={slow:600,fast:200}[H.speed]||400}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}H.speedIn=H.speed;H.speedOut=H.speed;H.slideCount=G.length;H.currSlide=K;H.nextSlide=1;var L=J[K];if(H.before.length){H.before[0].apply(L,[L,L,H,true])}if(H.after.length>1){H.after[1].apply(L,[L,L,H,true])}if(H.click&&!H.next){H.next=H.click}if(H.next){D(H.next).bind("click",function(){return C(G,H,H.rev?-1:1)})}if(H.prev){D(H.prev).bind("click",function(){return C(G,H,H.rev?1:-1)})}if(H.timeout){this.cycleTimeout=setTimeout(function(){B(G,H,0,!H.rev)},H.timeout+(H.delay||0))}})};function B(J,E,I,K){if(E.busy){return }var H=J[0].parentNode,M=J[E.currSlide],L=J[E.nextSlide];if(H.cycleTimeout===0&&!I){return }if(I||!H.cyclePause){if(E.before.length){D.each(E.before,function(N,O){O.apply(L,[M,L,E,K])})}var F=function(){if(D.browser.msie){this.style.removeAttribute("filter")}D.each(E.after,function(N,O){O.apply(L,[M,L,E,K])})};if(E.nextSlide!=E.currSlide){E.busy=1;D.fn.cycle.custom(M,L,E,F)}var G=(E.nextSlide+1)==J.length;E.nextSlide=G?0:E.nextSlide+1;E.currSlide=G?J.length-1:E.nextSlide-1}if(E.timeout){H.cycleTimeout=setTimeout(function(){B(J,E,0,!E.rev)},E.timeout)}}function C(E,F,I){var H=E[0].parentNode,G=H.cycleTimeout;if(G){clearTimeout(G);H.cycleTimeout=0}F.nextSlide=F.currSlide+I;if(F.nextSlide<0){F.nextSlide=E.length-1}else{if(F.nextSlide>=E.length){F.nextSlide=0}}B(E,F,1,I>=0);return false}D.fn.cycle.custom=function(K,H,I,E){var J=D(K),G=D(H);G.css({opacity:0});var F=function(){G.animate({opacity:1},I.speedIn,I.easeIn,E)};J.animate({opacity:0},I.speedOut,I.easeOut,function(){J.css({display:"none"});if(!I.sync){F()}});if(I.sync){F()}};D.fn.cycle.transitions={fade:function(F,G,E){G.not(":eq(0)").css("opacity",0);E.before.push(function(){D(this).show()})}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery);
/**
 * jQuery.Preload - Multifunctional preloader
 * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com
 * Dual licensed under MIT and GPL.
 * Date: 3/25/2009
 * @author Ariel Flesler
 * @version 1.0.8
 */
(function($){var h=$.preload=function(c,d){if(c.split)c=$(c);d=$.extend({},h.defaults,d);var f=$.map(c,function(a){if(!a)return;if(a.split)return d.base+a+d.ext;var b=a.src||a.href;if(typeof d.placeholder=='string'&&a.src)a.src=d.placeholder;if(b&&d.find)b=b.replace(d.find,d.replace);return b||null}),data={loaded:0,failed:0,next:0,done:0,total:f.length};if(!data.total)return finish();var g=$(Array(d.threshold+1).join('<img/>')).load(handler).error(handler).bind('abort',handler).each(fetch);function handler(e){data.element=this;data.found=e.type=='load';data.image=this.src;data.index=this.index;var a=data.original=c[this.index];data[data.found?'loaded':'failed']++;data.done++;if(d.enforceCache)h.cache.push($('<img/>').attr('src',data.image)[0]);if(d.placeholder&&a.src)a.src=data.found?data.image:d.notFound||a.src;if(d.onComplete)d.onComplete(data);if(data.done<data.total)fetch(0,this);else{if(g&&g.unbind)g.unbind('load').unbind('error').unbind('abort');g=null;finish()}};function fetch(i,a,b){if(a.attachEvent&&data.next&&data.next%h.gap==0&&!b){setTimeout(function(){fetch(i,a,1)},0);return!1}if(data.next==data.total)return!1;a.index=data.next;a.src=f[data.next++];if(d.onRequest){data.index=a.index;data.element=a;data.image=a.src;data.original=c[data.next-1];d.onRequest(data)}};function finish(){if(d.onFinish)d.onFinish(data)}};h.gap=14;h.cache=[];h.defaults={threshold:2,base:'',ext:'',replace:''};$.fn.preload=function(a){h(this,a);return this}})(jQuery);

jQuery(function($){
		//IE6...
		$.ifixpng('data/graphics/template.blank.gif');
		$('#logo img, #pageBorderLeft, #pageBorderRight, #pageBorderBottom, #topMenu a.hasSubMenu, #articleLead .content').ifixpng();
		//General...
		$('a.targetBlank').attr({target:'_blank'});
		$('img.closeThis').click(function(){ $(this).closest('div.closeMe').slideUp(function(){$(this).remove();}); });
		//Superfish...
		$('#topNav ul.sf-menu')
			.find('ul').each(function(){
					var el = $(this).css({width:'auto', whiteSpace:'nowrap'}), w = el.width();
					el.width(w+2);//...include a small safety margin!
				}).end()
			.superfish({delay:200, speed:0, dropShadows:false,autoArrows:false});
		//Site Search...
		$('#siteSearcher_form').bind('submit', function(){
				var f = $('#searchFor');
				if(f.length){
					if(f.val()){ $(this).ajaxSubmit({url:'index.php'
							, success:function(response, status){
									if(response){
										var sr = $('#searchResults');
										if(sr.length){
											sr.replaceWith(response);
											$('#searchResults').show();
										}else{
											$('#content').after(response).slideUp();
											$('#searchResults').slideDown();
										}
									}
								}
							}); }
					else{ f.get(0).focus(); }
				}
				return false;
			});
		$('#searchResultsClear').live('click', function(){
				$('#searchFor').val('');
				$('#searchResults').slideUp(function(){ $(this).remove(); });
				$('#content').slideDown();
				return false;
			});
		//Subscription...
		$('#subscriptionBox').submit(function(){
				var n = $('#subscribeName'), e = $('#subscribeEmail'), u = $('#subscribeUnsubscribe:checked'), m = '';
				if(!e.val()){
					e.addClass('reqdField').get(0).focus();
					m = u.length ? 'To unsubscribe, please provide your registered Email address' : 'To register for our newsletter, please provide both Email and Name';
				}else{
					e.removeClass('reqdField');
					if(!n.val() && !u.length){
						n.addClass('reqdField').get(0).focus();
						m = 'To register for our newsletter, please provide both Email and Name';
					}else{
						n.removeClass('reqdField');
					}
				}
				if(m){
					$('#subscribeError .errorMsg').text(m).parent().slideDown();
				}else{
					$('#subscribeError').hide();
				}
				return !m;
			}).find(':text').val('').end().find(':checkbox').each(function(){ this.checked = false; });
		$('#subscribeError .errorMsg').click(function(){ $(this).parent().slideUp(); }).hover(function(ev){
				$(this)[ev.type == 'mouseenter' ? 'addClass' : 'removeClass']('errorMsgHover');
			});
		//Contact Us...
		$('#contactUs').bind('submit', function(){
				var sub = $(':submit', this).enable(false).addClass('formSubmitDisabled'); //enable() is part of the form plugin
				if($('.requiredField').removeClass('missingField').find(':input')
						.filter(function(){ return !$(this).val(); }).closest('.requiredField').addClass('missingField').length){
					$('#contactUsIncomplete:hidden').slideDown('fast');
					sub.removeClass('formSubmitDisabled').enable();
				}else{
					$('div.contactUsFeedback:visible').hide();
					$(this).ajaxSubmit({
							success:function(response, status){
									if(response){
										$('#mailerProblem').html(' : ' + response);
										$('#contactUsProblem:hidden').slideDown();
										sub.removeClass('formSubmitDisabled').enable();
									}else{
										$('#contactUsSent:hidden').slideDown();
									}
								}
						});
				}
				return false;
			}).find(':submit').enable().removeClass('formSubmitDisabled');
		//Informers Box...
		$('#informersBox').find('a.xcSubMenu').click(function(){
				var u = $(this).prev('ul')
					, h = u.is(':hidden');
				u[h ? 'show' : 'hide']();
				$(this).text(h ? '-' : '+').toggleClass('xcSubMenu_open', h);
				this.blur();
				return false;
			}).end()
			.find('li.openSubAndParents').each(function(){
					var el = $(this);
					while(el.length){
						$('>a.xcSubMenu', el).trigger('click');
						el = el.parent('ul').parent('li');
					}
				});
		//News Slider
		var newsBox = {
				el: $('#newsBoxSlider')
			, speed: 1000 //milliseconds for the slide transition
			, interval: 6000 //milliseconds before next transition (after completion of slide)
			, step: 0 //max height of the items, and therefore the amount that top needs to change by
			, ct: 0 //number of items
			, dir: 1 //=down the list, ie scrolling up
			, indx: 0 //into item array, indicating item currently in view
			, hold: false //set by onHover - true on mouseenter, false on mouseleave
			, pause: false //set by play/pause buttons - true on pause clicked
			, timer: null //timer id
			, next: function(next){ //clears timer and sets up new timer if required...
					if(newsBox.timer !== null){
						window.clearTimeout(newsBox.timer);
						newsBox.timer = null;
					}
					if(next){
						newsBox.timer = window.setTimeout(newsBox.onTimeout, newsBox.interval + newsBox.speed);
					}
				}
			, slide: function(next){ //animate to next item...
					newsBox.next(next);
					newsBox.indx += newsBox.dir;
					if(newsBox.indx >= newsBox.ct){ newsBox.indx -= 2; newsBox.dir *= -1; }
					else if(newsBox.indx < 0){ newsBox.indx = 1; newsBox.dir *= -1; }
					newsBox.el.stop().animate({top: newsBox.indx * newsBox.step * -1}, newsBox.speed);
				}
			, onClick: function(){ //click handler for control buttons...
					this.blur();
					switch(this.id){
						case 'newsBoxControlNext':
							if(newsBox.indx < newsBox.ct - 1){
								newsBox.dir = 1;
								newsBox.slide(!newsBox.pause);
							}
							break;
						case 'newsBoxControlPause':
							newsBox.pause = true;
							$('#newsBoxControl').addClass('newsPaused');
							break;
						case 'newsBoxControlPlay':
							newsBox.pause = false;
							$('#newsBoxControl').removeClass('newsPaused');
							if(newsBox.timer == null){ newsBox.slide(true); }
							break;
						case 'newsBoxControlPrev':
							if(newsBox.indx > 0){
								newsBox.dir = -1;
								newsBox.slide(!newsBox.pause);
							}
							break;
						default:
					}
					return false;
				}
			, onHover: function(ev){ //hover handler for mouse over/off the slider...
					newsBox.hold = ev.type == 'mouseenter';
					$('#newsBoxControlPause').toggleClass('newsPaused');
					if(!newsBox.hold && !newsBox.pause && newsBox.timer === null){
						newsBox.slide(true);
					}
					return false;
				}
			, onShow: function(){ //set up controls, and set up all handlers...
					var ctrl = $('#newsBoxControl'), offset = (ctrl.prev().get(0)||{}).offsetTop||0;
					if(newsBox.ct > 1){ //if only one item, don't need any handlers!
						newsBox.next(true);
						if(ctrl.length){
							offset = offset - ctrl.find('a').click(newsBox.onClick).first().height();
							ctrl.hide().css({top:offset, visibility:'visible'}).fadeIn();
							$(this).hover(newsBox.onHover); //'this' is #newsBoxWindow
						}
					}else{
						ctrl.hide();
					}
				}
			, onTimeout: function(){ //timer handler...
					newsBox.timer = null;
					if(!newsBox.hold && !newsBox.pause){ newsBox.slide(true); }
				}
			};
		if(newsBox.el.length){
			newsBox.el.find('div.newsSnippets').each(function(i){
					var h1 = $(this).find('.articleContent h1:first')
						, t = h1.length ? h1.html() : ''
						, h = $(this).height();
					if(t){
						h1.empty().append($(this).find('a.newsSnippets').show().html(t));
					}
					newsBox.ct++;
					if(h > newsBox.step){ newsBox.step = h; }
				}).height(newsBox.step);
			$('#newsBoxWindow').animate({height:newsBox.step}, 'slow', newsBox.onShow);
		}
		//Gallery...
		if($('#articleLeadGallery').length){
			var hoverGal = {
					full: $('#articleLeadGallery img')
				, thumbs: $('ul.galleryThumbnails img')
				, title: $('#articleLeadGalleryTitle')
				, indx: 0 //current
				, over: -1 //hovering
				, loaded: []
				, swap: function(){
						hoverGal.setTitle(hoverGal.full.eq(hoverGal.over).css({visibility:'visible', zIndex:hoverGal.full.length + 1}).attr('title'));
						hoverGal.full.eq(hoverGal.indx).css({zIndex:hoverGal.full.length - hoverGal.indx, visibility:'hidden'});
						hoverGal.indx = hoverGal.over;
					}
				, setTitle: function(ttl){
						hoverGal.title.text(ttl || '&nbsp;')[ttl ? 'show' : 'hide']();
					}
				, onLoad: function(data){
						hoverGal.full.eq(data.index).attr({src:data.image});
						hoverGal.loaded[data.index] = 1;
						if(hoverGal.over == data.index){
							hoverGal.swap();
						}
					}
				, onOver: function(){
						hoverGal.over = hoverGal.thumbs.index(this);
						if(hoverGal.indx != hoverGal.over && hoverGal.loaded[hoverGal.over]){
							hoverGal.swap();
						}
						return false;
					}
				, onOut: function(){
						hoverGal.over = -1;
						return false;
					}
				};
			if(hoverGal.thumbs.length){
				hoverGal.setTitle(hoverGal.full.eq(0).attr('title'));
				if(hoverGalPreloads && hoverGalPreloads.length){
					$.preload(hoverGalPreloads, {onComplete:hoverGal.onLoad});
					hoverGal.thumbs.hoverIntent({over:hoverGal.onOver, out:hoverGal.onOut});
				}
			}
		}
		//Cycle...
		var cycleFadeDelay = 0; //stagger starts
		$('.cycleFade').each(function(){
				$(this).find('img:gt(0)').each(function(){
						var alt = this.alt;
						$(this).attr({src:alt, alt:''});
					}); 
				$(this).cycle({timeout:6000, speed:1000, delay:(1000 * cycleFadeDelay++), pause:1}); 
			});
		//IE6 (again)...
		$('#articleLead .content').css({zoom:1});
	});

