%PDF- %PDF-
Direktori : /home/kfvehpdt/decominus.com/modules/pluginadder/ |
Current File : /home/kfvehpdt/decominus.com/modules/pluginadder/plugins.js |
var flexmin=1;var flexmax=5;$(document).ready(function(){if($('#center_column').width()<=280){flexmin=1;flexmax=1;} else if($('#center_column').width()<=440){flexmin=2;flexmax=2;} else if($('#center_column').width()<980){flexmin=3;flexmax=3;} else if($('#center_column').width()>=1240){flexmin=1;flexmax=5;} else if($('#center_column').width()>=980){flexmin=1;flexmax=4;}});var manFlexMin=2;var manFlexmMax=10;$(document).ready(function(){if($('#center_column').width()<=280){manFlexMin=2;manFlexmMax=2;} else if($('#center_column').width()<=440){manFlexMin=3;manFlexmMax=3;} else if($('#center_column').width()<980){manFlexMin=5;manFlexmMax=5;} else if($('#center_column').width()>=1240){manFlexMin=2;manFlexmMax=10;} else if($('#center_column').width()>=980){manFlexMin=2;manFlexmMax=8;}});$.fn.equalHeights=function(px){$(this).each(function(){var currentTallest=0;$(this).children().each(function(i){if($(this).height()>currentTallest){currentTallest=$(this).height();}});if(!px&&Number.prototype.pxToEm)currentTallest=currentTallest.pxToEm();if($.browser.msie&&$.browser.version==6.0){$(this).children().css({'height':currentTallest});} $(this).children().css({'min-height':currentTallest});});return this;};(function($){$.fn.equalHeights2=function(minHeight,maxHeight){tallest=(minHeight)?minHeight:0;this.each(function(){if($(this).height()>tallest){tallest=$(this).height();}});if((maxHeight)&&tallest>maxHeight)tallest=maxHeight;return this.each(function(){$(this).height(tallest).css("overflow","auto");});}})(jQuery);function setHeight(column){} function setHeight2(column){maxHeight=0;column=$(column);column.each(function(){if($(this).height()>maxHeight){maxHeight=$(this).height();}});column.height(maxHeight);} (function($){$.extend($.fx.step,{backgroundPosition:function(fx){if(fx.state===0&&typeof fx.end=='string'){var start=$.curCSS(fx.elem,'backgroundPosition');start=toArray(start);fx.start=[start[0],start[2]];var end=toArray(fx.end);fx.end=[end[0],end[2]];fx.unit=[end[1],end[3]];} var nowPosX=[];nowPosX[0]=((fx.end[0]-fx.start[0])*fx.pos)+fx.start[0]+fx.unit[0];nowPosX[1]=((fx.end[1]-fx.start[1])*fx.pos)+fx.start[1]+fx.unit[1];fx.elem.style.backgroundPosition=nowPosX[0]+' '+nowPosX[1];function toArray(strg){strg=strg.replace(/left|top/g,'0px');strg=strg.replace(/right|bottom/g,'100%');strg=strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var res=strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];}}});})(jQuery);/*!matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license*//*!NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part*/window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='­<style media="'+h+'"> #mq-test-1 { width: 42px; }</style>';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document);/*!Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs*/(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!o[z]){if(A.styleSheet&&A.styleSheet.rawCssText){m(A.styleSheet.rawCssText,z,C);o[z]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(z)&&!g)||z.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:z,media:C})}}}}u()},u=function(){if(d.length){var x=d.shift();n(x.href,function(y){m(y,x.href,x.media);o[x.href]=true;u()})}},m=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;k.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];i.push({media:F.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:k.length-1,hasquery:F.indexOf("(")>-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l<h){clearTimeout(r);r=setTimeout(j,h);return}else{l=z}for(var E in i){var K=i[E],C=K.minw,J=K.maxw,A=C===null,L=J===null,y="em";if(!!C){C=parseFloat(C)*(C.indexOf(y)>-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);;(function($){$.flexslider=function(el,options){var slider=$(el),vars=$.extend({},$.flexslider.defaults,options),namespace=vars.namespace,touch=("ontouchstart"in window)||window.DocumentTouch&&document instanceof DocumentTouch,eventType=(touch)?"touchend":"click",vertical=vars.direction==="vertical",reverse=vars.reverse,carousel=(vars.itemWidth>0),fade=vars.animation==="fade",asNav=vars.asNavFor!=="",methods={};$.data(el,"flexslider",slider);methods={init:function(){slider.animating=false;slider.currentSlide=vars.startAt;slider.animatingTo=slider.currentSlide;slider.atEnd=(slider.currentSlide===0||slider.currentSlide===slider.last);slider.containerSelector=vars.selector.substr(0,vars.selector.search(' '));slider.slides=$(vars.selector,slider);slider.container=$(slider.containerSelector,slider);slider.count=slider.slides.length;slider.syncExists=$(vars.sync).length>0;if(vars.animation==="slide")vars.animation="swing";slider.prop=(vertical)?"top":"marginLeft";slider.args={};slider.manualPause=false;slider.transitions=!vars.video&&!fade&&vars.useCSS&&(function(){var obj=document.createElement('div'),props=['perspectiveProperty','WebkitPerspective','MozPerspective','OPerspective','msPerspective'];for(var i in props){if(obj.style[props[i]]!==undefined){slider.pfx=props[i].replace('Perspective','').toLowerCase();slider.prop="-"+slider.pfx+"-transform";return true;}} return false;}());if(vars.controlsContainer!=="")slider.controlsContainer=$(vars.controlsContainer).length>0&&$(vars.controlsContainer);if(vars.manualControls!=="")slider.manualControls=$(vars.manualControls).length>0&&$(vars.manualControls);if(vars.randomize){slider.slides.sort(function(){return(Math.round(Math.random())-0.5);});slider.container.empty().append(slider.slides);} slider.doMath();if(asNav)methods.asNav.setup();slider.setup("init");if(vars.controlNav)methods.controlNav.setup();if(vars.directionNav)methods.directionNav.setup();if(vars.keyboard&&($(slider.containerSelector).length===1||vars.multipleKeyboard)){$(document).bind('keyup',function(event){var keycode=event.keyCode;if(!slider.animating&&(keycode===39||keycode===37)){var target=(keycode===39)?slider.getTarget('next'):(keycode===37)?slider.getTarget('prev'):false;slider.flexAnimate(target,vars.pauseOnAction);}});} if(vars.mousewheel){slider.bind('mousewheel',function(event,delta,deltaX,deltaY){event.preventDefault();var target=(delta<0)?slider.getTarget('next'):slider.getTarget('prev');slider.flexAnimate(target,vars.pauseOnAction);});} if(vars.pausePlay)methods.pausePlay.setup();if(vars.slideshow){if(vars.pauseOnHover){slider.hover(function(){if(!slider.manualPlay&&!slider.manualPause)slider.pause();},function(){if(!slider.manualPause&&!slider.manualPlay)slider.play();});} (vars.initDelay>0)?setTimeout(slider.play,vars.initDelay):slider.play();} if(touch&&vars.touch)methods.touch();if(!fade||(fade&&vars.smoothHeight))$(window).bind("resize focus",methods.resize);setTimeout(function(){vars.start(slider);},200);},asNav:{setup:function(){slider.asNav=true;slider.animatingTo=Math.floor(slider.currentSlide/slider.move);slider.currentItem=slider.currentSlide;slider.slides.removeClass(namespace+"active-slide").eq(slider.currentItem).addClass(namespace+"active-slide");slider.slides.click(function(e){e.preventDefault();var $slide=$(this),target=$slide.index();if(!$(vars.asNavFor).data('flexslider').animating&&!$slide.hasClass('active')){slider.direction=(slider.currentItem<target)?"next":"prev";slider.flexAnimate(target,vars.pauseOnAction,false,true,true);}});}},controlNav:{setup:function(){if(!slider.manualControls){methods.controlNav.setupPaging();}else{methods.controlNav.setupManual();}},setupPaging:function(){var type=(vars.controlNav==="thumbnails")?'control-thumbs':'control-paging',j=1,item;slider.controlNavScaffold=$('<ol class="'+namespace+'control-nav '+namespace+type+'"></ol>');if(slider.pagingCount>1){for(var i=0;i<slider.pagingCount;i++){item=(vars.controlNav==="thumbnails")?'<img src="'+slider.slides.eq(i).attr("data-thumb")+'"/>':'<a>'+j+'</a>';slider.controlNavScaffold.append('<li>'+item+'</li>');j++;}} (slider.controlsContainer)?$(slider.controlsContainer).append(slider.controlNavScaffold):slider.append(slider.controlNavScaffold);methods.controlNav.set();methods.controlNav.active();slider.controlNavScaffold.delegate('a, img',eventType,function(event){event.preventDefault();var $this=$(this),target=slider.controlNav.index($this);if(!$this.hasClass(namespace+'active')){slider.direction=(target>slider.currentSlide)?"next":"prev";slider.flexAnimate(target,vars.pauseOnAction);}});if(touch){slider.controlNavScaffold.delegate('a',"click touchstart",function(event){event.preventDefault();});}},setupManual:function(){slider.controlNav=slider.manualControls;methods.controlNav.active();slider.controlNav.live(eventType,function(event){event.preventDefault();var $this=$(this),target=slider.controlNav.index($this);if(!$this.hasClass(namespace+'active')){(target>slider.currentSlide)?slider.direction="next":slider.direction="prev";slider.flexAnimate(target,vars.pauseOnAction);}});if(touch){slider.controlNav.live("click touchstart",function(event){event.preventDefault();});}},set:function(){var selector=(vars.controlNav==="thumbnails")?'img':'a';slider.controlNav=$('.'+namespace+'control-nav li '+selector,(slider.controlsContainer)?slider.controlsContainer:slider);},active:function(){slider.controlNav.removeClass(namespace+"active").eq(slider.animatingTo).addClass(namespace+"active");},update:function(action,pos){if(slider.pagingCount>1&&action==="add"){slider.controlNavScaffold.append($('<li><a>'+slider.count+'</a></li>'));}else if(slider.pagingCount===1){slider.controlNavScaffold.find('li').remove();}else{slider.controlNav.eq(pos).closest('li').remove();} methods.controlNav.set();(slider.pagingCount>1&&slider.pagingCount!==slider.controlNav.length)?slider.update(pos,action):methods.controlNav.active();}},directionNav:{setup:function(){var directionNavScaffold=$('<ul class="'+namespace+'direction-nav"><li><a class="'+namespace+'prev" href="#">'+vars.prevText+'</a></li><li><a class="'+namespace+'next" href="#">'+vars.nextText+'</a></li></ul>');if(slider.controlsContainer){$(slider.controlsContainer).append(directionNavScaffold);slider.directionNav=$('.'+namespace+'direction-nav li a',slider.controlsContainer);}else{slider.append(directionNavScaffold);slider.directionNav=$('.'+namespace+'direction-nav li a',slider);} methods.directionNav.update();slider.directionNav.bind(eventType,function(event){event.preventDefault();var target=($(this).hasClass(namespace+'next'))?slider.getTarget('next'):slider.getTarget('prev');slider.flexAnimate(target,vars.pauseOnAction);});if(touch){slider.directionNav.bind("click touchstart",function(event){event.preventDefault();});}},update:function(){var disabledClass=namespace+'disabled';if(slider.pagingCount===1){slider.directionNav.addClass(disabledClass);}else if(!vars.animationLoop){if(slider.animatingTo===0){slider.directionNav.removeClass(disabledClass).filter('.'+namespace+"prev").addClass(disabledClass);}else if(slider.animatingTo===slider.last){slider.directionNav.removeClass(disabledClass).filter('.'+namespace+"next").addClass(disabledClass);}else{slider.directionNav.removeClass(disabledClass);}}else{slider.directionNav.removeClass(disabledClass);}}},pausePlay:{setup:function(){var pausePlayScaffold=$('<div class="'+namespace+'pauseplay"><a></a></div>');if(slider.controlsContainer){slider.controlsContainer.append(pausePlayScaffold);slider.pausePlay=$('.'+namespace+'pauseplay a',slider.controlsContainer);}else{slider.append(pausePlayScaffold);slider.pausePlay=$('.'+namespace+'pauseplay a',slider);} methods.pausePlay.update((vars.slideshow)?namespace+'pause':namespace+'play');slider.pausePlay.bind(eventType,function(event){event.preventDefault();if($(this).hasClass(namespace+'pause')){slider.manualPause=true;slider.manualPlay=false;slider.pause();}else{slider.manualPause=false;slider.manualPlay=true;slider.play();}});if(touch){slider.pausePlay.bind("click touchstart",function(event){event.preventDefault();});}},update:function(state){(state==="play")?slider.pausePlay.removeClass(namespace+'pause').addClass(namespace+'play').text(vars.playText):slider.pausePlay.removeClass(namespace+'play').addClass(namespace+'pause').text(vars.pauseText);}},touch:function(){var startX,startY,offset,cwidth,dx,startT,scrolling=false;el.addEventListener('touchstart',onTouchStart,false);function onTouchStart(e){if(slider.animating){e.preventDefault();}else if(e.touches.length===1){slider.pause();cwidth=(vertical)?slider.h:slider.w;startT=Number(new Date());offset=(carousel&&reverse&&slider.animatingTo===slider.last)?0:(carousel&&reverse)?slider.limit-(((slider.itemW+vars.itemMargin)*slider.move)*slider.animatingTo):(carousel&&slider.currentSlide===slider.last)?slider.limit:(carousel)?((slider.itemW+vars.itemMargin)*slider.move)*slider.currentSlide:(reverse)?(slider.last-slider.currentSlide+slider.cloneOffset)*cwidth:(slider.currentSlide+slider.cloneOffset)*cwidth;startX=(vertical)?e.touches[0].pageY:e.touches[0].pageX;startY=(vertical)?e.touches[0].pageX:e.touches[0].pageY;el.addEventListener('touchmove',onTouchMove,false);el.addEventListener('touchend',onTouchEnd,false);}} function onTouchMove(e){dx=(vertical)?startX-e.touches[0].pageY:startX-e.touches[0].pageX;scrolling=(vertical)?(Math.abs(dx)<Math.abs(e.touches[0].pageX-startY)):(Math.abs(dx)<Math.abs(e.touches[0].pageY-startY));if(!scrolling||Number(new Date())-startT>500){e.preventDefault();if(!fade&&slider.transitions){if(!vars.animationLoop){dx=dx/((slider.currentSlide===0&&dx<0||slider.currentSlide===slider.last&&dx>0)?(Math.abs(dx)/cwidth+2):1);} slider.setProps(offset+dx,"setTouch");}}} function onTouchEnd(e){el.removeEventListener('touchmove',onTouchMove,false);if(slider.animatingTo===slider.currentSlide&&!scrolling&&!(dx===null)){var updateDx=(reverse)?-dx:dx,target=(updateDx>0)?slider.getTarget('next'):slider.getTarget('prev');if(slider.canAdvance(target)&&(Number(new Date())-startT<550&&Math.abs(updateDx)>50||Math.abs(updateDx)>cwidth/2)){slider.flexAnimate(target,vars.pauseOnAction);}else{if(!fade)slider.flexAnimate(slider.currentSlide,vars.pauseOnAction,true);}} el.removeEventListener('touchend',onTouchEnd,false);startX=null;startY=null;dx=null;offset=null;}},resize:function(){if(!slider.animating&&slider.is(':visible')){if(!carousel)slider.doMath();if(fade){methods.smoothHeight();}else if(carousel){slider.slides.width(slider.computedW);slider.update(slider.pagingCount);slider.setProps();} else if(vertical){slider.viewport.height(slider.h);slider.setProps(slider.h,"setTotal");}else{if(vars.smoothHeight)methods.smoothHeight();slider.newSlides.width(slider.computedW);slider.setProps(slider.computedW,"setTotal");}}},smoothHeight:function(dur){if(!vertical||fade){var $obj=(fade)?slider:slider.viewport;(dur)?$obj.animate({"height":slider.slides.eq(slider.animatingTo).height()},dur):$obj.height(slider.slides.eq(slider.animatingTo).height());}},sync:function(action){var $obj=$(vars.sync).data("flexslider"),target=slider.animatingTo;switch(action){case "animate":$obj.flexAnimate(target,vars.pauseOnAction,false,true);break;case "play":if(!$obj.playing&&!$obj.asNav){$obj.play();}break;case "pause":$obj.pause();break;}}} slider.flexAnimate=function(target,pause,override,withSync,fromNav){if(asNav&&slider.pagingCount===1)slider.direction=(slider.currentItem<target)?"next":"prev";if(!slider.animating&&(slider.canAdvance(target,fromNav)||override)&&slider.is(":visible")){if(asNav&&withSync){var master=$(vars.asNavFor).data('flexslider');slider.atEnd=target===0||target===slider.count-1;master.flexAnimate(target,true,false,true,fromNav);slider.direction=(slider.currentItem<target)?"next":"prev";master.direction=slider.direction;if(Math.ceil((target+1)/slider.visible)-1!==slider.currentSlide&&target!==0){slider.currentItem=target;slider.slides.removeClass(namespace+"active-slide").eq(target).addClass(namespace+"active-slide");target=Math.floor(target/slider.visible);}else{slider.currentItem=target;slider.slides.removeClass(namespace+"active-slide").eq(target).addClass(namespace+"active-slide");return false;}} slider.animating=true;slider.animatingTo=target;vars.before(slider);if(pause)slider.pause();if(slider.syncExists&&!fromNav)methods.sync("animate");if(vars.controlNav)methods.controlNav.active();if(!carousel)slider.slides.removeClass(namespace+'active-slide').eq(target).addClass(namespace+'active-slide');slider.atEnd=target===0||target===slider.last;if(vars.directionNav)methods.directionNav.update();if(target===slider.last){vars.end(slider);if(!vars.animationLoop)slider.pause();} if(!fade){var dimension=(vertical)?slider.slides.filter(':first').height():slider.computedW,margin,slideString,calcNext;if(carousel){margin=(vars.itemWidth>slider.w)?vars.itemMargin*2:vars.itemMargin;calcNext=((slider.itemW+margin)*slider.move)*slider.animatingTo;slideString=(calcNext>slider.limit&&slider.visible!==1)?slider.limit:calcNext;}else if(slider.currentSlide===0&&target===slider.count-1&&vars.animationLoop&&slider.direction!=="next"){slideString=(reverse)?(slider.count+slider.cloneOffset)*dimension:0;}else if(slider.currentSlide===slider.last&&target===0&&vars.animationLoop&&slider.direction!=="prev"){slideString=(reverse)?0:(slider.count+1)*dimension;}else{slideString=(reverse)?((slider.count-1)-target+slider.cloneOffset)*dimension:(target+slider.cloneOffset)*dimension;} slider.setProps(slideString,"",vars.animationSpeed);if(slider.transitions){if(!vars.animationLoop||!slider.atEnd){slider.animating=false;slider.currentSlide=slider.animatingTo;} slider.container.unbind("webkitTransitionEnd transitionend");slider.container.bind("webkitTransitionEnd transitionend",function(){slider.wrapup(dimension);});}else{slider.container.animate(slider.args,vars.animationSpeed,vars.easing,function(){slider.wrapup(dimension);});}}else{if(!touch){slider.slides.eq(slider.currentSlide).fadeOut(vars.animationSpeed,vars.easing);slider.slides.eq(target).fadeIn(vars.animationSpeed,vars.easing,slider.wrapup);}else{slider.slides.eq(slider.currentSlide).css({"opacity":0,"zIndex":1});slider.slides.eq(target).css({"opacity":1,"zIndex":2});slider.slides.unbind("webkitTransitionEnd transitionend");slider.slides.eq(slider.currentSlide).bind("webkitTransitionEnd transitionend",function(){vars.after(slider);});slider.animating=false;slider.currentSlide=slider.animatingTo;}} if(vars.smoothHeight)methods.smoothHeight(vars.animationSpeed);}} slider.wrapup=function(dimension){if(!fade&&!carousel){if(slider.currentSlide===0&&slider.animatingTo===slider.last&&vars.animationLoop){slider.setProps(dimension,"jumpEnd");}else if(slider.currentSlide===slider.last&&slider.animatingTo===0&&vars.animationLoop){slider.setProps(dimension,"jumpStart");}} slider.animating=false;slider.currentSlide=slider.animatingTo;vars.after(slider);} slider.animateSlides=function(){if(!slider.animating)slider.flexAnimate(slider.getTarget("next"));} slider.pause=function(){clearInterval(slider.animatedSlides);slider.playing=false;if(vars.pausePlay)methods.pausePlay.update("play");if(slider.syncExists)methods.sync("pause");} slider.play=function(){slider.animatedSlides=setInterval(slider.animateSlides,vars.slideshowSpeed);slider.playing=true;if(vars.pausePlay)methods.pausePlay.update("pause");if(slider.syncExists)methods.sync("play");} slider.canAdvance=function(target,fromNav){var last=(asNav)?slider.pagingCount-1:slider.last;return(fromNav)?true:(asNav&&slider.currentItem===slider.count-1&&target===0&&slider.direction==="prev")?true:(asNav&&slider.currentItem===0&&target===slider.pagingCount-1&&slider.direction!=="next")?false:(target===slider.currentSlide&&!asNav)?false:(vars.animationLoop)?true:(slider.atEnd&&slider.currentSlide===0&&target===last&&slider.direction!=="next")?false:(slider.atEnd&&slider.currentSlide===last&&target===0&&slider.direction==="next")?false:true;} slider.getTarget=function(dir){slider.direction=dir;if(dir==="next"){return(slider.currentSlide===slider.last)?0:slider.currentSlide+1;}else{return(slider.currentSlide===0)?slider.last:slider.currentSlide-1;}} slider.setProps=function(pos,special,dur){var target=(function(){var posCheck=(pos)?pos:((slider.itemW+vars.itemMargin)*slider.move)*slider.animatingTo,posCalc=(function(){if(carousel){return(special==="setTouch")?pos:(reverse&&slider.animatingTo===slider.last)?0:(reverse)?slider.limit-(((slider.itemW+vars.itemMargin)*slider.move)*slider.animatingTo):(slider.animatingTo===slider.last)?slider.limit:posCheck;}else{switch(special){case "setTotal":return(reverse)?((slider.count-1)-slider.currentSlide+slider.cloneOffset)*pos:(slider.currentSlide+slider.cloneOffset)*pos;case "setTouch":return(reverse)?pos:pos;case "jumpEnd":return(reverse)?pos:slider.count*pos;case "jumpStart":return(reverse)?slider.count*pos:pos;default:return pos;}}}());return(posCalc*-1)+"px";}());if(slider.transitions){target=(vertical)?"translate3d(0,"+target+",0)":"translate3d("+target+",0,0)";dur=(dur!==undefined)?(dur/1000)+"s":"0s";slider.container.css("-"+slider.pfx+"-transition-duration",dur);} slider.args[slider.prop]=target;if(slider.transitions||dur===undefined)slider.container.css(slider.args);} slider.setup=function(type){if(!fade){var sliderOffset,arr;if(type==="init"){slider.viewport=$('<div class="'+namespace+'viewport"></div>').css({"overflow":"hidden","position":"relative"}).appendTo(slider).append(slider.container);slider.cloneCount=0;slider.cloneOffset=0;if(reverse){arr=$.makeArray(slider.slides).reverse();slider.slides=$(arr);slider.container.empty().append(slider.slides);}} if(vars.animationLoop&&!carousel){slider.cloneCount=2;slider.cloneOffset=1;if(type!=="init")slider.container.find('.clone').remove();slider.container.append(slider.slides.first().clone().addClass('clone')).prepend(slider.slides.last().clone().addClass('clone'));} slider.newSlides=$(vars.selector,slider);sliderOffset=(reverse)?slider.count-1-slider.currentSlide+slider.cloneOffset:slider.currentSlide+slider.cloneOffset;if(vertical&&!carousel){slider.container.height((slider.count+slider.cloneCount)*200+"%").css("position","absolute").width("100%");setTimeout(function(){slider.newSlides.css({"display":"block"});slider.doMath();slider.viewport.height(slider.h);slider.setProps(sliderOffset*slider.h,"init");},(type==="init")?100:0);}else{slider.container.width((slider.count+slider.cloneCount)*200+"%");slider.setProps(sliderOffset*slider.computedW,"init");setTimeout(function(){slider.doMath();slider.newSlides.css({"width":slider.computedW,"float":"left","display":"block"});if(vars.smoothHeight)methods.smoothHeight();},(type==="init")?100:0);}}else{slider.slides.css({"width":"100%","float":"left","marginRight":"-100%","position":"relative"});if(type==="init"){if(!touch){slider.slides.eq(slider.currentSlide).fadeIn(vars.animationSpeed,vars.easing);}else{slider.slides.css({"opacity":0,"display":"block","webkitTransition":"opacity "+vars.animationSpeed/1000+"s ease","zIndex":1}).eq(slider.currentSlide).css({"opacity":1,"zIndex":2});}} if(vars.smoothHeight)methods.smoothHeight();} if(!carousel)slider.slides.removeClass(namespace+"active-slide").eq(slider.currentSlide).addClass(namespace+"active-slide");} slider.doMath=function(){var slide=slider.slides.first(),slideMargin=vars.itemMargin,minItems=vars.minItems,maxItems=vars.maxItems;slider.w=slider.width();slider.h=slide.height();slider.boxPadding=slide.outerWidth()-slide.width();if(carousel){slider.itemT=vars.itemWidth+slideMargin;slider.minW=(minItems)?minItems*slider.itemT:slider.w;slider.maxW=(maxItems)?maxItems*slider.itemT:slider.w;slider.itemW=(slider.minW>slider.w)?(slider.w-(slideMargin*minItems))/minItems:(slider.maxW<slider.w)?(slider.w-(slideMargin*maxItems))/maxItems:(vars.itemWidth>slider.w)?slider.w:vars.itemWidth;slider.visible=Math.floor(slider.w/(slider.itemW+slideMargin));slider.move=(vars.move>0&&vars.move<slider.visible)?vars.move:slider.visible;slider.pagingCount=Math.ceil(((slider.count-slider.visible)/slider.move)+1);slider.last=slider.pagingCount-1;slider.limit=(slider.pagingCount===1)?0:(vars.itemWidth>slider.w)?((slider.itemW+(slideMargin*2))*slider.count)-slider.w-slideMargin:((slider.itemW+slideMargin)*slider.count)-slider.w-slideMargin;}else{slider.itemW=slider.w;slider.pagingCount=slider.count;slider.last=slider.count-1;} slider.computedW=slider.itemW-slider.boxPadding;} slider.update=function(pos,action){slider.doMath();if(!carousel){if(pos<slider.currentSlide){slider.currentSlide+=1;}else if(pos<=slider.currentSlide&&pos!==0){slider.currentSlide-=1;} slider.animatingTo=slider.currentSlide;} if(vars.controlNav&&!slider.manualControls){if((action==="add"&&!carousel)||slider.pagingCount>slider.controlNav.length){methods.controlNav.update("add");}else if((action==="remove"&&!carousel)||slider.pagingCount<slider.controlNav.length){if(carousel&&slider.currentSlide>slider.last){slider.currentSlide-=1;slider.animatingTo-=1;} methods.controlNav.update("remove",slider.last);}} if(vars.directionNav)methods.directionNav.update();} slider.addSlide=function(obj,pos){var $obj=$(obj);slider.count+=1;slider.last=slider.count-1;if(vertical&&reverse){(pos!==undefined)?slider.slides.eq(slider.count-pos).after($obj):slider.container.prepend($obj);}else{(pos!==undefined)?slider.slides.eq(pos).before($obj):slider.container.append($obj);} slider.update(pos,"add");slider.slides=$(vars.selector+':not(.clone)',slider);slider.setup();vars.added(slider);} slider.removeSlide=function(obj){var pos=(isNaN(obj))?slider.slides.index($(obj)):obj;slider.count-=1;slider.last=slider.count-1;if(isNaN(obj)){$(obj,slider.slides).remove();}else{(vertical&&reverse)?slider.slides.eq(slider.last).remove():slider.slides.eq(obj).remove();} slider.doMath();slider.update(pos,"remove");slider.slides=$(vars.selector+':not(.clone)',slider);slider.setup();vars.removed(slider);} slider.setOpts=function(opts){for(var opt in opts){vars[opt]=opts[opt];} slider.setup();} slider.getOpts=function(){return vars;} methods.init();} $.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:false,animationLoop:true,smoothHeight:false,startAt:0,slideshow:true,slideshowSpeed:7000,animationSpeed:600,initDelay:0,randomize:false,pauseOnAction:true,pauseOnHover:false,useCSS:true,touch:true,video:false,controlNav:true,directionNav:true,prevText:"Previous",nextText:"Next",keyboard:true,multipleKeyboard:false,mousewheel:false,pausePlay:false,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}} $.fn.flexslider=function(options){if(options===undefined)options={};if(typeof options==="object"){return this.each(function(){var $this=$(this),selector=(options.selector)?options.selector:".slides > li",$slides=$this.find(selector);if($slides.length===1){$slides.fadeIn(400);if(options.start)options.start($this);}else if($this.data('flexslider')==undefined){new $.flexslider(this,options);}});}else{var $slider=$(this).data('flexslider');switch(options){case "play":$slider.play();break;case "pause":$slider.pause();break;case "next":$slider.flexAnimate($slider.getTarget("next"),true);break;case "prev":case "previous":$slider.flexAnimate($slider.getTarget("prev"),true);break;default:if(typeof options==="number")$slider.flexAnimate(options,true);}}}})(jQuery);(function(a,b,c){function e(a){return a}function f(a){return decodeURIComponent(a.replace(d," "))}var d=/\+/g;var g=a.cookie=function(d,h,i){if(h!==c){i=a.extend({},g.defaults,i);if(h===null){i.expires=-1}if(typeof i.expires==="number"){var j=i.expires,k=i.expires=new Date;k.setDate(k.getDate()+j)}h=g.json?JSON.stringify(h):String(h);return b.cookie=[encodeURIComponent(d),"=",g.raw?h:encodeURIComponent(h),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}var l=g.raw?e:f;var m=b.cookie.split("; ");for(var n=0,o;o=m[n]&&m[n].split("=");n++){if(l(o.shift())===d){var p=l(o.join("="));return g.json?JSON.parse(p):p}}return null};g.defaults={};a.removeCookie=function(b,c){if(a.cookie(b)!==null){a.cookie(b,null,c);return true}return false}})(jQuery,document);(function(a){a.fn.ezMark=function(b){b=b||{};var c={checkboxCls:b.checkboxCls||"ez-checkbox",radioCls:b.radioCls||"ez-radio",checkedCls:b.checkedCls||"ez-checked",selectedCls:b.selectedCls||"ez-selected",hideCls:"ez-hide"};return this.each(function(){var b=a(this);var d=b.attr("type")=="checkbox"?'<div class="'+c.checkboxCls+'">':'<div class="'+c.radioCls+'">';if(b.attr("type")=="checkbox"){b.addClass(c.hideCls).wrap(d).change(function(){if(a(this).is(":checked")){a(this).parent().addClass(c.checkedCls)}else{a(this).parent().removeClass(c.checkedCls)}});if(b.is(":checked")){b.parent().addClass(c.checkedCls)}}else if(b.attr("type")=="radio"){b.addClass(c.hideCls).wrap(d).change(function(){a('input[name="'+a(this).attr("name")+'"]').each(function(){if(a(this).is(":checked")){a(this).parent().addClass(c.selectedCls)}else{a(this).parent().removeClass(c.selectedCls)}})});if(b.is(":checked")){b.parent().addClass(c.selectedCls)}}})}})(jQuery);if(jQuery)(function(a){a.extend(a.fn,{selectBox:function(b,c){var d,e="",f=navigator.platform.match(/mac/i);var g=function(b,c){var d;if(navigator.userAgent.match(/iPad|iPhone|Android|IEMobile|BlackBerry/i))return false;if(b.tagName.toLowerCase()!=="select")return false;b=a(b);if(b.data("selectBox-control"))return false;var e=a('<a class="selectBox" />'),f=b.attr("multiple")||parseInt(b.attr("size"))>1;var g=c||{};e.width(b.outerWidth()+5).addClass(b.attr("class")).attr("title",b.attr("title")||"").attr("tabindex",parseInt(b.attr("tabindex"))).css("display","inline-block").bind("focus.selectBox",function(){if(this!==document.activeElement&&document.body!==document.activeElement)a(document.activeElement).blur();if(e.hasClass("selectBox-active"))return;e.addClass("selectBox-active");b.trigger("focus")}).bind("blur.selectBox",function(){if(!e.hasClass("selectBox-active"))return;e.removeClass("selectBox-active");b.trigger("blur")});if(!a(window).data("selectBox-bindings")){a(window).data("selectBox-bindings",true).bind("scroll.selectBox",o).bind("resize.selectBox",o)}if(b.attr("disabled"))e.addClass("selectBox-disabled");b.bind("click.selectBox",function(a){e.focus();a.preventDefault()});if(f){d=h(b,"inline");e.append(d).data("selectBox-options",d).addClass("selectBox-inline selectBox-menuShowing").bind("keydown.selectBox",function(a){t(b,a)}).bind("keypress.selectBox",function(a){u(b,a)}).bind("mousedown.selectBox",function(b){if(a(b.target).is("A.selectBox-inline"))b.preventDefault();if(!e.hasClass("selectBox-focus"))e.focus()}).insertAfter(b);if(!b[0].style.height){var k=b.attr("size")?parseInt(b.attr("size")):5;var l=e.clone().removeAttr("id").css({position:"absolute",top:"-9999em"}).show().appendTo("body");l.find(".selectBox-options").html("<li><a> </a></li>");var m=parseInt(l.find(".selectBox-options A:first").html(" ").outerHeight());l.remove();e.height(m*k)}z(e)}else{var p=a('<span class="selectBox-label" />'),q=a('<span class="selectBox-arrow" />');p.attr("class",i(b)).text(j(b));d=h(b,"dropdown");d.appendTo("BODY");e.data("selectBox-options",d).addClass("selectBox-dropdown").append(p).append(q).bind("mousedown.selectBox",function(a){if(e.hasClass("selectBox-menuShowing")){o()}else{a.stopPropagation();d.data("selectBox-down-at-x",a.screenX).data("selectBox-down-at-y",a.screenY);n(b)}}).bind("keydown.selectBox",function(a){t(b,a)}).bind("keypress.selectBox",function(a){u(b,a)}).bind("open.selectBox",function(a,c){if(c&&c._selectBox===true)return;n(b)}).bind("close.selectBox",function(a,b){if(b&&b._selectBox===true)return;o()}).insertAfter(b);var r=e.width()-q.outerWidth()-parseInt(p.css("paddingLeft"))-parseInt(p.css("paddingLeft"));p.width(r);z(e)}b.addClass("selectBox").data("selectBox-control",e).data("selectBox-settings",g).hide()};var h=function(b,c){var d;var e=function(b,c){b.children("OPTION, OPTGROUP").each(function(){if(a(this).is("OPTION")){if(a(this).length>0){A(a(this),c)}else{c.append("<li> </li>")}}else{var b=a('<li class="selectBox-optgroup" />');b.text(a(this).attr("label"));c.append(b);c=e(a(this),c)}});return c};switch(c){case"inline":d=a('<ul class="selectBox-options" />');d=e(b,d);d.find("A").bind("mouseover.selectBox",function(c){q(b,a(this).parent())}).bind("mouseout.selectBox",function(c){r(b,a(this).parent())}).bind("mousedown.selectBox",function(a){a.preventDefault();if(!b.selectBox("control").hasClass("selectBox-active"))b.selectBox("control").focus()}).bind("mouseup.selectBox",function(c){o();p(b,a(this).parent(),c)});z(d);return d;case"dropdown":d=a('<ul class="selectBox-dropdown-menu selectBox-options" />');d=e(b,d);d.data("selectBox-select",b).css("display","none").appendTo("BODY").find("A").bind("mousedown.selectBox",function(a){a.preventDefault();if(a.screenX===d.data("selectBox-down-at-x")&&a.screenY===d.data("selectBox-down-at-y")){d.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y");o()}}).bind("mouseup.selectBox",function(c){if(c.screenX===d.data("selectBox-down-at-x")&&c.screenY===d.data("selectBox-down-at-y")){return}else{d.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y")}p(b,a(this).parent());o()}).bind("mouseover.selectBox",function(c){q(b,a(this).parent())}).bind("mouseout.selectBox",function(c){r(b,a(this).parent())});var f=b.attr("class")||"";if(f!==""){f=f.split(" ");for(var g in f)d.addClass(f[g]+"-selectBox-dropdown-menu")}z(d);return d}};var i=function(b){var c=a(b).find("OPTION:selected");return("selectBox-label "+(c.attr("class")||"")).replace(/\s+$/,"")};var j=function(b){var c=a(b).find("OPTION:selected");return c.text()||" "};var k=function(b){b=a(b);var c=b.data("selectBox-control");if(!c)return;c.find(".selectBox-label").attr("class",i(b)).text(j(b))};var l=function(b){b=a(b);var c=b.data("selectBox-control");if(!c)return;var d=c.data("selectBox-options");d.remove();c.remove();b.removeClass("selectBox").removeData("selectBox-control").data("selectBox-control",null).removeData("selectBox-settings").data("selectBox-settings",null).show()};var m=function(b){b=a(b);b.selectBox("options",b.html())};var n=function(b){b=a(b);var c=b.data("selectBox-control"),d=b.data("selectBox-settings"),e=c.data("selectBox-options");if(c.hasClass("selectBox-disabled"))return false;o();var f=isNaN(c.css("borderBottomWidth"))?0:parseInt(c.css("borderBottomWidth"));e.width(c.innerWidth()).css({top:c.offset().top+c.outerHeight()-f,left:c.offset().left});if(b.triggerHandler("beforeopen"))return false;var g=function(){b.triggerHandler("open",{_selectBox:true})};switch(d.menuTransition){case"fade":e.fadeIn(d.menuSpeed,g);break;case"slide":e.slideDown(d.menuSpeed,g);break;default:e.show(d.menuSpeed,g);break}if(!d.menuSpeed)g();var h=e.find(".selectBox-selected:first");s(b,h,true);q(b,h);c.addClass("selectBox-menuShowing");a(document).bind("mousedown.selectBox",function(b){if(a(b.target).parents().andSelf().hasClass("selectBox-options"))return;o()})};var o=function(){if(a(".selectBox-dropdown-menu:visible").length===0)return;a(document).unbind("mousedown.selectBox");a(".selectBox-dropdown-menu").each(function(){var b=a(this),c=b.data("selectBox-select"),d=c.data("selectBox-control"),e=c.data("selectBox-settings");if(c.triggerHandler("beforeclose"))return false;var f=function(){c.triggerHandler("close",{_selectBox:true})};if(e){switch(e.menuTransition){case"fade":b.fadeOut(e.menuSpeed,f);break;case"slide":b.slideUp(e.menuSpeed,f);break;default:b.hide(e.menuSpeed,f);break}if(!e.menuSpeed)f();d.removeClass("selectBox-menuShowing")}else{a(this).hide();a(this).triggerHandler("close",{_selectBox:true});a(this).removeClass("selectBox-menuShowing")}})};var p=function(b,c,d){b=a(b);c=a(c);var e=b.data("selectBox-control"),g=b.data("selectBox-settings");if(e.hasClass("selectBox-disabled"))return false;if(c.length===0||c.hasClass("selectBox-disabled"))return false;if(b.attr("multiple")){if(d.shiftKey&&e.data("selectBox-last-selected")){c.toggleClass("selectBox-selected");var h;if(c.index()>e.data("selectBox-last-selected").index()){h=c.siblings().slice(e.data("selectBox-last-selected").index(),c.index())}else{h=c.siblings().slice(c.index(),e.data("selectBox-last-selected").index())}h=h.not(".selectBox-optgroup, .selectBox-disabled");if(c.hasClass("selectBox-selected")){h.addClass("selectBox-selected")}else{h.removeClass("selectBox-selected")}}else if(f&&d.metaKey||!f&&d.ctrlKey){c.toggleClass("selectBox-selected")}else{c.siblings().removeClass("selectBox-selected");c.addClass("selectBox-selected")}}else{c.siblings().removeClass("selectBox-selected");c.addClass("selectBox-selected")}if(e.hasClass("selectBox-dropdown")){e.find(".selectBox-label").text(c.text())}var i=0,j=[];if(b.attr("multiple")){e.find(".selectBox-selected A").each(function(){j[i++]=a(this).attr("rel")})}else{j=c.find("A").attr("rel")}e.data("selectBox-last-selected",c);if(b.val()!==j){b.val(j);k(b);b.trigger("change")}return true};var q=function(b,c){b=a(b);c=a(c);var d=b.data("selectBox-control"),e=d.data("selectBox-options");e.find(".selectBox-hover").removeClass("selectBox-hover");c.addClass("selectBox-hover")};var r=function(b,c){b=a(b);c=a(c);var d=b.data("selectBox-control"),e=d.data("selectBox-options");e.find(".selectBox-hover").removeClass("selectBox-hover")};var s=function(b,c,d){if(!c||c.length===0)return;b=a(b);var e=b.data("selectBox-control"),f=e.data("selectBox-options"),g=e.hasClass("selectBox-dropdown")?f:f.parent(),h=parseInt(c.offset().top-g.position().top),i=parseInt(h+c.outerHeight());if(d){g.scrollTop(c.offset().top-g.offset().top+g.scrollTop()-g.height()/2)}else{if(h<0){g.scrollTop(c.offset().top-g.offset().top+g.scrollTop())}if(i>g.height()){g.scrollTop(c.offset().top+c.outerHeight()-g.offset().top+g.scrollTop()-g.height())}}};var t=function(b,c){b=a(b);var d=b.data("selectBox-control"),f=d.data("selectBox-options"),g=b.data("selectBox-settings"),h=0,i=0;if(d.hasClass("selectBox-disabled"))return;switch(c.keyCode){case 8:c.preventDefault();e="";break;case 9:case 27:o();r(b);break;case 13:if(d.hasClass("selectBox-menuShowing")){p(b,f.find("LI.selectBox-hover:first"),c);if(d.hasClass("selectBox-dropdown"))o()}else{n(b)}break;case 38:case 37:c.preventDefault();if(d.hasClass("selectBox-menuShowing")){var j=f.find(".selectBox-hover").prev("LI");h=f.find("LI:not(.selectBox-optgroup)").length;i=0;while(j.length===0||j.hasClass("selectBox-disabled")||j.hasClass("selectBox-optgroup")){j=j.prev("LI");if(j.length===0){if(g.loopOptions){j=f.find("LI:last")}else{j=f.find("LI:first")}}if(++i>=h)break}q(b,j);p(b,j,c);s(b,j)}else{n(b)}break;case 40:case 39:c.preventDefault();if(d.hasClass("selectBox-menuShowing")){var k=f.find(".selectBox-hover").next("LI");h=f.find("LI:not(.selectBox-optgroup)").length;i=0;while(k.length===0||k.hasClass("selectBox-disabled")||k.hasClass("selectBox-optgroup")){k=k.next("LI");if(k.length===0){if(g.loopOptions){k=f.find("LI:first")}else{k=f.find("LI:last")}}if(++i>=h)break}q(b,k);p(b,k,c);s(b,k)}else{n(b)}break}};var u=function(b,c){b=a(b);var f=b.data("selectBox-control"),g=f.data("selectBox-options");if(f.hasClass("selectBox-disabled"))return;switch(c.keyCode){case 9:case 27:case 13:case 38:case 37:case 40:case 39:break;default:if(!f.hasClass("selectBox-menuShowing"))n(b);c.preventDefault();clearTimeout(d);e+=String.fromCharCode(c.charCode||c.keyCode);g.find("A").each(function(){if(a(this).text().substr(0,e.length).toLowerCase()===e.toLowerCase()){q(b,a(this).parent());s(b,a(this).parent());return false}});d=setTimeout(function(){e=""},1e3);break}};var v=function(b){b=a(b);b.attr("disabled",false);var c=b.data("selectBox-control");if(!c)return;c.removeClass("selectBox-disabled")};var w=function(b){b=a(b);b.attr("disabled",true);var c=b.data("selectBox-control");if(!c)return;c.addClass("selectBox-disabled")};var x=function(b,c){b=a(b);b.val(c);c=b.val();if(c===null){c=b.children().first().val();b.val(c)}var d=b.data("selectBox-control");if(!d)return;var e=b.data("selectBox-settings"),f=d.data("selectBox-options");k(b);f.find(".selectBox-selected").removeClass("selectBox-selected");f.find("A").each(function(){if(typeof c==="object"){for(var b=0;b<c.length;b++){if(a(this).attr("rel")==c[b]){a(this).parent().addClass("selectBox-selected")}}}else{if(a(this).attr("rel")==c){a(this).parent().addClass("selectBox-selected")}}});if(e.change)e.change.call(b)};var y=function(b,d){b=a(b);var e=b.data("selectBox-control"),f=b.data("selectBox-settings");switch(typeof c){case"string":b.html(c);break;case"object":b.html("");for(var g in c){if(c[g]===null)continue;if(typeof c[g]==="object"){var i=a('<optgroup label="'+g+'" />');for(var j in c[g]){i.append('<option value="'+j+'">'+c[g][j]+"</option>")}b.append(i)}else{var l=a('<option value="'+g+'">'+c[g]+"</option>");b.append(l)}}break}if(!e)return;e.data("selectBox-options").remove();var m=e.hasClass("selectBox-dropdown")?"dropdown":"inline";d=h(b,m);e.data("selectBox-options",d);switch(m){case"inline":e.append(d);break;case"dropdown":k(b);a("BODY").append(d);break}};var z=function(b){a(b).css("MozUserSelect","none").bind("selectstart",function(a){a.preventDefault()})};var A=function(b,c){var d=a("<li />"),e=a("<a />");d.addClass(b.attr("class"));d.data(b.data());e.attr("rel",b.val()).text(b.text());d.append(e);if(b.attr("disabled"))d.addClass("selectBox-disabled");if(b.attr("selected"))d.addClass("selectBox-selected");c.append(d)};switch(b){case"control":return a(this).data("selectBox-control");case"settings":if(!c)return a(this).data("selectBox-settings");a(this).each(function(){a(this).data("selectBox-settings",a.extend(true,a(this).data("selectBox-settings"),c))});break;case"options":if(c===undefined)return a(this).data("selectBox-control").data("selectBox-options");a(this).each(function(){y(this,c)});break;case"value":if(c===undefined)return a(this).val();a(this).each(function(){x(this,c)});break;case"refresh":a(this).each(function(){m(this)});break;case"enable":a(this).each(function(){v(this)});break;case"disable":a(this).each(function(){w(this)});break;case"destroy":a(this).each(function(){l(this)});break;default:a(this).each(function(){g(this,b)});break}return a(this)}})})(jQuery);(function(a,b,c){b.fn.touchwipe=function(a){var c={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:true};if(a)b.extend(c,a);this.each(function(){function e(){this.removeEventListener("touchmove",f);a=null;d=false}function f(f){if(c.preventDefaultEvents){f.preventDefault()}if(d){var g=f.touches[0].pageX;var h=f.touches[0].pageY;var i=a-g;var j=b-h;if(Math.abs(i)>=c.min_move_x){e();if(i>0){c.wipeLeft()}else{c.wipeRight()}}else if(Math.abs(j)>=c.min_move_y){e();if(j>0){c.wipeDown()}else{c.wipeUp()}}}}function g(c){if(c.touches.length==1){a=c.touches[0].pageX;b=c.touches[0].pageY;d=true;this.addEventListener("touchmove",f,false)}}var a;var b;var d=false;if("ontouchstart"in document.documentElement){this.addEventListener("touchstart",g,false)}});return this};b.elastislide=function(a,c){this.$el=b(c);this._init(a)};b.elastislide.defaults={speed:450,easing:"",imageW:190,margin:3,border:2,minItems:1,current:0,onClick:function(){return false}};b.elastislide.prototype={_init:function(a){this.options=b.extend(true,{},b.elastislide.defaults,a);this.$slider=this.$el.find("ul");this.$items=this.$slider.children("li");this.itemsCount=this.$items.length;this.$esCarousel=this.$slider.parent();this._validateOptions();this._configure();this._addControls();this._initEvents();this.$slider.show();this._slideToCurrent(false)},_validateOptions:function(){if(this.options.speed<0)this.options.speed=450;if(this.options.margin<0)this.options.margin=4;if(this.options.border<0)this.options.border=1;if(this.options.minItems<1||this.options.minItems>this.itemsCount)this.options.minItems=1;if(this.options.current>this.itemsCount-1)this.options.current=0},_configure:function(){this.current=this.options.current;this.visibleWidth=this.$esCarousel.width();if(this.visibleWidth<this.options.minItems*(this.options.imageW+2*this.options.border)+(this.options.minItems-1)*this.options.margin){this._setDim((this.visibleWidth-(this.options.minItems-1)*this.options.margin)/this.options.minItems);this._setCurrentValues();this.fitCount=this.options.minItems}else{this._setDim();this._setCurrentValues()}this.$slider.css({width:this.sliderW})},_setDim:function(a){this.$items.css({marginRight:this.options.margin,width:a?a:this.options.imageW+2*this.options.border}).children("a").css({borderWidth:this.options.border})},_setCurrentValues:function(){this.itemW=this.$items.outerWidth(true);this.sliderW=this.itemW*this.itemsCount;this.visibleWidth=this.$esCarousel.width();this.fitCount=Math.floor(this.visibleWidth/this.itemW)},_addControls:function(){this.$navNext=b('<span class="es-nav-next">Next</span>');this.$navPrev=b('<span class="es-nav-prev">Previous</span>');b('<div class="es-nav"/>').append(this.$navPrev).append(this.$navNext).appendTo(this.$el)},_toggleControls:function(a,b){if(a&&b){if(b===1)a==="right"?this.$navNext.show():this.$navPrev.show();else a==="right"?this.$navNext.hide():this.$navPrev.hide()}else if(this.current===this.itemsCount-1||this.fitCount>=this.itemsCount)this.$navNext.hide()},_initEvents:function(){var c=this;b(a).bind("resize.elastislide",function(a){c._setCurrentValues();if(c.visibleWidth<c.options.minItems*(c.options.imageW+2*c.options.border)+(c.options.minItems-1)*c.options.margin){c._setDim((c.visibleWidth-(c.options.minItems-1)*c.options.margin)/c.options.minItems);c._setCurrentValues();c.fitCount=c.options.minItems}else{c._setDim();c._setCurrentValues()}c.$slider.css({width:c.sliderW+10});clearTimeout(c.resetTimeout);c.resetTimeout=setTimeout(function(){c._slideToCurrent()},200)});this.$navNext.bind("click.elastislide",function(a){c._slide("right")});this.$navPrev.bind("click.elastislide",function(a){c._slide("left")});this.$items.bind("click.elastislide",function(a){c.options.onClick(b(this));return false});c.$slider.touchwipe({wipeLeft:function(){c._slide("right")},wipeRight:function(){c._slide("left")}})},_slide:function(a,d,e,f){if(this.$slider.is(":animated"))return false;var g=parseFloat(this.$slider.css("margin-left"));if(d===c){var h=this.fitCount*this.itemW,d;if(h<0)return false;if(a==="right"&&this.sliderW-(Math.abs(g)+h)<this.visibleWidth){h=this.sliderW-(Math.abs(g)+this.visibleWidth)-this.options.margin;this._toggleControls("right",-1);this._toggleControls("left",1)}else if(a==="left"&&Math.abs(g)-h<0){h=Math.abs(g);this._toggleControls("left",-1);this._toggleControls("right",1)}else{var i;a==="right"?i=Math.abs(g)+this.options.margin+Math.abs(h):i=Math.abs(g)-this.options.margin-Math.abs(h);if(i>0)this._toggleControls("left",1);else this._toggleControls("left",-1);if(i<this.sliderW-this.visibleWidth)this._toggleControls("right",1);else this._toggleControls("right",-1)}a==="right"?d="-="+h:d="+="+h}else{var i=Math.abs(d);if(Math.max(this.sliderW,this.visibleWidth)-i<this.visibleWidth){d=-(Math.max(this.sliderW,this.visibleWidth)-this.visibleWidth);if(d!==0)d+=this.options.margin;this._toggleControls("right",-1);i=Math.abs(d)}if(i>0)this._toggleControls("left",1);else this._toggleControls("left",-1);if(Math.max(this.sliderW,this.visibleWidth)-this.visibleWidth>i+this.options.margin)this._toggleControls("right",1);else this._toggleControls("right",-1)}b.fn.applyStyle=e===c?b.fn.animate:b.fn.css;var j={marginLeft:d};var k=this;this.$slider.applyStyle(j,b.extend(true,[],{duration:this.options.speed,easing:this.options.easing,complete:function(){if(f)f.call()}}))},_slideToCurrent:function(a){var b=this.current*this.itemW;this._slide("",-b,a)},add:function(a,b){this.$items=this.$items.add(a);this.itemsCount=this.$items.length;this._setDim();this._setCurrentValues();this.$slider.css({width:this.sliderW});this._slideToCurrent();if(b)b.call(a)},destroy:function(a){this._destroy(a)},_destroy:function(c){this.$el.unbind(".elastislide").removeData("elastislide");b(a).unbind(".elastislide");if(c)c.call()}};var d=function(a){if(this.console){console.error(a)}};b.fn.elastislide=function(a){if(typeof a==="string"){var c=Array.prototype.slice.call(arguments,1);this.each(function(){var e=b.data(this,"elastislide");if(!e){d("cannot call methods on elastislide prior to initialization; "+"attempted to call method '"+a+"'");return}if(!b.isFunction(e[a])||a.charAt(0)==="_"){d("no such method '"+a+"' for elastislide instance");return}e[a].apply(e,c)})}else{this.each(function(){var c=b.data(this,"elastislide");if(!c){b.data(this,"elastislide",new b.elastislide(a,this))}})}return this}})(window,jQuery)