(function(g){g.fn.siteFeature=function(l){var m=g.extend({},g.fn.siteFeature.defaults,l);return this.each(function(n){obj=g(this);var o={};o.which=n;k(m,o);a(m,o);d(m,o)})};g.fn.siteFeature.defaults={outputElementId:"siteFeature",txtBoxIdPrefix:"txtBox",imgBgIdPrefix:"imgBg",tabIdPrefix:"tab",titleText:"h3",containerWidth:"645px",containerHeight:"265px",imgWidth:"490px",tabsLocation:"left",tabBgImg:"/images/assets/slider/f_arrow-left.png",tabBgImgIE6:"/images/assets/slider/f_arrow-left.png",tabControl:"click",tabLock:4,startTab:1,txtBoxWidth:"185px",txtBoxHorizontalHeight:"90px",txtBoxOpacity:0.5,activeTabIsLink:true,activeWindowIsLink:true,animateInOnLoad:true,txtBoxAnimateInType:"slideLeft",txtBoxAnimateOutType:"slideRight",txtBoxAnimateHorzAlt:true,txtBoxAnimateInHorzType:"slideUp",txtBoxAnimateOutHorzType:"slideDown",txtBoxAnimateInDuration:500,txtBoxAnimateOutDuration:500,txtBoxPauseBetweenInOut:1000,cols:10,rows:5,imgBgsAnimationDuration:500,imgBgsAnimateOutDuration:500,imgBgsAnimationType:"cycle",imgBgsAnimationList:["fade","wave","crash","curtain","zipper","fountain","cascade","dribble","checker","enterTheDragon"],imgBgAnimationDirection:"random",tabsAnimateInDuration:100,tabsAnimateWidth:"+=20",autoPlay:false,autoPlayInterval:5000,pauseOnHover:true,ieEnableFilters:false,endCreateFunction:null};g.fn.siteFeatureTxtBoxAnimationsOut=function(m){if(g(this).hasClass("horizontal")&&m.txtBoxAnimateHorzAlt){var l=m.txtBoxAnimateOutType;m.txtBoxAnimateOutType=m.txtBoxAnimateOutHorzType}if(m.txtBoxAnimateOutType=="blink"){g(this).css({opacity:"0",display:"none"})}if(m.txtBoxAnimateOutType=="fade"){g(this).animate({opacity:"0"},m.txtBoxAnimateOutDuration,function(){g(this).css({display:"none"})})}if(m.txtBoxAnimateOutType=="slideUp"){if(!g(this).hasClass("horizontal")){g(this).stop().animate({marginTop:"-"+m.containerHeight},m.txtBoxAnimateOutDuration,function(){g(this).css({opacity:"0","margin-top":"0",display:"none"})})}else{g(this).css({opacity:"1"}).slideUp(m.txtBoxAnimateOutDuration,function(){g(this).css({opacity:"0",display:"none"})})}}if(m.txtBoxAnimateOutType=="slideDown"){g(this).stop().animate({marginTop:m.containerHeight},m.txtBoxAnimateOutDuration,function(){g(this).css({opacity:"0","margin-top":"0",display:"none"})})}if(m.txtBoxAnimateOutType=="slideLeft"){if(m.tabsLocation=="left"){if(!g(this).hasClass("horizontal")){g(this).css({right:"auto",left:(parseInt(m.imgWidth)-parseInt(m.txtBoxWidth))}).children().each(function(){g(this).css({width:g(this).width()})}).end().css({opacity:"1"}).stop().animate({width:"0"},m.txtBoxAnimateOutDuration,function(){g(this).css({opacity:"0",width:m.txtBoxWidth,display:"none"})})}else{g(this).children().each(function(){g(this).css({width:g(this).width()})}).end().css({opacity:"1"}).stop().animate({left:"-"+m.imgWidth},m.txtBoxAnimateOutDuration,function(){g(this).css({opacity:"0",left:"0",display:"none"})})}}else{g(this).css({right:"auto",left:"0"}).stop().animate({left:"-"+m.imgWidth},m.txtBoxAnimateOutDuration,function(){g(this).css({opacity:"0",left:"0",display:"none"})})}}if(m.txtBoxAnimateOutType=="slideRight"){if(m.tabsLocation=="left"){if(!g(this).hasClass("horizontal")){g(this).css({opacity:"1",left:"auto",right:"0"}).stop().animate({right:"-"+m.txtBoxWidth},m.txtBoxAnimateOutDuration,function(){g(this).css({opacity:"0",right:"0",display:"none"})})}else{g(this).css({opacity:"1",left:"auto"}).stop().animate({right:"-"+m.imgWidth},m.txtBoxAnimateOutDuration,function(){g(this).css({opacity:"0",right:"0",display:"none"})})}}else{if(!g(this).hasClass("horizontal")){g(this).css({left:"0px"}).stop().animate({left:"-"+m.txtBoxWidth},m.txtBoxAnimateOutDuration,function(){g(this).css({opacity:"0",display:"none",left:"0px"})})}else{g(this).css({left:"0px"}).stop().animate({left:"-"+m.imgWidth},m.txtBoxAnimateOutDuration,function(){g(this).css({opacity:"0",display:"none",left:"0px"})})}}}if(g(this).hasClass("horizontal")&&m.txtBoxAnimateHorzAlt){m.txtBoxAnimateOutType=l}return this};g.fn.siteFeatureTxtBoxAnimationsIn=function(m){if(g(this).hasClass("horizontal")&&m.txtBoxAnimateHorzAlt){var l=m.txtBoxAnimateInType;m.txtBoxAnimateInType=m.txtBoxAnimateInHorzType}if(m.txtBoxAnimateInType=="blink"){g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({opacity:"1",display:"block"})})}if(m.txtBoxAnimateInType=="fade"){g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block"}).animate({opacity:"1"},m.txtBoxAnimateInDuration,function(){b(g(this),m)})})}if(m.txtBoxAnimateInType=="slideUp"){g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block",opacity:"1","margin-top":m.containerHeight}).animate({marginTop:"0"},m.txtBoxAnimateInDuration,function(){b(g(this),m)})})}if(m.txtBoxAnimateInType=="slideDown"){if(!g(this).hasClass("horizontal")){g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block",opacity:"1","margin-top":"-"+m.containerHeight}).animate({marginTop:"0"},m.txtBoxAnimateInDuration,function(){b(g(this),m)})})}else{g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block",opacity:"1"}).slideUp(0).slideDown(m.txtBoxAnimateInDuration,function(){b(g(this),m)})})}}if(m.txtBoxAnimateInType=="slideLeft"){if(m.tabsLocation=="left"){if(!g(this).hasClass("horizontal")){g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block",opacity:"1",right:"-"+m.txtBoxWidth}).animate({right:"0"},m.txtBoxAnimateInDuration,function(){b(g(this),m)})})}else{g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block",opacity:"1",left:"auto",right:"-"+m.imgWidth}).animate({right:"0"},m.txtBoxAnimateInDuration,function(){b(g(this),m)})})}}else{if(!g(this).hasClass("horizontal")){g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block"}).children().each(function(){g(this).css({width:g(this).width()})}).end().css({display:"block",opacity:"1",width:"0",left:"auto",right:parseInt(m.imgWidth)-parseInt(m.txtBoxWidth)}).animate({width:m.txtBoxWidth})})}else{g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block",opacity:"1",left:"auto",right:"-"+m.imgWidth}).animate({right:"0"},m.txtBoxAnimateInDuration,function(){b(g(this),m)})})}}}if(m.txtBoxAnimateInType=="slideRight"){if(m.tabsLocation=="left"){if(!g(this).hasClass("horizontal")){g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block",right:"auto",left:(parseInt(m.imgWidth)-parseInt(m.txtBoxWidth))}).children().each(function(){g(this).css({width:g(this).width()})}).end().css({opacity:"1",width:"0"}).animate({width:m.txtBoxWidth},m.txtBoxAnimateInDuration,function(){b(g(this),m)})})}else{g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block",right:"auto",left:"-"+m.imgWidth}).children().each(function(){g(this).css({width:g(this).width()})}).end().css({opacity:"1"}).animate({left:"0"},m.txtBoxAnimateInDuration,function(){b(g(this),m)})})}}else{g(this).animate({opacity:"0"},m.txtBoxPauseBetweenInOut,function(){g(this).css({display:"block",opacity:"1",left:"-"+m.imgWidth}).animate({left:"0"},m.txtBoxAnimateInDuration,function(){b(g(this),m)})})}}if(g(this).hasClass("horizontal")&&m.txtBoxAnimateHorzAlt){m.txtBoxAnimateInType=l}return this};g.fn.siteFeatureImgAnimations=function(C,J,l){J.imgIsAnimating=true;C.width=parseInt(C.imgWidth);C.height=parseInt(C.containerHeight);$imgs=g(this);if(C.imgBgsAnimationType=="random"||C.animationMemory=="random"){C.animationMemory="random";var t=C.imgBgsAnimationList.slice(0);var A=-1;for(var G=0;G<t.length;G++){if(t[G]==C.imgBgsAnimationType){A=G;break}}t.splice(A,1);t.sort(function(){return 0.5-Math.random()});C.imgBgsAnimationType=t[0]}if(C.imgBgsAnimationType=="cycle"||C.animationMemory=="cycle"){C.animationMemory="cycle";for(G=0;G<C.imgBgsAnimationList.length;G++){if(C.imgBgsAnimationList[G]==C.imgBgsAnimationType){C.currentAni=G;break}else{C.currentAni=-1}}if(C.currentAni<0||C.currentAni==C.imgBgsAnimationList.length-1){C.currentAni=0}else{C.currentAni++}C.imgBgsAnimationType=C.imgBgsAnimationList[C.currentAni]}if(C.imgBgsAnimationType=="enterTheDragon"){$target=g(this).filter(".selected");$current=g(this).filter(l)}else{$target=g(this).filter(l);$current=g(this).filter(".selected")}$copy=$target.clone();if(C.imgBgAnimationDirection=="random"){C.directionList=["left","right"];C.directionMemory=C.directionList.sort(function(){return 0.5-Math.random()})[0]}else{C.directionMemory=C.imgBgAnimationDirection}var K=[];var s=[];var F=[];var L=parseInt(C.width/C.cols);var o=parseInt(C.height/C.rows);var D=C.width-(L*C.cols);var p=C.height-(o*C.rows);var I=0;var m=0;var v=1;var y=0;var u=C.imgBgsAnimationDuration/8;var w=1;for(G=0;G<C.cols;G++){if(D>0){tcolWidth=L+1;D--}else{tcolWidth=L}var x=$target.clone().show().attr({id:""}).addClass("col-"+G).css({"background-position":-I+"px top",width:tcolWidth+"px",height:C.height+"px","float":"left",position:"absolute",left:I});if(C.imgBgsAnimationType=="wave"||C.imgBgsAnimationType=="cascade"){x.css({height:0})}if(C.imgBgsAnimationType=="fall"){x.css({top:C.height*-1})}if(C.imgBgsAnimationType=="curtain"){x.data("width",tcolWidth+"px").css({width:0})}if(C.imgBgsAnimationType=="zipper"){if((G+1)%2==0){x.css({top:C.height})}else{x.css({top:C.height*-1})}}if(C.imgBgsAnimationType=="fountain"){x.css({top:C.height})}if(C.imgBgsAnimationType=="crash"||C.imgBgsAnimationType=="dribble"){x.css({top:C.height*-1})}if(C.imgBgsAnimationType=="checker"){x.css({"background-image":"none",opacity:1})}if(C.imgBgsAnimationType=="enterTheDragon"){$current.css({opacity:"1",display:"block"})}$current.append(x[0]);s.push(x);if(C.imgBgsAnimationType=="checker"){for(j=0;j<C.rows;j++){if(p>0){trowHeight=o+1;p--}else{trowHeight=o}var z=$target.clone().show().attr({id:""}).addClass("row-"+G+"-"+j).css({"background-position":-I+"px "+-m+"px",height:0,width:0,"float":"left",position:"absolute",left:tcolWidth/2,top:m+(trowHeight/2),opacity:1}).data("info",{width:tcolWidth,height:trowHeight,left:0,top:m});g(".col-"+G).append(z[0]);K.push(z[0]);m+=trowHeight}m=0}I+=tcolWidth}if(C.imgBgsAnimationType=="checker"){if(C.directionMemory=="right"){var q=C.cols-1;var H=0;var E=C.cols-1;var n=1}else{var q=0;var H=0;var E=0;var n=1}for(G=0;G<K.length;G++){if(C.directionMemory=="right"){if(q<0){q=q+n;H=H+n;n++}F[G]=q.toString()+"-"+H.toString();if(q==C.cols-1||H>=C.rows-1){E--;q=E;H=0}else{q++;H++}}else{if(q>C.cols-1){q=q-n;H=H+n;n++}F[G]=q.toString()+"-"+H.toString();if(q==0||H>=C.rows-1){E++;q=E;H=0}else{q--;H++}}}s=[];g.each(F,function(O){s.push(g(K).filter('[class$="-'+this+'"]'))})}if(C.imgBgsAnimationType=="fountain"||C.imgBgsAnimationType=="cascade"||C.imgBgsAnimationType=="dribble"||C.imgBgsAnimationType=="enterTheDragon"){var v=1;var N=s.length/2;for(G=0;G<s.length;G++){mafs=N-(parseInt((G+1)/2)*v);F[G]=mafs;if(C.imgBgsAnimationType=="enterTheDragon"){if(G==0){v=0}var B=g(s[parseInt(F[G]-1)]);var r=(B.width()/2)*v;if(v<0){$ref=B.prev()}else{if(v>0){$ref=B.next()}else{$ref=B}}bgPos=parseInt($ref.css("background-position"))+r;B.data("bgPos-o",B.css("background-position")).css("background-position",bgPos+"px 0px").data("bgPos-n",bgPos+"px 0px");if(G==0){v=1}}v*=-1}F[C.cols-1]=0;if(C.imgBgsAnimationType=="enterTheDragon"){g.each(s,function(){g(this).css("background-position",g(this).data("bgPos-o"))})}}if(C.directionMemory=="right"&&C.imgBgsAnimationType!="checker"){s.reverse()}if(C.imgBgsAnimationType=="fade"){g(this).filter(".selected").animate({opacity:"0"},C.imgBgsAnimationDuration,function(){g(this).css({display:"none"}).empty();J.imgIsAnimating=false}).end().filter(l).css({display:"block"}).animate({opacity:"1"},C.imgBgsAnimationDuration)}if(C.imgBgsAnimationType=="wave"){g.each(s,function(O){g(this).animate({"letter-spacing":"0"},y,function(){g(this).animate({opacity:"1",height:C.height},C.imgBgsAnimationDuration,function(){if((O+1)==s.length){y=0;$target.css({opacity:"1"}).show();$current.empty().css({opacity:"0"}).hide();J.imgIsAnimating=false}})});y=(y*w+u)})}if(C.imgBgsAnimationType=="curtain"){g.each(s,function(O){g(this).animate({"letter-spacing":"0"},y,function(){g(this).animate({opacity:"1",width:g(this).data("width")},C.imgBgsAnimationDuration,function(){if((O+1)==s.length){y=0;$target.css({opacity:"1"}).show();$current.empty().css({opacity:"0"}).hide();J.imgIsAnimating=false}})});y=(y*w+u)})}if(C.imgBgsAnimationType=="zipper"||C.imgBgsAnimationType=="crash"){g.each(s,function(O){g(this).animate({"letter-spacing":"0"},y,function(){g(this).animate({opacity:"1",top:"0"},C.imgBgsAnimationDuration,function(){if((O+1)==s.length){y=0;$target.css({opacity:"1"}).show();$current.empty().css({opacity:"0"}).hide();J.imgIsAnimating=false}})});y=(y*w+u)})}if(C.imgBgsAnimationType=="fountain"||C.imgBgsAnimationType=="dribble"){g.each(F,function(O){s[this].animate({"letter-spacing":"0"},y,function(){g(this).animate({opacity:"1",top:"0"},C.imgBgsAnimationDuration,function(){if((O+1)==s.length){y=0;$target.css({opacity:"1"}).show();$current.empty().css({opacity:"0"}).hide();J.imgIsAnimating=false}})});y=(y*w+u)})}if(C.imgBgsAnimationType=="cascade"){g.each(F,function(O){s[this].animate({"letter-spacing":"0"},y,function(){g(this).animate({opacity:"1",height:C.height},C.imgBgsAnimationDuration,function(){if((O+1)==s.length){y=0;$target.css({opacity:"1"}).show();$current.empty().css({opacity:"0"}).hide();J.imgIsAnimating=false}})});y=(y*w+u)})}if(C.imgBgsAnimationType=="checker"){var u=C.imgBgsAnimationDuration/25;g.each(s,function(O){g(this).animate({"letter-spacing":"0"},y,function(){g(this).animate({width:g(this).data("info").width,height:g(this).data("info").height,top:g(this).data("info").top,left:g(this).data("info").left},C.imgBgsAnimationDuration,function(){if((O+1)==K.length){y=0;$target.css({opacity:"1"}).show();$current.empty().css({opacity:"0"}).hide();J.imgIsAnimating=false}})});y=(y*w+u)})}if(C.imgBgsAnimationType=="enterTheDragon"){if(g.browser.msie){var M=700}else{var M=C.imgBgsAnimationDuration-100}$target.css({opacity:"0"}).hide();g.each(F,function(O){s[this].animate({"background-position":s[this].data("bgPos-n")},M,function(){if(O+1==s.length){F.sort(function(){return 0.5-Math.random()});g.each(F,function(P){s[this].animate({"letter-spacing":"0"},y,function(){g(this).animate({top:C.containerHeight},C.imgBgsAnimationDuration,function(){if(P+1==s.length){$current.empty();J.imgIsAnimating=false}})});y=(y*w+u)})}})})}return this};function b(l,m){if(g.browser.msie&&m.ieEnableFilters){l.attr("style",l.attr("style").replace(/filter+[^\;]*./gi,"")).children().each(function(){g(this).attr("style",g(this).attr("style").replace(/filter+[^\;]*./gi,""))})}}function c(l){return g("<div>").append(l.eq(0).clone()).html()}function k(q,p){var l;var o="<div id='"+q.txtBoxIdPrefix+"Container'>";var m="<div id='"+q.imgBgIdPrefix+"Container'>";var n="<div id='"+q.tabIdPrefix+"Container'>";if(g.browser.msie&&g.browser.version==6){if(q.tabBgImgIE6!=null||q.tabBgImgIE6!=""){q.tabBgImg=q.tabBgImgIE6}}obj.find("p").parent().each(function(r){sfcurrent=g(this);cloned=sfcurrent.clone().attr({id:q.tabIdPrefix+r}).children("img").remove().end().wrapInner("<div>").prepend("<span></span>");o+=c(cloned);m+='<div id="'+q.tabIdPrefix+r+'" style="background-image:url('+sfcurrent.find("img").attr("src")+"); width:"+q.imgWidth+"; height:"+q.containerHeight+';"></div>';n+='<a href="#'+q.tabIdPrefix+r+'" id="'+q.tabIdPrefix+r+'"><span><span></span><img class="ff-arrow" src="'+q.tabBgImg+'"/></span><h4>'+sfcurrent.find("h3").text()+"</h4><p>"+sfcurrent.find("img").attr("title")+"</p></a>"});o+="</div>";m+="</div>";n+="</div>";l=(m+o+n);obj.empty().attr({id:q.outputElementId,"class":q.tabsLocation}).css({width:q.containerWidth,height:q.containerHeight}).append(l);obj.addClass("SF-"+p.which);if(g.isFunction(q.endCreateFunction)){q.endCreateFunction.apply(this,[q])}}function a(p,o){var n=g("#"+p.txtBoxIdPrefix+"Container",obj);var l=g("#"+p.imgBgIdPrefix+"Container",obj);var m=g("#"+p.tabIdPrefix+"Container",obj);l.css({width:p.imgWidth,height:p.containerHeight});if(m.children().length<=p.tabLock){p.tabLock=0}if(!p.tabLock){o.calcdTabHeight=Math.round((parseInt(p.containerHeight)/m.children().length)-(1+(1/m.children().length)))}else{o.calcdTabHeight=Math.round((parseInt(p.containerHeight)/p.tabLock)-(1+(1/m.children().length)));o.tabTriggers=obj.after('<div id="'+p.outputElementId+'-nav"><a href="#" id="SF-n-prev"><i>prev</i></a><a href="#" id="SF-n-next"><i>next</i></a></div>').next().children();o.tabTriggers.data("offsetCount",0);o.tabTriggers.data("calcdTabHeight",o.calcdTabHeight);o.tabTriggers.hide().filter("#SF-n-prev").click(function(){if(m.children().length-p.tabLock-o.tabTriggers.data("offsetCount")!=m.children().length-p.tabLock){m.animate({top:"+="+(o.calcdTabHeight+1)},500);o.tabTriggers.data("offsetCount",o.tabTriggers.data("offsetCount")+1);return false}else{return false}}).end().filter("#SF-n-next").click(function(){if(m.children().length-p.tabLock+o.tabTriggers.data("offsetCount")!=0){m.animate({top:"-="+(o.calcdTabHeight+1)},500);o.tabTriggers.data("offsetCount",o.tabTriggers.data("offsetCount")-1);return false}else{return false}}).end().hover(function(){o.overTriggers=true},function(){o.overTriggers=false;g(this).animate({azimuth:"0"},200,function(){if(!o.overTabs){o.tabTriggers.fadeOut(350)}})});o.tabTriggers.filter("#SF-n-prev").css({top:obj[0].offsetTop-o.tabTriggers.filter("#SF-n-prev").height()-1}).end().filter("#SF-n-next").css({top:obj[0].offsetTop+obj.height()});if(p.tabsLocation=="left"){o.tabTriggers.css({left:obj[0].offsetLeft+((parseInt(p.containerWidth)-parseInt(p.imgWidth))/2)-(o.tabTriggers.filter("#SF-n-prev").width()/2)})}else{o.tabTriggers.css({left:obj[0].offsetLeft+(parseInt(p.containerWidth)-((parseInt(p.containerWidth)-parseInt(p.imgWidth))/2))-(o.tabTriggers.filter("#SF-n-prev").width()/2)})}m.hover(function(){o.overTabs=true;if(!o.overTriggers){o.tabTriggers.fadeIn(350)}},function(){o.overTabs=false;g(this).animate({azimuth:"0"},200,function(){if(!o.overTriggers){o.tabTriggers.fadeOut(350)}})})}m.children().css({width:(parseInt(p.containerWidth)-parseInt(p.imgWidth)),height:o.calcdTabHeight}).children("span").css({width:(parseInt(p.containerWidth)-parseInt(p.imgWidth)),height:o.calcdTabHeight}).children("img").css({left:((p.tabsLocation=="left")?parseInt(p.containerWidth)-parseInt(p.imgWidth):"0")}).prev().css({width:(parseInt(p.containerWidth)-parseInt(p.imgWidth))});n.css({width:p.imgWidth,height:p.containerHeight}).children("div:not(.horizontal)").css({width:p.txtBoxWidth,height:"100%"}).end().children("div.horizontal").css({width:p.imgWidth,height:p.txtBoxHorizontalHeight,top:(parseInt(p.containerHeight)-parseInt(p.txtBoxHorizontalHeight)),left:"0px"}).end().find("div span").css({opacity:p.txtBoxOpacity}).next().css({opacity:"1"})}function d(q,p){var l=obj;var o=g("#"+q.txtBoxIdPrefix+"Container",obj).children();var m=g("#"+q.imgBgIdPrefix+"Container",obj).children();var n=g("#"+q.tabIdPrefix+"Container",obj).children();if(q.startTab>n.length||q.startTab<1){if(window.console&&window.console.log){console.log("Your startTab value("+q.startTab+") isn't in range of the number of tabs(1 - "+n.length+"). The first tab has been shown.")}else{alert("Your startTab value("+q.startTab+") isn't in range of the number of tabs(1 - "+n.length+"). The first tab has been shown.")}q.startTab=1}n.click(function(s){if(p.imgIsAnimating){return false}if(!n.hasClass("selected")){if(q.animateInOnLoad){o.css({opacity:"0",display:"none"}).filter(this.hash).siteFeatureTxtBoxAnimationsIn(q);m.css({opacity:"0",display:"none"}).filter(this.hash).css({display:"block"}).animate({opacity:"1"},q.imgBgsAnimationDuration,null);n.filter(this.hash).children("span").animate({width:q.tabsAnimateWidth},q.tabsAnimateInDuration,null)}else{o.css({opacity:"0",display:"none"}).filter(this.hash).css({opacity:"1",display:"block"});m.css({opacity:"0",display:"none"}).filter(this.hash).css({opacity:"1",display:"block"});n.filter(this.hash).children("span").animate({width:q.tabsAnimateWidth},0,null)}}else{if(!g(this).hasClass("selected")){var r=this.hash;o.filter(".selected").siteFeatureTxtBoxAnimationsOut(q).end().filter(this.hash).siteFeatureTxtBoxAnimationsIn(q);m.siteFeatureImgAnimations(q,p,this.hash);n.filter(".selected").children("span").css({width:(parseInt(q.containerWidth)-parseInt(q.imgWidth)),display:"none"});h(n,n.filter(r),q);n.filter(r).children("span").animate({width:q.tabsAnimateWidth},q.tabsAnimateInDuration).css({display:"block"})}else{if(q.activeTabIsLink){window.location=o.filter(this.hash).find("a").attr("href");return false}}}l.find(".selected").removeClass("selected").end().find(this.hash).addClass("selected");return false}).filter(":eq("+(q.startTab-1)+")").click();if(g.browser.msie&&g.browser.version==6){if(o.filter(":eq("+(q.startTab-1)+")").hasClass("horizontal")){o.filter(":eq("+(q.startTab-1)+")").css({height:q.txtBoxHorizontalHeight})}else{o.filter(":eq("+(q.startTab-1)+")").css({height:q.containerHeight})}}if(q.activeWindowIsLink){g("#"+q.txtBoxIdPrefix+"Container").css({cursor:"pointer"}).click(function(t){if(t.target.tagName=="A"){return true}else{var s=n.filter(".selected").attr("href");var r=s.lastIndexOf("#");s=s.substring(r,s.length);window.location=o.filter(s).find("a").attr("href");return false}})}if(q.autoPlay){SiteFeatureAutoPlayInterval["which"+p.which]=setInterval("siteFeatureAutoPlayer("+p.which+")",q.autoPlayInterval);if(q.pauseOnHover){obj.hover(function(){clearInterval(SiteFeatureAutoPlayInterval["which"+p.which])},function(){SiteFeatureAutoPlayInterval["which"+p.which]=setInterval("siteFeatureAutoPlayer("+p.which+")",q.autoPlayInterval)})}}if(q.tabControl=="hover"){n.mouseover(function(){if(p.imgIsAnimating){return false}if(!g(this).hasClass("selected")){var r=this.hash;o.filter(".selected").siteFeatureTxtBoxAnimationsOut(q).end().filter(this.hash).siteFeatureTxtBoxAnimationsIn(q);m.siteFeatureImgAnimations(q,p,this.hash);n.filter(".selected").children("span").css({width:(parseInt(q.containerWidth)-parseInt(q.imgWidth)),display:"none"});h(n,n.filter(r),q);n.filter(r).children("span").css({display:"block"}).animate({width:q.tabsAnimateWidth},q.tabsAnimateInDuration)}l.find(".selected").removeClass("selected").end().find(this.hash).addClass("selected")})}}function h(n,r,p){var q=g("#"+p.outputElementId+"-nav").children(),m=q.data("calcdTabHeight"),o=q.data("offsetCount"),l=n.index(r);if(l==0){n.parent().animate({top:"0"},500);q.data("offsetCount",0)}else{if(l+o==p.tabLock){n.parent().animate({top:"-="+(m+1)},500);q.data("offsetCount",o-1)}}}if(!document.defaultView||!document.defaultView.getComputedStyle){var i=jQuery.curCSS;jQuery.curCSS=function(n,l,o){if(l==="background-position"){l="backgroundPosition"}if(l!=="backgroundPosition"||!n.currentStyle||n.currentStyle[l]){return i.apply(this,arguments)}var m=n.style;if(!o&&m&&m[l]){return m[l]}return i(n,"backgroundPositionX",o)+" "+i(n,"backgroundPositionY",o)}}var f=g.fn.animate;g.fn.animate=function(l){if("background-position" in l){l.backgroundPosition=l["background-position"];delete l["background-position"]}if("backgroundPosition" in l){l.backgroundPosition="("+l.backgroundPosition}return f.apply(this,arguments)};function e(m){m=m.replace(/left|top/g,"0px");m=m.replace(/right|bottom/g,"100%");m=m.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var l=m.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(l[1],10),l[2],parseFloat(l[3],10),l[4]]}g.fx.step.backgroundPosition=function(m){if(!m.bgPosReady){var o=g.curCSS(m.elem,"backgroundPosition");if(!o){o="0px 0px"}o=e(o);m.start=[o[0],o[2]];var l=e(m.options.curAnim.backgroundPosition);m.end=[l[0],l[2]];m.unit=[l[1],l[3]];m.bgPosReady=true}var n=[];n[0]=((m.end[0]-m.start[0])*m.pos)+m.start[0]+m.unit[0];n[1]=((m.end[1]-m.start[1])*m.pos)+m.start[1]+m.unit[1];m.elem.style.backgroundPosition=n[0]+" "+n[1]}})(jQuery);var SiteFeatureAutoPlayInterval=[];function siteFeatureAutoPlayer(b){var a=jQuery(".SF-"+b).find("#"+jQuery.fn.siteFeature.defaults.tabIdPrefix+"Container").children();if((a.length-1)==a.index(a.filter(".selected"))){a.filter(":first").click()}else{a.filter(".selected").next().click()}};
