\/a><\/p>')});i();t&&(n(t,$z("a.zptag[data-tag*='"+t+"']")),prevfilter=t);$z("#zplayoutbrowser").addClass("loaded")},"async":!1})}function i(){var t="keyup change";"onsearch"in document.getElementById("layoutsearch")&&(t="search");$z("input#layoutsearch").on(t,function(){$z(this).val()==""?n(clickedFilter,null,!0):n($z(this).val().toLowerCase())});$z("a.zpfilter").on("click",function(t){t.preventDefault();$(this).hasClass("zptag")&&($z("ul.tag li, a.zptag").not($z(this)).not($z(this).parent("li")).removeClass("open"),$z(this).parent("li").toggleClass("open"),$z(this).toggleClass("open"));clickedFilter=$z(this).attr("data-tag");n(clickedFilter);$z("input#layoutsearch").val("")});$z(".notouch p.layout > a:not(.btn-preview), p.layout > a.btn-preview").click(function(n){var t=$(this).parent("p").attr("data-urlpart");try{ga("send","event","Layouts","Click",t)}catch(i){console.log("Error tracking layout click in GA")}n.preventDefault();$z.fancybox({margin:20,padding:0,overlayColor:"#000000",overlayOpacity:.85,autoScale:!0,transitionIn:"none",transitionOut:"none",width:2560,height:2560,href:this.href,type:"iframe"})});$z(".touch p.layout > a:not(.btn-preview)").click(function(n){n.preventDefault()})}function n(n,t,i){t&&$z(t).hasClass("zptag")&&($z("ul.tag li, a.zptag").not($z(t)).not($z(t).parent("li")).removeClass("open"),$z(t).parent("li").toggleClass("open"),$z(t).toggleClass("open"));(n!==prevfilter||i)&&(prevfilter=n,$z("p.layout").css("opacity","0"),document.location.search.search("zpnorandom")==-1?$z("p.layout").sort(function(){return Math.random()*10>5?1:-1}).each(function(){var n=$(this);n.appendTo(n.parent())}):$z("p.layout").sort(function(n,t){return n.dataset.orderposition==t.dataset.orderposition?0:parseInt(n.dataset.orderposition)>parseInt(t.dataset.orderposition)?1:-1}).each(function(){var n=$(this);n.appendTo(n.parent())}),setTimeout(function(){$z("p.layout").css("display","none").removeClass("on").removeClass("even");$z("p.layout[data-tags*='"+n+"']").css("display","block").addClass("on");$z("p.layout[data-tags*='"+n+"']:odd").addClass("even");$z("p.layout[data-tags*='"+n+"']").css("opacity","1")},200))}$z("a#loader").click(function(){t()});t(clickedFilter)})