(function(V,U,T){var S=V.document,R=V.Modernizr,Q=function(b){return b.charAt(0).toUpperCase()+b.slice(1)},P="Moz Webkit O Ms".split(" "),O=function(f){var d=S.documentElement.style,l;if(typeof d[f]=="string"){return f}f=Q(f);for(var k=0,g=P.length;k"+k+"{#modernizr{height:3px}}").appendTo("head"),g=U('
').appendTo("html");b=g.height()===3,g.remove(),h.remove()}return b},csstransitions:function(){return !!M}},K;if(R){for(K in L){R.hasOwnProperty(K)||R.addTest(K,L[K])}}else{R=V.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var J=" ",I;for(K in L){I=L[K](),R[K]=I,J+=" "+(I?"":"no-")+K}U("html").addClass(J)}if(R.csstransforms){var H=R.csstransforms3d?{translate:function(b){return"translate3d("+b[0]+"px, "+b[1]+"px, 0) "},scale:function(b){return"scale3d("+b+", "+b+", 1) "}}:{translate:function(b){return"translate("+b[0]+"px, "+b[1]+"px) "},scale:function(b){return"scale("+b+") "}},G=function(w,v,u){var t=U.data(w,"isoTransform")||{},s={},r,q={},p;s[v]=u,U.extend(t,s);for(r in t){p=t[r],q[r]=H[r](p)}var o=q.translate||"",n=q.scale||"",b=o+n;U.data(w,"isoTransform",t),w.style[N]=b};U.cssNumber.scale=!0,U.cssHooks.scale={set:function(d,c){G(d,"scale",c)},get:function(b,f){var e=U.data(b,"isoTransform");return e&&e.scale?e.scale:1}},U.fx.step.scale=function(b){U.cssHooks.scale.set(b.elem,b.now+b.unit)},U.cssNumber.translate=!0,U.cssHooks.translate={set:function(d,c){G(d,"translate",c)},get:function(b,f){var e=U.data(b,"isoTransform");return e&&e.translate?e.translate:[0,0]}}}var F,E;R.csstransitions&&(F={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[M],E=O("transitionDuration"));var D=U.event,C=U.event.handle?"handle":"dispatch",B;D.special.smartresize={setup:function(){U(this).bind("resize",D.special.smartresize.handler)},teardown:function(){U(this).unbind("resize",D.special.smartresize.handler)},handler:function(f,e){var h=this,g=arguments;f.type="smartresize",B&&clearTimeout(B),B=setTimeout(function(){D[C].apply(h,g)},e==="execAsap"?0:100)}},U.fn.smartresize=function(b){return b?this.bind("smartresize",b):this.trigger("smartresize",["execAsap"])},U.Isotope=function(b,f,e){this.element=U(f),this._create(b),this._init(e)};var A=["width","height"],z=U(V);U.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:0.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},U.Isotope.prototype={_create:function(b){this.options=U.extend({},U.Isotope.settings,b),this.styleQueue=[],this.elemCount=0;var q=this.element[0].style;this.originalStyle={};var p=A.slice(0);for(var o in this.options.containerStyle){p.push(o)}for(var n=0,m=p.length;na?1:b0&&(W=function(d,c){c.$el[aa](c.style,Z).one(F,w)},x=!1)}}}}U.each(this.styleQueue,W),x&&w(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(b){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,b)},addItems:function(e,d){var f=this._getAtoms(e);this.$allAtoms=this.$allAtoms.add(f),d&&d(f)},insert:function(e,d){this.element.append(e);var f=this;this.addItems(e,function(b){var c=f._filter(b);f._addHideAppended(c),f._sort(),f.reLayout(),f._revealAppended(c,d)})},appended:function(e,d){var f=this;this.addItems(e,function(b){f._addHideAppended(b),f.layout(b),f._revealAppended(b,d)})},_addHideAppended:function(b){this.$filteredAtoms=this.$filteredAtoms.add(b),b.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:b,style:this.options.hiddenStyle})},_revealAppended:function(e,d){var f=this;setTimeout(function(){e.removeClass("no-transition"),f.styleQueue.push({$el:e,style:f.options.visibleStyle}),f._isInserting=!1,f._processStyleQueue(e,d)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(f,e){this.$allAtoms=this.$allAtoms.not(f),this.$filteredAtoms=this.$filteredAtoms.not(f);var h=this,g=function(){f.remove(),e&&e.call(h.element)};f.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:f,style:this.options.hiddenStyle}),this._sort(),this.reLayout(g)):g()},shuffle:function(b){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(b)},destroy:function(){var f=this.usingTransforms,e=this.options;this.$allAtoms.removeClass(e.hiddenClass+" "+e.itemClass).each(function(){var a=this.style;a.position="",a.top="",a.left="",a.opacity="",f&&(a[N]="")});var h=this.element[0].style;for(var g in this.originalStyle){h[g]=this.originalStyle[g]}this.element.unbind(".isotope").undelegate("."+e.hiddenClass,"click").removeClass(e.containerClass).removeData("isotope"),z.unbind(".isotope")},_getSegments:function(k){var f=this.options.layoutMode,q=k?"rowHeight":"columnWidth",p=k?"height":"width",o=k?"rows":"cols",n=this.element[p](),m,l=this.options[f]&&this.options[f][q]||this.$filteredAtoms["outer"+Q(p)](!0)||n;m=Math.floor(n/l),m=Math.max(m,1),this[f][o]=m,this[f][q]=l},_checkIfSegmentsChanged:function(f){var e=this.options.layoutMode,h=f?"rows":"cols",g=this[e][h];return this._getSegments(f),this[e][h]!==g},_masonryReset:function(){this.masonry={},this._getSegments();var b=this.masonry.cols;this.masonry.colYs=[];while(b--){this.masonry.colYs.push(0)}},_masonryLayout:function(b){var f=this,e=f.masonry;b.each(function(){var c=U(this),n=Math.ceil(c.outerWidth(!0)/e.columnWidth);n=Math.min(n,e.cols);if(n===1){f._masonryPlaceBrick(c,e.colYs)}else{var m=e.cols+1-n,l=[],k,d;for(d=0;dg&&(f.x=0,f.y=f.height),h._pushPosition(c,f.x,f.y),f.height=Math.max(f.y+d,f.height),f.x+=e})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return !0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(b){var f=this,e=this.cellsByRow;b.each(function(){var c=U(this),m=e.index%e.cols,l=Math.floor(e.index/e.cols),k=(m+0.5)*e.columnWidth-c.outerWidth(!0)/2,d=(l+0.5)*e.rowHeight-c.outerHeight(!0)/2;f._pushPosition(c,k,d),e.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(b){var d=this;b.each(function(c){var e=U(this);d._pushPosition(e,0,d.straightDown.y),d.straightDown.y+=e.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return !0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var b=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(b--){this.masonryHorizontal.rowXs.push(0)}},_masonryHorizontalLayout:function(b){var f=this,e=f.masonryHorizontal;b.each(function(){var c=U(this),n=Math.ceil(c.outerHeight(!0)/e.rowHeight);n=Math.min(n,e.rows);if(n===1){f._masonryHorizontalPlaceBrick(c,e.rowXs)}else{var m=e.rows+1-n,l=[],k,d;for(d=0;dg&&(f.x=f.width,f.y=0),h._pushPosition(c,f.x,f.y),f.width=Math.max(f.x+e,f.width),f.y+=d})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return !0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(b){var f=this,e=this.cellsByColumn;b.each(function(){var c=U(this),m=Math.floor(e.index/e.rows),l=e.index%e.rows,k=(m+0.5)*e.columnWidth-c.outerWidth(!0)/2,d=(l+0.5)*e.rowHeight-c.outerHeight(!0)/2;f._pushPosition(c,k,d),e.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(b){var d=this;b.each(function(c){var e=U(this);d._pushPosition(e,d.straightAcross.x,0),d.straightAcross.x+=e.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return !0}},U.fn.imagesLoaded=function(b){function l(){b.call(q,p)}function k(d){var e=d.target;e.src!==n&&U.inArray(e,m)===-1&&(m.push(e),--o<=0&&(setTimeout(l),p.unbind(".imagesLoaded",k)))}var q=this,p=q.find("img").add(q.filter("img")),o=p.length,n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",m=[];return o||l(),p.bind("load.imagesLoaded error.imagesLoaded",k).each(function(){var c=this.src;this.src=n,this.src=c}),q};var y=function(a){V.console&&V.console.error(a)};U.fn.isotope=function(b,f){if(typeof b=="string"){var e=Array.prototype.slice.call(arguments,1);this.each(function(){var a=U.data(this,"isotope");if(!a){y("cannot call methods on isotope prior to initialization; attempted to call method '"+b+"'");return}if(!U.isFunction(a[b])||b.charAt(0)==="_"){y("no such method '"+b+"' for isotope instance");return}a[b].apply(a,e)})}else{this.each(function(){var a=U.data(this,"isotope");a?(a.option(b),a._init(f)):U.data(this,"isotope",new U.Isotope(b,this,f))})}return this}})(window,jQuery);jQuery(document).ready(function(l){if(!("ontouchstart" in window)&&!(/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor))){if(dtLocal.themeSettings.smoothScroll=="on"||dtLocal.themeSettings.smoothScroll=="on_parallax"&&l(".stripe-parallax-bg").length>0){var m=false,d=0,n=0,p=0,r=0,q,c=l(window),g=l("html"),b=0.5,o=0,f=1,e=1;var k=function(t){p+=t;o+=(p-r)*f;r=p};var a=function(){if(o<-(e)||o>e){d=(d+o);c.scrollTop(-d);n=d;o*=b}else{m=false}};var s=function(){if(!m){return}requestAnimFrame(s);a()};var h=function(v){v.preventDefault();var t=v.originalEvent;var w=t.detail?t.detail*-1:t.wheelDelta/33;w=w*10;var u=w<0?-1:1;d=-c.scrollTop();k(w);if(!m){m=true;s()}};window.requestAnimFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1000/60)}})();g.bind("mousewheel",h);g.bind("DOMMouseScroll",h);p=r=c.scrollTop();d=n=-p}}});jQuery(document).ready(function(a){var b=a(window);var c=b.height();b.resize(function(){c=b.height()});a.fn.parallax=function(e,d,g){var k=a(this);var l;var h;var f=0;k.each(function(){h=k.offset().top});if(g){l=function(n){return n.outerHeight(true)}}else{l=function(n){return n.height()}}if(arguments.length<1||e===null){e="50%"}if(arguments.length<2||d===null){d=0.1}if(arguments.length<3||g===null){g=true}function m(){var n=b.scrollTop();k.each(function(){var p=a(this);var q=p.offset().top;var o=l(p);if(q+on+c){return}k.css("backgroundPosition",e+" "+Math.round((h-n)*d)+"px")})}b.bind("scroll",m).resize(m);m();setTimeout(function(){if(!window.bgGlitchFixed&&a.browser.webkit){b.scrollTop(b.scrollTop()+1);window.bgGlitchFixed=true}},20)}});if(typeof jQuery.easing.jswing=="undefined"){jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(d,b,f,c,a){return jQuery.easing[jQuery.easing.def](d,b,f,c,a)},easeInQuad:function(d,b,f,c,a){return c*(b/=a)*b+f},easeOutQuad:function(d,b,f,c,a){return -c*(b/=a)*(b-2)+f},easeInOutQuad:function(d,b,f,c,a){if((b/=a/2)<1){return c/2*b*b+f}return -c/2*(--b*(b-2)-1)+f},easeInCubic:function(d,b,f,c,a){return c*(b/=a)*b*b+f},easeOutCubic:function(d,b,f,c,a){return c*((b=b/a-1)*b*b+1)+f},easeInOutCubic:function(d,b,f,c,a){if((b/=a/2)<1){return c/2*b*b*b+f}return c/2*((b-=2)*b*b+2)+f},easeInQuart:function(d,b,f,c,a){return c*(b/=a)*b*b*b+f},easeOutQuart:function(d,b,f,c,a){return -c*((b=b/a-1)*b*b*b-1)+f},easeInOutQuart:function(d,b,f,c,a){if((b/=a/2)<1){return c/2*b*b*b*b+f}return -c/2*((b-=2)*b*b*b-2)+f},easeInQuint:function(d,b,f,c,a){return c*(b/=a)*b*b*b*b+f},easeOutQuint:function(d,b,f,c,a){return c*((b=b/a-1)*b*b*b*b+1)+f},easeInOutQuint:function(d,b,f,c,a){if((b/=a/2)<1){return c/2*b*b*b*b*b+f}return c/2*((b-=2)*b*b*b*b+2)+f},easeInSine:function(d,b,f,c,a){return -c*Math.cos(b/a*(Math.PI/2))+c+f},easeOutSine:function(d,b,f,c,a){return c*Math.sin(b/a*(Math.PI/2))+f},easeInOutSine:function(d,b,f,c,a){return -c/2*(Math.cos(Math.PI*b/a)-1)+f},easeInExpo:function(d,b,f,c,a){return b==0?f:c*Math.pow(2,10*(b/a-1))+f},easeOutExpo:function(d,b,f,c,a){return b==a?f+c:c*(-Math.pow(2,-10*b/a)+1)+f},easeInOutExpo:function(d,b,f,c,a){if(b==0){return f}if(b==a){return f+c}if((b/=a/2)<1){return c/2*Math.pow(2,10*(b-1))+f}return c/2*(-Math.pow(2,-10*--b)+2)+f},easeInCirc:function(d,b,f,c,a){return -c*(Math.sqrt(1-(b/=a)*b)-1)+f},easeOutCirc:function(d,b,f,c,a){return c*Math.sqrt(1-(b=b/a-1)*b)+f},easeInOutCirc:function(d,b,f,c,a){if((b/=a/2)<1){return -c/2*(Math.sqrt(1-b*b)-1)+f}return c/2*(Math.sqrt(1-(b-=2)*b)+1)+f},easeInElastic:function(g,c,k,f,b){var d=1.70158;var h=0;var a=f;if(c==0){return k}if((c/=b)==1){return k+f}if(!h){h=b*0.3}if(a '+this.$trigger.find(".menu-open").html()+"";this.closeCap=' '+this.$trigger.find(".menu-close").html()+"";this.$menu=this.$el.find("ul.dl-menu");this.$menuitems=this.$menu.find("li:not(.dl-back)");this.$back=this.$menu.find("li.dl-back");this.$menuitems.each(function(){var g=d(this),k=g.children("ul.dl-submenu");g.siblings(".new-column").find("> a").remove();var h=g.siblings(".new-column").find("> ul.dl-submenu").unwrap();h.find("> a, > .dl-back").remove();h.children().unwrap().appendTo(k);g.siblings(".new-column").remove()})},_initEvents:function(){var g=this;this.$trigger.on("click.dlmenu",function(){if(g.open){g._closeMenu()}else{g._openMenu();c.off("click").on("click.dlmenu",function(){g._closeMenu()})}return false});this.$menuitems.on("click.dlmenu",function(l){l.stopPropagation();var k=d(this),h=k.children("ul.dl-submenu");if(h.length>0){d("html, body").animate({scrollTop:g.$el.offset().top-20},150);var n=h.clone().insertAfter(g.$menu).addClass(g.options.animationClasses.animIn),m=function(){g.$menu.off(g.animEndEventName).removeClass(g.options.animationClasses.animOut).addClass("dl-subview");k.addClass("dl-subviewopen").parents(".dl-subviewopen:first").removeClass("dl-subviewopen").addClass("dl-subview");n.remove()};g.$menu.addClass(g.options.animationClasses.animOut);if(g.supportAnimations){g.$menu.on(g.animEndEventName,m)}else{m.call()}return false}});this.$back.on("click.dlmenu",function(m){d("html, body").animate({scrollTop:g.$el.offset().top-20},150);var n=d(this),k=n.parents("ul.dl-submenu:first"),h=k.parent(),p=k.clone().insertAfter(g.$menu).addClass(g.options.animationClasses.animOut);var o=function(){g.$menu.off(g.animEndEventName).removeClass(g.options.animationClasses.animIn);p.remove()};g.$menu.addClass(g.options.animationClasses.animIn);if(g.supportAnimations){g.$menu.on(g.animEndEventName,o)}else{o.call()}h.removeClass("dl-subviewopen");var l=n.parents(".dl-subview:first");if(l.is("li")){l.addClass("dl-subviewopen")}l.removeClass("dl-subview");return false})},_closeMenu:function(){var g=this,h=function(){g.$menu.off(g.transEndEventName);g._resetMenu()};this.$menu.removeClass("dl-menuopen");this.$menu.addClass("dl-menu-toggle");this.$trigger.removeClass("dl-active").html(this.openCap);if(this.supportTransitions){this.$menu.on(this.transEndEventName,h)}else{h.call()}this.open=false},_openMenu:function(){this.$menu.addClass("dl-menuopen dl-menu-toggle").on(this.transEndEventName,function(){d(this).removeClass("dl-menu-toggle")});this.$trigger.addClass("dl-active").html(this.closeCap);this.open=true;d("html, body").animate({scrollTop:this.$el.offset().top-20},150)},_resetMenu:function(){this.$menu.removeClass("dl-subview");this.$menuitems.removeClass("dl-subview dl-subviewopen")}};var a=function(g){if(b.console){b.console.error(g)}};d.fn.dlmenu=function(h){if(typeof h==="string"){var g=Array.prototype.slice.call(arguments,1);this.each(function(){var k=d.data(this,"dlmenu");if(!k){a("cannot call methods on dlmenu prior to initialization; attempted to call method '"+h+"'");return}if(!d.isFunction(k[h])||h.charAt(0)==="_"){a("no such method '"+h+"' for dlmenu instance");return}k[h].apply(k,g)})}else{this.each(function(){var k=d.data(this,"dlmenu");if(k){k._init()}else{k=d.data(this,"dlmenu",new d.DLMenu(h,this))}})}return this}})(jQuery,window);function simple_tooltip(b,a){jQuery(b).each(function(c){jQuery("body").append("
"+jQuery(this).find("span.tooltip-c").html()+"
");var d=jQuery("#"+a+c);jQuery(this).removeAttr("title").mouseover(function(){d.css({opacity:1,display:"none"}).fadeIn(400)}).mousemove(function(k){var f=jQuery(window).scrollTop();var g=jQuery(window).width();var h;var e;var l=15;if(g-(l*2)>=d.width()+k.pageX){h=k.pageX+l}else{h=g-d.width()-l}if(f+(l*2)>=k.pageY-d.height()){e=f+l}else{e=k.pageY-d.height()-2.2*l}d.css({left:h,top:e})}).mouseout(function(){d.css({left:"-9999px"})})})}(function(c,d,f){var a=d.event;var e=0;d.Accordion=function(g,h){this.$el=d(h);this.$items=this.$el.children("ul").children("li");this.itemsCount=this.$items.length;this._init(g)};d.Accordion.defaults={open:-1,oneOpenedItem:false,speed:600,easing:"easeInOutExpo",scrollSpeed:900,scrollEasing:"easeInOutExpo"};d.Accordion.prototype={_init:function(g){this.options=d.extend(true,{},d.Accordion.defaults,g);this._validate();this.current=this.options.open;this.$items.find("div.st-content").hide();this._saveDimValues();if(this.current!=-1){this._toggleItem(this.$items.eq(this.current))}this._initEvents()},_saveDimValues:function(){this.$items.each(function(){var g=d(this);g.data({originalHeight:g.find("a:first").height(),offsetTop:g.offset().top})})},_validate:function(){if(this.options.open<-1||this.options.open>this.itemsCount-1){this.options.open=-1}},_initEvents:function(){var g=this;this.$items.find("a:first").bind("click.accordion",function(k){var h=d(this).parent();if(g.options.oneOpenedItem&&g._isOpened()&&g.current!==h.index()){g._toggleItem(g.$items.eq(g.current))}g._toggleItem(h);return false});g.$el.find("li").each(function(){var h=d(this);h.css("height",h.data("originalHeight"))});d(c).bind("debouncedresize",function(h){g._saveDimValues();g.$el.find("li").not(".st-open").each(function(){var k=d(this);k.css("height",k.data("originalHeight"))});g.$el.find("li.st-open").each(function(){var k=d(this);k.css("height",k.data("originalHeight")+k.find("div.st-content").outerHeight(true))})})},_isOpened:function(){return(this.$el.find("li.st-open").length>0)},_toggleItem:function(h){e++;var g=this;var k=h.find("div.st-content");(h.hasClass("st-open"))?(this.current=-1,k.stop(true,true).fadeOut(this.options.speed),h.removeClass("st-open").stop().animate({height:h.data("originalHeight")},this.options.speed,this.options.easing,function(){if(e>1){g._scroll()}})):(this.current=h.index(),k.stop(true,true).fadeIn(this.options.speed),h.addClass("st-open").stop().animate({height:h.data("originalHeight")+k.outerHeight(true)},this.options.speed,this.options.easing,function(){}))},_scroll:function(g){var g=g||this,h;(g.current!==-1)?h=g.current:h=g.$el.find("li.st-open:last").index();if(c.innerWidth<760){d("html, body").stop().animate({scrollTop:g.$items.eq(h).offset().top},g.options.scrollSpeed,g.options.scrollEasing)}}};var b=function(g){if(this.console){console.error(g)}};d.fn.dtAccordion=function(h){if(typeof h==="string"){var g=Array.prototype.slice.call(arguments,1);this.each(function(){var k=d.data(this,"accordion");if(!k){b("cannot call methods on accordion prior to initialization; attempted to call method '"+h+"'");return}if(!d.isFunction(k[h])||h.charAt(0)==="_"){b("no such method '"+h+"' for accordion instance");return}k[h].apply(k,g)})}else{this.each(function(){var k=d.data(this,"accordion");if(!k){d.data(this,"accordion",new d.Accordion(h,this))}})}return this}})(window,jQuery);(function(b,c,e){var d=0;c.Toggle=function(f,g){this.$el=c(g);this.$items=this.$el;this.itemsCount=this.$items.length;this._init(f)};c.Toggle.defaults={open:-1,oneOpenedItem:false,speed:600,easing:"easeInOutExpo",scrollSpeed:900,scrollEasing:"easeInOutExpo"};c.Toggle.prototype={_init:function(f){this.options=c.extend(true,{},c.Toggle.defaults,f);this._validate();this.current=this.options.open;this.$items.find("div.st-toggle-content").hide();this._saveDimValues();if(this.current!=-1){this._toggleItem(this.$items.eq(this.current))}this._initEvents()},_saveDimValues:function(){this.$items.each(function(){var f=c(this);f.data({originalHeight:f.find("a:first").height(),offsetTop:f.offset().top})})},_validate:function(){if(this.options.open<-1||this.options.open>this.itemsCount-1){this.options.open=-1}},_initEvents:function(){var f=this;this.$items.find("a:first").bind("click.toggle",function(h){var g=c(this).parent();if(f.options.oneOpenedItem&&f._isOpened()&&f.current!==g.index()){f._toggleItem(f.$items.eq(f.current))}f._toggleItem(g);return false});f.$el.each(function(){var g=c(this);g.css("height",g.data("originalHeight"))});c(b).bind("debouncedresize",function(g){f._saveDimValues();f.$el.not(".st-open").each(function(){var h=c(this);h.css("height",h.data("originalHeight"))});f.$el.each(function(){if(c(this).hasClass("st-open")){var h=c(this);h.css("height",h.data("originalHeight")+h.find("div.st-toggle-content").outerHeight(true))}})})},_isOpened:function(){return(this.$el.is(".st-toggle-open").length>0)},_toggleItem:function(g){d++;var f=this;var h=g.find("div.st-toggle-content");(g.hasClass("st-open"))?(this.current=-1,h.stop(true,true).fadeOut(this.options.speed),g.removeClass("st-open").stop().animate({height:g.data("originalHeight")},this.options.speed,this.options.easing,function(){if(d>1){f._scroll()}})):(this.current=g.index(),h.stop(true,true).fadeIn(this.options.speed),g.addClass("st-open").stop().animate({height:g.data("originalHeight")+h.outerHeight(true)},this.options.speed,this.options.easing,function(){if(d>1){f._scroll()}}))},_scroll:function(f){var f=f||this,g;(f.current!==-1)?g=f.current:g=f.$el.find("li.st-open:last").index();if(b.innerWidth<760){c("html, body").stop().animate({scrollTop:f.$items.eq(g).offset().top},f.options.scrollSpeed,f.options.scrollEasing)}}};var a=function(f){if(this.console){console.error(f)}};c.fn.toggle=function(g){if(typeof g==="string"){var f=Array.prototype.slice.call(arguments,1);this.each(function(){var h=c.data(this,"toggle");if(!h){a("cannot call methods on toggle prior to initialization; attempted to call method '"+g+"'");return}if(!c.isFunction(h[g])||g.charAt(0)==="_"){a("no such method '"+g+"' for toggle instance");return}h[g].apply(h,f)})}else{this.each(function(){var h=c.data(this,"toggle");if(!h){c.data(this,"toggle",new c.Toggle(g,this))}})}return this}})(window,jQuery);jQuery(document).ready(function(a){a.fn.goTabs=function(b){var d={heading:".tab",content:".tab-content",active:"active-tab"};a(".tab-content .tab-inner-content").fadeOut();a(".tab-content.active-tab-content .tab-inner-content").fadeIn();var c=a(window);b=a.extend(d,b);return this.each(function(){var e=a(this),m=a('').prependTo(e),h=a(b.heading,e),l=a(b.content,e),k=false,n=false;k=h.clone();n=h.addClass("fullsize-tab");h=k;h.prependTo(m).each(function(p){var q=a(this),o=false;if(k){o=n.filter(":eq("+p+")")}q.addClass("tab-counter-"+p).bind("click",function(){g(q,p,o);return false});if(k){o.bind("click",function(){g(o,p,q);return false})}});f();function g(r,p,s){if(!r.is("."+b.active)){var q=l.filter(":eq("+p+")").find(".tab-inner-content").outerHeight();a("."+b.active,e).removeClass(b.active);a("."+b.active+"-content",e).removeClass(b.active+"-content").find(".tab-inner-content").css({height:""}).fadeOut(400,function(){var u=r.addClass(b.active);var t=l.filter(":eq("+p+")").addClass(b.active+"-content");t.find(".tab-inner-content").fadeIn(400);if(window.innerWidth<760){a("html, body").stop().animate({scrollTop:u.offset().top},900,"easeInOutExpo")}});var o=r.data("fake-id");if(s){s.addClass(b.active)}}}function f(){var o=h.filter('[data-fake-id=""]');if(o.length){if(!o.is(".active-tab")){o.trigger("click")}}}})}}); /*!-The Slider*/ jQuery(document).ready(function(a){a.fn.exists=function(){if(a(this).length>0){return true}else{return false}};a.fn.loaded=function(c,e,d){var b=this.length;if(b>0){return this.each(function(){var g=this,f=a(g),h="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";f.on("load.dt",function(k){a(this).off("load.dt");if(typeof c=="function"){c.call(this)}if(--b<=0&&typeof e=="function"){e.call(this)}});if(!g.complete||g.complete===undefined){g.src=g.src}else{f.trigger("load.dt")}})}else{if(d){if(typeof e=="function"){e.call(this)}return this}}};a.rsCSS3Easing={easeOutSine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeInOutSine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"};a.extend(jQuery.easing,{easeInOutSine:function(f,c,g,d,b){return -d/2*(Math.cos(Math.PI*c/b)-1)+g},easeOutSine:function(f,c,g,d,b){return d*Math.sin(c/b*(Math.PI/2))+g},easeOutCubic:function(f,c,g,d,b){return d*((c=c/b-1)*c*c+1)+g}});a.theSlider=function(b,d){var c=a(b).data("theSlider");if(!c){this._init(b,d)}else{c.update()}};a.theSlider.defaults={mode:"slider",responsive:true,height:false,width:false,storeHTML:true,threshold:20};a.theSlider.prototype={_init:function(b,d){var c=this;c.st=a.extend({},a.theSlider.defaults,d);c.ev=a(c);c.currSlide=0;c.noSlide=true;c.lockLeft=false;c.lockRight=false;c.wrap={};c.wrap.$el=a(b);c.wrap.width=0;c.wrap.height=false;c.wrap.$el.data("theSlider",c);c.viewport=false;c.cont={};c.cont.$el=c.wrap.$el.find(".ts-cont").exists()?c.wrap.$el.find(".ts-cont"):c.wrap.$el.children();c.cont.width=0;c.cont.startX=0;c.cont.instantX=0;c.slides={};c.slides.$items=c.cont.$el.find(".ts-slide").exists()?c.cont.$el.find(".ts-slide"):c.cont.$el.children();c.slides.number=c.slides.$items.length;c.slides.position=[];c.slides.width=[];c.slides.isLoaded=[];c.drag={};c.drag.isMoving=false;c.drag.startX=0;c.drag.startY=0;c.drag.offsetX=0;c.drag.offsetY=0;c.drag.lockX=false;c.drag.lockY=false;c.features={};c._featureDetection();if(c.st.storeHTML){c.origHTML=c.wrap.$el.html()}c._buildHTML();c._calcSliderSize();c._setSliderWidth();c._adjustSlides();c._setSliderHeight();if(!c.noSlide){c._bindEvents()}setTimeout(function(){c.ev.trigger("sliderReady")},20);if(c.st.responsive){a(window).on("resize",function(){c.update()})}},_featureDetection:function(){var d=this,b=document.createElement("div").style,f=["webkit","Moz","ms","O"],c;d.features.vendor="";for(i=0;i')}b.viewport=b.wrap.$el.find(".ts-viewport");b.wrap.$el.addClass("ts-wrap");b.cont.$el.addClass("ts-cont");if(b.st.mode==="slider"){b.slides.$items.addClass("ts-slide")}else{if(b.st.mode==="scroller"){b.slides.$items.addClass("ts-cell")}}},_calcSliderSize:function(){var f=this,c=typeof f.st.width,g=typeof f.st.height,d=false,b=false;f.wrap.width=f.wrap.$el.width();if(c==="function"){d=f.st.width(this)}else{if(c==="number"){d=f.st.width}}if(g==="function"){b=f.st.height(this)}else{if(g==="number"){b=f.st.height}}if(b&&!d){f.wrap.height=b}else{if(b&&d){f.wrap.height=b*f.wrap.width/d}else{f.wrap.height=false}}},_setSliderWidth:function(){var b=this;b.viewport.css({width:b.wrap.width})},_setSliderHeight:function(){var b=this;if(typeof b.wrap.height==="number"){b.viewport.css({height:b.wrap.height})}else{if(b.st.mode==="scroller"){if(b.viewport.css("height")==="0px"||b.viewport.css("height")==0||!b.viewport.css("height")){b.viewport.css({height:Math.max.apply(null,b.slides.height)})}}else{if(b.slides.isLoaded[b.currSlide]){b.viewport.css({height:a(b.slides.$items[b.currSlide]).height()})}else{b.slides.$items[b.currSlide].find("img").loaded(false,function(){b._setSliderHeight()},true)}}}},_adjustSlides:function(){var b=this;if(b.st.mode==="slider"){b.cont.width=b.wrap.width*b.slides.number;b.slides.$items.each(function(e){var d=a(b.slides.$items[e]),c={};b.slides.width[e]=b.wrap.width;b.slides.position[e]=-b.wrap.width*e;if(!b.slides.isLoaded[e]){d.find("img").loaded(false,function(){b.slides.isLoaded[e]=true},true)}c.left=-b.slides.position[e];if(b.st.height){c.height=b.wrap.height}d.css(c)})}else{if(b.st.mode==="scroller"){b.cont.width=0;b.slides.ratio=[];if(!(typeof b.wrap.height==="number")){b.slides.height=[]}b.slides.$items.each(function(e){var d=a(b.slides.$items[e]),c={};if(!b.slides.ratio[e]){b.slides.ratio[e]=d.width()/d.height()}if(typeof b.wrap.height==="number"){b.slides.width[e]=b.wrap.height*b.slides.ratio[e];c.width=b.slides.width[e];c.height=b.slides.width[e]/b.slides.ratio[e]}else{if(!b.slides.width[e]){b.slides.width[e]=d.width()}if(!b.slides.height[e]){b.slides.height[e]=d.height()}}b.slides.position[e]=-b.cont.width;b.cont.width=b.cont.width+b.slides.width[e];c.left=-b.slides.position[e];if(!b.slides.isLoaded[e]){d.find("img").loaded(false,function(){b.slides.isLoaded[e]=true},true)}d.css(c)})}}if(b.cont.width<=b.wrap.width){b.noSlide=true;b.cont.$el.css("left",(b.wrap.width-b.cont.width)/2);b.lockLeft=true;b.lockRight=true;b.ev.trigger("updateNav")}else{b.noSlide=false;b.cont.$el.css("left","");if(b.lockRight){b.lockLeft=false;b.lockRight=true;b.ev.trigger("lockRight").trigger("updateNav")}else{if(b.currSlide<=0){b.lockLeft=true;b.lockRight=false;b.ev.trigger("lockLeft").trigger("updateNav")}else{if(b.currSlide>0){b.lockLeft=false;b.lockRight=false;b.ev.trigger("updateNav")}}}}},_unifiedEvent:function(b){if(b.originalEvent.touches!==undefined&&b.originalEvent.touches[0]){b.pageX=b.originalEvent.touches[0].pageX;b.pageY=b.originalEvent.touches[0].pageY}return b},_bindEvents:function(){var b=this;b.wrap.$el.on("mousedown.theSlider touchstart.theSlider",function(c){if(c.type!="touchstart"){c.preventDefault()}b._onStart(b._unifiedEvent(c));a(document).on("mousemove.theSlider touchmove.theSlider",function(d){b._onMove(b._unifiedEvent(d))});a(document).on("mouseup.theSlider mouseleave.theSlider touchend.theSlider touchcancel.theSlider",function(d){a(document).off("mousemove.theSlider mouseup.theSlider mouseleave.theSlider touchmove.theSlider touchend.theSlider touchcancel.theSlider");b._onStop(b._unifiedEvent(d))})})},_unbindEvents:function(){var b=this;b.wrap.$el.off("mousedown.theSlider touchstart.theSlider");a(document).off("mousemove.theSlider mouseup.theSlider mouseleave.theSlider touchmove.theSlider touchend.theSlider touchcancel.theSlider")},_onStart:function(c){var b=this;if(!b.drag.isMoving){b._transitionStop();b.drag.isMoving=true;b.drag.startX=c.pageX;b.drag.startY=c.pageY;b.cont.startX=b.cont.$el.position().left;b.drag.offsetX=0;b.drag.offsetY=0;b.drag.lockX=false;b.drag.lockY=false}},_onMove:function(c){var b=this,d=0;if(b.drag.isMoving){b.drag.offsetX=c.pageX-b.drag.startX;b.drag.offsetY=c.pageY-b.drag.startY;if(Math.abs(b.drag.offsetX)>=b.st.threshold-1&&Math.abs(b.drag.offsetX)>Math.abs(b.drag.offsetY)&&!b.drag.lockX){b.drag.lockX=false;b.drag.lockY=true;if(c.type=="touchmove"){b.drag.offsetY=0}}else{if(Math.abs(b.drag.offsetY)>=b.st.threshold-1&&Math.abs(b.drag.offsetX)-b.cont.width+b.wrap.width){d=b.cont.instantX}else{if(b.cont.instantX>=0){d=b.cont.instantX/4}else{d=-b.cont.width+b.wrap.width+(b.cont.width-b.wrap.width+b.cont.instantX)/4}}b._doDrag(d)}},_onStop:function(c){var b=this;if(b.drag.isMoving){b.cont.instantX=b.cont.startX+b.drag.offsetX;b._autoAdjust();b._setSliderHeight();b.cont.startX=0;b.cont.instantX=0;b.drag.isMoving=false;b.drag.startX=0;b.drag.startY=0;b.drag.offsetX=0;b.drag.offsetY=0;b.drag.lockX=false;b.drag.lockY=false}return false},_doDrag:function(c){var b=this;if(b.features.css3d){var d={};d[b.features.vendor+"transform"]="translate3d("+c+"px,0,0)";d.transform="translate3d("+c+"px,0,0)";d[b.vendor+"transition"]="";d.transition="";b.cont.$el.css(d)}else{b.cont.$el.css({left:c})}},_calcCurrSlide:function(c){var b=this,d=b.slides.number-1;b.slides.$items.each(function(e){if(c>b.slides.position[e]){d=e-1;return false}});return d},_isRightExceed:function(c){var b=this;if(c<-b.cont.width+b.wrap.width){return true}else{return false}},_autoAdjust:function(){var d=this,b=0,f=0,c=d.slides.number-1;if(d.cont.instantX>=0){b=0;d.currSlide=0;d.lockLeft=true;d.lockRight=false;d.ev.trigger("lockLeft").trigger("updateNav")}else{if(d._isRightExceed(d.cont.instantX)){b=-d.cont.width+d.wrap.width;d.currSlide=d._calcCurrSlide(b);d.lockLeft=false;d.lockRight=true;d.ev.trigger("lockRight").trigger("updateNav")}else{if(d.drag.offsetX<-d.st.threshold){c=d._calcCurrSlide(d.cont.instantX)+1;if(d._isRightExceed(d.slides.position[c])){b=-d.cont.width+d.wrap.width;for(i=c;i>=0;i--){if(!d._isRightExceed(d.slides.position[i])){c=i;break}}d.lockLeft=false;d.lockRight=true;d.ev.trigger("lockRight").trigger("updateNav")}else{b=d.slides.position[c];if(cd.st.threshold){d.currSlide=d._calcCurrSlide(d.cont.instantX);b=d.slides.position[d.currSlide];if(d.currSlide>0){d.lockLeft=false;d.lockRight=false;d.ev.trigger("updateNav")}else{d.lockLeft=true;d.lockRight=false;d.ev.trigger("lockLeft").trigger("updateNav")}}else{b=d.cont.startX}}}}f=Math.abs(d.cont.instantX-b)/2+100;d._transitionStart(b,f,"easeOutSine")},_transitionStart:function(d,h,f,c){var e=this,g={},b=a.rsCSS3Easing[f];e._transitionStop();if(c){if(e.features.css3d){g[e.features.vendor+"transform"]="translate3d("+d+"px,0,0)";g.transform="translate3d("+d+"px,0,0)"}else{g.left=d}e.cont.$el.css(g);return false}if(e.features.css3d){g[e.features.vendor+"transform"]="translate3d("+d+"px,0,0)";g.transform="translate3d("+d+"px,0,0)";g[e.features.vendor+"transition"]="all "+h+"ms "+b;g.transition="all "+h+"ms "+b;e.cont.$el.css(g);e.cont.$el.one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){e._transitionStop()})}else{if(e.features.css){g.left=d;g[e.vendor+"transition"]="left "+h+"ms "+b;g.transition="left "+h+"ms "+b;e.cont.$el.css(g);e.cont.$el.one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){e._transitionStop()})}else{e.cont.$el.animate({left:d},h,f)}}},_transitionStop:function(){var c=this;if(c.features.css){var b={};b[c.vendor+"transition"]="";b.transition="";c.cont.$el.css(b)}else{c.cont.$el.stop()}},slideTo:function(g,c){var h=this,f=h.slides.position[g],b=0,d=h.currSlide;h._transitionStop();if(f>=0){h.currSlide=0;h.lockLeft=true;if(!h.noSlide){h.lockRight=false}h.ev.trigger("lockLeft").trigger("updateNav")}else{if(h._isRightExceed(f)||g>=h.slides.number-1){f=-h.cont.width+h.wrap.width;h.currSlide=h._calcCurrSlide(f);h.lockLeft=false;h.lockRight=true;h.ev.trigger("lockRight").trigger("updateNav")}else{h.currSlide=g;h.lockLeft=false;h.lockRight=false;h.ev.trigger("updateNav")}}b=Math.abs(h.slides.position[d]-f)/2+100;h._transitionStart(f,b,"easeInOutSine",c)},slideNext:function(){var b=this;if(b.currSlide+1<=b.slides.number-1){b.slideTo(b.currSlide+1)}else{return false}},slidePrev:function(){var b=this;if(b.currSlide-1>=0){b.slideTo(b.currSlide-1)}else{if(b.currSlide==0&&b.lockLeft==false){b.slideTo(b.currSlide)}else{return false}}},update:function(){var b=this;b._calcSliderSize();b._setSliderWidth();b._adjustSlides();b._setSliderHeight();if(b.noSlide){b._unbindEvents()}else{b.slideTo(b.currSlide,true);b._bindEvents()}}};a.fn.theSlider=function(b){return this.each(function(){new a.theSlider(this,b)})}});jQuery(document).ready(function(aG){if(aG(".three-d-slider").length>0){if(aG("#main-slideshow").hasClass("fixed")){var ao=aG(".three-d-slider").attr("data-height")/aG(".three-d-slider").attr("data-width");var ax=aG(".three-d-slider").css("height"),aq=aG(".three-d-slider").css("height",aG(".three-d-slider").width()*ao).addClass("slide-me");var aC=aG(".three-d-slider").width()}else{if(aG("#main-slideshow").hasClass("fixed-height")){var ao=aG(".three-d-slider").attr("data-height")/aG(".three-d-slider").attr("data-width");var ax=aG(".three-d-slider").css("height"),aq=aG(".three-d-slider").css("height",aG(".three-d-slider").width()*ao).addClass("slide-me");var aC=aG(".three-d-slider").width()}else{if(aG(".boxed").length>0){var ap=parseInt(aG("#page.boxed").css("margin-bottom"))}else{var ap=0}var aq=aG(".three-d-slider").css({height:aG(window).height()-aG("#header").height()+aG("#header.overlap").height()-ap-aG("#wpadminbar").height()-ap-aG("#top-bar").height()}).addClass("slide-me")}}var aw={useJS:1,cellSize:300,images:[aG("#level1 img"),aG("#level2 img"),aG("#level3 img")],scale:[0.14,0.23,0.35],corner_w:3,corner_l:30,corner_color:"#ffffff",hover_color:"rgba(0, 0, 0, .35)"};var an=[],aL=aG([]),aF=0;function az(){var a=aw.images.slice();for(var b=0;b0){var a=parseInt(aG("#page.boxed").css("margin-bottom"))}else{var a=0}var b=aG(".three-d-slider").css({height:aG(window).height()-aG("#header").height()+aG("#header.overlap").height()-a-aG("#wpadminbar").height()-a-aG("#top-bar").height()}).addClass("slide-me")})}}var ba=aq.offset().left,a7=aq.offset().top;function au(){var b=Math.floor(aD/aE);for(var a=0;a

'+a0.noImagesWarning+"

");return aq}}function aU(){var a=aG.Deferred();bg=setTimeout(function(){if(aI>0.5*aD){var b=0;a1=setInterval(function(){if(b';var c=e[g].length;for(var b=0;b")[0].getContext){var h=''}else{var h=''}k+=h}k+='
';if(!a0.isMobile){if(bn){d=''}else{d=''}k+=d}k+=""}aq.append(k);aW();aG(window).resize(function(){ba=aq.offset().left;a7=aq.offset().top;$navig.css("top",Math.round(0.5*(aH-$navig.height())));if(!a0.isLightbox){if(bn&&!aw.useJS){aO();return true}aP()}});aG(document).on("scroll",function(){$this=aG(document);scrollTop=$this.scrollTop();scrollLeft=$this.scrollLeft()});return aG("div.container")}function aW(){$closeX=aq.children(".close");$dark_layer1=aq.children(".l1");$dark_layer2=aq.children(".l2");$caption=aq.children(".img-caption");$caption_text=$caption.children("p");$navig=aq.children(".navig");$navig.css("top",Math.round(0.5*(aH-$navig.height())));$darkLayers=aq.find("div.dark-layer");scrollTop=aG(document).scrollTop();scrollLeft=aG(document).scrollLeft()}function aQ(l){for(var d=0;d")[0].getContext){var g=b[m].getContext("2d");g.drawImage(c,0,0,k,h)}else{aG(b[m]).attr("src",aG(c).attr("src"))}aG(b[m]).attr("alt",c.alt);ag(b[m])}}}function bq(a){return aG(bc[a]).children(".photo")}function ag(b){var d=aG(b),c=Math.ceil(d.width()/aw.cellSize),a=Math.ceil(d.height()/aw.cellSize);d.data({wCanvas:c,hCanvas:a,deviationX:Math.floor((c*aw.cellSize-d.width())*Math.random()),deviationY:Math.floor((a*aw.cellSize-d.height())*Math.random())})}function bj(){for(var v=0;vh)){g=h+1}o=Math.ceil(giveMoreSpace*g/v);if(!(o>w)){o=w+1}return{n:o,m:g}}function ar(g,c,k,f){var b=[];for(var d=k;dE){E=F+widthCanvas}if(B+heightCanvas>A){A=B+heightCanvas}e.css({top:Math.floor(B*aw.cellSize+e.data("deviationY")),left:Math.floor(F*aw.cellSize+e.data("deviationX"))});break aG}}}return[E,A]}function bo(c,a){if(aw.cellSize*c*aw.scale[aE-1]am)*(am+0.1)+(n<0)*0.1;t=(a>aH)*(aH+0.1)+(a<0)*0.1;if(!f){f=n}else{f=f-0.1;d=am-f-m}if(!t){t=a}else{t=t-0.1;w=aH-t-v}a0.scrolling=true;bp(am-f+ba,aH-t+a7);p=true});aq.on("touchend",function(a){if(p){m+=d-k;v+=w-g}p=0})}function aN(x){if(bn){var D=x.width()+2*aw.corner_w,k=x.height()+2*aw.corner_w,b=parseFloat(x.css("left"))-aw.corner_w,o=parseFloat(x.css("top"))-aw.corner_w,E=x.siblings(".corners").css({left:b,top:o});E[0].width=D;E[0].height=k;var C=E[0].getContext("2d");C.clearRect(0,0,D,k);C.fillStyle=aw.hover_color;C.fillRect(aw.corner_w,aw.corner_w,D-2*aw.corner_w,k-2*aw.corner_w);C.beginPath();C.strokeStyle=aw.corner_color;C.lineWidth=aw.corner_w;C.lineCap="square";ad(C,0.5*aw.corner_w,aw.corner_l,0.5*aw.corner_w,0.5*aw.corner_w,aw.corner_l,0.5*aw.corner_w);ad(C,D-aw.corner_l,0.5*aw.corner_w,D-0.5*aw.corner_w,0.5*aw.corner_w,D-0.5*aw.corner_w,aw.corner_l);ad(C,D-0.5*aw.corner_w,k-aw.corner_l,D-0.5*aw.corner_w,k-0.5*aw.corner_w,D-aw.corner_l,k-0.5*aw.corner_w);C.stroke();ad(C,aw.corner_l,k-0.5*aw.corner_w,0.5*aw.corner_w,k-0.5*aw.corner_w,0.5*aw.corner_w,k-aw.corner_l);C.stroke();return false}else{var A=x.siblings("span.top-l"),w=x.siblings("span.bottom-l"),m=x.siblings("span.top-r"),z=x.siblings("span.bottom-r"),q=parseFloat(x.css("left")),g=parseFloat(x.css("top")),y=x.width(),B=x.height();span_side=aw.corner_l-aw.corner_w;A.css({opacity:0.7,left:q,top:g});w.css({opacity:0.7,left:q,top:g+B-span_side});m.css({opacity:0.7,left:q+y-span_side,top:g});z.css({opacity:0.7,left:q+y-span_side,top:g+B-span_side});x.on("mouseleave",function(){A.css("opacity",0);w.css("opacity",0);m.css("opacity",0);z.css("opacity",0)})}}function ad(f,b,h,d,a,c,g){f.moveTo(b,h);f.lineTo(d,a);f.lineTo(c,g)}function ab(c,g){var e=c.length-1,b=g.target;ae();while(!aG(b).hasClass("photo")&&e!=0){var d=new jQuery.Event("click");d.pageX=g.pageX-scrollLeft;d.pageY=g.pageY-scrollTop;aG(c[e]).addClass("toBG");b=document.elementFromPoint(d.pageX,d.pageY);e--}var f=c.length;for(var a=0;aam||k/o>aH-110){if(F/k>am/aH){var x=am-2*$closeX.width(),C=Math.round((am-2*$closeX.width())*k/F);d=0.5*$closeX.width()}else{var x=Math.round((aH-110)*F/k),C=aH-110}A.css({maxHeight:C,maxWidth:x});B=x*o;w=C*o}else{B=F;w=k}if(bn&&!aw.useJS){A.css({left:Math.round(0.5*(am-B*b-2*D-G*(1-b))/b),top:Math.round(0.5*(aH-w*b-2*z-E*(1-b))/b)})}else{A.animate({left:Math.round(-D-0.5*(1-b/v)*G+0.5*(am-B/v)),top:Math.round(-z-0.5*(1-b/v)*E+0.5*(aH-w/v)),width:Math.round(B/v),height:Math.round(w/v)},850,function(){$closeX.delay(700).fadeIn(400);q.delay(700).fadeIn(400);$caption.delay(700).fadeIn(400)})}$caption.css("top",Math.round(0.5*(aH+w/(bn*!aw.useJS+(!bn+aw.useJS)*v))));$closeX.css({top:Math.round(0.5*(aH-w/(bn*!aw.useJS+(!bn+aw.useJS)*v))),left:Math.round(0.5*B/(bn*!aw.useJS+(!bn+aw.useJS)*v)+d)});return A}function bm(b){if(a0.allowParallax>=aE&&!b.hasClass("act")){af();a0.useNavig=aE;var d=aE-$navig.children(".act").index(),c=aE-b.index(),a=aE-1-d;$navig.children(".act").removeClass("act");b.addClass("act");bc=bi(aG(bc[(c+a)%aE]))}}function bk(){clearTimeout(aj);clearTimeout(aV);clearTimeout(a2);clearTimeout(bd);clearTimeout(aA);clearTimeout(a4);clearTimeout(bg);clearInterval(a1);aq.children("div.container").children(".photo").off("click");$closeX.off("click");aq.off("click");aq.off("mousemove");aq.children("div.container").children(".photo").off("mouseenter");aq.children("div.container").children(".photo").off("mouseleave");!a0.isMobile*aq.children("div.container").children("canvas.corners").off("click");$dark_layer1.remove();$dark_layer2.remove();$closeX.remove();$caption.remove();bc.remove()}return aY()}aG.fn.loaded=function(b,d,c){var a=this.length;if(a>0){return this.each(function(){var f=this,e=aG(f),g="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";e.on("load.dt",function(h){aG(this).off("load.dt");if(typeof b=="function"){b.call(this)}if(--a<=0&&typeof d=="function"){d.call(this)}});if(!f.complete||f.complete===undefined){f.src=f.src}else{e.trigger("load.dt")}})}else{if(c){if(typeof d=="function"){d.call(this)}return this}}}});var Swiper=function(g,a,A){if(!window.addEventListener){if(!window.Element){Element=function(){}}Element.prototype.addEventListener=HTMLDocument.prototype.addEventListener=addEventListener=function(p,R,e){this.attachEvent("on"+p,R)};Element.prototype.removeEventListener=HTMLDocument.prototype.removeEventListener=removeEventListener=function(p,R,e){this.detachEvent("on"+p,R)}}if(document.body.__defineGetter__){if(HTMLElement){var m=HTMLElement.prototype;if(m.__defineGetter__){m.__defineGetter__("outerHTML",function(){return new XMLSerializer().serializeToString(this)})}}}if(!window.getComputedStyle){window.getComputedStyle=function(e,p){this.el=e;this.getPropertyValue=function(S){var R=/(\-([a-z]){1})/g;if(S=="float"){S="styleFloat"}if(R.test(S)){S=S.replace(R,function(){return arguments[2].toUpperCase()})}return e.currentStyle[S]?e.currentStyle[S]:null};return this}}if(!(g.nodeType)){if(!document.querySelectorAll||document.querySelectorAll(g).length==0){return}}function t(e){return document.querySelectorAll(e)}var f=this;f.touches={};f.positions={current:0};f.id=(new Date()).getTime();f.container=(g.nodeType)?g:t(g)[0];f.times={};f.isTouched=false;f.realIndex=0;f.activeSlide=0;f.activeIndex=0;f.previousSlide=null;f.previousIndex=null;f.langDirection=window.getComputedStyle(f.container,null).getPropertyValue("direction");f.support={touch:f.isSupportTouch(),threeD:f.isSupport3D(),transitions:f.isSupportTransitions()};f.use3D=f.support.threeD;var x={mode:"horizontal",ratio:1,speed:300,freeMode:false,freeModeFluid:false,slidesPerSlide:1,slidesPerGroup:1,simulateTouch:true,followFinger:true,shortSwipes:true,moveStartThreshold:false,autoPlay:false,onlyExternal:false,createPagination:true,pagination:false,resistance:true,nopeek:false,scrollContainer:false,fluidContainerWidth:false,preventLinks:true,preventClassNoSwiping:true,initialSlide:0,keyboardControl:false,mousewheelControl:false,resizeEvent:"auto",useCSS3Transforms:true,queueStartCallbacks:false,queueEndCallbacks:false,slideElement:"div",slideClass:"swiper-slide",wrapperClass:"swiper-wrapper",paginationClass:"swiper-pagination-switch",paginationActiveClass:"swiper-active-switch"};a=a||{};for(var q in x){if(!(q in a)){a[q]=x[q]}}f.params=a;if(a.scrollContainer){a.freeMode=true;a.freeModeFluid=true}var u=false;if(a.slidesPerSlide=="auto"){u=true;a.slidesPerSlide=1}var r,C,z,H,O,h,b,d;for(var J=f.container.childNodes.length-1;J>=0;J--){if(f.container.childNodes[J].className){var k=f.container.childNodes[J].className.split(" ");for(var I=0;I=0;R--){if(e==f.slides[R]){p=R}}return p};e.isActive=function(){if(e.index()==f.activeIndex){return true}else{return false}};if(!e.swiperSlideDataStorage){e.swiperSlideDataStorage={}}e.getData=function(p){return e.swiperSlideDataStorage[p]};e.setData=function(p,R){e.swiperSlideDataStorage[p]=R;return e};e.data=function(p,R){if(!R){return e.getAttribute("data-"+p)}else{e.setAttribute("data-"+p,R);return e}};return e};f._calcSlides=function(){var S=f.slides?f.slides.length:false;f.slides=[];for(var R=0;R=0;R--){f._extendSwiperSlide(f.slides[R])}if(!S){return}if(S!=f.slides.length&&f.createPagination){f.createPagination();f.callPlugins("numberOfSlidesChanged")}};f._calcSlides();f.createSlide=function(R,p,S){var p=p||f.params.slideClass;var S=S||a.slideElement;var e=document.createElement(S);e.innerHTML=R||"";e.className=p;return f._extendSwiperSlide(e)};f.appendSlide=function(p,e,R){if(!p){return}if(p.nodeType){return f._extendSwiperSlide(p).append()}else{return f.createSlide(p,e,R).append()}};f.prependSlide=function(p,e,R){if(!p){return}if(p.nodeType){return f._extendSwiperSlide(p).prepend()}else{return f.createSlide(p,e,R).prepend()}};f.insertSlideAfter=function(p,R,e,S){if(!p){return false}if(R.nodeType){return f._extendSwiperSlide(R).insertAfter(p)}else{return f.createSlide(R,e,S).insertAfter(p)}};f.removeSlide=function(e){if(f.slides[e]){f.slides[e].remove();return true}else{return false}};f.removeLastSlide=function(){if(f.slides.length>0){f.slides[(f.slides.length-1)].remove();return true}else{return false}};f.removeAllSlides=function(){for(var e=f.slides.length-1;e>=0;e--){f.slides[e].remove()}};f.getSlide=function(e){return f.slides[e]};f.getLastSlide=function(){return f.slides[f.slides.length-1]};f.getFirstSlide=function(){return f.slides[0]};f.currentSlide=function(){return f.slides[f.activeIndex]};var s=[];for(var M in f.plugins){if(a[M]){var G=f.plugins[M](f,a[M]);if(G){s.push(G)}}}f.callPlugins=function(R,e){if(!e){e={}}for(var p=0;p0){Y=f.container.offsetWidth-parseInt(window.getComputedStyle(f.container,null).getPropertyValue("padding-left"),10)-parseInt(window.getComputedStyle(f.container,null).getPropertyValue("padding-right"),10)}if(isNaN(e)||W.indexOf("%")>0){e=f.container.offsetHeight-parseInt(window.getComputedStyle(f.container,null).getPropertyValue("padding-top"),10)-parseInt(window.getComputedStyle(f.container,null).getPropertyValue("padding-bottom"),10)}if(!Z){if(f.width==Y&&f.height==e){return}}if(Z||n){f._calcSlides();if(a.pagination){f.updatePagination()}}f.width=Y;f.height=e;var p=C?1:a.slidesPerSlide,ab=C?a.slidesPerSlide:1,S,aa,U,T;H=f.slides.length;if(!a.scrollContainer){if(!u){S=f.width/ab;aa=f.height/p}else{S=f.slides[0].offsetWidth;aa=f.slides[0].offsetHeight}d=C?f.width:f.height;z=C?S:aa;U=C?H*S:f.width;T=C?f.height:H*aa;if(u){a.slidesPerSlide=Math.round(d/z)}}else{if(!C){r.style.width="";r.style.height="";f.slides[0].style.width="";f.slides[0].style.height=""}if(a.fluidContainerWidth&&C){S=0;aa=0;for(var X=0;Xaa){aa=f.slides[0].children[X].offsetHeight}}}else{S=f.slides[0].offsetWidth;aa=f.slides[0].offsetHeight}d=C?f.width:f.height;z=C?S:aa;U=S;T=aa}O=C?U:T;for(var X=0;X0&&a.initialSlidef.slides.length){e=0}return e}function P(){var e=0;if(a.loop){e=d}return e}f.updatePagination=function(){if(f.slides.length<2){return}var U=t(a.pagination+" ."+a.paginationActiveClass);if(!U){return}for(var T=0;T=S){e=e-S}if(e<0){e=S+e}if(e'}t(a.pagination)[0].innerHTML=e;f.updatePagination();f.callPlugins("onCreatePagination")}};f.createPagination();f.resizeEvent=a.resizeEvent==="auto"?("onorientationchange" in window)?"orientationchange":"resize":a.resizeEvent;f.resizeFix=function(){f.callPlugins("beforeResizeFix");f.init();if(!a.scrollContainer){f.swipeTo(f.activeIndex,0,false)}else{var R=C?f.getTranslate("x"):f.getTranslate("y");if(R<-l()){var e=C?-l():0;var p=C?0:-l();f.setTransition(0);f.setTransform(e,p,0)}}f.callPlugins("afterResizeFix")};if(!a.disableAutoResize){window.addEventListener(f.resizeEvent,f.resizeFix,false)}var D;f.startAutoPlay=function(){if(a.autoPlay&&!a.loop){D=setInterval(function(){var e=f.realIndex+1;if(e==H){e=0}if(e==H-a.slidesPerSlide+1){e=0}f.swipeTo(e)},a.autoPlay)}else{if(a.autoPlay&&a.loop){D=setInterval(function(){f.fixLoop();f.swipeNext(true)},a.autoPlay)}}f.callPlugins("onAutoPlayStart")};f.stopAutoPlay=function(){if(D){clearInterval(D)}f.callPlugins("onAutoPlayStop")};if(a.autoPlay){f.startAutoPlay()}if(!f.ie10){if(f.support.touch){r.addEventListener("touchstart",K,false);r.addEventListener("touchmove",L,false);r.addEventListener("touchend",E,false)}if(a.simulateTouch){r.addEventListener("mousedown",K,false);document.addEventListener("mousemove",L,false);document.addEventListener("mouseup",E,false)}}else{if(f.support.touch){r.addEventListener("touchstart",K,false);r.addEventListener("touchmove",L,false);r.addEventListener("touchend",E,false)}if(a.simulateTouch){r.addEventListener("mousedown",K,false);document.addEventListener("mousemove",L,false);document.addEventListener("mouseup",E,false)}}f.destroy=function(e){e=e===false?e:e||true;if(e){window.removeEventListener(f.resizeEvent,f.resizeFix,false)}if(f.ie10){r.removeEventListener(f.touchEvents.touchStart,K,false);document.removeEventListener(f.touchEvents.touchMove,L,false);document.removeEventListener(f.touchEvents.touchEnd,E,false)}else{if(f.support.touch){r.removeEventListener("touchstart",K,false);r.removeEventListener("touchmove",L,false);r.removeEventListener("touchend",E,false)}r.removeEventListener("mousedown",K,false);document.removeEventListener("mousemove",L,false);document.removeEventListener("mouseup",E,false)}if(a.keyboardControl){document.removeEventListener("keydown",w,false)}if(a.mousewheelControl&&f._wheelEvent){f.container.removeEventListener(f._wheelEvent,c,false)}if(a.autoPlay){f.stopAutoPlay()}f.callPlugins("onDestroy")};f.allowLinks=true;if(a.preventLinks){var y=f.container.querySelectorAll("a");for(var J=0;JMath.abs(T.deltaY)?-T.deltaX:-T.deltaY}}}}if(!a.freeMode){if(V<0){f.swipeNext()}else{f.swipePrev()}}else{var R=C?f.getTranslate("x"):f.getTranslate("y");var p,U;if(C){p=f.getTranslate("x")+V;U=f.getTranslate("y");if(p>0){p=0}if(p<-l()){p=-l()}}else{p=f.getTranslate("x");U=f.getTranslate("y")+V;if(U>0){U=0}if(U<-l()){U=-l()}}f.setTransition(0);f.setTransform(p,U,0)}if(T.preventDefault){T.preventDefault()}else{T.returnValue=false}return false}if(f._wheelEvent){f.container.addEventListener(f._wheelEvent,c,false)}}if(a.grabCursor){f.container.style.cursor="move";f.container.style.cursor="grab";f.container.style.cursor="-moz-grab";f.container.style.cursor="-webkit-grab"}var o=false;var B;function K(S){if(f.isTouched||a.onlyExternal){return false}if(a.preventClassNoSwiping&&S.target&&S.target.className.indexOf("NoSwiping")>-1){return false}f.isTouched=true;o=S.type=="touchstart";if(!o||S.targetTouches.length==1){f.callPlugins("onTouchStartBegin");if(a.loop){f.fixLoop()}if(!o){if(S.preventDefault){S.preventDefault()}else{S.returnValue=false}}var R=o?S.targetTouches[0].pageX:(S.pageX||S.clientX);var p=o?S.targetTouches[0].pageY:(S.pageY||S.clientY);f.touches.startX=f.touches.currentX=R;f.touches.startY=f.touches.currentY=p;f.touches.start=f.touches.current=C?f.touches.startX:f.touches.startY;f.setTransition(0);f.positions.start=f.positions.current=C?f.getTranslate("x"):f.getTranslate("y");if(C){f.setTransform(f.positions.start,0,0)}else{f.setTransform(0,f.positions.start,0)}var e=new Date();f.times.start=e.getTime();b=undefined;if(a.onSlideClick||a.onSlideTouch){(function(){var V=f.container;var Y=V.getBoundingClientRect();var Z=document.body;var X=V.clientTop||Z.clientTop||0;var aa=V.clientLeft||Z.clientLeft||0;var U=window.pageYOffset||V.scrollTop;var W=window.pageXOffset||V.scrollLeft;var ac=R-Y.left+aa-W;var ab=p-Y.top-X-U;var af=C?ac:ab;var ae=-Math.round(f.positions.current/z);var T=Math.floor(af/z)+ae;var ad=T;if(a.loop){var ad=T-a.slidesPerSlide;if(ad<0){ad=f.slides.length+ad-(a.slidesPerSlide*2)}}f.clickedSlideIndex=ad;f.clickedSlide=f.getSlide(T);if(a.onSlideTouch){a.onSlideTouch(f);f.callPlugins("onSlideTouch")}})()}if(a.moveStartThreshold>0){B=false}if(a.onTouchStart){a.onTouchStart(f)}f.callPlugins("onTouchStartEnd")}}function L(T){if(!f.isTouched||a.onlyExternal){return}if(o&&T.type=="mousemove"){return}var S=o?T.targetTouches[0].pageX:(T.pageX||T.clientX);var p=o?T.targetTouches[0].pageY:(T.pageY||T.clientY);if(typeof b==="undefined"&&C){b=!!(b||Math.abs(p-f.touches.startY)>Math.abs(S-f.touches.startX))}if(typeof b==="undefined"&&!C){b=!!(b||Math.abs(p-f.touches.startY)0&&!(a.freeMode&&!a.freeModeFluid)){if(a.loop){var R=1;if(f.positions.current>0){f.positions.current=0}}else{var R=(d*2-f.positions.current)/d/2}if(R<0.5){f.positions.current=(d/2)}else{f.positions.current=f.positions.current*R}if(a.nopeek){f.positions.current=0}}if((f.positions.current)<-l()&&!(a.freeMode&&!a.freeModeFluid)){if(a.loop){var R=1;var e=f.positions.current;var V=-l()-d}else{var U=(f.touches.current-f.touches.start)*a.ratio+(l()+f.positions.start);var R=(d+U)/(d);var e=f.positions.current-U*(1-R)/2;var V=-l()-d/2}if(a.nopeek){e=f.positions.current-U;V=-l()}if(ea.moveStartThreshold||B){B=true;if(C){f.setTransform(f.positions.current,0,0)}else{f.setTransform(0,f.positions.current,0)}}else{f.positions.current=f.positions.start}}if(a.freeMode){f.updateActiveSlide(f.positions.current)}if(a.onSlideClick&&f.clickedSlide){f.clickedSlide=false}if(a.grabCursor){f.container.style.cursor="move";f.container.style.cursor="grabbing";f.container.style.cursor="-moz-grabbin";f.container.style.cursor="-webkit-grabbing"}f.callPlugins("onTouchMoveEnd");if(a.onTouchMove){a.onTouchMove(f)}return false}}function E(S){if(b){f.swipeReset()}if(a.onlyExternal||!f.isTouched){return}f.isTouched=false;if(a.grabCursor){f.container.style.cursor="move";f.container.style.cursor="grab";f.container.style.cursor="-moz-grab";f.container.style.cursor="-webkit-grab"}if(a.onSlideClick&&f.clickedSlide){a.onSlideClick(f);f.callPlugins("onSlideClick")}if(!f.positions.current&&f.positions.current!==0){f.positions.current=f.positions.start}if(a.followFinger){if(C){f.setTransform(f.positions.current,0,0)}else{f.setTransform(0,f.positions.current,0)}}var R=new Date();f.times.end=R.getTime();f.touches.diff=f.touches.current-f.touches.start;f.touches.abs=Math.abs(f.touches.diff);f.positions.diff=f.positions.current-f.positions.start;f.positions.abs=Math.abs(f.positions.diff);var U=f.positions.diff;var T=f.positions.abs;if(T<5&&(f.times.end-f.times.start)<300&&f.allowLinks==false){f.swipeReset();if(a.preventLinks){f.allowLinks=true}}var V=O-d;if(a.scrollContainer){V=z-d}if(f.positions.current>0){f.swipeReset();if(a.onTouchEnd){a.onTouchEnd(f)}f.callPlugins("onTouchEnd");return}if(f.positions.current<-V){f.swipeReset();if(a.onTouchEnd){a.onTouchEnd(f)}f.callPlugins("onTouchEnd");return}if(a.freeMode){if((f.times.end-f.times.start)<300&&a.freeModeFluid){var p=f.positions.current+f.touches.diff*2;if(p0){p=0}if(C){f.setTransform(p,0,0)}else{f.setTransform(0,p,0)}f.setTransition((f.times.end-f.times.start)*2);f.updateActiveSlide(p)}if(!a.freeModeFluid||(f.times.end-f.times.start)>=300){f.updateActiveSlide(f.positions.current)}if(a.onTouchEnd){a.onTouchEnd(f)}f.callPlugins("onTouchEnd");return}h=U<0?"toNext":"toPrev";if(h=="toNext"&&(f.times.end-f.times.start<=300)){if(T<30||!a.shortSwipes){f.swipeReset()}else{f.swipeNext(true)}}if(h=="toPrev"&&(f.times.end-f.times.start<=300)){if(T<30||!a.shortSwipes){f.swipeReset()}else{f.swipePrev(true)}}var e=z*a.slidesPerGroup;if(h=="toNext"&&(f.times.end-f.times.start>300)){if(T>=e*0.5){f.swipeNext(true)}else{f.swipeReset()}}if(h=="toPrev"&&(f.times.end-f.times.start>300)){if(T>=e*0.5){f.swipePrev(true)}else{f.swipeReset()}}if(a.onTouchEnd){a.onTouchEnd(f)}f.callPlugins("onTouchEnd")}f.swipeNext=function(p){if(!p&&a.loop){f.fixLoop()}if(!p&&a.autoPlay){f.stopAutoPlay()}f.callPlugins("onSwipeNext");var T=C?f.getTranslate("x"):f.getTranslate("y");var e=z*a.slidesPerGroup;var R=Math.floor(Math.abs(T)/Math.floor(e))*e+e;var S=Math.abs(T);if(R==O){return}if(S>=l()&&!a.loop){return}if(R>l()&&!a.loop){R=l()}if(a.loop){if(R>=(l()+d)){R=l()+d}}if(C){f.setTransform(-R,0,0)}else{f.setTransform(0,-R,0)}f.setTransition(a.speed);f.updateActiveSlide(-R);Q();return true};f.swipePrev=function(p){if(!p&&a.loop){f.fixLoop()}if(!p&&a.autoPlay){f.stopAutoPlay()}f.callPlugins("onSwipePrev");var S=Math.ceil(C?f.getTranslate("x"):f.getTranslate("y"));var e=z*a.slidesPerGroup;var R=(Math.ceil(-S/e)-1)*e;if(R<0){R=0}if(C){f.setTransform(-R,0,0)}else{f.setTransform(0,-R,0)}f.setTransition(a.speed);f.updateActiveSlide(-R);Q();return true};f.swipeReset=function(p){f.callPlugins("onSwipeReset");var S=C?f.getTranslate("x"):f.getTranslate("y");var e=z*a.slidesPerGroup;var R=S<0?Math.round(S/e)*e:0;var T=-l();if(a.scrollContainer){R=S<0?S:0;T=d-z}if(R<=T){R=T}if(a.scrollContainer&&(d>z)){R=0}if(a.mode=="horizontal"){f.setTransform(R,0,0)}else{f.setTransform(0,R,0)}f.setTransition(a.speed);f.updateActiveSlide(R);if(a.onSlideReset){a.onSlideReset(f)}return true};var v=true;f.swipeTo=function(e,R,S){e=parseInt(e,10);f.callPlugins("onSwipeTo",{index:e,speed:R});if(e>(H-1)){return}if(e<0&&!a.loop){return}S=S===false?false:S||true;var R=R===0?R:R||a.speed;if(a.loop){e=e+a.slidesPerSlide}if(e>H-a.slidesPerSlide){e=H-a.slidesPerSlide}var p=-e*z;if(v&&a.loop&&a.initialSlide>0&&a.initialSlide=H-a.slidesPerSlide*2){f.activeIndex=H-a.slidesPerSlide*2-f.activeIndex}if(f.activeIndex<0){f.activeIndex=H-a.slidesPerSlide*2+f.activeIndex}}if(f.realIndex==H){f.realIndex=H-1}if(f.realIndex<0){f.realIndex=0}f.activeSlide=f.activeIndex;if(a.pagination){f.updatePagination()}};f.fixLoop=function(){if(f.realIndexH-a.slidesPerSlide*2){var e=-H+f.realIndex+a.slidesPerSlide;f.swipeTo(e,0,false)}};if(a.loop){f.swipeTo(0,0,false)}};Swiper.prototype={plugins:{},transitionEnd:function(h,f){var b=this;var e=b.wrapper;var d=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"];if(h){function g(){h(b);b._queueEndCallbacks=false;if(!f){for(var a=0;a<\/script>');var m=document.getElementById("__onload_ie_pixastic__");m.onreadystatechange=function(){if(m.readyState=="complete"){m.parentNode.removeChild(m);o()}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",o,false)}d(window,"load",o)}function k(){var l=c("pixastic",null,"img");var o=c("pixastic",null,"canvas");var n=l.concat(o);for(var m=0;m-1){var A=o;o=A.substr(0,A.indexOf("("));var q=A.match(/\((.*?)\)/);if(q[1]){q=q[1].split(";");for(var B=0;B").addClass(a("Inner")),d=b("");e.after(d.append(c));d.addClass(k);if(l.mapClass){d.addClass(e.attr("class"))}if(l.mapStyle){d.attr("style",e.attr("style"))}e.addClass("hasCustomSelect").on("update",function(){g(e,d);var f=parseInt(e.outerWidth(),10)-(parseInt(d.outerWidth(),10)-parseInt(d.width(),10));d.css({display:"inline-block"});var m=d.outerHeight();if(e.attr("disabled")){d.addClass(a("Disabled"))}else{d.removeClass(a("Disabled"))}c.css({width:f,display:"inline-block"});e.css({"-webkit-appearance":"menulist-button",width:d.outerWidth(),position:"absolute",opacity:0,height:m,fontSize:d.css("font-size")})}).on("change",function(){d.addClass(a("Changed"));g(e,d)}).on("keyup",function(f){if(!d.hasClass(a("Open"))){e.blur();e.focus()}else{if(f.which==13||f.which==27){g(e,d)}}}).on("mousedown",function(f){d.removeClass(a("Changed"))}).on("mouseup",function(f){if(!d.hasClass(a("Open"))){if(b("."+a("Open")).not(d).length>0&&typeof InstallTrigger!=="undefined"){e.focus()}else{d.addClass(a("Open"));f.stopPropagation();b(document).one("mouseup."+a("Open"),function(m){if(m.target!=e.get(0)&&b.inArray(m.target,e.find("*").get())<0){e.blur()}else{g(e,d)}})}}}).focus(function(){d.removeClass(a("Changed")).addClass(a("Focus"))}).blur(function(){d.removeClass(a("Focus")+" "+a("Open"))}).hover(function(){d.addClass(a("Hover"))},function(){d.removeClass(a("Hover"))}).trigger("update")})}})}); /*! Magnific Popup - v0.9.7 - 2013-10-10 * http://dimsemenov.com/plugins/magnific-popup/ * Copyright (c) 2013 Dmitry Semenov; */ (function(G){var C="Close",L="BeforeClose",z="AfterClose",R="BeforeAppend",f="MarkupParse",n="Open",h="Change",H="mfp",d="."+H,M="mfp-ready",O="mfp-removing",e="mfp-prevent-close";var W,D=function(){},N=!!(window.jQuery),F,a=G(window),B,E,J,b,P;var l=function(aa,ab){W.ev.on(H+aa+d,ab)},q=function(ae,ab,ac,aa){var ad=document.createElement("div");ad.className="mfp-"+ae;if(ac){ad.innerHTML=ac}if(!aa){ad=G(ad);if(ab){ad.appendTo(ab)}}else{if(ab){ab.appendChild(ad)}}return ad},T=function(ab,aa){W.ev.triggerHandler(H+ab,aa);if(W.st.callbacks){ab=ab.charAt(0).toLowerCase()+ab.slice(1);if(W.st.callbacks[ab]){W.st.callbacks[ab].apply(W,G.isArray(aa)?aa:[aa])}}},k=function(){(W.st.focus?W.content.find(W.st.focus).eq(0):W.wrap).focus()},I=function(aa){if(aa!==P||!W.currTemplate.closeBtn){W.currTemplate.closeBtn=G(W.st.closeMarkup.replace("%title%",W.st.tClose));P=aa}return W.currTemplate.closeBtn},w=function(){if(!G.magnificPopup.instance){W=new D();W.init();G.magnificPopup.instance=W}},r=function(ac){if(G(ac).hasClass(e)){return}var aa=W.st.closeOnContentClick;var ab=W.st.closeOnBgClick;if(aa&&ab){return true}else{if(!W.content||G(ac).hasClass("mfp-close")||(W.preloader&&ac===W.preloader[0])){return true}if((ac!==W.content[0]&&!G.contains(W.content[0],ac))){if(ab){if(G.contains(document,ac)){return true}}}else{if(aa){return true}}}return false},Z=function(){var ab=document.createElement("p").style,aa=["ms","O","Moz","Webkit"];if(ab.transition!==undefined){return true}while(aa.length){if(aa.pop()+"Transition" in ab){return true}}return false};D.prototype={constructor:D,init:function(){var aa=navigator.appVersion;W.isIE7=aa.indexOf("MSIE 7.")!==-1;W.isIE8=aa.indexOf("MSIE 8.")!==-1;W.isLowIE=W.isIE7||W.isIE8;W.isAndroid=(/android/gi).test(aa);W.isIOS=(/iphone|ipad|ipod/gi).test(aa);W.supportsTransition=Z();W.probablyMobile=(W.isAndroid||W.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent));B=G(document.body);E=G(document);W.popupsCache={}},open:function(af){var ag;if(af.isObj===false){W.items=af.items.toArray();W.index=0;var ah=af.items,ai;for(ag=0;ag(aa||a.height()))},_parseMarkup:function(ac,ab,ad){var aa;if(ad.data){ab=G.extend(ad.data,ab)}T(f,[ac,ab,ad]);G.each(ab,function(af,ah){if(ah===undefined||ah===false){return true}aa=af.split("_");if(aa.length>1){var ag=ac.find(d+"-"+aa[0]);if(ag.length>0){var ae=aa[1];if(ae==="replaceWith"){if(ag[0]!==ah[0]){ag.replaceWith(ah)}}else{if(ae==="img"){if(ag.is("img")){ag.attr("src",ah)}else{ag.replaceWith('')}}else{ag.attr(aa[1],ah)}}}}else{ac.find(d+"-"+af).html(ah)}})},_getScrollbarSize:function(){if(W.scrollbarSize===undefined){var aa=document.createElement("div");aa.id="mfp-sbm";aa.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;";document.body.appendChild(aa);W.scrollbarSize=aa.offsetWidth-aa.clientWidth;document.body.removeChild(aa)}return W.scrollbarSize}};G.magnificPopup={instance:null,proto:D.prototype,modules:[],open:function(ab,aa){w();if(!ab){ab={}}else{ab=G.extend(true,{},ab)}ab.isObj=true;ab.index=aa||0;return this.instance.open(ab)},close:function(){return G.magnificPopup.instance&&G.magnificPopup.instance.close()},registerModule:function(aa,ab){if(ab.options){G.magnificPopup.defaults[aa]=ab.options}G.extend(this.proto,ab.proto);this.modules.push(aa)},defaults:{disableOn:0,key:null,midClick:false,mainClass:"",preloader:true,focus:"",closeOnContentClick:false,closeOnBgClick:true,closeBtnInside:true,showCloseBtn:true,enableEscapeKey:true,modal:false,alignTop:false,removalDelay:0,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}};G.fn.magnificPopup=function(ac){w();var ad=G(this);if(typeof ac==="string"){if(ac==="open"){var aa,ae=N?ad.data("magnificPopup"):ad[0].magnificPopup,ab=parseInt(arguments[1],10)||0;if(ae.items){aa=ae.items[ab]}else{aa=ad;if(ae.delegate){aa=aa.find(ae.delegate)}aa=aa.eq(ab)}W._openClick({mfpEl:aa},ad,ae)}else{if(W.isOpen){W[ac].apply(W,Array.prototype.slice.call(arguments,1))}}}else{ac=G.extend(true,{},ac);if(N){ad.data("magnificPopup",ac)}else{ad[0].magnificPopup=ac}W.addGroup(ad,ac)}return ad};var K="inline",V,S,v,o=function(){if(v){S.after(v.addClass(V)).detach();v=null}};G.magnificPopup.registerModule(K,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){W.types.push(K);l(C+"."+K,function(){o()})},getInline:function(ae,ad){o();if(ae.src){var aa=W.st.inline,ac=G(ae.src);if(ac.length){var ab=ac[0].parentNode;if(ab&&ab.tagName){if(!S){V=aa.hiddenClass;S=q(V);V="mfp-"+V}v=ac.after(S).detach().removeClass(V)}W.updateStatus("ready")}else{W.updateStatus("error",aa.tNotFound);ac=G("
")}ae.inlineElement=ac;return ac}W.updateStatus("ready");W._parseMarkup(ad,{},ae);return ad}}});var x="ajax",Y,y=function(){if(Y){B.removeClass(Y)}},X=function(){y();if(W.req){W.req.abort()}};G.magnificPopup.registerModule(x,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){W.types.push(x);Y=W.st.ajax.cursor;l(C+"."+x,X);l("BeforeChange."+x,X)},getAjax:function(ab){if(Y){B.addClass(Y)}W.updateStatus("loading");var aa=G.extend({url:ab.src,success:function(ae,af,ad){var ac={data:ae,xhr:ad};T("ParseAjax",ac);W.appendContent(G(ac.data),x);ab.finished=true;y();k();setTimeout(function(){W.wrap.addClass(M)},16);W.updateStatus("ready");T("AjaxContentAdded")},error:function(){y();ab.finished=ab.loadError=true;W.updateStatus("error",W.st.ajax.tError.replace("%url%",ab.src))}},W.st.ajax.settings);W.req=G.ajax(aa);return""}}});var g,c=function(aa){if(aa.data&&aa.data.title!==undefined){return aa.data.title}var ab=W.st.image.titleSrc;if(ab){if(G.isFunction(ab)){return ab.call(W,aa)}else{if(aa.el){return aa.el.attr(ab)||""}}}return""};G.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:true,tError:'The image could not be loaded.'},proto:{initImage:function(){var ab=W.st.image,aa=".image";W.types.push("image");l(n+aa,function(){if(W.currItem.type==="image"&&ab.cursor){B.addClass(ab.cursor)}});l(C+aa,function(){if(ab.cursor){B.removeClass(ab.cursor)}a.off("resize"+d)});l("Resize"+aa,W.resizeImage);if(W.isLowIE){l("AfterChange",W.resizeImage)}},resizeImage:function(){var ab=W.currItem;if(!ab||!ab.img){return}if(W.st.image.verticalFit){var aa=0;if(W.isLowIE){aa=parseInt(ab.img.css("padding-top"),10)+parseInt(ab.img.css("padding-bottom"),10)}ab.img.css("max-height",W.wH-aa)}},_onImageHasSize:function(aa){if(aa.img){aa.hasSize=true;if(g){clearInterval(g)}aa.isCheckingImgSize=false;T("ImageHasSize",aa);if(aa.imgHidden){if(W.content){W.content.removeClass("mfp-loading")}aa.imgHidden=false}}},findImageSize:function(ad){var aa=0,ab=ad.img[0],ac=function(ae){if(g){clearInterval(g)}g=setInterval(function(){if(ab.naturalWidth>0){W._onImageHasSize(ad);return}if(aa>200){clearInterval(g)}aa++;if(aa===3){ac(10)}else{if(aa===40){ac(50)}else{if(aa===100){ac(500)}}}},ae)};ac(1)},getImage:function(ag,ad){var af=0,ah=function(){if(ag){if(ag.img[0].complete){ag.img.off(".mfploader");if(ag===W.currItem){W._onImageHasSize(ag);W.updateStatus("ready")}ag.hasSize=true;ag.loaded=true;T("ImageLoadComplete")}else{af++;if(af<200){setTimeout(ah,100)}else{aa()}}}},aa=function(){if(ag){ag.img.off(".mfploader");if(ag===W.currItem){W._onImageHasSize(ag);W.updateStatus("error",ae.tError.replace("%url%",ag.src))}ag.hasSize=true;ag.loaded=true;ag.loadError=true}},ae=W.st.image;var ac=ad.find(".mfp-img");if(ac.length){var ab=document.createElement("img");ab.className="mfp-img";ag.img=G(ab).on("load.mfploader",ah).on("error.mfploader",aa);ab.src=ag.src;if(ac.is("img")){ag.img=ag.img.clone()}if(ag.img[0].naturalWidth>0){ag.hasSize=true}}W._parseMarkup(ad,{title:c(ag),img_replaceWith:ag.img},ag);W.resizeImage();if(ag.hasSize){if(g){clearInterval(g)}if(ag.loadError){ad.addClass("mfp-loading");W.updateStatus("error",ae.tError.replace("%url%",ag.src))}else{ad.removeClass("mfp-loading");W.updateStatus("ready")}return ad}W.updateStatus("loading");ag.loading=true;if(!ag.hasSize){ag.imgHidden=true;ad.addClass("mfp-loading");W.findImageSize(ag)}return ad}}});var m,Q=function(){if(m===undefined){m=document.createElement("p").style.MozTransform!==undefined}return m};G.magnificPopup.registerModule("zoom",{options:{enabled:false,easing:"ease-in-out",duration:300,opener:function(aa){return aa.is("img")?aa:aa.find("img")}},proto:{initZoom:function(){var ab=W.st.zoom,ae=".zoom",ah;if(!ab.enabled||!W.supportsTransition){return}var ag=ab.duration,af=function(ak){var aj=ak.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),al="all "+(ab.duration/1000)+"s "+ab.easing,am={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},ai="transition";am["-webkit-"+ai]=am["-moz-"+ai]=am["-o-"+ai]=am[ai]=al;aj.css(am);return aj},aa=function(){W.content.css("visibility","visible")},ac,ad;l("BuildControls"+ae,function(){if(W._allowZoom()){clearTimeout(ac);W.content.css("visibility","hidden");ah=W._getItemToZoom();if(!ah){aa();return}ad=af(ah);ad.css(W._getOffset());W.wrap.append(ad);ac=setTimeout(function(){ad.css(W._getOffset(true));ac=setTimeout(function(){aa();setTimeout(function(){ad.remove();ah=ad=null;T("ZoomAnimationEnded")},16)},ag)},16)}});l(L+ae,function(){if(W._allowZoom()){clearTimeout(ac);W.st.removalDelay=ag;if(!ah){ah=W._getItemToZoom();if(!ah){return}ad=af(ah)}ad.css(W._getOffset(true));W.wrap.append(ad);W.content.css("visibility","hidden");setTimeout(function(){ad.css(W._getOffset())},16)}});l(C+ae,function(){if(W._allowZoom()){aa();if(ad){ad.remove()}ah=null}})},_allowZoom:function(){return W.currItem.type==="image"},_getItemToZoom:function(){if(W.currItem.hasSize){return W.currItem.img}else{return false}},_getOffset:function(ac){var aa;if(ac){aa=W.currItem.img}else{aa=W.st.zoom.opener(W.currItem.el||W.currItem)}var af=aa.offset();var ab=parseInt(aa.css("padding-top"),10);var ae=parseInt(aa.css("padding-bottom"),10);af.top-=(G(window).scrollTop()-ab);var ad={width:aa.width(),height:(N?aa.innerHeight():aa[0].offsetHeight)-ae-ab};if(Q()){ad["-moz-transform"]=ad.transform="translate("+af.left+"px,"+af.top+"px)"}else{ad.left=af.left;ad.top=af.top}return ad}}});var u="iframe",t="//about:blank",U=function(aa){if(W.currTemplate[u]){var ab=W.currTemplate[u].find("iframe");if(ab.length){if(!aa){ab[0].src=t}if(W.isIE8){ab.css("display",aa?"block":"none")}}}};G.magnificPopup.registerModule(u,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){W.types.push(u);l("BeforeChange",function(ac,aa,ab){if(aa!==ab){if(aa===u){U()}else{if(ab===u){U(true)}}}});l(C+"."+u,function(){U()})},getIframe:function(ae,ad){var aa=ae.src;var ac=W.st.iframe;G.each(ac.patterns,function(){if(aa.indexOf(this.index)>-1){if(this.id){if(typeof this.id==="string"){aa=aa.substr(aa.lastIndexOf(this.id)+this.id.length,aa.length)}else{aa=this.id.call(this,aa)}}aa=this.src.replace("%id%",aa);return false}});var ab={};if(ac.srcAction){ab[ac.srcAction]=aa}W._parseMarkup(ad,ab,ae);W.updateStatus("ready");return ad}}});var A=function(aa){var ab=W.items.length;if(aa>ab-1){return aa-ab}else{if(aa<0){return ab+aa}}return aa},s=function(ac,ab,aa){return ac.replace(/%curr%/gi,ab+1).replace(/%total%/gi,aa)};G.magnificPopup.registerModule("gallery",{options:{enabled:false,arrowMarkup:'',preload:[0,2],navigateByImgClick:true,arrows:true,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var aa=W.st.gallery,ac=".mfp-gallery",ab=Boolean(G.fn.mfpFastClick);W.direction=true;if(!aa||!aa.enabled){return false}b+=" mfp-gallery";l(n+ac,function(){if(aa.navigateByImgClick){W.wrap.on("click"+ac,".mfp-img",function(){if(W.items.length>1){W.next();return false}})}E.on("keydown"+ac,function(ad){if(ad.keyCode===37){W.prev()}else{if(ad.keyCode===39){W.next()}}})});l("UpdateStatus"+ac,function(ae,ad){if(ad.text){ad.text=s(ad.text,W.currItem.index,W.items.length)}});l(f+ac,function(ah,af,ae,ag){var ad=W.items.length;ae.counter=ad>1?s(aa.tCounter,ag.index,ad):""});l("BuildControls"+ac,function(){if(W.items.length>1&&aa.arrows&&!W.arrowLeft){var af=aa.arrowMarkup,ag=W.arrowLeft=G(af.replace(/%title%/gi,aa.tPrev).replace(/%dir%/gi,"left")).addClass(e),ae=W.arrowRight=G(af.replace(/%title%/gi,aa.tNext).replace(/%dir%/gi,"right")).addClass(e);var ad=ab?"mfpFastClick":"click";ag[ad](function(){W.prev()});ae[ad](function(){W.next()});if(W.isIE7){q("b",ag[0],false,true);q("a",ag[0],false,true);q("b",ae[0],false,true);q("a",ae[0],false,true)}W.container.append(ag.add(ae))}});l(h+ac,function(){if(W._preloadTimeout){clearTimeout(W._preloadTimeout)}W._preloadTimeout=setTimeout(function(){W.preloadNearbyImages();W._preloadTimeout=null},16)});l(C+ac,function(){E.off(ac);W.wrap.off("click"+ac);if(W.arrowLeft&&ab){W.arrowLeft.add(W.arrowRight).destroyMfpFastClick()}W.arrowRight=W.arrowLeft=null})},next:function(){W.direction=true;W.index=A(W.index+1);W.updateItemHTML()},prev:function(){W.direction=false;W.index=A(W.index-1);W.updateItemHTML()},goTo:function(aa){W.direction=(aa>=W.index);W.index=aa;W.updateItemHTML()},preloadNearbyImages:function(){var ad=W.st.gallery.preload,ab=Math.min(ad[0],W.items.length),ac=Math.min(ad[1],W.items.length),aa;for(aa=1;aa<=(W.direction?ac:ab);aa++){W._preloadItem(W.index+aa)}for(aa=1;aa<=(W.direction?ab:ac);aa++){W._preloadItem(W.index-aa)}},_preloadItem:function(aa){aa=A(aa);if(W.items[aa].preloaded){return}var ab=W.items[aa];if(!ab.parsed){ab=W.parseEl(aa)}T("LazyLoad",ab);if(ab.type==="image"){ab.img=G('').on("load.mfploader",function(){ab.hasSize=true}).on("error.mfploader",function(){ab.hasSize=true;ab.loadError=true;T("LazyLoadError",ab)}).attr("src",ab.src)}ab.preloaded=true}}});var p="retina";G.magnificPopup.registerModule(p,{options:{replaceSrc:function(aa){return aa.src.replace(/\.\w+$/,function(ab){return"@2x"+ab})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var aa=W.st.retina,ab=aa.ratio;ab=!isNaN(ab)?ab:ab();if(ab>1){l("ImageHasSize."+p,function(ad,ac){ac.img.css({"max-width":ac.img[0].naturalWidth/ab,width:"100%"})});l("ElementParse."+p,function(ad,ac){ac.src=aa.replaceSrc(ac,ab)})}}}}});(function(){var ab=1000,ad="ontouchstart" in window,ae=function(){a.off("touchmove"+ac+" touchend"+ac)},aa="mfpFastClick",ac="."+aa;G.fn.mfpFastClick=function(af){return G(this).each(function(){var am=G(this),al;if(ad){var an,ai,ah,ak,ag,aj;am.on("touchstart"+ac,function(ao){ak=false;aj=1;ag=ao.originalEvent?ao.originalEvent.touches[0]:ao.touches[0];ai=ag.clientX;ah=ag.clientY;a.on("touchmove"+ac,function(ap){ag=ap.originalEvent?ap.originalEvent.touches:ap.touches;aj=ag.length;ag=ag[0];if(Math.abs(ag.clientX-ai)>10||Math.abs(ag.clientY-ah)>10){ak=true;ae()}}).on("touchend"+ac,function(ap){ae();if(ak||aj>1){return}al=true;ap.preventDefault();clearTimeout(an);an=setTimeout(function(){al=false},ab);af()})})}am.on("click"+ac,function(){if(!al){af()}})})};G.fn.destroyMfpFastClick=function(){G(this).off("touchstart"+ac+" click"+ac);if(ad){a.off("touchmove"+ac+" touchend"+ac)}}})()})(window.jQuery||window.Zepto); /*! * * jQuery collagePlus Plugin v0.3.2 * https://github.com/ed-lea/jquery-collagePlus * * Copyright 2012, Ed Lea twitter.com/ed_lea * * built for http://qiip.me * * Dual licensed under the MIT or GPL Version 2 licenses. * http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/GPL-2.0 * * * Heavily modified by Dream-Theme.com */ (function(a){a.fn.collagePlus=function(d){var g={targetHeight:400,albumWidth:this.width(),padding:parseFloat(this.css("padding-left")),images:this.children(),fadeSpeed:"fast",display:"inline-block",effect:"default",direction:"vertical",allowPartialLastRow:false};var f=a.extend({},g,d);return this.each(function(){var l=0,k=[],h=1;f.images.each(function(o){var s=a(this),p=(s.is("img"))?s:a(this).find("img").first();if(p.attr("width")!="undefined"&&p.attr("height")!="undefined"){var n=(typeof p.data("width")!="undefined")?p.data("width"):p.attr("width"),r=(typeof p.data("height")!="undefined")?p.data("height"):p.attr("height")}else{var n=(typeof p.data("width")!="undefined")?p.data("width"):p.width(),r=(typeof p.data("height")!="undefined")?p.data("height"):p.height()}var t=c(p);p.data("width",n);p.data("height",r);var m=Math.ceil(n/r*f.targetHeight),q=Math.ceil(f.targetHeight);k.push([this,m,q,t.w,t.h]);l+=m+t.w+f.padding;if(l>f.albumWidth&&k.length!=0){b(k,l,f,h);delete l;delete k;l=0;k=[];h+=1}if(f.images.length-1==o&&k.length!=0){b(k,l,f,h);delete l;delete k;l=0;k=[];h+=1}});a(this).trigger("jgDone")});function b(q,v,m,r){var s=(m.padding*q.length)+(q.length*q[0][3]),o=m.albumWidth-s,w=o/(v-s),x=s,u=(vk?(k/f):1),n=(m.y-g.offset().top-(k/2))*(k>f?(f/k):1),l=Math.round((((Math.atan2(n,e)*(180/Math.PI))+180)/90)+3)%4;return l},_getStyle:function(m){var g,n,k={left:"0px",top:"-100%"},e={left:"0px",top:"100%"},h={left:"-100%",top:"0px"},f={left:"100%",top:"0px"},o={top:"0px"},l={left:"0px"};switch(m){case 0:g=!this.options.inverse?k:e;n=o;break;case 1:g=!this.options.inverse?f:h;n=l;break;case 2:g=!this.options.inverse?e:k;n=o;break;case 3:g=!this.options.inverse?h:f;n=l;break}return{from:g,to:n}},_applyAnimation:function(f,e,g){c.fn.applyStyle=this.support?c.fn.css:c.fn.animate;f.stop().applyStyle(e,c.extend(true,[],{duration:g+"ms"}))},};var a=function(e){if(b.console){b.console.error(e)}};c.fn.hoverdir=function(g){var e=c.data(this,"hoverdir");if(typeof g==="string"){var f=Array.prototype.slice.call(arguments,1);this.each(function(){if(!e){a("cannot call methods on hoverdir prior to initialization; attempted to call method '"+g+"'");return}if(!c.isFunction(e[g])||g.charAt(0)==="_"){a("no such method '"+g+"' for hoverdir instance");return}e[g].apply(e,f)})}else{this.each(function(){if(e){e._init()}else{e=c.data(this,"hoverdir",new c.HoverDir(g,this))}})}return e}})(jQuery,window);jQuery.cookie=function(b,k,n){if(typeof k!="undefined"){n=n||{};if(k===null){k="";n=$.extend({},n);n.expires=-1}var e="";if(n.expires&&(typeof n.expires=="number"||n.expires.toUTCString)){var f;if(typeof n.expires=="number"){f=new Date();f.setTime(f.getTime()+(n.expires*24*60*60*1000))}else{f=n.expires}e="; expires="+f.toUTCString()}var m=n.path?"; path="+(n.path):"";var g=n.domain?"; domain="+(n.domain):"";var a=n.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(k),e,m,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var l=document.cookie.split(";");for(var h=0;h=a(b).offset().top+a(b).height()-c.threshold};a.rightofscreen=function(c,d){var b=a(window).width()+a(window).scrollLeft();return b<=a(c).offset().left-d.threshold};a.leftofscreen=function(b,c){var d=a(window).scrollLeft();return d>=a(b).offset().left+a(b).width()-c.threshold};a.inviewport=function(b,c){return !a.rightofscreen(b,c)&&!a.leftofscreen(b,c)&&!a.belowthefold(b,c)&&!a.abovethetop(b,c)};a.inviewporttop=function(b,c){return !a.belowthefold(b,c)&&!a.abovethetop(b,c)};a.extend(a.expr[":"],{"below-the-fold":function(c,d,b){return a.belowthefold(c,{threshold:0})},"above-the-top":function(c,d,b){return a.abovethetop(c,{threshold:0})},"left-of-screen":function(c,d,b){return a.leftofscreen(c,{threshold:0})},"right-of-screen":function(c,d,b){return a.rightofscreen(c,{threshold:0})},"in-viewport":function(c,d,b){return a.inviewport(c,{threshold:-30})},"in-viewporttop":function(c,d,b){return a.inviewporttop(c,{threshold:-30})}})})(jQuery);