jQuery(document).ready(function(a){a.fn.calculateColumns=function(b,c,d){return this.each(function(){var r=a(this),p=r.width(),i=(c!==false)?c:20,q=r.attr("data-cont-id"),o=b?b:300,f=Math.round(p/o),h="",j=false;if(!a("#col-style-id-"+q).exists()){if(!a("html").hasClass("old-ie")){var m=document.createElement("style");m.id="col-style-id-"+q;m.appendChild(document.createTextNode(""));document.head.appendChild(m)}}else{var m=document.getElementById("col-style-id-"+q)}var e=a("#col-style-id-"+q);var l,s,k,n;if(i<10){k=0}else{k=i-10}if(i==0){n=0}else{n=-i}if(d=="px"){l=Math.floor(p/f)+"px";s=Math.floor(p/f)*2+"px"}else{l=Math.floor(100000/f)/1000+"%";s=Math.floor(100000/f)*2/1000+"%"}if(a(".cont-id-"+q+"").hasClass("description-under-image")){if(f>1){h=" .cont-id-"+q+" { margin: -"+k+"px -"+i+"px; } .full-width-wrap .cont-id-"+q+" { margin: "+(-k)+"px "+i+"px; } .cont-id-"+q+" > .wf-cell { width: "+l+"; padding: "+k+"px "+i+"px; } .cont-id-"+q+" > .wf-cell.double-width { width: "+s+"; } "}else{h=" .cont-id-"+q+" { margin: -"+k+"px -"+i+"px; } .full-width-wrap .cont-id-"+q+" { margin: "+(-k)+"px "+i+"px; } .cont-id-"+q+" > .wf-cell { width: "+l+"; padding: "+k+"px "+i+"px; } "}}else{if(f>1){h=" .cont-id-"+q+" { margin: -"+i+"px; } .full-width-wrap .cont-id-"+q+" { margin: "+n+"px "+i+"px; } .cont-id-"+q+" > .wf-cell { width: "+l+"; padding: "+i+"px; } .cont-id-"+q+" > .wf-cell.double-width { width: "+s+"; } "}else{h=" .cont-id-"+q+" { margin: -"+i+"px; } .full-width-wrap .cont-id-"+q+" { margin: "+n+"px "+i+"px; } .cont-id-"+q+" > .wf-cell { width: "+l+"; padding: "+i+"px; } "}}if(a("html").hasClass("old-ie")){a("#static-stylesheet").prop("styleSheet").cssText=h}else{e.html(h);var g=m.sheet.cssRules.length;m.sheet.insertRule(".webkit-hack { }",g);m.sheet.deleteRule(g)}r.trigger("columnsReady")})};a.fn.heightHack=function(){return this.each(function(){var e=a(this);if(e.hasClass("height-ready")||e.parents(".post-rollover").exists()){return}var d=parseInt(e.attr("width")),b=parseInt(e.attr("height")),c=d/b;if(e.parents(".testimonial-vcard, .dt-format-gallery, .team-container, .shortcode-blog-posts.iso-grid ").exists()){e.wrap("
")}e.parent().css({"padding-bottom":100/c+"%",height:0,display:"block"});e.attr("data-ratio",c).addClass("height-ready")})};a.fn.initSlider=function(){return this.each(function(){var c=a(this),d=c.data("width"),b=c.data("height");c.royalSlider({autoScaleSlider:true,autoScaleSliderWidth:d,autoScaleSliderHeight:b,imageScaleMode:"fit",imageScalePadding:0,slidesOrientation:"horizontal",disableResponsiveness:true})})};a.fn.showItems=function(){return this.each(function(){var b=a(this),c=b.find(".preload-me").first();if(c.exists()){c.loaded(function(){var d=a(this);setTimeout(function(){d.parents(".iso-item, .wf-cell").css({opacity:1})},1)},null,true)}else{setTimeout(function(){b.css({opacity:1})},1)}})}});jQuery(document).ready(function(d){var f=d(".iso-container, .portfolio-grid");d(".filter:not(.without-isotope, .with-ajax) .filter-categories a").on("click.presscorFilterCategories",function(h){var g=d(this).attr("data-filter");f.isotope({filter:g});return false});d(".filter:not(.without-isotope, .with-ajax) .filter-extras .filter-by a").on("click",function(i){var h=d(this).attr("data-by"),g=d(this).parents(".filter-extras").find(".filter-sorting > a.act").first().attr("data-sort");f.isotope({sortBy:h,sortAscending:"asc"==g});return false});d(".filter:not(.without-isotope, .with-ajax) .filter-extras .filter-sorting a").on("click",function(i){var g=d(this).attr("data-sort"),h=d(this).parents(".filter-extras").find(".filter-by > a.act").first().attr("data-by");f.isotope({sortBy:h,sortAscending:"asc"==g});return false});var e=d(".iso-container"),c=d(".portfolio-grid:not(.jg-container, .iso-container), .blog.layout-grid .wf-container.description-under-image:not(.jg-container, .iso-container), .grid-masonry:not(.iso-container), .shortcode-blog-posts.iso-grid"),a=e.add(c),b=dtGlobals.isoPreloader=d('').appendTo("body").hide();if(a.exists()){a.each(function(g){var j=d(this),k=parseInt(j.attr("data-width")),h=parseInt(j.attr("data-padding"));j.addClass("cont-id-"+g).attr("data-cont-id",g);j.calculateColumns(k,h,"px");d(window).on("debouncedresize",function(){j.calculateColumns(k,h,"px")})})}if(e.exists()||c.exists()){b.fadeIn(50);e.each(function(h){var j=d(this);d(".preload-me",j).heightHack();d(".slider-masonry",j).initSlider();var g;if(dtGlobals.isTablet){g="css"}else{if(dtGlobals.isDesktop){g="best-available"}}j.one("columnsReady",function(){j.isotope({itemSelector:".iso-item",resizable:false,layoutMode:"masonry",animationEngine:g,masonry:{columnWidth:1},getSortData:{date:function(i){return i.attr("data-date")},name:function(i){return i.attr("data-name")}}});d(window).on("columnsReady",function(){d(".royalSlider",j).each(function(){d(this).data("royalSlider").updateSliderSize()});j.isotope("reLayout")})});d("> .iso-item",j).showItems()});c.each(function(h){var j=d(this);d(".preload-me",j).heightHack();d(".slider-simple",j).initSlider();var g;if(dtGlobals.isTablet){g="css"}else{if(dtGlobals.isDesktop){g="best-available"}}j.one("columnsReady",function(){j.isotope({itemSelector:".wf-cell",resizable:false,layoutMode:"fitRows",animationEngine:g,masonry:{columnWidth:1},getSortData:{date:function(i){return i.attr("data-date")},name:function(i){return i.attr("data-name")}}});j.on("columnsReady",function(){d(".royalSlider",j).each(function(){d(this).data("royalSlider").updateSliderSize()});j.isotope("reLayout")})});d("> .wf-cell",j).showItems()});b.stop().fadeOut(300)}});