");return i.inlineElement=a,a}return t.updateStatus("ready"),t._parseMarkup(n,{},i),n}}});var A,F="ajax",j=function(){A&&n.removeClass(A)};e.magnificPopup.registerModule(F,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'
The content could not be loaded.'},proto:{initAjax:function(){t.types.push(F),A=t.st.ajax.cursor,x(l+"."+F,function(){j(),t.req&&t.req.abort()})},getAjax:function(i){A&&n.addClass(A),t.updateStatus("loading");var o=e.extend({url:i.src,success:function(n,o,a){var r={data:n,xhr:a};T("ParseAjax",r),t.appendContent(e(r.data),F),i.finished=!0,j(),E(),setTimeout(function(){t.wrap.addClass(h)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){j(),i.finished=i.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",i.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var N,W=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var n=t.st.image.titleSrc;if(n){if(e.isFunction(n))return n.call(t,i);if(i.el)return i.el.attr(n)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'
The image could not be loaded.'},proto:{initImage:function(){var e=t.st.image,i=".image";t.types.push("image"),x(f+i,function(){"image"===t.currItem.type&&e.cursor&&n.addClass(e.cursor)}),x(l+i,function(){e.cursor&&n.removeClass(e.cursor),I.off("resize"+v)}),x("Resize"+i,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var i=0;t.isLowIE&&(i=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-i)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,N&&clearInterval(N),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,n=e.img[0],o=function(a){N&&clearInterval(N),N=setInterval(function(){return n.naturalWidth>0?(t._onImageHasSize(e),void 0):(i>200&&clearInterval(N),i++,3===i?o(10):40===i?o(50):100===i&&o(500),void 0)},a)};o(1)},getImage:function(i,n){var o=0,a=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(a,100):r()))},r=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",s.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},s=t.st.image,l=n.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",i.img=e(c).on("load.mfploader",a).on("error.mfploader",r),c.src=i.src,l.is("img")&&(i.img=i.img.clone()),i.img[0].naturalWidth>0&&(i.hasSize=!0)}return t._parseMarkup(n,{title:W(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(N&&clearInterval(N),i.loadError?(n.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",i.src))):(n.removeClass("mfp-loading"),t.updateStatus("ready")),n):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,n.addClass("mfp-loading"),t.findImageSize(i)),n)}}});var R,Z=function(){return void 0===R&&(R=void 0!==document.createElement("p").style.MozTransform),R};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e=t.st.zoom,i=".zoom";if(e.enabled&&t.supportsTransition){var n,o,a=e.duration,r=function(t){var i=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+e.duration/1e3+"s "+e.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},a="transition";return o["-webkit-"+a]=o["-moz-"+a]=o["-o-"+a]=o[a]=n,i.css(o),i},s=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(n),t.content.css("visibility","hidden"),image=t._getItemToZoom(),!image)return s(),void 0;o=r(image),o.css(t._getOffset()),t.wrap.append(o),n=setTimeout(function(){o.css(t._getOffset(!0)),n=setTimeout(function(){s(),setTimeout(function(){o.remove(),image=o=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(n),t.st.removalDelay=a,!image){if(image=t._getItemToZoom(),!image)return;o=r(image)}o.css(t._getOffset(!0)),t.wrap.append(o),t.content.css("visibility","hidden"),setTimeout(function(){o.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(s(),o&&o.remove())})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(i){var n;n=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=n.offset(),a=parseInt(n.css("padding-top"),10),r=parseInt(n.css("padding-bottom"),10);o.top-=e(window).scrollTop()-a;var s={width:n.width(),height:(b?n.innerHeight():n[0].offsetHeight)-r-a};return Z()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var q="iframe",D="//about:blank",K=function(e){if(t.currTemplate[q]){var i=t.currTemplate[q].find("iframe");i.length&&(e||(i[0].src=D),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(q,{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(){t.types.push(q),x("BeforeChange",function(e,t,i){t!==i&&(t===q?K():i===q&&K(!0))}),x(l+"."+q,function(){K()})},getIframe:function(i,n){var o=i.src,a=t.st.iframe;e.each(a.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var r={};return a.srcAction&&(r[a.srcAction]=o),t._parseMarkup(n,r,i),t.updateStatus("ready"),n}}});var Y=function(e){var i=t.items.length;return e>i-1?e-i:0>e?i+e:e},U=function(e,t,i){return e.replace("%curr%",t+1).replace("%total%",i)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'
',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=t.st.gallery,n=".mfp-gallery",a=Boolean(e.fn.mfpFastClick);return t.direction=!0,i&&i.enabled?(r+=" mfp-gallery",x(f+n,function(){i.navigateByImgClick&&t.wrap.on("click"+n,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+n,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+n,function(e,i){i.text&&(i.text=U(i.text,t.currItem.index,t.items.length))}),x(p+n,function(e,n,o,a){var r=t.items.length;o.counter=r>1?U(i.tCounter,a.index,r):""}),x("BuildControls"+n,function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var n=i.arrowMarkup,o=t.arrowLeft=e(n.replace("%title%",i.tPrev).replace("%dir%","left")).addClass(y),r=t.arrowRight=e(n.replace("%title%",i.tNext).replace("%dir%","right")).addClass(y),s=a?"mfpFastClick":"click";o[s](function(){t.prev()}),r[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",r[0],!1,!0),k("a",r[0],!1,!0)),t.container.append(o.add(r))}}),x(m+n,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+n,function(){o.off(n),t.wrap.off("click"+n),t.arrowLeft&&a&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=Y(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=Y(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,i=t.st.gallery.preload,n=Math.min(i[0],t.items.length),o=Math.min(i[1],t.items.length);for(e=1;(t.direction?o:n)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?n:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=Y(i),!t.items[i].preloaded){var n=t.items[i];n.parsed||(n=t.parseEl(i)),T("LazyLoad",n),"image"===n.type&&(n.img=e('
').on("load.mfploader",function(){n.hasSize=!0}).on("error.mfploader",function(){n.hasSize=!0,n.loadError=!0,T("LazyLoadError",n)}).attr("src",n.src)),n.preloaded=!0}}}});var G="retina";e.magnificPopup.registerModule(G,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,i=e.ratio;i=isNaN(i)?i():i,i>1&&(x("ImageHasSize."+G,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),x("ElementParse."+G,function(t,n){n.src=e.replaceSrc(n,i)}))}}}}),function(){var t=1e3,i="ontouchstart"in window,n=function(){I.off("touchmove"+a+" touchend"+a)},o="mfpFastClick",a="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var r,s=e(this);if(i){var l,c,d,u,p,f;s.on("touchstart"+a,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+a,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,n())}).on("touchend"+a,function(e){n(),u||f>1||(r=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){r=!1},t),o())})})}s.on("click"+a,function(){r||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+a+" click"+a),i&&I.off("touchmove"+a+" touchend"+a)}}()})(window.jQuery||window.Zepto);
(function(a){a.fn.fitVids=function(b){var c={customSelector:null};if(!document.getElementById("fit-vids-style")){var f=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0],e="Â";f.className="fit-vids-style";f.id="fit-vids-style";f.style.display="none";f.innerHTML=e;d.parentNode.insertBefore(f,d)}if(b){a.extend(c,b)}return this.each(function(){var g=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];if(c.customSelector){g.push(c.customSelector)}var h=a(this).find(g.join(","));h=h.not("object object");h.each(function(){var m=a(this);if(this.tagName.toLowerCase()==="embed"&&m.parent("object").length||m.parent(".fluid-width-video-wrapper").length){return}var i=(this.tagName.toLowerCase()==="object"||(m.attr("height")&&!isNaN(parseInt(m.attr("height"),10))))?parseInt(m.attr("height"),10):m.height(),j=!isNaN(parseInt(m.attr("width"),10))?parseInt(m.attr("width"),10):m.width(),k=i/j;if(!m.attr("id")){var l="fitvid"+Math.floor(Math.random()*999999);m.attr("id",l)}m.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",(k*100)+"%");m.removeAttr("height").removeAttr("width")})})}})(window.jQuery||window.Zepto);
(function(e){"use strict";e.fn.counterUp=function(t){var n=e.extend({time:400,delay:10},t);return this.each(function(){var t=e(this),r=n,i=function(){var e=[],n=r.time/r.delay,i=t.text(),s=/[0-9]+,[0-9]+/.test(i);i=i.replace(/,/g,"");var o=/^[0-9]+$/.test(i),u=/^[0-9]+\.[0-9]+$/.test(i),a=u?(i.split(".")[1]||[]).length:0;for(var f=n;f>=1;f--){var l=parseInt(i/n*f);u&&(l=parseFloat(i/n*f).toFixed(a));if(s)while(/(\d+)(\d{3})/.test(l.toString()))l=l.toString().replace(/(\d+)(\d{3})/,"$1,$2");e.unshift(l)}t.data("counterup-nums",e);t.text("0");var c=function(){t.text(t.data("counterup-nums").shift());if(t.data("counterup-nums").length)setTimeout(t.data("counterup-func"),r.delay);else{delete t.data("counterup-nums");t.data("counterup-nums",null);t.data("counterup-func",null)}};t.data("counterup-func",c);setTimeout(t.data("counterup-func"),r.delay)};t.waypoint(i,{offset:"100%",triggerOnce:!0})})}})(jQuery);
!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){"use strict";function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b
e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a,b){function c(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function d(){}function e(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=h.length;c>b;b++){var d=h[b];a[d]=0}return a}function f(b){function d(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||g("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=b("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var f=document.body||document.documentElement;f.appendChild(e);var h=j(e);l=200===c(h.width),f.removeChild(e)}}}function f(a){if(d(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var b=j(a);if("none"===b.display)return e();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var g=f.isBorderBox=!(!k||!b[k]||"border-box"!==b[k]),m=0,n=h.length;n>m;m++){var o=h[m],p=b[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=g&&l,y=c(b.width);y!==!1&&(f.width=y+(x?0:r+v));var z=c(b.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return f}var g="undefined"==typeof console?d:function(a){console.error(a)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],f):"object"==typeof exports?module.exports=f(require("desandro-get-style-property")):a.getSize=f(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){"use strict";function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"use strict";"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){"use strict";function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){"use strict";function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.Item=b(a.Outlayer))}(window,function(a){"use strict";function b(){a.Item.apply(this,arguments)}b.prototype=new a.Item,b.prototype._create=function(){this.id=this.layout.itemGUID++,a.Item.prototype._create.call(this),this.sortData={}},b.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var a=this.layout.options.getSortData,b=this.layout._sorters;for(var c in a){var d=b[c];this.sortData[c]=d(this.element,this)}}};var c=b.prototype.destroy;return b.prototype.destroy=function(){c.apply(this,arguments),this.css({display:""})},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("get-size"),require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.LayoutMode=b(a.getSize,a.Outlayer))}(window,function(a,b){"use strict";function c(a){this.isotope=a,a&&(this.options=a.options[this.namespace],this.element=a.element,this.items=a.filteredItems,this.size=a.size)}return function(){function a(a){return function(){return b.prototype[a].apply(this.isotope,arguments)}}for(var d=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],e=0,f=d.length;f>e;e++){var g=d[e];c.prototype[g]=a(g)}}(),c.prototype.needsVerticalResizeLayout=function(){var b=a(this.isotope.element),c=this.isotope.size&&b;return c&&b.innerHeight!=this.isotope.size.innerHeight},c.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},c.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},c.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},c.prototype.getSegmentSize=function(a,b){var c=a+b,d="outer"+b;if(this._getMeasurement(c,d),!this[c]){var e=this.getFirstItemSize();this[c]=e&&e[d]||this.isotope.size["inner"+b]}},c.prototype.getFirstItemSize=function(){var b=this.isotope.filteredItems[0];return b&&b.element&&a(b.element)},c.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},c.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},c.modes={},c.create=function(a,b){function d(){c.apply(this,arguments)}return d.prototype=new c,b&&(d.options=b),d.prototype.namespace=a,c.modes[a]=d,d},c}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],b):"object"==typeof exports?module.exports=b(require("../layout-mode"),require("masonry-layout")):b(a.Isotope.LayoutMode,a.Masonry)}(window,function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}var d=a.create("masonry"),e=d.prototype._getElementOffset,f=d.prototype.layout,g=d.prototype._getMeasurement;
c(d.prototype,b.prototype),d.prototype._getElementOffset=e,d.prototype.layout=f,d.prototype._getMeasurement=g;var h=d.prototype.measureColumns;d.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,h.call(this)};var i=d.prototype._manageStamp;return d.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,i.apply(this,arguments)},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("fitRows");return b.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth+this.gutter,c=this.isotope.size.innerWidth+this.gutter;0!==this.x&&b+this.x>c&&(this.x=0,this.y=this.maxY);var d={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+a.size.outerHeight),this.x+=b,d},b.prototype._getContainerSize=function(){return{height:this.maxY}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("vertical",{horizontalAlignment:0});return b.prototype._resetLayout=function(){this.y=0},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=(this.isotope.size.innerWidth-a.size.outerWidth)*this.options.horizontalAlignment,c=this.y;return this.y+=a.size.outerHeight,{x:b,y:c}},b.prototype._getContainerSize=function(){return{height:this.y}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","fizzy-ui-utils/utils","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(c,d,e,f,g,h){return b(a,c,d,e,f,g,h)}):"object"==typeof exports?module.exports=b(a,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):a.Isotope=b(a,a.Outlayer,a.getSize,a.matchesSelector,a.fizzyUIUtils,a.Isotope.Item,a.Isotope.LayoutMode)}(window,function(a,b,c,d,e,f,g){function h(a,b){return function(c,d){for(var e=0,f=a.length;f>e;e++){var g=a[e],h=c.sortData[g],i=d.sortData[g];if(h>i||i>h){var j=void 0!==b[g]?b[g]:b,k=j?1:-1;return(h>i?1:-1)*k}}return 0}}var i=a.jQuery,j=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s+|\s+$/g,"")},k=document.documentElement,l=k.textContent?function(a){return a.textContent}:function(a){return a.innerText},m=b.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});m.Item=f,m.LayoutMode=g,m.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),b.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var a in g.modes)this._initLayoutMode(a)},m.prototype.reloadItems=function(){this.itemGUID=0,b.prototype.reloadItems.call(this)},m.prototype._itemize=function(){for(var a=b.prototype._itemize.apply(this,arguments),c=0,d=a.length;d>c;c++){var e=a[c];e.id=this.itemGUID++}return this._updateItemsSortData(a),a},m.prototype._initLayoutMode=function(a){var b=g.modes[a],c=this.options[a]||{};this.options[a]=b.options?e.extend(b.options,c):c,this.modes[a]=new b(this)},m.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?void this.arrange():void this._layout()},m.prototype._layout=function(){var a=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,a),this._isLayoutInited=!0},m.prototype.arrange=function(a){function b(){d.reveal(c.needReveal),d.hide(c.needHide)}this.option(a),this._getIsInstant();var c=this._filter(this.items);this.filteredItems=c.matches;var d=this;this._bindArrangeComplete(),this._isInstant?this._noTransition(b):b(),this._sort(),this._layout()},m.prototype._init=m.prototype.arrange,m.prototype._getIsInstant=function(){var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=a,a},m.prototype._bindArrangeComplete=function(){function a(){b&&c&&d&&e.dispatchEvent("arrangeComplete",null,[e.filteredItems])}var b,c,d,e=this;this.once("layoutComplete",function(){b=!0,a()}),this.once("hideComplete",function(){c=!0,a()}),this.once("revealComplete",function(){d=!0,a()})},m.prototype._filter=function(a){var b=this.options.filter;b=b||"*";for(var c=[],d=[],e=[],f=this._getFilterTest(b),g=0,h=a.length;h>g;g++){var i=a[g];if(!i.isIgnored){var j=f(i);j&&c.push(i),j&&i.isHidden?d.push(i):j||i.isHidden||e.push(i)}}return{matches:c,needReveal:d,needHide:e}},m.prototype._getFilterTest=function(a){return i&&this.options.isJQueryFiltering?function(b){return i(b.element).is(a)}:"function"==typeof a?function(b){return a(b.element)}:function(b){return d(b.element,a)}},m.prototype.updateSortData=function(a){var b;a?(a=e.makeArray(a),b=this.getItems(a)):b=this.items,this._getSorters(),this._updateItemsSortData(b)},m.prototype._getSorters=function(){var a=this.options.getSortData;for(var b in a){var c=a[b];this._sorters[b]=n(c)}},m.prototype._updateItemsSortData=function(a){for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.updateSortData()}};var n=function(){function a(a){if("string"!=typeof a)return a;var c=j(a).split(" "),d=c[0],e=d.match(/^\[(.+)\]$/),f=e&&e[1],g=b(f,d),h=m.sortDataParsers[c[1]];return a=h?function(a){return a&&h(g(a))}:function(a){return a&&g(a)}}function b(a,b){var c;return c=a?function(b){return b.getAttribute(a)}:function(a){var c=a.querySelector(b);return c&&l(c)}}return a}();m.sortDataParsers={parseInt:function(a){return parseInt(a,10)},parseFloat:function(a){return parseFloat(a)}},m.prototype._sort=function(){var a=this.options.sortBy;if(a){var b=[].concat.apply(a,this.sortHistory),c=h(b,this.options.sortAscending);this.filteredItems.sort(c),a!=this.sortHistory[0]&&this.sortHistory.unshift(a)}},m.prototype._mode=function(){var a=this.options.layoutMode,b=this.modes[a];if(!b)throw new Error("No layout mode: "+a);return b.options=this.options[a],b},m.prototype._resetLayout=function(){b.prototype._resetLayout.call(this),this._mode()._resetLayout()},m.prototype._getItemLayoutPosition=function(a){return this._mode()._getItemLayoutPosition(a)},m.prototype._manageStamp=function(a){this._mode()._manageStamp(a)},m.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},m.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},m.prototype.appended=function(a){var b=this.addItems(a);if(b.length){var c=this._filterRevealAdded(b);this.filteredItems=this.filteredItems.concat(c)}},m.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){this._resetLayout(),this._manageStamps();var c=this._filterRevealAdded(b);this.layoutItems(this.filteredItems),this.filteredItems=c.concat(this.filteredItems),this.items=b.concat(this.items)}},m.prototype._filterRevealAdded=function(a){var b=this._filter(a);return this.hide(b.needHide),this.reveal(b.matches),this.layoutItems(b.matches,!0),b.matches},m.prototype.insert=function(a){var b=this.addItems(a);if(b.length){var c,d,e=b.length;for(c=0;e>c;c++)d=b[c],this.element.appendChild(d.element);var f=this._filter(b).matches;for(c=0;e>c;c++)b[c].isLayoutInstant=!0;for(this.arrange(),c=0;e>c;c++)delete b[c].isLayoutInstant;this.reveal(f)}};var o=m.prototype.remove;return m.prototype.remove=function(a){a=e.makeArray(a);var b=this.getItems(a);o.call(this,a);var c=b&&b.length;if(c)for(var d=0;c>d;d++){var f=b[d];e.removeFrom(this.filteredItems,f)}},m.prototype.shuffle=function(){for(var a=0,b=this.items.length;b>a;a++){var c=this.items[a];c.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},m.prototype._noTransition=function(a){var b=this.options.transitionDuration;this.options.transitionDuration=0;var c=a.call(this);return this.options.transitionDuration=b,c},m.prototype.getFilteredItemElements=function(){for(var a=[],b=0,c=this.filteredItems.length;c>b;b++)a.push(this.filteredItems[b].element);return a},m});
+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed.bs.alert").remove()}var c=a(this),d=c.attr("data-target");d||(d=c.attr("href"),d=d&&d.replace(/.(?=#[^\s]$)/,""));var e=a(d);b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close.bs.alert"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.one(a.support.transition.end,f).emulateTransitionEnd(150):f()};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery);
+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);var e=this.options.trigger.split(" ");for(var f=e.length;f--;){var g=e[f];if(g=="click")this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if(g!="manual"){var h=g=="hover"?"mouseenter":"focusin",i=g=="hover"?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="in";if(!c.options.delay||!c.options.delay.show)return c.show();c.timeout=setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="out";if(!c.options.delay||!c.options.delay.hide)return c.hide();c.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e=typeof this.options.placement=="function"?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n=this.options.container=="body"?window.innerWidth:k.outerWidth(),o=this.options.container=="body"?window.innerHeight:k.outerHeight(),p=this.options.container=="body"?0:k.offset().left;e=e=="bottom"&&h.top+h.height+j-m>o?"top":e=="top"&&h.top-m-j<0?"bottom":e=="right"&&h.right+i>n?"left":e=="left"&&h.left-iback');this.$back=this.$menu.find("li.dl-back")},_initEvents:function(){var g=this;this.$trigger.on("click.dlmenu",function(){if(g.open){g._closeMenu()}else{g._openMenu()}return false});this.$menuitems.on("click.dlmenu",function(j){j.stopPropagation();var i=d(this),h=i.children("ul.dl-submenu");if(h.length>0){var l=h.clone().css("opacity",0).insertAfter(g.$menu),k=function(){g.$menu.off(g.animEndEventName).removeClass(g.options.animationClasses.classout).addClass("dl-subview");i.addClass("dl-subviewopen").parents(".dl-subviewopen:first").removeClass("dl-subviewopen").addClass("dl-subview");l.remove()};setTimeout(function(){l.addClass(g.options.animationClasses.classin);g.$menu.addClass(g.options.animationClasses.classout);if(g.supportAnimations){g.$menu.on(g.animEndEventName,k)}else{k.call()}g.options.onLevelClick(i,i.children("a:first").text())});return false}else{g.options.onLinkClick(i,j)}});this.$back.on("click.dlmenu",function(j){var k=d(this),i=k.parents("ul.dl-submenu:first"),h=i.parent(),m=i.clone().insertAfter(g.$menu);var l=function(){g.$menu.off(g.animEndEventName).removeClass(g.options.animationClasses.classin);m.remove()};setTimeout(function(){m.addClass(g.options.animationClasses.classout);g.$menu.addClass(g.options.animationClasses.classin);if(g.supportAnimations){g.$menu.on(g.animEndEventName,l)}else{l.call()}h.removeClass("dl-subviewopen");var n=k.parents(".dl-subview:first");if(n.is("li")){n.addClass("dl-subviewopen")}n.removeClass("dl-subview")});return false})},closeMenu:function(){if(this.open){this._closeMenu()}},_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");if(this.supportTransitions){this.$menu.on(this.transEndEventName,h)}else{h.call()}this.open=false},openMenu:function(){if(!this.open){this._openMenu()}},_openMenu:function(){var g=this;c.off("click").on("click.dlmenu",function(){g._closeMenu()});this.$menu.addClass("dl-menuopen dl-menu-toggle").on(this.transEndEventName,function(){d(this).removeClass("dl-menu-toggle")});this.$trigger.addClass("dl-active");this.open=true},_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 i=d.data(this,"dlmenu");if(!i){a("cannot call methods on dlmenu prior to initialization; attempted to call method '"+h+"'");return}if(!d.isFunction(i[h])||h.charAt(0)==="_"){a("no such method '"+h+"' for dlmenu instance");return}i[h].apply(i,g)})}else{this.each(function(){var i=d.data(this,"dlmenu");if(i){i._init()}else{i=d.data(this,"dlmenu",new d.DLMenu(h,this))}})}return this}})(jQuery,window);
(function($){
var $window=$(window);
var windowHeight=$window.height();
$window.resize(function (){
windowHeight=$window.height();
});
$.fn.parallax=function(xpos, speedFactor, outerHeight){
var $this=$(this);
var getHeight;
var firstTop;
var paddingTop=0;
$this.each(function(){
firstTop=$this.offset().top;
});
if(outerHeight){
getHeight=function(jqo){
return jqo.outerHeight(true);
};}else{
getHeight=function(jqo){
return jqo.height();
};}
if(arguments.length < 1||xpos===null) xpos="50%";
if(arguments.length < 2||speedFactor===null) speedFactor=0.1;
if(arguments.length < 3||outerHeight===null) outerHeight=true;
function update(){
var pos=$window.scrollTop();
$this.each(function(){
var $element=$(this);
var top=$element.offset().top;
var height=getHeight($element);
if(top + height < pos||top > pos + windowHeight){
return;
}
$this.css('background-position', '50% ' + Math.round((firstTop - pos) * speedFactor) + "px");
});
}
$window.bind('scroll', update).resize(update);
update();
};})(jQuery);
(function(window){
'use strict';
function classReg(className){
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
}
var hasClass, addClass, removeClass;
if('classList' in document.documentElement){
hasClass=function(elem, c){
return elem.classList.contains(c);
};
addClass=function(elem, c){
elem.classList.add(c);
};
removeClass=function(elem, c){
elem.classList.remove(c);
};}else{
hasClass=function(elem, c){
return classReg(c).test(elem.className);
};
addClass=function(elem, c){
if(!hasClass(elem, c)){
elem.className=elem.className + ' ' + c;
}};
removeClass=function(elem, c){
elem.className=elem.className.replace(classReg(c), ' ');
};}
function toggleClass(elem, c){
var fn=hasClass(elem, c) ? removeClass:addClass;
fn(elem, c);
}
var classie={
hasClass: hasClass,
addClass: addClass,
removeClass: removeClass,
toggleClass: toggleClass,
has: hasClass,
add: addClass,
remove: removeClass,
toggle: toggleClass
};
if(typeof define==='function'&&define.amd){
define(classie);
}else{
window.classie=classie;
}})(window);
(function(){
var triggerBttn=document.getElementById('overlay-menu-wrap'),
overlay=document.querySelector('div.overlay'),
closeBttn=document.querySelector('button.overlay-close');
transEndEventNames={
'WebkitTransition': 'webkitTransitionEnd',
'MozTransition': 'transitionend',
'OTransition': 'oTransitionEnd',
'msTransition': 'MSTransitionEnd',
'transition': 'transitionend'
},
transEndEventName=transEndEventNames[ Modernizr.prefixed('transition') ],
support={ transitions:Modernizr.csstransitions };
function toggleOverlay(){
if(classie.has(overlay, 'open')){
classie.remove(overlay, 'open');
classie.add(overlay, 'close');
classie.remove(triggerBttn, 'hide');
var onEndTransitionFn=function(ev){
if(support.transitions){
if(ev.propertyName!=='visibility') return;
this.removeEventListener(transEndEventName, onEndTransitionFn);
}
classie.remove(overlay, 'close');
};
if(support.transitions){
overlay.addEventListener(transEndEventName, onEndTransitionFn);
}else{
onEndTransitionFn();
}}
else if(!classie.has(overlay, 'close')){
classie.add(overlay, 'open');
classie.add(triggerBttn, 'hide');
}}
if(triggerBttn){
triggerBttn.addEventListener('click', toggleOverlay);
}
if(closeBttn){
closeBttn.addEventListener('click', toggleOverlay);
}})();
!function(e,t){if("function"==typeof define&&define.amd)define(["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={exports:{}};t(n.exports),e.retina=n.exports}}(this,function(e){"use strict";function t(e){var t=parseInt(e,10);return t>f?f:t}function n(e){return e.hasAttribute("data-no-resize")||(0===e.offsetWidth&&0===e.offsetHeight?(e.setAttribute("width",e.naturalWidth),e.setAttribute("height",e.naturalHeight)):(e.setAttribute("width",e.offsetWidth),e.setAttribute("height",e.offsetHeight))),e}function r(e,t){var r=e.nodeName.toLowerCase(),i=document.createElement("img");i.addEventListener("load",function(){"img"===r?n(e).setAttribute("src",t):e.style.backgroundImage="url("+t+")"}),i.setAttribute("src",t)}function i(e,n){var i=arguments.length<=2||void 0===arguments[2]?1:arguments[2],o=t(i);if(n&&o>1){var a=n.replace(c,"@"+o+"x$1");r(e,a)}}function o(e,t,n){f>1&&r(e,n)}function a(){return"undefined"!=typeof document?Array.prototype.slice.call(document.querySelectorAll(g)):[]}function u(e){return e.style.backgroundImage.replace(l,"$2")}function s(){a().forEach(function(e){var t="img"===e.nodeName.toLowerCase(),n=t?e.getAttribute("src"):u(e),r=e.getAttribute("data-rjs"),a=!isNaN(parseInt(r,10));a?i(e,n,r):o(e,n,r)})}Object.defineProperty(e,"__esModule",{value:!0});var d="undefined"!=typeof window,f=d?window.devicePixelRatio||1:1,c=/(\.[A-z]{3,4}\/?(\?.*)?)$/,l=/url\(('|")?([^\)'"]+)('|")?\)/i,g="[data-rjs]";d&&(window.addEventListener("load",s),window.retinajs=s),e["default"]=s});
function updateViewportDimensions(){
var w=window,d=document,e=d.documentElement,g=d.getElementsByTagName('body')[0],x=w.innerWidth||e.clientWidth||g.clientWidth,y=w.innerHeight||e.clientHeight||g.clientHeight;
return { width:x,height:y }}
var viewport=updateViewportDimensions();
function loadGravatars(){
viewport=updateViewportDimensions();
if(viewport.width >=768){
jQuery('.comment img[data-gravatar]').each(function(){
jQuery(this).attr('src',jQuery(this).attr('data-gravatar'));
});
}}
window.vc_js=function (){
if(typeof('vc_twitterBehaviour')!='undefined'){
vc_twitterBehaviour();
}
if(typeof('vc_toggleBehaviour')!='undefined'){
vc_toggleBehaviour();
}
if(typeof('vc_tabsBehaviour')!='undefined'){
vc_tabsBehaviour();
}
if(typeof('vc_accordionBehaviour')!='undefined'){
vc_accordionBehaviour();
}
if(typeof('vc_teaserGrid')!='undefined'){
vc_teaserGrid();
}
if(typeof('vc_prettyPhoto')!='undefined'){
vc_prettyPhoto();
}
if(typeof('vc_googleplus')!='undefined'){
vc_googleplus();
}
if(typeof('vc_pinterest')!='undefined'){
vc_pinterest();
}
if(typeof('vc_progress_bar')!='undefined'){
vc_progress_bar();
}
if(typeof('vc_google_fonts')!='undefined'){
vc_google_fonts();
}
if(typeof('vc_carouselBehaviour')!='undefined'){
vc_carouselBehaviour();
}
if(typeof('vc_slidersBehaviour')!='undefined'){
vc_slidersBehaviour();
}
if(typeof('vc_plugin_flexslider')!='undefined'){
vc_plugin_flexslider();
}
if(typeof('vc_gridBehaviour')!='undefined'){
vc_gridBehaviour();
}
if(typeof('vc_rowBehaviour')!='undefined'){
vc_rowBehaviour();
}
jQuery(document).trigger('vc_js');
window.setTimeout(vc_waypoints, 1500);
if(typeof('vc_waypoints')!='undefined'){
window.setTimeout(vc_waypoints, 1500);
}};
(function($){
'use strict';
String.prototype.decodeHTML=function(){
return $("
", {html: "" + this}).html();
};
var $main=$("#wrapper"),
$mainCon=$("#main-wrapper"),
responsive_viewport=$(window).width(),
contentNode=$main.get(0),
woo_drop_down=function (){
var $cartBtn=$('.cart-trigger'),
$cartDropdown=$('.cart-trigger').find('.woo-cart-dropdown');
if($cartBtn.length > 0&&$cartDropdown.length > 0){
$cartBtn.mouseover(function(){
$(this).find('.woo-cart-dropdown').stop().fadeIn();
}).mouseout(function(){
$(this).find('.woo-cart-dropdown').stop().fadeOut();
});
}},
blockLoadMore=function(self){
var $loadMoreBtn=self.parents('.block-load-more-btn'),
$loadContainer=self.parents('.loadmore-wrap').find('.load-container');
var ajaxurl=pix_composer.ajaxurl,
values=self.data('values'),
args=self.data('args');
var page_number=self.data('paged');
if(undefined!=page_number){
var page_number=page_number+1;
}
var max=values.max;
$.ajax({
type: 'post',
url: ajaxurl,
data: {
action:values.action,
values:values,
args:args,
paged:page_number
},
beforeSend: function(){
$loadMoreBtn.find('.spinner').fadeIn();
$loadMoreBtn.find('a').hide();
$loadMoreBtn.addClass('disabled');
},
complete: function(){
$('.popup-gallery').magnificPopup({
type: 'image',
tLoading: 'Loading image...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: false,
navigateByImgClick: true,
preload: [0,1]
},
image: {
tError: '
The image #%curr% could not be loaded.',
titleSrc: function(item){
return item.el.data('title');
}}
});
},
}).done(function(data){
var $data=$(data),
$posts=$data.find('.load-element');
var paged=$data.find('.ajax-posts').data('paged');
self.data('paged', paged);
if(max==paged){
$loadMoreBtn.find('.loaded-msg').removeClass('hide');
$loadMoreBtn.find('.loaded-msg').show(0);
}else{
$loadMoreBtn.find('a').show();
}
var $loadContainer=self.parents('.loadmore-wrap').find('.load-container');
if($loadContainer.hasClass('portfolio-contents')||$loadContainer.hasClass('grid-blog-contents')||$loadContainer.hasClass('shop-contents')){
$loadContainer.isotope()
.append($posts)
.isotope('appended', $posts);
$loadContainer.imagesLoaded().progress(function(){
$loadContainer.isotope('layout');
});
}else{
$loadContainer.find('.load-element').last().after($posts);
}}).always(function(){
$loadMoreBtn.find('.spinner').fadeOut();
$loadMoreBtn.removeClass('disabled');
});
},
pieChartResponsive=function (options, $self, $border, size){
if($self.hasClass('style2')&&$self.hasClass('style4')){
$border.css({
'line-height': (size + options.style4) +'px',
'height': (size + options.style4) +'px',
'width': (size + (options.style4)) +'px'
});
}else if($self.hasClass('style2')&&$self.hasClass('style5')){
$border.css({
'line-height': (size - options.style5) +'px',
'height': (size - options.style5) +'px',
'width': (size - (options.style5)) +'px'
});
}
else if($self.hasClass('style2')&&$self.hasClass('style6')){
$border.css({
'line-height': (size + options.style6) +'px',
'height': (size + options.style6) +'px',
'width': (size + options.style6) +'px'
});
}
else if($self.hasClass('style2')){
$border.css({
'line-height': (size + options.style2) +'px',
'height': (size + options.style2) +'px',
'width': (size + options.style2) +'px'
});
}},
afterContentLoad=function(){
},
loadMore=function(self){
var $loadMoreBtn=self.parents('.load-more-btn'),
$loadContainer=self.parents('.loadmore-wrap').find('.load-container'),
ajaxurl=pix_composer.ajaxurl,
values=self.data('values'),
args=self.data('args'),
page_number=self.data('paged'),
max=values.max,
search=$loadMoreBtn.data('search'),
searchPaged=$loadMoreBtn.data('search-paged'),
searchMax=$loadMoreBtn.data('search-max');
if($loadMoreBtn.hasClass('disabled')) return;
if(''!=search&&'undefined'!=typeof(search)){
page_number=searchPaged;
max=searchMax;
}
if('undefined'!=typeof(page_number)){
page_number=page_number+1;
}
if(page_number > max) return;
$.ajax({
type: 'post',
url: ajaxurl,
data: {
action:values.action,
values:values,
args:args,
paged:page_number
},
beforeSend: function(){
$loadMoreBtn.find('.spinner').fadeIn();
$loadMoreBtn.find('a').hide();
$loadMoreBtn.addClass('disabled');
},
complete: function(){
},
}).done(function(data){
var $data=$(data),
$posts=$data.find('.load-element');
var paged=$data.find('.ajax-posts').data('paged');
self.data('paged', paged);
if(max==paged){
$loadMoreBtn.find('.loaded-msg').removeClass('hide');
$loadMoreBtn.find('.loaded-msg').show(0);
}else{
$loadMoreBtn.find('a').show();
}
var $loadContainer=self.parents('.loadmore-wrap').find('.load-container');
if($loadContainer.hasClass('portfolio-contents')||$loadContainer.hasClass('blog-isotope')){
$loadContainer.isotope()
.append($posts)
.isotope('appended', $posts);
$loadContainer.imagesLoaded().progress(function(){
$loadContainer.isotope('layout');
});
if($loadContainer.hasClass('portfolio-contents')){
var $filter=$loadContainer.parents('.loadmore-wrap').find('#filters');
if($filter.length > 0){
$filter.find('li').eq(0).find('a').trigger('click');
}}
}else{
$loadContainer.find('.load-element').last().after($posts);
}
var $elem=$('.pix-animate-cre');
$elem.each(function(){
var $singleElement=$(this);
var animateTrans=$singleElement.data('trans') ? $singleElement.data('trans'):'fadeIn';
var animateDelay=$singleElement.data('delay') ? $singleElement.data('delay'):'';
var animateDuration=$singleElement.data('duration') ? $singleElement.data('duration'):'';
if(animateDelay!=''){
$singleElement.css('animation-delay', animateDelay);
}
if(animateDuration!=''){
$singleElement.css('animation-duration', animateDuration);
}
$singleElement.waypoint(function(){
if($singleElement.hasClass('animated ' + animateTrans)) return;
$singleElement.css('opacity','1').addClass('animated '+ animateTrans);
},
{
offset: '90%',
triggerOnce: true
});
});
}).always(function(){
$loadMoreBtn.find('.spinner').fadeOut();
$loadMoreBtn.removeClass('disabled');
});
},
portfolioSearch=function($self, search){
var $con=$self.parents('.loadmore-wrap'),
$loadMoreBtn=$con.find('.load-more-btn'),
$loadContainer=$con.find('.load-container'),
ajaxurl=blocks.ajaxurl,
$wrap=$self.parent(),
values=$wrap.data('values'),
args=$wrap.data('args'),
max=$wrap.data('max');
if($loadMoreBtn.hasClass('disabled')) return;
$loadMoreBtn.data('search', search);
$loadMoreBtn.find('.loaded-msg').addClass('hide');
$loadMoreBtn.find('.loaded-msg').hide(0);
$.ajax({
type: 'post',
url: ajaxurl,
data: {
action:values.action,
values:values,
args:args,
paged:1,
search:search
},
beforeSend: function(){
$loadContainer.addClass('port-search-loading');
$loadMoreBtn.find('.spinner').fadeIn();
$loadMoreBtn.find('a').hide();
$loadMoreBtn.addClass('disabled');
},
complete: function(){
$loadContainer.removeClass('port-search-loading');
},
}).done(function(data){
var $data=$(data),
$posts=$data.find('.load-element'),
$ajaxPosts=$data.find('.ajax-posts'),
postFound=$ajaxPosts.data('post-found'),
postNotFoundText,
paged=$ajaxPosts.data('paged'),
max=$ajaxPosts.data('max');
$loadContainer.find('.load-element').remove();
$con.find('.not-found').remove();
if(''!=search&&'undefined'!=typeof(search)){
$con.find('.clear-search').fadeIn();
}else{
$con.find('.clear-search').fadeOut();
}
if(!postFound){
postNotFoundText=$ajaxPosts.text();
$loadContainer.before('
'+ postNotFoundText +'
');
}else{
$loadMoreBtn.data('search-paged', paged);
$loadMoreBtn.data('search-max', max);
if(max==paged){
$loadMoreBtn.find('.loaded-msg').removeClass('hide');
$loadMoreBtn.find('.loaded-msg').show(0);
}else{
$loadMoreBtn.find('a').show();
}
$loadContainer.isotope()
.append($posts)
.isotope('appended', $posts);
$loadContainer.imagesLoaded().progress(function(){
$loadContainer.isotope('layout');
});
var $elem=$('.pix-animate-cre');
$elem.each(function(){
var $singleElement=$(this);
var animateTrans=$singleElement.data('trans') ? $singleElement.data('trans'):'fadeIn';
var animateDelay=$singleElement.data('delay') ? $singleElement.data('delay'):'';
var animateDuration=$singleElement.data('duration') ? $singleElement.data('duration'):'';
if(animateDelay!=''){
$singleElement.css('animation-delay', animateDelay);
}
if(animateDuration!=''){
$singleElement.css('animation-duration', animateDuration);
}
$singleElement.waypoint(function(){
if($singleElement.hasClass('animated ' + animateTrans)) return;
$singleElement.css('opacity','1').addClass('animated '+ animateTrans);
},
{
offset: '90%',
triggerOnce: true
});
});
}}).always(function(){
$loadMoreBtn.find('.spinner').fadeOut();
$loadMoreBtn.removeClass('disabled');
});
},
AjaxifyRemoveIteminCart=function(e){
e.preventDefault();
var $wooCart=$('.woo-cart-dropdown'),
$cartContent=$wooCart.find('.woo-cart-content'),
$cartLoader=$wooCart.find('.spinner');
$.ajax({
type: "POST",
url: pixLike.ajaxurl,
data: {
'action':'composer_cart_remove_item',
'item_key': $(this).data('item_key'),
},
cache: false,
headers: {'cache-control': 'no-cache'},
beforeSend: function(){
$cartLoader.show();
$(this).parent('li').addClass('removing');
}}).done(function(data){
var $data=$(data),
status=$data.find('#status').html(),
cartCount=$data.find('#amz-cart-count').html(),
wcNotice=$data.find('#amz-wc-notice').html(),
wccart=$data.find('#amz-mini-cart').html();
$(this).parent('li').removeClass('removing');
if(status!=1){
$cartLoader.hide();
return;
}
$('body').find('.pix-item-icon').html(cartCount);
if(! $data.find('.woocommerce-error').length){
$cartContent.html(wccart);
}
$cartLoader.hide();
});
},
init=function(){
var responsive_viewport=$(window).width();
loadGravatars();
var $langBtn=$('#lang-list.lang-dropdown.translated');
if($langBtn.length > 0){
$langBtn.mouseover(function(){
var $langDropdown=$(this).find('.lang-dropdown-inner');
$langDropdown.stop().slideDown();
}).mouseout(function(){
var $langDropdown=$(this).find('.lang-dropdown-inner');
$langDropdown.stop().slideUp();
});
}
var mMenuStatus=0,
$mMenu=$('.mobile-menu-nav'),
$pixOverlay=$('
', {class: 'pix-overlay'});
$('.pix-menu .pix-menu-trigger').on('click', function(e){
var $this=$(this);
if(mMenuStatus==0){
$this.parent().addClass('pix-menu-open').removeClass('pix-menu-close');
$('#content-pusher').addClass('content-pushed');
$pixOverlay.hide().appendTo('body').fadeIn(300);
$mMenu.addClass('mobile-nav').addClass('moved');
$('.left-main-menu').addClass('moved');
mMenuStatus=1;
$pixOverlay.off().on('click', function(e){
e.preventDefault();
if(mMenuStatus==1){
$this.parent().removeClass('pix-menu-open').addClass('pix-menu-close');
$('#content-pusher').removeClass('content-pushed');
$mMenu.removeClass('mobile-nav').removeClass('moved');
$('.left-main-menu').removeClass('moved');
$pixOverlay.fadeOut(300, function(){
$(this).remove();
});
mMenuStatus=0;
}});
}else{
$mMenu.removeClass('mobile-nav').removeClass('moved');
$('.left-main-menu').removeClass('moved');
$pixOverlay.fadeOut(300, function(){
$(this).remove();
});
mMenuStatus=0;
$this.parent().removeClass('pix-menu-open').addClass('pix-menu-close');
$('#content-pusher').removeClass('content-pushed');
}
e.preventDefault();
});
var fsStatus=0,
$fs=$('.pix-flyin-content');
$('.pix-flyin-sidebar .pix-flyin-trigger').on('click', function(e){
var $this=$(this);
if(fsStatus==0){
$this.parent().addClass('pix-flyin-open').removeClass('pix-flyin-close');
$('#content-pusher').addClass('flyin-pushed');
$fs.addClass('moved');
fsStatus=1;
}else{
$fs.removeClass('moved');
fsStatus=0;
$this.parent().removeClass('pix-flyin-open').addClass('pix-flyin-close');
$('#content-pusher').removeClass('flyin-pushed');
}
e.preventDefault();
});
$('.counter-value').counterUp({
delay: 10,
time: 1000
});
$(".container, .posts, .pix-blog-video,.wp-video, .pix-post-video").fitVids();
$('.port-share-btn a, .share-social a').on('click', function(e){
e.preventDefault();
var newwindow=window.open($(this).attr('href'),'','height=450,width=700');
if(window.focus){newwindow.focus()}
return false;
});
$('.popup-gallery').magnificPopup({
type: 'image',
tLoading: 'Loading image...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: false,
navigateByImgClick: true,
preload: [0,1]
},
image: {
tError: '
The image #%curr% could not be loaded.',
titleSrc: function(item){
return item.el.data('title');
}}
});
$('.pix-chart').each(function(index, el){
var $self=$(this);
$self.width($self.data('size')).height($self.data('size')).css('line-height', $self.data('size') +'px');
$self.waypoint(function(){
$(this).easyPieChart({
onStart: function(from, to){
var canvas=$(this.el).find('canvas'),
size=canvas.width(),
$border=$(this.el).find('.border-bg'),
$bg=$(this.el).find('.bg'),
$self=$(this.el);
$self.css({
'line-height': (size) +'px',
'height': (size) +'px',
'width': (size) +'px'
});
},
onStep: function(from, to, percent){
$(this.el).find('.percent-text').text(Math.round(percent));
}});
},
{
offset: '90%',
triggerOnce: true
});
});
var loginForm=function(self){
var ajaxurl=pix_composer.ajaxurl,
$form=self.parents('.login-form'),
username=$form.find('.username').val(),
password=$form.find('.password').val(),
remember=$form.find('.remember_me').prop('checked');
$.ajax({
type: 'post',
url: ajaxurl,
data: {
action:'composer_ajax_login_form',
username:username,
password:password,
remember:remember
},
beforeSend: function(){
self.addClass('btn-loading');
},
complete: function(){
afterContentLoad();
},
}).done(function(data){
self.removeClass('btn-loading');
var data=$.parseJSON(data),
error=data.error;
if(1==error){
var username=data.username,
password=data.password;
$form.find('.username-notice').text(username);
$form.find('.password-notice').text(password);
}else{
var success=data.success,
redirect=data.redirect;
$form.find('.success').text(success).delay(400).fadeOut(400);
$(location).attr('href',redirect);
}}).always(function(){
});
};
$('.login-form').on('click', '.submit-login-form', function(e){
e.preventDefault();
e.stopPropagation();
var self=$(this);
loginForm(self);
});
var forgotForm=function(self){
var ajaxurl=pix_composer.ajaxurl,
$form=self.parents('.forgot-form'),
user_login=$form.find('.user_login').val();
$.ajax({
type: 'post',
url: ajaxurl,
data: {
action:'composer_ajax_forgot_form',
user_login:user_login
},
beforeSend: function(){
self.addClass('btn-loading');
},
complete: function(){
afterContentLoad();
},
}).done(function(data){
self.removeClass('btn-loading');
var data=$.parseJSON(data),
error=data.error,
notice=data.notice;
if(1==error){
var forgot_login=data.forgot_login;
$form.find('.user-login-notice').text(notice);
}else{
var success=data.success,
redirect=data.redirect;
$form.find('.success').text(success).delay(400).fadeOut(400);
}}).always(function(){
});
};
$('.forgot-form').on('click', '.submit-forgot-form', function(e){
e.preventDefault();
e.stopPropagation();
var self=$(this);
forgotForm(self);
});
var resetForm=function(self){
var ajaxurl=pix_composer.ajaxurl,
$form=self.parents('.reset-form'),
login=self.data('login'),
password=$form.find('.password').val(),
key=$form.data('key');
$.ajax({
type: 'post',
url: ajaxurl,
data: {
action:'composer_ajax_reset_form',
login:login,
password:password,
key:key
},
beforeSend: function(){
self.addClass('btn-loading');
},
complete: function(){
afterContentLoad();
},
}).done(function(data){
self.removeClass('btn-loading');
var data=$.parseJSON(data),
error=data.error,
notice=data.notice;
if(1==error){
var forgot_login=data.forgot_login;
$form.find('.user-login-notice').text(notice);
}else{
var redirect=data.redirect;
$(location).attr('href',redirect);
$form.parent().next('.login-form-con').find('.reset-notice').text(notice);
}}).always(function(){
});
};
$('.reset-form').on('click', '.submit-reset-form', function(e){
e.preventDefault();
e.stopPropagation();
var self=$(this);
resetForm(self);
});
var updateProfile=function(self){
var ajaxurl=pix_composer.ajaxurl,
$form=self.parents('.update-form'),
firstName=$form.find('.first_name').val(),
lastName=$form.find('.last_name').val(),
email=$form.find('.email').val(),
website=$form.find('.website').val(),
oldPassword=$form.find('.old_password').val(),
newPassword=$form.find('.new_password').val();
$.ajax({
type: 'post',
url: ajaxurl,
data: {
action:'composer_ajax_update_form',
first_name:firstName,
last_name:lastName,
email:email,
website:website,
old_password:oldPassword,
new_password:newPassword,
},
beforeSend: function(){
self.addClass('btn-loading');
},
complete: function(){
afterContentLoad();
},
}).done(function(data){
console.log(data);
self.removeClass('btn-loading');
var data=$.parseJSON(data),
error=data.error;
if(true==error){
var username_notice=data.username_notice,
password_notice=data.password_notice;
$form.find('.username-notice').text(username_notice);
$form.find('.password-notice').text(password_notice);
}else{
var success=data.succcess_notice,
redirect=data.redirect;
$form.find('.success').text(success);
}}).always(function(){
});
};
$('.my-account-con').on('click', '.submit-update-form', function(e){
e.preventDefault();
e.stopPropagation();
var self=$(this);
updateProfile(self);
});
var registerForm=function(self){
var ajaxurl=pix_composer.ajaxurl,
$form=self.parents('.register-form'),
username=$form.find('.username').val(),
email=$form.find('.email').val();
$.ajax({
type: 'post',
url: ajaxurl,
data: {
action:'composer_ajax_register_form',
username:username,
email:email
},
beforeSend: function(){
self.addClass('btn-loading');
},
complete: function(){
afterContentLoad();
},
}).done(function(data){
self.removeClass('btn-loading');
var data=$.parseJSON(data),
error=data.error;
if(1==error){
var username_notice=data.username_notice,
email_notice=data.email_notice,
general_notice=data.general_notice;
$form.find('.general-notice').addClass('error').removeClass('success').text(general_notice);
$form.find('.username-notice').text(username_notice);
$form.find('.email-notice').text(email_notice);
}else{
var success=data.succcess_notice,
redirect=data.redirect;
$form.find('.general-notice').addClass('success').removeClass('error').text(success).delay(400).fadeOut(400);
$(location).attr('href',redirect);
}}).always(function(){
});
};
$('.register-form').on('click', '.submit-register-form', function(e){
e.preventDefault();
e.stopPropagation();
var self=$(this);
registerForm(self);
});
$('.login-form').on('click', '.forgot-password', function(e){
e.preventDefault();
e.stopPropagation();
var self=$(this);
self.parents('.login-form-con').fadeOut(400);
self.parents('.login-form-con').next('.forgot-password-con').fadeIn(400);
});
$('.login-form').on('click', '.change-password', function(e){
e.preventDefault();
e.stopPropagation();
var self=$(this);
self.parents('.login-form-con').fadeOut(400);
self.parents('.login-form-con').next().next('.change-password-con').fadeIn(400);
});
$('.login-form').on('click', '.form-checkbox label', function(e){
e.preventDefault();
e.stopPropagation();
var self=$(this);
self.next('.remember-me').trigger('click');
});
$('.login-form').on('click', '.remember-me', function(e){
e.preventDefault();
e.stopPropagation();
var self=$(this),
$form=self.parents('.login-form'),
$checkbox=self.parent().find('.remember_me'),
val=$checkbox.prop('checked');
if(false==val){
$checkbox.prop('checked',true);
}else{
$checkbox.prop('checked',false);
}
self.toggleClass('active');
});
$('.show-login-form').on('click', function(e){
e.preventDefault();
e.stopPropagation();
var self=$(this),
$forgotPasswordCon=self.parents('.forgot-password-con'),
$changePasswordCon=self.parents('.change-password-con');
$forgotPasswordCon.fadeOut(0);
$changePasswordCon.fadeOut(0);
$('.login-form-con').fadeIn(0);
});
$('.main-nav .menu-item-has-children .pix-dropdown-arrow').on('click',function(e){
e.preventDefault();
$(this).next('ul').stop().slideToggle();
});
$(window).resize(function(event){
var responsive_viewport=$(window).width(),
$sideHeader=$('.left-main-menu'),$container=$('.portfolio-contents'),
$portfolioInnerText=$container.find('.portfolio-inner-text');
if($portfolioInnerText.length > 0){
$portfolioInnerText.css('height', $container.find('.element').first().height());
};
var $affix=$('.single-portfolio-affix'),
$singlePortAffixWrap=$('.single-portfolio-affix-wrap'),
$footer=$('#footer');
if($affix.length > 0){
if(responsive_viewport >=991){
$('.single-portfolio-affix-container').height($('.single-portfolio-item').height() - 50);
$singlePortAffixWrap.waypoint('destroy');
$footer.waypoint('destroy');
$singlePortAffixWrap.waypoint({
handler: function(direction){
$('.single-portfolio-affix').toggleClass('sticky-top');
}});
$footer.waypoint({
offset: $('.single-portfolio-affix').height() + 180,
handler: function(direction){
if(direction==='down'){
$('.single-portfolio-affix').removeClass('sticky-top');
$singlePortAffixWrap.addClass('sticky-bottom');
}else if(direction==='up'){
$('.single-portfolio-affix').addClass('sticky-top');
$singlePortAffixWrap.removeClass('sticky-bottom');
}}
});
}else{
$('.single-portfolio-affix-container').height('auto');
$singlePortAffixWrap.waypoint('destroy');
$footer.waypoint('destroy');
}}
if(responsive_viewport >=991){
$mainCon.css('margin-bottom',$('.footer-fixed').height()+'px');
}else{
$mainCon.css('margin-bottom','0px');
}
$('.pix-chart').each(function(index, el){
var $self=$(this),
canvas=$self.find('canvas'),
size=canvas.width(),
$border=$self.find('.border-bg'),
$bg=$self.find('.bg');
$self.css({
'line-height': (size) +'px',
'height': (size) +'px'
});
});
if(responsive_viewport <=991){
$mMenu.addClass('mobile-nav');
}else{
$mMenu.removeClass('mobile-nav');
}});
},
portfolioImageOnScroll=function($portElem){
var portTotal=$portElem.length,
showed=0;
$portElem.each(function(index){
var $singleElement=$(this);
var animateTrans=$singleElement.data('trans') ? $singleElement.data('trans'):'fadeIn';
var animateDelay=$singleElement.data('delay') ? $singleElement.data('delay'):200;
var animateDuration=$singleElement.data('duration') ? $singleElement.data('duration'):'';
if(animateDelay!=''){
}
if(animateDuration!=''){
$singleElement.css('animation-duration', animateDuration);
}
$singleElement.waypoint(function(){
if($singleElement.hasClass('animated ' + animateTrans)) return;
var delay=index, parentIndex=$(this).closest('.load-element').index();
delay -=showed;
setTimeout(function(){
$singleElement.css('opacity','1').addClass('animated '+ animateTrans);
showed=parentIndex;
}, delay * parseInt(animateDelay));
},
{
offset: '100%',
triggerOnce: true
});
});
},
afterPageLoad=function(){
var $shopContainer=$('.shop-contents');
$shopContainer.isotope({
itemSelector:'.shop-item',
percentPosition: true,
masonry:{
columnWidth:'.shop-grid-sizer'
}});
var $galleryContainer=$('.gallery-contents');
$galleryContainer.isotope({
itemSelector:'.gallery-item',
percentPosition: true,
masonry:{
columnWidth:'.gallery-grid-sizer'
}});
var $portfolioContainer=$('.portfolio-contents');
$portfolioContainer.isotope({
itemSelector:'.pix-portfolio-item',
percentPosition: true,
masonry:{
columnWidth:'.portfolio-grid-sizer'
}});
var $gridBlogContainer=$('.grid-blog-contents');
$gridBlogContainer.isotope({
itemSelector:'.grid-blog-item',
percentPosition: true,
masonry:{
columnWidth:'.grid-blog-grid-sizer'
}});
var $loadMoreBtn=$('.block-load-more-btn');
if($loadMoreBtn.length){
if($loadMoreBtn.hasClass('amz-autoload')){
$(window).on('scroll', function(){
if($(window).scrollTop() >=$('.load-container').offset().top + $('.load-container').outerHeight() - window.innerHeight){
if($loadMoreBtn.hasClass('done-loading')||$loadMoreBtn.hasClass('disabled')){
return;
}
$loadMoreBtn.find('a').trigger('click');
}});
}
$('.block-load-more-btn').on('click', 'a', function(e){
e.preventDefault();
blockLoadMore($(this));
});
}
var $elem='';
$('[data-hover-animate]').addClass('loaded');
$(".hover-box").hover(function(){
var $elems=$(this).find('[data-hover-animate]');
$elems.each(function(){
var animateTransIn=$(this).data('trans-in') ? $(this).data('trans-in'):'fadeIn';
var animateTransOut=$(this).data('trans-out') ? $(this).data('trans-out'):'fadeOut';
var animateDelay=$(this).data('delay-in') ? $(this).data('delay-in'):'';
var animateDuration=$(this).data('duration-in') ? $(this).data('duration-in'):'';
if(animateDelay!=''){
$(this).css('animation-delay', animateDelay);
}
if(animateDuration!=''){
$(this).css('animation-duration', animateDuration);
}
$(this).removeClass(animateTransOut).addClass(animateTransIn);
});
},
function(){
var $elems=$(this).find('[data-hover-animate]');
$elems.each(function(){
var animateTransIn=$(this).data('trans-in') ? $(this).data('trans-in'):'fadeIn';
var animateTransOut=$(this).data('trans-out') ? $(this).data('trans-out'):'fadeOut';
var animateDelay=$(this).data('delay-out') ? $(this).data('delay-out'):'';
var animateDuration=$(this).data('duration-out') ? $(this).data('duration-out'):'';
if(animateDelay!=''){
$(this).css('animation-delay', animateDelay);
}
if(animateDuration!=''){
$(this).css('animation-duration', animateDuration);
}
$(this).removeClass(animateTransIn).addClass(animateTransOut);
});
$elems='';
}
);
$('.move-label').on('focus', function (){
$(this).parents('p').find('label').addClass('is_focus');
});
$('.move-label').on('blur', function (){
if(! $(this).val()){
$(this).parents('p').find('label').removeClass('is_focus');
}});
var $wooCartDropdown=$('.woo-cart-dropdown'),
$cartContent=$wooCartDropdown.find('.woo-cart-content'),
$cartLoader=$wooCartDropdown.find('.spinner');
$wooCartDropdown.on('click', '.remove', AjaxifyRemoveIteminCart);
$(document.body).on('added_to_cart', function(){
$.ajax({
url: woocommerce_params.ajax_url,
type: 'post',
data: {
'action': 'composer_update_mini_cart'
},
beforeSend: function(){
$cartLoader.show();
},
}).done(function(data){
$cartContent.html(data);
}).always(function(){
$cartLoader.hide();
});
});
$('.parallax').parallax('50%', -0.3, true);
if(responsive_viewport >=991){
$mainCon.css('margin-bottom',$('.footer-fixed').height()+'px');
}else{
$mainCon.css('margin-bottom','0px');
}
var s=skrollr.init({
easing: {
quintic: function(p){
return 1*(p*p*p*p*p) - 5*(p*p*p*p) + 10*(p*p*p) - 10*(p*p) + 5*p;
}},forceHeight: false
});
if(s.isMobile()){
s.destroy();
}
var $searchHeader=$('.search-btn'),
$search=$searchHeader.find('.topSearchForm');
if($search.length > 0){
$searchHeader.off().on('click', function(e){
var self=$(this);
self.toggleClass('color');
$search.toggleClass('show');
setTimeout(function(){ $search.find('input').focus(); }, 300);
e.preventDefault();
e.stopPropagation();
});
$search.off().on('click', function(e){
e.stopPropagation();
});
$(document).on('click', function(e){
$search.removeClass('show');
$searchHeader.removeClass('color');
});
}
$('#dot-nav').css({marginTop:-($('#dot-nav').height()/2)});
var changeHashInURL=($('body').hasClass('pix-ajaxify')) ? false:true;
$('#dot-nav').onePageNav({
currentClass: 'current',
changeHash: changeHashInURL
});
$('.main-nav').onePageNav({
currentClass: 'current-menu-item',
changeHash: changeHashInURL,
filter: ':not(.external)',
begin: function(){
$('body').append('
');
},
end: function(){
$('#device-dummy').remove();
}});
$('.popup-video').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: true
});
woo_drop_down();
var $simplemenu=$('#dl-menu');
var $headerCon=$('.header-con.pix-sticky-header');
if($headerCon.length > 0){
$headerCon.waypoint('sticky', {
offset: -($('.header-wrap').height()+30)
});
}
var $affix=$('.single-portfolio-affix'),
$singlePortAffixWrap=$('.single-portfolio-affix-wrap'),
$footer=$('#footer');
if(responsive_viewport >=991){
if($affix.length > 0){
$('.single-portfolio-affix-container').height($('.single-portfolio-item').height() - 50);
$singlePortAffixWrap.waypoint('destroy');
$footer.waypoint('destroy');
$singlePortAffixWrap.waypoint({
handler: function(direction){
$('.single-portfolio-affix').toggleClass('sticky-top');
}});
$footer.waypoint({
offset: $('.single-portfolio-affix').height() + 180,
handler: function(direction){
if(direction==='down'){
$('.single-portfolio-affix').removeClass('sticky-top');
$singlePortAffixWrap.addClass('sticky-bottom');
}else if(direction==='up'){
$('.single-portfolio-affix').addClass('sticky-top');
$singlePortAffixWrap.removeClass('sticky-bottom');
}}
});
}}else{
if($affix.length > 0){
$('.single-portfolio-affix-container').height('auto');
$singlePortAffixWrap.waypoint('destroy');
$footer.waypoint('destroy');
}}
var $elem=$('.pix-animate-cre');
$elem.each(function(){
var $singleElement=$(this);
var animateTrans=$singleElement.data('trans') ? $singleElement.data('trans'):'fadeIn';
var animateDelay=$singleElement.data('delay') ? $singleElement.data('delay'):'';
var animateDuration=$singleElement.data('duration') ? $singleElement.data('duration'):'';
if(animateDelay!=''){
$singleElement.css('animation-delay', animateDelay);
}
if(animateDuration!=''){
$singleElement.css('animation-duration', animateDuration);
}
if($singleElement.parent('.portfolio-container')){
$singleElement.waypoint(function(){
if($singleElement.hasClass('animated ' + animateTrans)) return;
$singleElement.css('opacity','1').addClass('animated '+ animateTrans);
},
{
offset: '100%',
triggerOnce: true
});
}else{
$singleElement.waypoint(function(){
if($singleElement.hasClass('animated ' + animateTrans)) return;
$singleElement.css('opacity','1').addClass('animated '+ animateTrans);
},
{
offset: '90%',
triggerOnce: true
});
}});
var $portElem=$('.pix-animate-portfolio');
portfolioImageOnScroll($portElem);
if(! $('body').hasClass('compose-mode')){
$(".composer-primary-slider").each(function(index, el){
var $self=$(this);
$self.owlCarousel({
navText: ['',''],
items: 1,
loop: true,
nav:(typeof($(this).data('nav'))=='undefined') ? false:$(this).data('nav'),
dots:(typeof($(this).data('dots'))=='undefined') ? true:$(this).data('dots'),
rtl:(pix_composer.rtl==='true') ? true:false,
onInitialized: function(){
$self.find('.slide-title, .slide-content, .pix_button').removeClass('animated fadeInUp');
$self.find('.active .slide-title, .active .slide-content, .active .pix_button').addClass('animated fadeInUp');
var header=$self.find('.active .slider-content').data('header');
if(header=='white'){
$('.header-wrap').addClass('dark');
$('.pageTopCon').addClass('top-sec-dark');
}else if(header=='black'){
$('.header-wrap').removeClass('dark');
$('.pageTopCon').removeClass('top-sec-dark');
}},
onTranslated: function(){
$self.find('.slide-title, .slide-content, .pix_button').removeClass('animated fadeInUp');
$self.find('.active .slide-title, .active .slide-content, .active .pix_button').addClass('animated fadeInUp');
var header=$self.find('.active .slider-content').data('header');
if(header=='white'){
$('.header-wrap').addClass('dark');
$('.pageTopCon').addClass('top-sec-dark');
}else if(header=='black'){
$('.header-wrap').removeClass('dark');
$('.pageTopCon').removeClass('top-sec-dark');
}}
});
});
$(".owl-carousel").each(function(index, el){
var elem={};
elem.Items=(typeof($(this).data('items'))=='undefined') ? 3:$(this).data('items'),
elem.Margin=(typeof($(this).data('margin'))=='undefined') ? 30:$(this).data('margin'),
elem.Loop=(typeof($(this).data('loop'))=='undefined') ? true:$(this).data('loop'),
elem.Center=(typeof($(this).data('center'))=='undefined') ? false:$(this).data('center'),
elem.MouseDrag=(typeof($(this).data('mouse-drag'))=='undefined') ? true:$(this).data('mouse-drag'),
elem.TouchDrag=(typeof($(this).data('touch-drag'))=='undefined') ? true:$(this).data('touch-drag'),
elem.StagePadding=(typeof($(this).data('stage-padding'))=='undefined') ? 0:$(this).data('stage-padding'),
elem.StartPosition=(typeof($(this).data('start-position'))=='undefined') ? 3:$(this).data('start-position'),
elem.Nav=(typeof($(this).data('nav'))=='undefined') ? false:$(this).data('nav'),
elem.Dots=(typeof($(this).data('dots'))=='undefined') ? true:$(this).data('dots'),
elem.Autoplay=(typeof($(this).data('autoplay'))=='undefined') ? false:$(this).data('autoplay'),
elem.AutoplayTimeout=(typeof($(this).data('autoplay-timeout'))=='undefined') ? 5000:$(this).data('autoplay-timeout'),
elem.AutoplayHoverPause=(typeof($(this).data('autoplay-hover-pause'))=='undefined') ? true:$(this).data('autoplay-hover-pause'),
elem.AnimateOut=(typeof($(this).data('animate-out'))=='undefined') ? false:$(this).data('animate-out'),
elem.AnimateIn=(typeof($(this).data('animate-in'))=='undefined') ? false:$(this).data('animate-in');
if(elem.Items >=2){
elem.TabItems=2;
}else{
elem.TabItems=1;
}
$(this).owlCarousel({
navText: ['',''],
items: elem.Items,
margin: elem.Margin,
loop: elem.Loop,
center: elem.Center,
mouseDrag: elem.MouseDrag,
touchDrag: elem.TouchDrag,
stagePadding: elem.StagePadding,
startPosition: elem.StartPosition,
nav: elem.Nav,
dots: elem.Dots,
rtl:(pix_composer.rtl==='true') ? true:false,
autoplay: elem.Autoplay,
autoplayTimeout: elem.AutoplayTimeout,
autoplayHoverPause: elem.AutoplayHoverPause,
responsive: {0:{'items':1},768:{'items':elem.TabItems},991:{'items': elem.Items },1199:{'items': elem.Items }},
animateOut: elem.AnimateOut,
animateIn: elem.AnimateIn,
onChanged: function(){
if(elem.Items > 1&&elem.AnimateIn){
var $item=$(this.$element[0]).find('.owl-item'),
$curItem=$(this.$element[0]).find('.owl-item.active'),
$prevItem=$curItem.first().prev(),
$nextItem=$curItem.last().next();
$(this.$element[0]).find('.owl-item').removeClass('animated '+ elem.AnimateIn);
$prevItem.addClass('animated '+ elem.AnimateIn);
$nextItem.addClass('animated '+ elem.AnimateIn);
}},
});
});
}
var $container=$('.portfolio-contents'),
$portfolioInnerText=$container.find('.portfolio-inner-text');
if($portfolioInnerText.length > 0){
$portfolioInnerText.css('height', $container.find('.element').first().height());
}
$container.isotope({
itemSelector:'.pix-portfolio-item',
percentPosition: true,
masonry:{
columnWidth:'.portfolio-grid-sizer'
}});
var $masonryContainer=$('.blog-isotope'), $filterCon=$("#filters");
$masonryContainer.isotope({
itemSelector:'.element',
masonry:{
columnWidth:1
}});
if($filterCon.hasClass('dropdown')){
$filterCon.find('.selected').parent('li').css('display', 'none');
}
$('.top-active').on('click', function(e){
e.preventDefault();
$(this).next('#filters').slideToggle('400');
});
$('#filters a').click(function(){
var $this=$(this),
$filter=$this.parents('#filters');
$portElem.waypoint('destroy');
if($filter.hasClass('dropdown')){
$filter.slideUp(400, function(){
$this.parent('li').css('display', 'none');
$this.parent('li').siblings().css('display', 'block');
});
$filter.prev('.top-active').find('.txt').text($this.text());
}
if($this.hasClass('selected')){
return false;
}
var $optionSet=$this.parents('.option-set');
$optionSet.find('.selected').removeClass('selected');
$this.addClass('selected');
var selector=$(this).attr('data-filter');
$portElem=$(selector).find('.pix-animate-portfolio');
$container.isotope({ filter: selector });
$container.isotope('on', 'layoutComplete', function(){
portfolioImageOnScroll($portElem);
});
$masonryContainer.isotope({ filter: selector });
$masonryContainer.isotope('on', 'layoutComplete', function(){
portfolioImageOnScroll($portElem);
});
return false;
});
};
$(window).load(function(){
afterPageLoad();
if($('body').hasClass('pix-preload-enabled')){
var $preLoaderCon=$('#preloader-con');
$preLoaderCon.fadeOut(function(){
var trans=$main.data('preloadtrans');
$main.removeClass().addClass('animated ' + trans);
$('body').delay(750).removeClass('pix-preloader-enabled');
});
$(document).on("click", 'a:not(.noajax, .woocommerce a, .btn, .button, .popup-gallery, .popup-video, [href$=".png"], [href$=".jpg"], [href$=".jpeg"], [href$=".svg"], [href$=".mp4"], [href$=".webm"], [href$=".ogg"], [href$=".mp3"], [href^="#"], [href^="mailto:"], [href=""], [href*="wp-login"], [href*="wp-admin"], .dot-nav-noajax, .pix-dropdown-arrow)', function(e){
if(( e.shiftKey||e.ctrlKey||e.metaKey||'_blank'==$.trim($(this).attr('target')))){
return;
}
$('body').addClass('pix-preloader-enabled');
$preLoaderCon.fadeIn();
});
}
$('.tool-tip').tooltip();
$('.mobile-menu-nav li.menu-item-has-children').on('click', '.pix-dropdown-arrow, a[href="#"], a[href=""]', function (e){
e.preventDefault();
e.stopPropagation();
var $li=$(this).parent('li');
$li.find('.sub-menu').first().stop().slideToggle();
if($(this).hasClass('pix-dropdown-arrow')){
$(this).toggleClass('pix-bottom-arrow');
}else{
$li.find('.pix-dropdown-arrow').toggleClass('pix-bottom-arrow');
}});
var changeHashInURL=($('body').hasClass('pix-ajaxify')) ? false:true;
$('.mobile-menu-inner').onePageNav({
currentClass: 'current-menu-item',
changeHash: changeHashInURL,
filter: ':not(.external)',
begin: function(){
if($('.mobile-menu-nav').hasClass('mobile-nav')){
$('.pix-menu-trigger').trigger('click');
}},
});
var $loadMoreBtn=$('.load-more-btn');
if($loadMoreBtn.length){
if($loadMoreBtn.hasClass('amz-autoload')){
$(window).on('scroll', function(){
if($(window).scrollTop() >=$('.load-container').offset().top + $('.load-container').outerHeight() - window.innerHeight){
if($loadMoreBtn.hasClass('done-loading')||$loadMoreBtn.hasClass('disabled')){
return;
}
$loadMoreBtn.find('a').trigger('click');
}});
}
$('.load-more-btn').on('click', 'a', function(e){
e.preventDefault();
loadMore($(this));
});
}});
$("#back-top").hide();
var lastScrollTop=0;
$(window).scroll(function(){
var scrollTopVal=$(this).scrollTop();
if($(this).width() >=991&&$(this).scrollTop() > 100){
$("#back-top").fadeIn();
}else{
$("#back-top").fadeOut();
}
var $headerConScrollUp=$('.header-con.pix-sticky-header.pix-sticky-header-scroll-up');
if($headerConScrollUp.length > 0){
if(scrollTopVal > lastScrollTop){
$headerConScrollUp.addClass('hide-sticky-header');
}else{
$headerConScrollUp.removeClass('hide-sticky-header');
}
lastScrollTop=scrollTopVal;
}});
$("#back-top a").click(function(){
$("body,html").animate({
scrollTop:0},800);
return false;
});
var $headerWidgetCon=$("#headerWidgetCon"),
$toggleBtn=$headerWidgetCon.find('.toggleBtn'),
headerWidgetStatus=0;
if($headerWidgetCon.length > 0){
$toggleBtn.on('click', function(e){
e.preventDefault();
if(headerWidgetStatus==0){
$headerWidgetCon.animate({bottom: -$headerWidgetCon.outerHeight()});
$toggleBtn.addClass('close').removeClass('open');
headerWidgetStatus=1;
}else{
$headerWidgetCon.animate({bottom: -2});
$toggleBtn.addClass('open').removeClass('close');
headerWidgetStatus=0;
}});
}
init();
$('#pix-header-search-form').on('submit',
function(e){
e.preventDefault();
var host=pix_composer.rootUrl + "?s=", searchUrl;
searchUrl=host + $(this).find('.pix-search').val();
if($(window).scrollTop() > 10){
$("body,html").animate({ scrollTop:0 },300,function(){
history.pushState({}, '', searchUrl);
loadPage(searchUrl);
});
}else{
history.pushState({}, '', searchUrl);
loadPage(searchUrl);
}}
);
var ajaxLoad=function(html){
document.title=html
.match(/
(.*?)<\/title>/)[1]
.trim()
.decodeHTML();
},
documentHtml=function(html){
var result=String(html).replace(/<\!DOCTYPE[^>]*>/i, '')
.replace(/<(html|head|body|title|script|style)([\s\>])/gi,'/gi,'
');
return result;
},
loadPage=function(href){
$.ajax({
url: href,
dataType: "html",
beforeSend: function(){
$mainCon.height(($(window).height()) + 200);
var trans=$main.data('ajaxtransout');
$main.removeClass().addClass('animated ' + trans);
if($("#pix-loadingbar").length > 0){
$('#pix-loadingbar').delay(750).show(function(){
$main.html('');
});
}}
}).done(function(data){
var $data=$(documentHtml(data)),
$dataHead=$data.find('#document-head:first'),
$dataBody=$data.find('#document-body:first #wrapper'),
bodyClasses=$data.find('#document-body:first').attr('class'),
htmlFiltered=$('#wrapper', data).html(),
rootUrl=pix_composer.rootUrl,
relativeUrl=href.replace(rootUrl,''),
url=href,
$menu_list, $scripts, $embeddedStyle, $wpadminbar;
$menu_list=$data.find('.main-nav');
$('body').attr('class', bodyClasses);
$embeddedStyle=$dataHead.find('#document-style');
var $pixAllStyle=$('head').find('#pix-all-styles');
if($pixAllStyle.length){
$pixAllStyle.html('');
}else{
$('head').append('');
$pixAllStyle=$('head').find('#pix-all-styles');
}
var newStyles='';
$embeddedStyle.each(function(){
var media=($(this).attr('media')) ? $(this).attr('media'):'screen';
if(media=='screen'){
newStyles +=$(this).html();
}});
$pixAllStyle.html(newStyles);
$scripts=$dataBody.find('#document-script');
if($scripts.length) $scripts.detach();
if(!htmlFiltered){
document.location.href=href;
return false;
}
$main.html(htmlFiltered).fadeIn();
$mainCon.height('auto');
ajaxLoad(data);
$('.main-nav').html($menu_list.html());
var $currwpadminbar=$('#wpadminbar');
if($currwpadminbar.length > 0){
$wpadminbar=$data.find('#wpadminbar');
if($wpadminbar.length > 0){
$('#wpadminbar').html($wpadminbar.html());
}else{
$currwpadminbar.remove();
}}
$scripts.each(function(){
var scriptText=$(this).html();
if(''!=scriptText){
var scriptNode=document.createElement('script');
scriptNode.appendChild(document.createTextNode(scriptText));
contentNode.appendChild(scriptNode);
}else{
$.getScript($(this).attr('src'));
}});
init();
$(window).trigger('load');
if(typeof window['vc_js']=='function'){
window.vc_js();
}
if($("#pix-loadingbar").length > 0){
$('#pix-loadingbar').hide(function(){
var trans=$main.data('ajaxtransin');
$main.removeClass().addClass('animated ' + trans);
});
}
if(typeof window.pageTracker!=='undefined') window.pageTracker._trackPageview(relativeUrl);
if(typeof window.reinvigorate!=='undefined'&&typeof window.reinvigorate.ajax_track!=='undefined')
reinvigorate.ajax_track(url);
}).error(function(){
document.location.href=href;
return false;
});
};
var popped=('state' in window.history&&window.history.state!==null), initialURL=location.href;
if($('body').hasClass('pix-ajaxify')){
$(window).on("popstate", function(e){
var initialPop = !popped&&location.href==initialURL
popped=true
if(initialPop) return;
loadPage(location.href);
});
$(document).on("click", 'a:not(.noajax, [href^="#"], [href^=""], [href=""], [href*="wp-login"], [href*="wp-admin"], .dot-nav-noajax, .pix-dropdown-arrow)', function(e){
var self=$(this),
href=self.attr("href");
if(e.which==2||e.metaKey) return true;
if($('.mobile-menu-nav').hasClass('mobile-nav')){
$('.pix-menu-trigger').trigger('click');
}
if(href.indexOf(document.domain) > -1||href.indexOf(':')===-1){
if($(window).scrollTop() > 10){
$("body,html").animate({ scrollTop:0 },300,function(){
history.pushState({}, '', href);
loadPage(href);
});
}else{
history.pushState({}, '', href);
loadPage(href);
}
return false;
}});
}
jQuery(document).ready(function($){
if(! $('body').hasClass('seperate-mobile-nav')){
$('.main-nav').each(function(){
var navHtml=$(this).html();
$('.mobile-menu-inner').append(navHtml);
});
}
var scrollToAnchor=function(id, event){
var elem=$("a[name='"+ id +"']");
if(typeof(elem.offset())==="undefined"){
elem=$("#"+id);
}
if(typeof(elem.offset())!=="undefined"){
event.preventDefault();
var scroll_to=elem.offset().top;
$('html, body').animate({
scrollTop: scroll_to
}, 600, 'swing', function(){ if(scroll_to > 46) window.location.hash=id; });
}};
$("a.scroll-to, .scroll-to a").click(function(event){
var href=$(this).attr("href");
if(href.match("#")&&href!=='#'&&$(this).parents(".tabs").length!==1){
var parts=href.split('#'),
url=parts[0],
target=parts[1];
if((!url||url==window.location.href.split('#')[0])&&target)
scrollToAnchor(target, event);
}});
$('.portfolio-search').on('keypress', '.search-field', function(e){
var $self=$(this),
search=$self.val();
if(e.keyCode===13){
portfolioSearch($self, search);
}});
$('.portfolio-search').on('click', '.clear-search', function(e){
var $self=$(this),
search=$self.val();
portfolioSearch($self, '');
});
});
})(jQuery);
(function($){
var pixLikeMe=function (e){
e.preventDefault();
var self=$(this),
postID=self.data('id');
if(self.hasClass('liked')){
alert(pixLike.liked);
return;
};
self.off('click');
$.ajax({
type: 'post',
url: pixLike.ajaxurl,
beforeSend: function(){
self.addClass('like-loading');
},
data: {
action:'pix_like_me',
postid:postID,
},
}).done(function(response){
self.addClass('liked').find('.like-count').text(response);
}).always(function(){
self.removeClass('like-loading');
self.on('click',pixLikeMe);
});
};
$('.pix-like-me').on('click',pixLikeMe);
})(jQuery);
!function(d,l){"use strict";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),c=0;c