(function(a){a.fn.multiBanner=function(j,g){var v=this;if(!j||v.length!=1){return this}if(!g){g={}}var V,z,b,f,u,h,H="",Q=0,W=0,n=false,P="none",S=(document.ontouchmove!==undefined),B,e,l,y,s,J,E,N,R,m,A,Y,t,w=null,M=0,K=0,O=false,I=false,k=[],X;var D={preDelay:100,delay3d:200,duration3d:800,durationScale:350,squaresDuration:1500,durationSlice:2000,durationFade:1500,durationSlide:1000,durationBlinds:1000,durationContent:350,effectContent:"fade",hideContent:false,slices3d:4,slices:10,start:0,bg:"#333",effect:"3d",perspective:1000,transition:"linear",plane:"h",squareSize:100,intensity:0.9,fadeColor:"#fff",onChange:a.noop,onChanged:a.noop,slideShow:0,hideNav:false,touchSupport:true,useNav:false,useIndexNav:true,contentClass:"png",progressBar:true,randomEffect:true,fade:true};a.extend(D,g);if(D.effectContent=="none"){D.durationContent=0}if(!a.effects){D.transition="linear"}if(D.slices>20){D.slices=20}if(D.contentClass){D.contentClass=" "+D.contentClass}if(a.browser){if(a.browser.webkit){H="-webkit-"}else{if(a.browser.mozilla){H="-moz-"}else{if(a.browser.opera){H="-o-"}else{if(a.browser.msie){H="-ms-";I=true}}}}}if(typeof j=="string"){a.getJSON(j+"?"+Math.round(new Date().getTime()),function(i){j=i;U();T()})}else{U();T()}function U(){var i=[];if(typeof D.effect!="string"){if(a.inArray("3d",D.effect)>=0&&j.length==4&&G("3d")){D.effect="3d";D.hideNav=true}else{a.each(D.effect,function(Z){if(this=="3d"||!G(String(this))){D.effect.splice(Z,1)}});if(D.effect.length==1){D.effect=D.effect[0]}else{if(D.effect.length==0){D.effect="none"}}}}else{if(!G(D.effect)){D.effect="none"}}}function G(aa){var i=["3d"],Z=["scale"];if(a.inArray(aa,i)<0&&a.inArray(aa,Z)<0){return true}else{if(Modernizr.csstransforms3d&&a.inArray(aa,i)>=0){return true}else{if(Modernizr.csstransforms&&a.inArray(aa,Z)>=0){return true}else{return false}}}}function C(aa,Z){var i=(aa==Z)?100:Math.floor((aa/Z)*100);if(!Y.is(":visible")){Y.css({display:"block",width:i+"%"})}else{Y.animate({width:i+"%"},"swing")}}function r(){var aa=j.length,i=[],Z=(a.browser&&a.browser.mozilla);t=setTimeout(function(){a(".progress-bar",v).css("visibility","visible")},5000);a.each(j,function(ab){i[ab]=document.createElement("img");i[ab].src=this.src;if(Z||(!Z&&!i[ab].complete)){a(i[ab]).bind("load onreadystatechange error",function(){aa--;if(D.progressBar){C(j.length-aa,j.length)}if(!aa){t=clearTimeout(t);F()}a(this).remove()})}else{a(i[ab]).remove();aa--;if(D.progressBar){C(j.length-aa,j.length)}if(!aa){t=clearTimeout(t);F()}}})}function F(){a(".loading",v).remove();if(D.touchSupport&&S){if(D.effect!="3d"){v.swipe({swipeUp:function(){D.plane="v";d("back")},swipeDown:function(){D.plane="v";d("forward")},swipeLeft:function(){D.plane="h";d("back")},swipeRight:function(){D.plane="h";d("forward")}})}else{v.swipe({swipeUp:function(){d("back")},swipeDown:function(){d("forward")}})}}d(V,true);if(D.slideShow!=0){p("start")}}function T(){if(D.effect=="3d"&&j.length!=4){D.effect=D.fallbackEffect}if(D.hideContent){a(document).mousemove(function(aA){M=aA.pageX,K=aA.pageY})}V=(D.start<j.length)?D.start:0,z=(V==0)?j.length-1:V-1,b=v.innerWidth(),f=v.innerHeight();var ao="",av="",Z="",am="",al="",ay="",ap=Math.floor(b/D.slices3d),at=Math.floor(b/D.slices),az=Math.floor(f/D.slices),aq=f/2;if(S&&D.hideContent){D.hideContent=false}if(typeof D.effect=="string"&&D.effect=="3d"){W=((D.slices3d-1)*D.delay3d)+D.duration3d+50;var aa=0,au="width:"+ap+"px;height:"+f+"px;position:absolute;"+H+"transform-style:preserve-3d;"+H+"transform:translateZ(-"+aq+"px);"+H+"transition:"+H+"transform "+(D.duration3d/1000)+"s ease-in-out;",an="display:block;position:absolute;height:"+f+"px;background:"+D.bg+";",ad=an+"width:"+ap+"px;",ak=an+"width:"+f+"px;",ax='<div class="shadow" style="width:100%;height:100%;position:absolute;"></div>',ab,aj,ar=-101;ao+='<div class="viewport" style="width:100%;height:100%;'+H+"perspective:"+D.perspective+";"+H+"perspective-origin: 50% 50%;"+H+'perspective-transform:translateZ(0px);z-index:1;position:relative;">';if(((D.slices3d/2)%2==0)){aj=D.slices3d/2;ab=aj-1}else{ab=aj=(D.slices3d-1)/2}for(c=0;c<D.slices3d;c++){if(c<ab){ar=ar+10}else{if(c>aj){ar=ar-10}else{ar=0}}ao+='<div class="slice3d" style="'+au+"z-index:"+ar+";left:"+aa+'px;"><div class="front" style="'+ad+"background-image: url("+j[0].src+");background-position: -"+aa+"px 0px;"+H+"transform:rotateY(0deg) translateZ("+aq+'px);">'+ax+'</div><div class="top" style="'+ad+"background-image: url("+j[1].src+");background-position: -"+aa+"px 0px;"+H+"transform:rotateX(90deg) translateZ("+aq+'px);">'+ax+'</div><div class="back" style="'+ad+"background-image: url("+j[2].src+");background-position: -"+aa+"px 0px;"+H+"transform:rotateX(180deg) translateZ("+aq+'px);">'+ax+'</div><div class="bottom" style="'+ad+"background-image: url("+j[3].src+");background-position: -"+aa+"px 0px;"+H+"transform:rotateX(-90deg) translateZ("+aq+'px);">'+ax+'</div><div class="right" style="'+ak+H+"transform:rotateY(90deg) translateZ("+(ap-aq)+'px);"></div><div class="left" style="'+ak+H+"transform:rotateY(-90deg) translateZ("+aq+'px);"></div></div>';aa+=ap}ao+="</div>";a(window).focus(function(){if(D.slideShow&&!w){p("start")}}).blur(function(){p("stop")})}else{v.css({overflow:"hidden"});var aa,ae,ah=Math.ceil(b/D.squareSize),i=Math.ceil(f/D.squareSize),aw=ah*i;ao+='<div class="wrapper abs" style="position:absolute;top:0;left:0;width:'+b*2+"px;height:"+f*2+'px;overflow:hidden;">';ao+='<div class="image abs" style="position:absolute;top:0;left:0;width:100%;height:100%;background-image:url('+j[V].src+');"></div>';ao+='<div class="newimage abs" style="position:absolute;top:0;left:0;width:'+b+"px;height:"+f+'px;background-repeat:no-repeat;"></div>';if((typeof D.effect=="string"&&(D.effect=="slice"||D.effect=="blinds"))||a.inArray("slice",D.effect)>=0||a.inArray("blinds",D.effect)>=0){ae=0,aa=0;for(c=0;c<D.slices;c++){if(c==0||c==D.slices-1){var ag=(c==0)?" first":" last"}else{var ag=""}ao+='<div class="slice'+ag+'" style="position:absolute;width:'+at+"px;height:"+f+"px;background-position:-"+aa+"px 0px;top:-"+f+"px;left: "+aa+'px;"></div>';aa+=at}}if((typeof D.effect=="string"&&D.effect.search("squares")>=0)||a.inArray("squares",D.effect)>=0||a.inArray("squaresdiag",D.effect)>=0||a.inArray("squaresrandom",D.effect)>=0){var ai=0,ac=1;for(c=0;c<(ah+i);c++){if(c<=ah-1){k[c]=[c];for(x=0;x<ai;x++){k[c].push(c+((x+1)*(ah-1)))}if(ai<i-1){ai++}}else{ai--;k[c]=[c+(ac*ah)-ac];for(x=ai;x>-1;x--){k[c].push((c+(ac*ah)-ac)+(x*(ah-1)))}ac++}}ae=0,aa=0;for(c=0;c<aw;c++){if(c==0||c==aw-1){var ag=(c==0)?" first":" last"}else{var ag=""}ao+='<div class="square'+ag+'" style="position:absolute;width:'+D.squareSize+"px;height:"+D.squareSize+"px;background-image:url("+j[V+1].src+");background-position:-"+aa+"px -"+ae+"px;top:"+ae+"px;left:"+aa+'px;visibility:hidden;"></div>';aa+=D.squareSize;if(aa>=b){aa=0;ae+=D.squareSize}}}ao+="</div>"}al='<div class="overimage" style="width:100%;height:100%;overflow:hidden;position:absolute;top:0;left:0;z-index:10;"><div class="caption'+D.contentClass+'" style="position:absolute;"></div>';if(D.useNav){av='<div class="nav back'+D.contentClass+'"></div><div class="nav forward'+D.contentClass+'"></div>'}if(D.useIndexNav){Z='<div class="navindex'+D.contentClass+'"><div class="left'+D.contentClass+'"></div><div class="right'+D.contentClass+'">';for(c=0;c<j.length;c++){var af=(c==V)?" selected":"";Z+='<div class="index'+D.contentClass+af+'"></div>'}Z+='<div style="clear:both"></div></div></div>'}v.empty().html(ao+al+av+Z+'<div class="clickimage" style="width:100%;height:100%;position:absolute;top:0;left:0;"></div><div class="loading" style="z-index:20;"><div class="progress-bar" style="visibility:hidden;"><div class="bar" style="display:none;"></div></div></div>');B=a(".nav.forward",v),e=a(".nav.back",v),l=a(".navindex",v),y=a(".abs",v),s=a(".wrapper",v),J=a(".image",v),E=a(".caption",v),N=a(".newimage",v),m=a(".slice3d",v),A=a(".slice",v),R=a(".square",v),Y=a(".progress-bar .bar",v);if(j[V].cls){E.addClass(j[V].cls)}X={top:parseInt(E.css("top")),left:parseInt(E.css("left"))};a.each([B,e,l,E],function(){this.css({opacity:0,zIndex:10})});B.click(function(){d("forward")});e.click(function(){d("back")});a(".index",l).each(function(aA){a(this).click(function(){d(aA)})});if(D.hideContent){v.mouseenter(function(){L("show")}).mouseleave(function(){L("hide")})}else{L("show",true)}r();return this}function p(aa,Z){if(aa=="start"){var i=(D.slideShow<0)?"back":"forward",ab=Math.abs(D.slideShow)-D.durationContent;w=setInterval(function(){d(i,false,true)},ab)}else{w=clearInterval(w)}}function L(ab,Z){var ae=(Z||D.effectContent=="none")?0:D.durationContent;if(ab=="show"&&!n){O=true;if(j[V].caption){E.css({opacity:0,visibility:"visible"});E.html(j[V].caption);var i=E.outerWidth(),aa=E.outerHeight(),ad=X.left,ac=X.top;switch(D.effectContent){case"sliderightfade":case"slideright":case"slideleftfade":case"slideleft":ad=(D.effectContent.search("right")>=0)?-i:b;break;case"slidetopfade":case"slidetop":case"slidebottomfade":case"slidebottom":ac=(D.effectContent.search("top")>=0)?-aa:f;break}E.css({left:ad,top:ac,opacity:(D.effectContent.search("fade")>=0)?0:1}).animate({opacity:1,left:X.left,top:X.top},ae,function(){if(I){this.style.removeAttribute("filter")}})}a.each([B,e,l],function(){this.css("visibility","visible").animate({opacity:1},ae,function(){if(I){this.style.removeAttribute("filter")}})})}else{if(ab=="hide"){if(O){O=false;var i=E.outerWidth(),aa=E.outerHeight(),ad=X.left,ac=X.top;switch(D.effectContent){case"sliderightfade":case"slideright":case"slideleftfade":case"slideleft":ad=(D.effectContent.search("right")>0)?-i:b;break;case"slidetopfade":case"slidetop":case"slidebottomfade":case"slidebottom":ac=(D.effectContent.search("top")>0)?-aa:f;break}E.animate({opacity:0,left:ad,top:ac},ae,function(){if(I){this.style.removeAttribute("filter")}})}if(D.hideNav||D.hideContent){a.each([B,e,l],function(){this.animate({opacity:0},ae,function(){a(this).css("visibility","hidden")})})}}}}function d(aa,i,Z){if(aa==V||n){return false}n=true;if(!Z){p("stop")}L("hide",(Z)?false:true);setTimeout(function(){o(aa,i)},(Z)?D.durationContent:0)}function o(aa,ao){n=true;var al=0,am="forward",ae=v.position(),ak="";if(aa===false||aa=="forward"){aa=(V==j.length-1)?0:V+1}else{if(aa=="back"){am="back";aa=(V==0)?j.length-1:V-1}else{if(aa<V){am="back"}}}a(".selected",l).removeClass("selected");a(".index",l).eq(aa).addClass("selected");D.onChange();if(typeof D.effect!="string"){ak=D.effect[Math.floor(Math.random()*D.effect.length)];D.plane=(Math.floor(Math.random()*2))?"h":"v"}else{ak=D.effect}if(ak!="3d"&&ao){J.css("background-image","url("+j[aa].src+")")}else{v.css({backgroundColor:(ak=="flash")?D.fadeColor:"none"});a.each([N,R,A],function(){this.css({opacity:0,visibility:"visible",backgroundImage:"url("+j[aa].src+")"})});y.css({top:0,left:0});switch(ak){case"scale":if(!ao){N.css(H+"transition",H+"transform 0s").css(H+"transform","scale(0)");setTimeout(function(){N.css(H+"transition",H+"transform "+(D.durationScale/1000)+"s ease-in-out").css(H+"transform","scale(1)").css("opacity",1)},10)}else{N.css(H+"transition",H+"transform 0s").css(H+"transform","scale(1)").css("opacity",1)}setTimeout(function(){J.css("background-image","url("+j[aa].src+")");q(aa,ao)},(ao)?0:D.durationScale+10);break;case"slide":if(D.plane=="h"){N.css({left:(am=="forward")?b:-b,opacity:(D.fade)?0:1}).animate({left:0,opacity:1},{duration:D.durationSlide,specialEasing:{opacity:"linear",left:D.transition},complete:function(){J.css("background-image","url("+j[aa].src+")");q(aa,ao)}})}else{N.css({top:(am=="forward")?-f:f,opacity:(D.fade)?0:1}).animate({top:0,opacity:1},{duration:D.durationSlide,specialEasing:{opacity:"linear",top:D.transition},complete:function(){J.css("background-image","url("+j[aa].src+")");q(aa,ao)}})}break;case"push":if(D.plane=="h"){N.css({left:(am=="forward")?b:0,opacity:1});J.css("left",(am=="forward")?0:b);s.css("left",(am=="forward")?0:-b).animate({left:(am=="forward")?-b:0},D.durationSlide,D.transition,function(){J.css({left:0,top:0,backgroundImage:"url("+j[aa].src+")"});s.css("left",0);q(aa,ao)})}else{N.css({top:(am=="forward")?0:f,opacity:1});J.css("top",(am=="forward")?f:0);s.css("top",(am=="forward")?-f:0).animate({top:(am=="forward")?0:-f},D.durationSlide,D.transition,function(){J.css({left:0,top:0,backgroundImage:"url("+j[aa].src+")"});s.css("top",0);q(aa,ao)})}break;case"blinds":var ad=Math.floor(b/A.length);A.css({top:0,width:0,opacity:(D.fade)?0:1}).animate({width:ad,opacity:1},D.durationBlinds,function(){if(a(this).hasClass("last")){J.css("background-image","url("+j[aa].src+")");q(aa,ao)}});break;case"slice":var ap=Math.floor(D.durationSlice/A.length),ac=0;A.each(function(aq){var ar=a(this);setTimeout(function(){ar.css({top:((am=="forward")?-f:f),opacity:(D.fade)?0:1}).animate({top:0+"px",opacity:1},{duration:ap*2,specialEasing:{opacity:"linear",top:D.transition},complete:function(){if(aq==A.length-1){J.css("background-image","url("+j[aa].src+")");q(aa,ao)}}})},ac);ac+=ap});break;case"flash":case"fade":if(ak=="flash"){J.animate({opacity:0},D.durationFade/2,function(){N.animate({opacity:1},D.durationFade/2,function(){J.css({opacity:1,backgroundImage:"url("+j[aa].src+")"});q(aa,ao)})})}else{N.animate({opacity:1},D.durationFade,function(){J.css({opacity:1,backgroundImage:"url("+j[aa].src+")"});q(aa,ao)})}break;case"squaresdiag":R.css("background-image","url("+j[aa].src+")");var ag=Math.ceil(b/D.squareSize),i=Math.ceil(f/D.squareSize),ap=Math.floor((D.squaresDuration-350)/(ag+i)),ac=0,Z=k;if(am=="back"){Z.reverse()}a.each(Z,function(aq){for(x=0;x<this.length;x++){R.eq(this[x]).delay(ac).animate({opacity:1},350,function(){if(a(this).hasClass((am=="forward")?"last":"first")){J.css("background-image","url("+j[aa].src+")");q(aa,ao)}})}ac+=ap});break;case"squares":case"squaresrandom":var ap=Math.floor((D.squaresDuration-350)/R.length),ac=0,ab=function(au){for(var ar,aq,at=au.length;at;ar=parseInt(Math.random()*at),aq=au[--at],au[at]=au[ar],au[ar]=aq){}return au},Z=[];for(c=0;c<R.length;c++){Z.push(c)}R.css("background-image","url("+j[aa].src+")");if(ak=="squaresrandom"){Z=ab(Z)}for(c=0;c<R.length;c++){setTimeout(function(){var aq=Z.splice(0,1);if(Z.length==0){R.eq(aq).animate({opacity:1},350,function(){J.css("background-image","url("+j[aa].src+")");q(aa,ao)})}else{R.eq(aq).animate({opacity:1},350)}},ac);ac+=ap}break;case"3d":var ah=true,af=1,an=[aa],ai=[V],aj=f/2;switch(aa){case 0:if(V==1){ah=false;an=[1];ai=[0]}else{if(V==2){af=2;ah=false;an=[2];ai=[1,0]}}break;case 1:if(V==2){ah=false;an=[2];ai=[1]}else{if(V==3){af=2;ah=false;an=[3];ai=[2,1]}}break;case 2:if(V==0){ah=false;af=2;an=[0];ai=[3,2]}else{if(V==3){ah=false;an=[3];ai=[2]}}break;case 3:if(V==0){ah=false;an=[0];ai=[3]}else{if(V==1){af=2;ah=false;an=[1];ai=[0,3]}}break}var ap=0;al=(ah)?Q-(af*90):Q+(af*90);if(ao){m.each(function(){var aq=a(this);a(".shadow",aq).css("opacity",0);aq.css(H+"transition",H+"transform 0s").css(H+"transform","translateZ(-"+aj+"px) rotateX("+al+"deg)");setTimeout(function(){aq.css(H+"transition",H+"transform "+(D.duration3d/1000)+"s ease-in-out")},10)})}else{m.each(function(){var aq=a(this),ar=function(){var au=a(".shadow",aq),at={backgroundColor:"#000",opacity:(ah)?0:D.intensity},av={backgroundColor:"#fff",opacity:(ah)?D.intensity:0};if(ai.length==1){au.eq(ai[0]).css(at).animate({opacity:(ah)?D.intensity:0},(af==1)?D.duration3d:D.duration3d/2)}else{au.eq(ai[0]).css(at).animate({opacity:(ah)?D.intensity:0},D.duration3d/2,function(){au.eq(ai[1]).css(at).animate({opacity:(ah)?D.intensity:0},D.duration3d/2);a(this).css({opacity:0,backgroundColor:"#fff"}).animate({opacity:D.intensity},D.duration3d/2)})}if(an.length==1){au.eq(an[0]).css(av).animate({opacity:(ah)?0:D.intensity},(af==1)?D.duration3d:D.duration3d/2)}else{au.eq(an[0]).css(av).animate({opacity:(ah)?0:D.intensity},D.duration3d/2,function(){au.eq(an[1]).css(av).animate({opacity:(ah)?0:D.intensity},D.duration3d/2);a(this).css({opacity:0,backgroundColor:"#000"}).animate({opacity:D.intensity},D.duration3d/2)})}au.eq(aa).stop().animate({opacity:0},D.duration3d);aq.css(H+"transform","translateZ(-"+aj+"px) rotateX("+al+"deg)")};setTimeout(ar,ap);ap+=D.delay3d})}setTimeout(function(){Q=al;q(aa,ao)},(ao)?0:W);break;default:J.css("background-image","url("+j[aa].src+")");q(aa,ao);break}}return true}function q(aa,i){var Z=v.position();prevI=V;V=aa;if(j[prevI].cls){E.removeClass(j[prevI].cls)}if(j[V].cls){E.addClass(j[V].cls)}n=false;if(!D.hideContent){L("show")}else{if(D.hideContent&&M>=Z.left&&M<=Z.left+b&K>=Z.top&&K<=Z.top+f){v.trigger("mouseenter")}}if(j[V].url){a(".clickimage",v).css("cursor","pointer").click(function(){document.location=j[V].url})}else{a(".clickimage",v).css("cursor","default").unbind("click")}D.onChanged()}}})(jQuery);jQuery(function(a){a.fn.contentSlide=function(b){if(!b){b={}}var d={speed:200,blockSpeed:500,touchSupport:true,step:1,catIndex:true};a.extend(d,b);return this.each(function(){var f=a(this),C=a("ul",f),z=0,u=[],o=[],j=C.children(":first-child").width(),r=C.children(":first-child").outerWidth(),g=C.children(),v=0,k=0,D=false,w=0,n=0,t=0,m=(document.ontouchmove!==undefined);C.width(g.length*r).wrap('<div class="container"></div>');f.append('<div class="nav back"></div><div class="scroll-bar-wrap" style="position:relative;overflow:hidden;"><div class="scroll-bar"></div></div><div class="nav forward"></div>');function s(K){K=K.toLowerCase();K=K.replace(/_/g," ");var I=K.split(" ");var H=["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"];for(var F=0;F<I.length;F++){var J=I[F].split("-");for(var G=0;G<J.length;G++){if(H.indexOf(J[G].toLowerCase())<0){J[G]=J[G].substring(0,1).toUpperCase()+J[G].substring(1)}}I[F]=J.join("-")}K=I.join(" ");K=K.substring(0,1).toUpperCase()+K.substring(1);return K}function p(){u=[];o=[];v=Math.floor(f.width()/r);k=100/(g.length-(f.width()/r));t=g.length-v;var G=0,i=0,F="";g.each(function(J){var I=a(this),H=I.attr("class");I.width(j);if(G<=100){G+=k;i+=r}if(H&&H!=F){F=I.attr("class");o.push({name:s(F),idx:J})}u.push({pos:i,percent:parseFloat(G)})});u.push({pos:Math.abs(f.width()-C.width()),percent:100});a(".nav,.scroll-bar-wrap",f).css("visibility",(g.length>v)?"visible":"hidden")}p();var B=a(".scroll-bar").slider({slide:function(F,i){if(C.width()>f.width()){C.css("margin-left",Math.round(i.value/100*(f.width()-C.width()))+"px")}else{C.css("margin-left",0)}},stop:function(F,i){n=w;w=y(i.value)}});var E=B.find(".ui-slider-handle").mousedown(function(){B.width(E.width())}).mouseup(function(){B.width("100%")}).attr("href","javascript:void(0)").append('<div class="handle-inner left"></div><div class="handle-inner right"></div>').wrap('<div class="ui-handle-helper-parent"></div>').parent();a(".scroll-bar-wrap",f).prepend('<div class="cat-wrap" style="position:absolute;top:0;left:0;"></div>');f.css("overflow","hidden");a(".nav.forward",f).mousedown(function(i){D=true;q("forward");return false}).mouseup(function(i){D=false;return false});a(".nav.back",f).mousedown(function(i){D=true;q("back");return false}).mouseup(function(i){D=false;return false});if(d.touchSupport&&m){C.swipe({swipeRight:function(F,i,G){q("forward",v,d.blockSpeed)},swipeLeft:function(F,i,G){q("back",v,d.blockSpeed)}}).swipe({fingers:2,swipeRight:function(F,i,G){q("forward",u.length,d.blockSpeed)},swipeLeft:function(F,i,G){q("back",u.length,d.blockSpeed)}})}function y(i){for(c=0;c<u.length;c++){if(i<=u[c].percent){return c}}}function q(F,i,I){if(!F){F="forward"}if((F=="forward"&&z==13)||(F=="back"&&w==0)){return false}if(!i){i=d.step}var H,G=(F=="forward")?w+i:w-i;if(G<0){i=Math.abs(0-w);G=0}else{if(G>t){i=G-t;G=t}}H=parseInt(C.css("margin-left"));H=Math.abs(H);if(!I){I=Math.abs((H-u[G].pos)/j)*d.speed}C.animate({marginLeft:-u[G].pos},{easing:"linear",duration:(I)?I:I,step:function(){l()},complete:function(){w=G;if(D&&((F=="forward"&&w<t)||(F=="back"&&w>0))){q(F,1,(I>50)?I-50:50)}}});return false}function A(i){if(i==100){return u[u.length-1].pos}else{if(i==0){return 0}}for(c=0;c<u.length;c++){if(i==u[c].percent){return u[c].pos}}return 0}function h(){var G=B.find(".ui-slider-handle"),H=C.width()-f.width(),I=H/C.width(),i=f.width()-(I*f.width()),F="";G.css({width:Math.ceil(i),marginLeft:-i/2});E.width("").width(B.width()-i);a(".right",G).width(G.width()-a(".left",G).width());a(".cat-wrap",f).width(B.width()-i);if(d.catIndex){a.each(o,function(){F+='<div class="cat" style="width:100%;cursor:default;display:block;position:absolute;top:0;left:'+(this.idx*(100/t))+'%;">'+this.name+"</div>"});if(F){a(".cat-wrap",f).empty().html(F)}}if(a.browser&&a.browser.webkit){setTimeout(function(){var J=parseInt(G.css("margin-left"),10);G.animate({marginLeft:J+1},0,function(){a(this).animate({marginLeft:J-1},0)})},10)}}function l(){var G=f.width()-C.width(),F=C.css("margin-left")==="auto"?0:parseInt(C.css("margin-left")),i=Math.round(F/G*100);B.slider("value",i)}function e(){var i=C.width()+parseInt(C.css("margin-left"),10),F=f.width()-i;if(F>0){C.css("margin-left",parseInt(C.css("margin-left"),10)+F)}}a(window).resize(function(){l();h();e();p()});setTimeout(h,10)})}});


/*
 * touchSwipe - jQuery Plugin
 * http://plugins.jquery.com/project/touchSwipe
 * http://labs.skinkers.com/touchSwipe/
 *
 * Copyright © 2010 Matt Bryson (www.skinkers.com)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * $version: 1.2.3
 *
 * Changelog
 * $Date: 2010-12-12 (Wed, 12 Dec 2010) $
 * $version: 1.0.0 
 * $version: 1.0.1 - removed multibyte comments
 *
 * $Date: 2011-21-02 (Mon, 21 Feb 2011) $
 * $version: 1.1.0 	- added allowPageScroll property to allow swiping and scrolling of page
 *					- changed handler signatures so one handler can be used for multiple events
 * $Date: 2011-23-02 (Wed, 23 Feb 2011) $
 * $version: 1.2.0 	- added click handler. This is fired if the user simply clicks and does not swipe. The event object and click target are passed to handler.
 *					- If you use the http://code.google.com/p/jquery-ui-for-ipad-and-iphone/ plugin, you can also assign jQuery mouse events to children of a touchSwipe object.
 * $version: 1.2.1 	- removed console log!
 *
 * $version: 1.2.2 	- Fixed bug where scope was not preserved in callback methods. 
 *
 * $Date: 2011-28-04 (Thurs, 28 April 2011) $
 * $version: 1.2.4 	- Changed licence terms to be MIT or GPL inline with jQuery. Added check for support of touch events to stop non compatible browsers erroring.
 *
 * A jQuery plugin to capture left, right, up and down swipes on touch devices.
 * You can capture 2 finger or 1 finger swipes, set the threshold and define either a catch all handler, or individual direction handlers.
 * Options:
 * 		swipe 		Function 	A catch all handler that is triggered for all swipe directions. Handler is passed 3 arguments, the original event object, the direction of the swipe : "left", "right", "up", "down" and the distance of the swipe.
 * 		swipeLeft	Function 	A handler that is triggered for "left" swipes. Handler is passed 3 arguments, the original event object, the direction of the swipe : "left", "right", "up", "down" and the distance of the swipe.
 * 		swipeRight	Function 	A handler that is triggered for "right" swipes. Handler is passed 3 arguments, the original event object, the direction of the swipe : "left", "right", "up", "down" and the distance of the swipe.
 * 		swipeUp		Function 	A handler that is triggered for "up" swipes. Handler is passed 3 arguments, the original event object, the direction of the swipe : "left", "right", "up", "down" and the distance of the swipe.
 * 		swipeDown	Function 	A handler that is triggered for "down" swipes. Handler is passed 3 arguments, the original event object, the direction of the swipe : "left", "right", "up", "down" and the distance of the swipe.
 *		swipeStatus Function 	A handler triggered for every phase of the swipe. Handler is passed 4 arguments: event : The original event object, phase:The current swipe face, either "start�, "move�, "end� or "cancel�. direction : The swipe direction, either "up�, "down�, "left " or "right�.distance : The distance of the swipe.
 *		click		Function	A handler triggered when a user just clicks on the item, rather than swipes it. If they do not move, click is triggered, if they do move, it is not.
 *
 * 		fingers 	int 		Default 1. 	The number of fingers to trigger the swipe, 1 or 2.
 * 		threshold 	int  		Default 75.	The number of pixels that the user must move their finger by before it is considered a swipe.
 *		triggerOnTouchEnd Boolean Default true If true, the swipe events are triggered when the touch end event is received (user releases finger).  If false, it will be triggered on reaching the threshold, and then cancel the touch event automatically.
 *		allowPageScroll String Default "auto". How the browser handles page scrolls when the user is swiping on a touchSwipe object. 
 *										"auto" : all undefined swipes will cause the page to scroll in that direction.
 *										"none" : the page will not scroll when user swipes.
 *										"horizontal" : will force page to scroll on horizontal swipes.
 *										"vertical" : will force page to scroll on vertical swipes.
 *
 * This jQuery plugin will only run on devices running Mobile Webkit based browsers (iOS 2.0+, android 2.2+)
 */
(function(a){a.fn.swipe=function(b){if(!this)return false;var c={fingers:1,threshold:75,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,click:null,triggerOnTouchEnd:true,allowPageScroll:"auto"};var d="left";var e="right";var f="up";var g="down";var h="none";var i="horizontal";var j="vertical";var k="auto";var l="start";var m="move";var n="end";var o="cancel";var p="start";if(b.allowPageScroll==undefined&&(b.swipe!=undefined||b.swipeStatus!=undefined))b.allowPageScroll=h;if(b)a.extend(c,b);return this.each(function(){function D(){var a=C();if(a<=45&&a>=0)return d;else if(a<=360&&a>=315)return d;else if(a>=135&&a<=225)return e;else if(a>45&&a<135)return g;else return f}function C(){var a=s.x-t.x;var b=t.y-s.y;var c=Math.atan2(b,a);var d=Math.round(c*180/Math.PI);if(d<0)d=360-Math.abs(d);return d}function B(){return Math.round(Math.sqrt(Math.pow(t.x-s.x,2)+Math.pow(t.y-s.y,2)))}function A(a,b){if(c.allowPageScroll==h){a.preventDefault()}else{var l=c.allowPageScroll==k;switch(b){case d:if(c.swipeLeft&&l||!l&&c.allowPageScroll!=i)a.preventDefault();break;case e:if(c.swipeRight&&l||!l&&c.allowPageScroll!=i)a.preventDefault();break;case f:if(c.swipeUp&&l||!l&&c.allowPageScroll!=j)a.preventDefault();break;case g:if(c.swipeDown&&l||!l&&c.allowPageScroll!=j)a.preventDefault();break}}}function z(a,h){if(c.swipeStatus)c.swipeStatus.call(b,a,h,direction||null,distance||0);if(h==o){if(c.click&&r==1&&(isNaN(distance)||distance==0))c.click.call(b,a,a.target)}if(h==n){if(c.swipe){c.swipe.call(b,a,direction,distance)}switch(direction){case d:if(c.swipeLeft)c.swipeLeft.call(b,a,direction,distance);break;case e:if(c.swipeRight)c.swipeRight.call(b,a,direction,distance);break;case f:if(c.swipeUp)c.swipeUp.call(b,a,direction,distance);break;case g:if(c.swipeDown)c.swipeDown.call(b,a,direction,distance);break}}}function y(a){r=0;s.x=0;s.y=0;t.x=0;t.y=0;u.x=0;u.y=0}function x(a){a.preventDefault();distance=B();direction=D();if(c.triggerOnTouchEnd){p=n;if(r==c.fingers&&t.x!=0){if(distance>=c.threshold){z(a,p);y(a)}else{p=o;z(a,p);y(a)}}else{p=o;z(a,p);y(a)}}else if(p==m){p=o;z(a,p);y(a)}}function w(a){if(p==n||p==o)return;t.x=a.touches[0].pageX;t.y=a.touches[0].pageY;direction=D();r=a.touches.length;p=m;A(a,direction);if(r==c.fingers){distance=B();if(c.swipeStatus)z(a,p,direction,distance);if(!c.triggerOnTouchEnd){if(distance>=c.threshold){p=n;z(a,p);y(a)}}}else{p=o;z(a,p);y(a)}}function v(a){p=l;r=a.touches.length;distance=0;direction=null;if(r==c.fingers){s.x=t.x=a.touches[0].pageX;s.y=t.y=a.touches[0].pageY;if(c.swipeStatus)z(a,p)}else{y(a)}}var b=a(this);var q=null;var r=0;var s={x:0,y:0};var t={x:0,y:0};var u={x:0,y:0};try{this.addEventListener("touchstart",v,false);this.addEventListener("touchmove",w,false);this.addEventListener("touchend",x,false);this.addEventListener("touchcancel",y,false)}catch(E){}})}})(jQuery)


/* Modernizr 2.0.6 (Custom Build) | MIT & BSD
 * Build: http://www.modernizr.com/download/#-csstransforms-csstransforms3d-teststyles-testprop-prefixes
 */
;window.Modernizr=function(a,b,c){function z(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function y(a,b){return!!~(""+a).indexOf(b)}function x(a,b){return typeof a===b}function w(a,b){return v(m.join(a+";")+(b||""))}function v(a){j.cssText=a}var d="2.0.6",e={},f=b.documentElement,g=b.head||b.getElementsByTagName("head")[0],h="modernizr",i=b.createElement(h),j=i.style,k,l=Object.prototype.toString,m=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),n={},o={},p={},q=[],r=function(a,c,d,e){var g,i,j,k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);g=["&shy;","<style>",a,"</style>"].join(""),k.id=h,k.innerHTML+=g,f.appendChild(k),i=c(k,a),k.parentNode.removeChild(k);return!!i},s,t={}.hasOwnProperty,u;!x(t,c)&&!x(t.call,c)?u=function(a,b){return t.call(a,b)}:u=function(a,b){return b in a&&x(a.constructor.prototype[b],c)};var A=function(a,c){var d=a.join(""),f=c.length;r(d,function(a,c){var d=b.styleSheets[b.styleSheets.length-1],g=d.cssRules&&d.cssRules[0]?d.cssRules[0].cssText:d.cssText||"",h=a.childNodes,i={};while(f--)i[h[f].id]=h[f];e.csstransforms3d=i.csstransforms3d.offsetLeft===9},f,c)}([,["@media (",m.join("transform-3d),("),h,")","{#csstransforms3d{left:9px;position:absolute}}"].join("")],[,"csstransforms3d"]);n.csstransforms=function(){return!!z(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},n.csstransforms3d=function(){var a=!!z(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in f.style&&(a=e.csstransforms3d);return a};for(var B in n)u(n,B)&&(s=B.toLowerCase(),e[s]=n[B](),q.push((e[s]?"":"no-")+s));v(""),i=k=null,e._version=d,e._prefixes=m,e.testProp=function(a){return z([a])},e.testStyles=r;return e}(this,this.document);







