function iv_cancelZoom(){"use strict";function e(e){t.content=i+("blur"==e.type?i.match(r,"")?"":n+10:n+1)}var t,i,o=document,n=",maximum-scale=",r=/,*maximum\-scale\=\d*\.*\d*/;this.addEventListener&&o.querySelector&&(t=o.querySelector('meta[name="viewport"]'),i=t.content,this.addEventListener("focus",e,!0),this.addEventListener("blur",e,!1))}function ivan_recalc_sticky_height(){"use strict";var e=jQuery(".iv-layout.header").outerHeight(!1);jQuery(".header-sticky-wrapper").css("height",e+"px")}function ivan_fixed_header(){"use strict";if(jQuery(".header-fixed").length>0&&imagesLoaded(jQuery(".header-fixed").find(".logo"),function(){var e=jQuery(".header-fixed"),t=e.find(".logo img:visible").outerHeight();if(0==t)return setTimeout(function(){ivan_fixed_header()},500),void 0;var i=e.outerHeight(),o="";e.hasClass("light")&&(o="light"),e.hasClass("dark")&&(o="dark");var n=-t-150,r="";e.hasClass("display-after-fold")&&(r="display-after-fold",n=-jQuery.waypoints("viewportHeight")+(i-1)),e.waypoint("sticky",{wrapper:'
',handler:function(n){"up"==n?(jQuery(".smooth-opening-holder").length>0&&jQuery(".smooth-opening-holder").removeClass("stuck-holder"),e.find(".logo img").css({maxHeight:"inherit"}),e.addClass(o),e.addClass(r),1==e.hasClass("hide-container")&&e.find(".to-hide").css("display","block"),e.parent(".sticky-wrapper").outerHeight(i)):(jQuery(".smooth-opening-holder").length>0&&(jQuery(".smooth-opening-holder").removeClass("z-enabled"),jQuery(".smooth-opening-holder").addClass("stuck-holder")),e.removeClass(o),e.removeClass(r),e.css("opacity","0"),1==e.hasClass("hide-container")&&e.find(".to-hide").css("display","none"),t>0&&e.find(".logo img").css({maxHeight:.8*t+"px"}),e.animate({opacity:"1"},300)),ivan_fix_header_area_height()},offset:n})}),jQuery(".aside-header-wrapper .fixed-height").length>0){var e=jQuery(".aside-header-wrapper .fixed-height");e.waypoint("sticky",{wrapper:'
',stuckClass:"aside-stuck"})}}function ivan_live_search_init(){"use strict";jQuery(".live-search .trigger").click(function(e){e.preventDefault();var t=jQuery(this).siblings(".inner-wrapper");t.addClass("visible"),0==jQuery(this).parents(".header.simple-left-right").length?t.animate({opacity:1},400):t.css("opacity","1"),t.find("#s").focus()}),jQuery(document).mouseup(function(e){var t=jQuery(".inner-wrapper.visible");t.is(e.target)||0!==t.has(e.target).length||(0==jQuery(this).parents(".header.simple-left-right").length?t.animate({opacity:0},150,function(){t.hasClass("visible")&&t.removeClass("visible")}):(t.css("opacity","0"),t.hasClass("visible")&&t.removeClass("visible")))}),jQuery(".live-search .submit-form").click(function(e){e.preventDefault(),jQuery(this).parents("form").submit()})}function ivan_woo_cart_init(){"use strict";jQuery(window).width()>992&&jQuery(".woo-cart").hover(function(){var e=jQuery(this).find(".inner-wrapper");e.addClass("visible"),0==jQuery(this).parents(".header.simple-left-right").length?e.animate({opacity:1},400):e.css("opacity","1")},function(){var e=jQuery(this).find(".inner-wrapper");0==jQuery(this).parents(".header.simple-left-right").length?e.animate({opacity:0},150,function(){e.removeClass("visible")}):(e.css("opacity","0"),e.removeClass("visible"))})}function ivan_login_ajax_init(){"use strict";jQuery(".login-ajax .trigger").click(function(e){var t=jQuery(this).siblings(".inner-wrapper");t.addClass("visible"),0==jQuery(this).parents(".header.simple-left-right").length?t.animate({opacity:1},400):t.css("opacity","1"),t.find("#lwa_user_login").focus(),e.preventDefault()}),jQuery(document).mouseup(function(e){var t=jQuery(".inner-wrapper.visible");t.is(e.target)||0!==t.has(e.target).length||(0==jQuery(this).parents(".header.simple-left-right").length?t.animate({opacity:0},150,function(){t.hasClass("visible")&&t.removeClass("visible")}):(t.css("opacity","0"),t.hasClass("visible")&&t.removeClass("visible")))})}function ivan_responsive_menus_init(){"use strict";setTimeout(function(){jQuery(".mobile-menu-trigger").each(function(){var e=jQuery(this).attr("data-selector"),t=jQuery(this).attr("data-id"),i=!0;jQuery(e+" .menu").length<=0&&(i=!1),1==i?(e+=" .menu",jQuery("body").prepend('
'),jQuery("#"+t+" .iv-mobile-menu-inner .modules").append(jQuery(e).parents(".iv-layout").find(".social-icons, .custom-text").clone().removeClass("hidden-xs hidden-sm")),jQuery("#"+t+" .iv-mobile-menu-inner .menu-wrap").append(jQuery(e).clone().removeClass("mega_main_menu_ul").attr("id","")),jQuery("#"+t).find(".post_type_dropdown .mega_dropdown, .grid_dropdown .mega_dropdown, .widgets_dropdown .mega_dropdown").remove(),jQuery("#"+t).find(".iv-mobile-menu-holder").niceScroll({touchbehavior:!1,cursorcolor:"#aaa",cursorborder:"none",cursoropacitymax:.7,cursorwidth:4,background:"#000",autohidemode:!0}),jQuery("#"+t).find(".iv-mobile-menu-holder").getNiceScroll().hide(),jQuery("#"+t).find(".menu > .menu-item-has-children > .item_link").click(function(e){return 0!=jQuery(this).hasClass("opened")?!0:(e.preventDefault(),jQuery(this).siblings("ul").slideDown("slow",function(){jQuery("#"+t).find(".iv-mobile-menu-holder").getNiceScroll().resize()}),jQuery(this).addClass("opened"),void 0)})):(jQuery("body").prepend('
'),jQuery("#"+t+" .iv-mobile-menu-inner .modules").append(jQuery(e).find(".social-icons, .custom-text").clone().removeClass("hidden-xs hidden-sm"))),jQuery(this).click(function(e){e.preventDefault(),jQuery("#"+t).css("display","block"),jQuery("#"+t).find(".iv-mobile-menu-holder").getNiceScroll().resize()})}),jQuery(".iv-mobile-menu-close").click(function(e){e.preventDefault(),jQuery(this).parents(".iv-mobile-menu-wrapper").css("display","none")})},1e3)}function ivan_responsive_menus_select_init(){"use strict";jQuery(".responsive-menu-select").each(function(){var e=jQuery(this).attr("data-selector");jQuery(e).tinyNav({active:"dummy",header:" ",indent:"- ",place:jQuery(this).find(".receptor")})})}function ivan_megamenu_init(){"use strict";if((1==iv_device_md||1==iv_device_lg)&&0==jQuery("body").hasClass("ivan-m-l-aside")){var e=jQuery(".header .container"),t=e.width(),i=e.offset().left,o=e.css("padding-left").replace("px","");jQuery(".header .mega_main_menu:not(.direction-vertical), .top-header .mega_main_menu").each(function(){jQuery(this).find(".mega_main_menu_ul > .submenu_full_width > .mega_dropdown").each(function(){var e=jQuery(this).offset().left,n=jQuery(this);n.css("width",t+"px");var r=e-i-o;n.css("left","-"+Math.abs(r)+"px")})})}}function ivan_negative_height_init(){"use strict";if(1==jQuery(".iv-layout.header").hasClass("negative-height")){var e;jQuery(".iv-layout.header").hasClass("header-fixed")?(e=jQuery(".header-sticky-wrapper").outerHeight(!0),e+=ivan_header_marginTop):e=jQuery(".iv-layout.header.negative-height").outerHeight(!0),jQuery(".iv-layout.title-wrapper").length>0?(jQuery(".negative-push").css("margin-top","-"+e+"px"),jQuery(".iv-layout.header").css("display","block"),jQuery(".iv-layout.title-wrapper").length>0&&(0==jQuery(".iv-layout.header").hasClass("show-after-fold")||1==jQuery(".iv-layout.header").hasClass("keep-logo-before-fold"))&&(null==ivan_title_paddingTop&&(ivan_title_paddingTop=parseInt(jQuery(".iv-layout.title-wrapper").css("padding-top").replace("px",""))),jQuery(".iv-layout.title-wrapper").css("padding-top",ivan_title_paddingTop+parseInt(e)+"px")),0==jQuery(".smooth-opening-holder").hasClass("smooth-opened")&&jQuery(".smooth-opening-holder").addClass("smooth-opened")):(jQuery(".iv-layout.header").css("display","block"),0==jQuery(".smooth-opening-holder").hasClass("smooth-opened")&&jQuery(".smooth-opening-holder").addClass("smooth-opened only-fixed-header")),ivan_negative_header_calls++,1==ivan_negative_header_calls&&setTimeout(function(){ivan_negative_height_init()},2e3)}}function ivan_post_formats_init(){"use strict";var e=!0;jQuery(".ivan-mansory-blog").length>0&&(e=!1),jQuery(".post-gallery-carousel").length>0&&jQuery(".post-gallery-carousel").owlCarousel({theme:"style-outline-circle",singleItem:!0,autoHeight:!1,navigation:!0,navigationText:['',''],pagination:!1}),jQuery(".format-gallery, .format-image, .single-post .format-standard").each(function(){jQuery(this).find(".thumbnail a").magnificPopup({type:"image",gallery:{enabled:!0}})})}function ivan_post_wp_gallery_init(){"use strict";var e=document.querySelector(".gallery");if(null!=e){jQuery(".gallery").each(function(){jQuery(this).find(".gallery-item a").magnificPopup({type:"image",image:{verticalFit:!1},gallery:{enabled:!0}})});var t;imagesLoaded(e,function(){t=new Packery(e,{itemSelector:".gallery-item",gutter:0})})}jQuery(".prettyphoto").each(function(){jQuery(this).magnificPopup({type:"image",image:{verticalFit:!1},gallery:{enabled:!0}})}),jQuery(".tiled-gallery a").magnificPopup({type:"image",image:{verticalFit:!1},gallery:{enabled:!0}}),jQuery(".ivan-lightbox a, a.ivan-lightbox").each(function(){jQuery(this).magnificPopup({type:"image",image:{verticalFit:!1},gallery:{enabled:!0}})})}function ivan_back_to_top_init(){"use strict";var e=jQuery("#back-top"),t=jQuery(".post-nav-fixed");e.click(function(e){e.preventDefault(),jQuery("body, html").animate({scrollTop:0},jQuery(window).scrollTop()/3,"linear")});var i=jQuery.waypoints("viewportHeight"),o=.5*jQuery.waypoints("viewportHeight");jQuery(window).scroll(function(){var n=jQuery(this).scrollTop();e.length>0&&(n>i?(e.removeClass("off"),e.addClass("on")):(e.removeClass("on"),e.addClass("off"))),t.length>0&&(n>o?(t.removeClass("off"),t.addClass("on")):(t.removeClass("on"),t.addClass("off")))})}function ivan_smooth_links_init(){"use strict";var e=0;if(jQuery(".header-fixed").length>0&&(e=.57*jQuery(".header-fixed").outerHeight(!1)),window.location.hash){var e=0;jQuery(".header-fixed").length>0&&(e=jQuery(".header-fixed").outerHeight(!1));var t=jQuery(window.location.hash);t.length&&(t.offset().top<150&&(e=0),jQuery(document).scrollTop(t.offset().top-e))}jQuery("a[href*=#]:not([href=#]):not([href*=#tab]):not([href*=#comments])").click(function(){if(0==e&&(e=.57*jQuery(".header-fixed").outerHeight(!1)),location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")||location.hostname==this.hostname){var t=jQuery(this.hash);if(t=t.length?t:jQuery("[name="+this.hash.slice(1)+"]"),t.length)return t.offset().top<150&&(e=0),jQuery("html,body").animate({scrollTop:t.offset().top-e},600),!1}})}function ivan_init_mansory_style_blog(){"use strict";var e=document.querySelector(".ivan-mansory-blog");if(null!=e){var t;imagesLoaded(e,function(){t=new Packery(e,{itemSelector:".post-wrapper"}),setTimeout(function(){jQuery("body").hasClass("ivan-m-l-aside")&&jQuery(".ivan-mansory-blog").packery()},1500)})}}function ivan_fix_header_area_height(){"use strict";jQuery(".header").length>0&&jQuery(".calc-height-area").each(function(){jQuery(this).outerHeight(jQuery(".header-center-area").outerHeight())})}function ivan_update_mansory_style_blog(){"use strict";jQuery(".ivan-mansory-blog").packery(),jQuery(".ivan-mansory-blog").packery("reloadItems")}function ivan_vc_full_width_container(){"use strict";var e=jQuery(window).width();jQuery(".entry-content > .wpb_row").each(function(){var t=jQuery(this).width(),i=(e-t)/2+15;jQuery(this).css({marginLeft:"-"+i+"px",paddingLeft:i+"px",marginRight:"-"+i+"px",paddingRight:i+"px"})})}function ivan_theme_script_load(){"use strict";ivan_fix_header_area_height(),ivan_vc_full_width_container()}function ivan_theme_script_ready(){"use strict";jQuery(".entry-content > p:empty").remove(),ivan_smooth_links_init(),ivan_back_to_top_init(),jQuery(".iv-layout.header").hasClass("negative-height")&&(ivan_header_marginTop=parseInt(jQuery(".iv-layout.header.negative-height").css("marginTop").replace("px",""))),setTimeout(function(){ivan_negative_height_init()},1e3),ivan_live_search_init(),ivan_woo_cart_init(),ivan_login_ajax_init(),ivan_responsive_menus_init(),ivan_responsive_menus_select_init(),setTimeout(function(){ivan_megamenu_init()},1e3),ivan_post_formats_init(),ivan_init_mansory_style_blog(),ivan_post_wp_gallery_init(),ivan_fixed_header(),jQuery("input:text,select,textarea").cancelZoom()}function ivan_recalc_dimensions(){"use strict";ivan_negative_height_init(),ivan_recalc_sticky_height(),ivan_vc_full_width_container()}"function"!=typeof window.magnificPopup&&function(e){var t,i,o,n,r,s,a,l="Close",c="BeforeClose",u="AfterClose",d="BeforeAppend",h="MarkupParse",p="Open",f="Change",m="mfp",g="."+m,v="mfp-ready",y="mfp-removing",w="mfp-prevent-close",b=function(){},x=!!window.jQuery,_=e(window),S=function(e,i){t.ev.on(m+e+g,i)},k=function(t,i,o,n){var r=document.createElement("div");return r.className="mfp-"+t,o&&(r.innerHTML=o),n?i&&i.appendChild(r):(r=e(r),i&&r.appendTo(i)),r},E=function(i,o){t.ev.triggerHandler(m+i,o),t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,e.isArray(o)?o:[o]))},T=function(i){return i===a&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),a=i),t.currTemplate.closeBtn},z=function(){e.magnificPopup.instance||(t=new b,t.init(),e.magnificPopup.instance=t)},C=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};b.prototype={constructor:b,init:function(){var i=navigator.appVersion;t.isIE7=-1!==i.indexOf("MSIE 7."),t.isIE8=-1!==i.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(i),t.isIOS=/iphone|ipad|ipod/gi.test(i),t.supportsTransition=C(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),n=e(document),t.popupsCache={}},open:function(i){o||(o=e(document.body));var r;if(i.isObj===!1){t.items=i.items.toArray(),t.index=0;var a,l=i.items;for(r=0;l.length>r;r++)if(a=l[r],a.parsed&&(a=a.el[0]),a===i.el[0]){t.index=r;break}}else t.items=e.isArray(i.items)?i.items:[i.items],t.index=i.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],s="",t.ev=i.mainEl&&i.mainEl.length?i.mainEl.eq(0):n,i.key?(t.popupsCache[i.key]||(t.popupsCache[i.key]={}),t.currTemplate=t.popupsCache[i.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,i),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+g,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+g,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var c=e.magnificPopup.modules;for(r=0;c.length>r;r++){var u=c[r];u=u.charAt(0).toUpperCase()+u.slice(1),t["init"+u].call(t)}E("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(S(h,function(e,t,i,o){i.close_replaceWith=T(o.type)}),s+=" mfp-close-btn-in"):t.wrap.append(T())),t.st.alignTop&&(s+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:_.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:n.height(),position:"absolute"}),t.st.enableEscapeKey&&n.on("keyup"+g,function(e){27===e.keyCode&&t.close()}),_.on("resize"+g,function(){t.updateSize()}),t.st.closeOnContentClick||(s+=" mfp-auto-cursor"),s&&t.wrap.addClass(s);var d=t.wH=_.height(),f={};if(t.fixedContentPos&&t._hasScrollBar(d)){var m=t._getScrollbarSize();m&&(f.marginRight=m)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):f.overflow="hidden");var y=t.st.mainClass;return t.isIE7&&(y+=" mfp-ie7"),y&&t._addClassToMFP(y),t.updateItemHTML(),E("BuildControls"),e("html").css(f),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||o),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),n.on("focusin"+g,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(d),E(p),i},close:function(){t.isOpen&&(E(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(y),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){E(l);var i=y+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(i+=t.st.mainClass+" "),t._removeClassFromMFP(i),t.fixedContentPos){var o={marginRight:""};t.isIE7?e("body, html").css("overflow",""):o.overflow="",e("html").css(o)}n.off("keyup"+g+" focusin"+g),t.ev.off(g),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,E(u)},updateSize:function(e){if(t.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,o=window.innerHeight*i;t.wrap.css("height",o),t.wH=o}else t.wH=e||_.height();t.fixedContentPos||t.wrap.css("height",t.wH),E("Resize")},updateItemHTML:function(){var i=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),i.parsed||(i=t.parseEl(t.index));var o=i.type;if(E("BeforeChange",[t.currItem?t.currItem.type:"",o]),t.currItem=i,!t.currTemplate[o]){var n=t.st[o]?t.st[o].markup:!1;E("FirstMarkupParse",n),t.currTemplate[o]=n?e(n):!0}r&&r!==i.type&&t.container.removeClass("mfp-"+r+"-holder");var s=t["get"+o.charAt(0).toUpperCase()+o.slice(1)](i,t.currTemplate[o]);t.appendContent(s,o),i.preloaded=!0,E(f,i),r=i.type,t.container.prepend(t.contentContainer),E("AfterChange")},appendContent:function(e,i){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[i]===!0?t.content.find(".mfp-close").length||t.content.append(T()):t.content=e:t.content="",E(d),t.container.addClass("mfp-"+i+"-holder"),t.contentContainer.append(t.content)},parseEl:function(i){var o,n=t.items[i];if(n.tagName?n={el:e(n)}:(o=n.type,n={data:n,src:n.src}),n.el){for(var r=t.types,s=0;r.length>s;s++)if(n.el.hasClass("mfp-"+r[s])){o=r[s];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=o||t.st.type||"inline",n.index=i,n.parsed=!0,t.items[i]=n,E("ElementParse",n),t.items[i]},addGroup:function(e,i){var o=function(o){o.mfpEl=this,t._openClick(o,e,i)};i||(i={});var n="click.magnificPopup";i.mainEl=e,i.items?(i.isObj=!0,e.off(n).on(n,o)):(i.isObj=!1,i.delegate?e.off(n).on(n,i.delegate,o):(i.items=e,e.off(n).on(n,o)))},_openClick:function(i,o,n){var r=void 0!==n.midClick?n.midClick:e.magnificPopup.defaults.midClick;if(r||2!==i.which&&!i.ctrlKey&&!i.metaKey){var s=void 0!==n.disableOn?n.disableOn:e.magnificPopup.defaults.disableOn;if(s)if(e.isFunction(s)){if(!s.call(t))return!0}else if(s>_.width())return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation()),n.el=e(i.mfpEl),n.delegate&&(n.items=o.find(n.delegate)),t.open(n)}},updateStatus:function(e,o){if(t.preloader){i!==e&&t.container.removeClass("mfp-s-"+i),o||"loading"!==e||(o=t.st.tLoading);var n={status:e,text:o};E("UpdateStatus",n),e=n.status,o=n.text,t.preloader.html(o),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),i=e}},_checkIfClose:function(i){if(!e(i).hasClass(w)){var o=t.st.closeOnContentClick,n=t.st.closeOnBgClick;if(o&&n)return!0;if(!t.content||e(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||e.contains(t.content[0],i)){if(o)return!0}else if(n&&e.contains(document,i))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?n.height():document.body.scrollHeight)>(e||_.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(i){return i.target===t.wrap[0]||e.contains(t.wrap[0],i.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,i,o){var n;o.data&&(i=e.extend(o.data,i)),E(h,[t,i,o]),e.each(i,function(e,i){if(void 0===i||i===!1)return!0;if(n=e.split("_"),n.length>1){var o=t.find(g+"-"+n[0]);if(o.length>0){var r=n[1];"replaceWith"===r?o[0]!==i[0]&&o.replaceWith(i):"img"===r?o.is("img")?o.attr("src",i):o.replaceWith(''):o.attr(n[1],i)}}else t.find(g+"-"+e).html(i)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width:99px; height:99px; overflow:scroll; position:absolute; top:-9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:b.prototype,modules:[],open:function(t,i){return z(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=i||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(e.magnificPopup.defaults[t]=i.options),e.extend(this.proto,i.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close(Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(i){z();var o=e(this);if("string"==typeof i)if("open"===i){var n,r=x?o.data("magnificPopup"):o[0].magnificPopup,s=parseInt(arguments[1],10)||0;r.items?n=r.items[s]:(n=o,r.delegate&&(n=n.find(r.delegate)),n=n.eq(s)),t._openClick({mfpEl:n},o,r)}else t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1));else i=e.extend(!0,{},i),x?o.data("magnificPopup",i):o[0].magnificPopup=i,t.addGroup(o,i);return o};var L,j,I,M="inline",P=function(){I&&(j.after(I.addClass(L)).detach(),I=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),S(l+"."+M,function(){P()})},getInline:function(i,o){if(P(),i.src){var n=t.st.inline,r=e(i.src);if(r.length){var s=r[0].parentNode;s&&s.tagName&&(j||(L=n.hiddenClass,j=k(L),L="mfp-"+L),I=r.after(j).detach().removeClass(L)),t.updateStatus("ready")}else t.updateStatus("error",n.tNotFound),r=e("
");return i.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(o,{},i),o}}});var O,Q="ajax",R=function(){O&&o.removeClass(O)},B=function(){R(),t.req&&t.req.abort()};e.magnificPopup.registerModule(Q,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){t.types.push(Q),O=t.st.ajax.cursor,S(l+"."+Q,B),S("BeforeChange."+Q,B)},getAjax:function(i){O&&o.addClass(O),t.updateStatus("loading");var n=e.extend({url:i.src,success:function(o,n,r){var s={data:o,xhr:r};E("ParseAjax",s),t.appendContent(e(s.data),Q),i.finished=!0,R(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),E("AjaxContentAdded")},error:function(){R(),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(n),""}}});var H,D=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var o=t.st.image.titleSrc;if(o){if(e.isFunction(o))return o.call(t,i);if(i.el)return i.el.attr(o)||""}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"),S(p+i,function(){"image"===t.currItem.type&&e.cursor&&o.addClass(e.cursor)}),S(l+i,function(){e.cursor&&o.removeClass(e.cursor),_.off("resize"+g)}),S("Resize"+i,t.resizeImage),t.isLowIE&&S("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,H&&clearInterval(H),e.isCheckingImgSize=!1,E("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,o=e.img[0],n=function(r){H&&clearInterval(H),H=setInterval(function(){return o.naturalWidth>0?(t._onImageHasSize(e),void 0):(i>200&&clearInterval(H),i++,3===i?n(10):40===i?n(50):100===i&&n(500),void 0)},r)};n(1)},getImage:function(i,o){var n=0,r=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,E("ImageLoadComplete")):(n++,200>n?setTimeout(r,100):s()))},s=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",a.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},a=t.st.image,l=o.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",i.img=e(c).on("load.mfploader",r).on("error.mfploader",s),c.src=i.src,l.is("img")&&(i.img=i.img.clone()),c=i.img[0],c.naturalWidth>0?i.hasSize=!0:c.width||(i.hasSize=!1)}return t._parseMarkup(o,{title:D(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(H&&clearInterval(H),i.loadError?(o.addClass("mfp-loading"),t.updateStatus("error",a.tError.replace("%url%",i.src))):(o.removeClass("mfp-loading"),t.updateStatus("ready")),o):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,o.addClass("mfp-loading"),t.findImageSize(i)),o)}}});var A,N=function(){return void 0===A&&(A=void 0!==document.createElement("p").style.MozTransform),A};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,i=t.st.zoom,o=".zoom";if(i.enabled&&t.supportsTransition){var n,r,s=i.duration,a=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),o="all "+i.duration/1e3+"s "+i.easing,n={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return n["-webkit-"+r]=n["-moz-"+r]=n["-o-"+r]=n[r]=o,t.css(n),t},u=function(){t.content.css("visibility","visible")};S("BuildControls"+o,function(){if(t._allowZoom()){if(clearTimeout(n),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return u(),void 0;r=a(e),r.css(t._getOffset()),t.wrap.append(r),n=setTimeout(function(){r.css(t._getOffset(!0)),n=setTimeout(function(){u(),setTimeout(function(){r.remove(),e=r=null,E("ZoomAnimationEnded")},16)},s)},16)}}),S(c+o,function(){if(t._allowZoom()){if(clearTimeout(n),t.st.removalDelay=s,!e){if(e=t._getItemToZoom(),!e)return;r=a(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),S(l+o,function(){t._allowZoom()&&(u(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(i){var o;o=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var n=o.offset(),r=parseInt(o.css("padding-top"),10),s=parseInt(o.css("padding-bottom"),10);n.top-=e(window).scrollTop()-r;var a={width:o.width(),height:(x?o.innerHeight():o[0].offsetHeight)-s-r};return N()?a["-moz-transform"]=a.transform="translate("+n.left+"px,"+n.top+"px)":(a.left=n.left,a.top=n.top),a}}});var W="iframe",F="//about:blank",q=function(e){if(t.currTemplate[W]){var i=t.currTemplate[W].find("iframe");i.length&&(e||(i[0].src=F),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(W,{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(W),S("BeforeChange",function(e,t,i){t!==i&&(t===W?q():i===W&&q(!0))}),S(l+"."+W,function(){q()})},getIframe:function(i,o){var n=i.src,r=t.st.iframe;e.each(r.patterns,function(){return n.indexOf(this.index)>-1?(this.id&&(n="string"==typeof this.id?n.substr(n.lastIndexOf(this.id)+this.id.length,n.length):this.id.call(this,n)),n=this.src.replace("%id%",n),!1):void 0});var s={};return r.srcAction&&(s[r.srcAction]=n),t._parseMarkup(o,s,i),t.updateStatus("ready"),o}}});var Y=function(e){var i=t.items.length;return e>i-1?e-i:0>e?i+e:e},X=function(e,t,i){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,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,o=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,i&&i.enabled?(s+=" mfp-gallery",S(p+o,function(){i.navigateByImgClick&&t.wrap.on("click"+o,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),n.on("keydown"+o,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),S("UpdateStatus"+o,function(e,i){i.text&&(i.text=X(i.text,t.currItem.index,t.items.length))}),S(h+o,function(e,o,n,r){var s=t.items.length;n.counter=s>1?X(i.tCounter,r.index,s):""}),S("BuildControls"+o,function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var o=i.arrowMarkup,n=t.arrowLeft=e(o.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass(w),s=t.arrowRight=e(o.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass(w),a=r?"mfpFastClick":"click";n[a](function(){t.prev()}),s[a](function(){t.next()}),t.isIE7&&(k("b",n[0],!1,!0),k("a",n[0],!1,!0),k("b",s[0],!1,!0),k("a",s[0],!1,!0)),t.container.append(n.add(s))}}),S(f+o,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),S(l+o,function(){n.off(o),t.wrap.off("click"+o),t.arrowLeft&&r&&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,o=Math.min(i[0],t.items.length),n=Math.min(i[1],t.items.length); for(e=1;(t.direction?n:o)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?o:n)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=Y(i),!t.items[i].preloaded){var o=t.items[i];o.parsed||(o=t.parseEl(i)),E("LazyLoad",o),"image"===o.type&&(o.img=e('').on("load.mfploader",function(){o.hasSize=!0}).on("error.mfploader",function(){o.hasSize=!0,o.loadError=!0,E("LazyLoadError",o)}).attr("src",o.src)),o.preloaded=!0}}}});var Z="retina";e.magnificPopup.registerModule(Z,{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&&(S("ImageHasSize."+Z,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),S("ElementParse."+Z,function(t,o){o.src=e.replaceSrc(o,i)}))}}}}),function(){var t=1e3,i="ontouchstart"in window,o=function(){_.off("touchmove"+r+" touchend"+r)},n="mfpFastClick",r="."+n;e.fn.mfpFastClick=function(n){return e(this).each(function(){var s,a=e(this);if(i){var l,c,u,d,h,p;a.on("touchstart"+r,function(e){d=!1,p=1,h=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=h.clientX,u=h.clientY,_.on("touchmove"+r,function(e){h=e.originalEvent?e.originalEvent.touches:e.touches,p=h.length,h=h[0],(Math.abs(h.clientX-c)>10||Math.abs(h.clientY-u)>10)&&(d=!0,o())}).on("touchend"+r,function(e){o(),d||p>1||(s=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){s=!1},t),n())})})}a.on("click"+r,function(){s||n()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),i&&_.off("touchmove"+r+" touchend"+r)}}(),z()}(window.jQuery||window.Zepto),"function"!=typeof window.imagesLoaded&&(function(){function e(){}function t(e,t){for(var i=e.length;i--;)if(e[i].listener===t)return i;return-1}function i(e){return function(){return this[e].apply(this,arguments)}}var o=e.prototype,n=this,r=n.EventEmitter;o.getListeners=function(e){var t,i,o=this._getEvents();if("object"==typeof e){t={};for(i in o)o.hasOwnProperty(i)&&e.test(i)&&(t[i]=o[i])}else t=o[e]||(o[e]=[]);return t},o.flattenListeners=function(e){var t,i=[];for(t=0;e.length>t;t+=1)i.push(e[t].listener);return i},o.getListenersAsObject=function(e){var t,i=this.getListeners(e);return i instanceof Array&&(t={},t[e]=i),t||i},o.addListener=function(e,i){var o,n=this.getListenersAsObject(e),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===t(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(e){return this.getListeners(e),this},o.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},o.removeListener=function(e,i){var o,n,r=this.getListenersAsObject(e);for(n in r)r.hasOwnProperty(n)&&(o=t(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},o.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},o.manipulateListeners=function(e,t,i){var o,n,r=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(o=i.length;o--;)r.call(this,t,i[o]);else for(o in t)t.hasOwnProperty(o)&&(n=t[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(e){var t,i=typeof e,o=this._getEvents();if("string"===i)delete o[e];else if("object"===i)for(t in o)o.hasOwnProperty(t)&&e.test(t)&&delete o[t];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(e,t){var i,o,n,r,s=this.getListenersAsObject(e);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(e,i.listener),r=i.listener.apply(this,t||[]),r===this._getOnceReturnValue()&&this.removeListener(e,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},o.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return n.EventEmitter=r,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}.call(this),function(e){function t(t){var i=e.event;return i.target=i.target||i.srcElement||t,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(e,t,i){e.addEventListener(t,i,!1)}:i.attachEvent&&(o=function(e,i,o){e[i+o]=o.handleEvent?function(){var i=t(e);o.handleEvent.call(o,i)}:function(){var i=t(e);o.call(e,i)},e.attachEvent("on"+i,e[i+o])});var n=function(){};i.removeEventListener?n=function(e,t,i){e.removeEventListener(t,i,!1)}:i.detachEvent&&(n=function(e,t,i){e.detachEvent("on"+t,e[t+i]);try{delete e[t+i]}catch(o){e[t+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):e.eventie=r}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(i,o){return t(e,i,o)}):"object"==typeof exports?module.exports=t(e,require("eventEmitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(this,function(e,t,i){function o(e,t){for(var i in t)e[i]=t[i];return e}function n(e){return"[object Array]"===h.call(e)}function r(e){var t=[];if(n(e))t=e;else if("number"==typeof e.length)for(var i=0,o=e.length;o>i;i++)t.push(e[i]);else t.push(e);return t}function s(e,t,i){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=r(e),this.options=o({},this.options),"function"==typeof t?i=t:o(this.options,t),i&&this.on("always",i),this.getImages(),c&&(this.jqDeferred=new c.Deferred);var n=this;setTimeout(function(){n.check()})}function a(e){this.img=e}function l(e){this.src=e,p[e]=this}var c=e.jQuery,u=e.console,d=void 0!==u,h=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var i=this.elements[e];"IMG"===i.nodeName&&this.addImage(i);for(var o=i.querySelectorAll("img"),n=0,r=o.length;r>n;n++){var s=o[n];this.addImage(s)}}},s.prototype.addImage=function(e){var t=new a(e);this.images.push(t)},s.prototype.check=function(){function e(e,n){return t.options.debug&&d&&u.log("confirm",e,n),t.progress(e),i++,i===o&&t.complete(),!0}var t=this,i=0,o=this.images.length;if(this.hasAnyBroken=!1,!o)return this.complete(),void 0;for(var n=0;o>n;n++){var r=this.images[n];r.on("confirm",e),r.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var i=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[i](t)}})},c&&(c.fn.imagesLoaded=function(e,t){var i=new s(this,e,t);return i.jqDeferred.promise(c(this))}),a.prototype=new t,a.prototype.check=function(){var e=p[this.img.src]||new l(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,i){return t.confirm(e.isLoaded,i),!0}),e.check()},a.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var p={};return l.prototype=new t,l.prototype.check=function(){if(!this.isChecked){var e=new Image;i.bind(e,"load",this),i.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},l.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},l.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},l.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},l.prototype.unbindProxyEvents=function(e){i.unbind(e.target,"load",this),i.unbind(e.target,"error",this)},s})),"undefined"==typeof jQuery.fn.waypoint&&function(){var e=[].indexOf||function(e){for(var t=0,i=this.length;i>t;t++)if(t in this&&this[t]===e)return t;return-1},t=[].slice;!function(e,t){return"function"==typeof define&&define.amd?define("waypoints",["jquery"],function(i){return t(i,e)}):t(e.jQuery,e)}(this,function(i,o){var n,r,s,a,l,c,u,d,h,p,f,m,g,v,y,w;return n=i(o),d=e.call(o,"ontouchstart")>=0,a={horizontal:{},vertical:{}},l=1,u={},c="waypoints-context-id",f="resize.waypoints",m="scroll.waypoints",g=1,v="waypoints-waypoint-ids",y="waypoint",w="waypoints",r=function(){function e(e){var t=this;this.$element=e,this.element=e[0],this.didResize=!1,this.didScroll=!1,this.id="context"+l++,this.oldScroll={x:e.scrollLeft(),y:e.scrollTop()},this.waypoints={horizontal:{},vertical:{}},e.data(c,this.id),u[this.id]=this,e.bind(m,function(){var e;return t.didScroll||d?void 0:(t.didScroll=!0,e=function(){return t.doScroll(),t.didScroll=!1},o.setTimeout(e,i[w].settings.scrollThrottle))}),e.bind(f,function(){var e;return t.didResize?void 0:(t.didResize=!0,e=function(){return i[w]("refresh"),t.didResize=!1},o.setTimeout(e,i[w].settings.resizeThrottle))})}return e.prototype.doScroll=function(){var e,t=this;return e={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}},!d||e.vertical.oldScroll&&e.vertical.newScroll||i[w]("refresh"),i.each(e,function(e,o){var n,r,s;return s=[],r=o.newScroll>o.oldScroll,n=r?o.forward:o.backward,i.each(t.waypoints[e],function(e,t){var i,n;return o.oldScroll<(i=t.offset)&&i<=o.newScroll?s.push(t):o.newScroll<(n=t.offset)&&n<=o.oldScroll?s.push(t):void 0}),s.sort(function(e,t){return e.offset-t.offset}),r||s.reverse(),i.each(s,function(e,t){return t.options.continuous||e===s.length-1?t.trigger([n]):void 0})}),this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.refresh=function(){var e,t,o,n=this;return o=i.isWindow(this.element),t=this.$element.offset(),this.doScroll(),e={horizontal:{contextOffset:o?0:t.left,contextScroll:o?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:o?0:t.top,contextScroll:o?0:this.oldScroll.y,contextDimension:o?i[w]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}},i.each(e,function(e,t){return i.each(n.waypoints[e],function(e,o){var n,r,s,a,l;return n=o.options.offset,s=o.offset,r=i.isWindow(o.element)?0:o.$element.offset()[t.offsetProp],i.isFunction(n)?n=n.apply(o.element):"string"==typeof n&&(n=parseFloat(n),o.options.offset.indexOf("%")>-1&&(n=Math.ceil(t.contextDimension*n/100))),o.offset=r-t.contextOffset+t.contextScroll-n,o.options.onlyOnScroll&&null!=s||!o.enabled?void 0:null!==s&&s<(a=t.oldScroll)&&a<=o.offset?o.trigger([t.backward]):null!==s&&s>(l=t.oldScroll)&&l>=o.offset?o.trigger([t.forward]):null===s&&t.oldScroll>=o.offset?o.trigger([t.forward]):void 0})})},e.prototype.checkEmpty=function(){return i.isEmptyObject(this.waypoints.horizontal)&&i.isEmptyObject(this.waypoints.vertical)?(this.$element.unbind([f,m].join(" ")),delete u[this.id]):void 0},e}(),s=function(){function e(e,t,o){var n,r;o=i.extend({},i.fn[y].defaults,o),"bottom-in-view"===o.offset&&(o.offset=function(){var e;return e=i[w]("viewportHeight"),i.isWindow(t.element)||(e=t.$element.height()),e-i(this).outerHeight()}),this.$element=e,this.element=e[0],this.axis=o.horizontal?"horizontal":"vertical",this.callback=o.handler,this.context=t,this.enabled=o.enabled,this.id="waypoints"+g++,this.offset=null,this.options=o,t.waypoints[this.axis][this.id]=this,a[this.axis][this.id]=this,n=null!=(r=e.data(v))?r:[],n.push(this.id),e.data(v,n)}return e.prototype.trigger=function(e){return this.enabled?(null!=this.callback&&this.callback.apply(this.element,e),this.options.triggerOnce?this.destroy():void 0):void 0},e.prototype.disable=function(){return this.enabled=!1},e.prototype.enable=function(){return this.context.refresh(),this.enabled=!0},e.prototype.destroy=function(){return delete a[this.axis][this.id],delete this.context.waypoints[this.axis][this.id],this.context.checkEmpty()},e.getWaypointsByElement=function(e){var t,o;return(o=i(e).data(v))?(t=i.extend({},a.horizontal,a.vertical),i.map(o,function(e){return t[e]})):[]},e}(),p={init:function(e,t){var o;return null==t&&(t={}),null==(o=t.handler)&&(t.handler=e),this.each(function(){var e,o,n,a;return e=i(this),n=null!=(a=t.context)?a:i.fn[y].defaults.context,i.isWindow(n)||(n=e.closest(n)),n=i(n),o=u[n.data(c)],o||(o=new r(n)),new s(e,o,t)}),i[w]("refresh"),this},disable:function(){return p._invoke(this,"disable")},enable:function(){return p._invoke(this,"enable")},destroy:function(){return p._invoke(this,"destroy")},prev:function(e,t){return p._traverse.call(this,e,t,function(e,t,i){return t>0?e.push(i[t-1]):void 0})},next:function(e,t){return p._traverse.call(this,e,t,function(e,t,i){return te.oldScroll.y})},left:function(e){return null==e&&(e=o),h._filter(e,"horizontal",function(e,t){return t.offset<=e.oldScroll.x})},right:function(e){return null==e&&(e=o),h._filter(e,"horizontal",function(e,t){return t.offset>e.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(e,t){return p[e]=t},_invoke:function(e){var t;return t=i.extend({},a.vertical,a.horizontal),i.each(t,function(t,i){return i[e](),!0})},_filter:function(e,t,o){var n,r;return(n=u[i(e).data(c)])?(r=[],i.each(n.waypoints[t],function(e,t){return o(n,t)?r.push(t):void 0}),r.sort(function(e,t){return e.offset-t.offset}),i.map(r,function(e){return e.element})):[]}},i[w]=function(){var e,i;return i=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],h[i]?h[i].apply(null,e):h.aggregate.call(null,i)},i[w].settings={resizeThrottle:100,scrollThrottle:30},n.load(function(){return i[w]("refresh")})})}.call(this),function(){!function(e,t){return"function"==typeof define&&define.amd?define(["jquery","waypoints"],t):t(e.jQuery)}(this,function(e){var t,i;return t={wrapper:'
',stuckClass:"stuck"},i=function(t,i){return t.wrap(i.wrapper),t.each(function(){var t;return t=e(this),t.parent().height(t.outerHeight()),!0}),t.parent()},e.waypoints("extendFn","sticky",function(o){var n,r;return o=e.extend({},e.fn.waypoint.defaults,t,o),n=i(this,o),r=o.handler,o.handler=function(t){var i,n;return i=e(this).children(":first"),n="down"===t||"right"===t,i.toggleClass(o.stuckClass,n),null!=r?r.call(this,t):void 0},n.waypoint(o),this})})}.call(this),"undefined"==typeof jQuery.event.special.debouncedresize&&function(e){var t,i,o=e.event;t=o.special.debouncedresize={setup:function(){e(this).on("resize",t.handler)},teardown:function(){e(this).off("resize",t.handler)},handler:function(e,n){var r=this,s=arguments,a=function(){e.type="debouncedresize",o.dispatch.apply(r,s)};i&&clearTimeout(i),n?a():i=setTimeout(a,t.threshold)},threshold:150}}(jQuery),"undefined"==typeof jQuery.fn.packery&&(function(e){function t(){}function i(e){function i(t){t.prototype.option||(t.prototype.option=function(t){e.isPlainObject(t)&&(this.options=e.extend(!0,this.options,t))})}function n(t,i){e.fn[t]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1),a=0,l=this.length;l>a;a++){var c=this[a],u=e.data(c,t);if(u)if(e.isFunction(u[n])&&"_"!==n.charAt(0)){var d=u[n].apply(u,s);if(void 0!==d)return d}else r("no such method '"+n+"' for "+t+" instance");else r("cannot call methods on "+t+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=e.data(this,t);o?(o.option(n),o._init()):(o=new i(this,n),e.data(this,t,o))})}}if(e){var r="undefined"==typeof console?t:function(e){console.error(e)};return e.bridget=function(e,t){i(t),n(e,t)},e.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i(e.jQuery)}(window),function(e){function t(e){return RegExp("(^|\\s+)"+e+"(\\s+|$)")}function i(e,t){var i=o(e,t)?r:n;i(e,t)}var o,n,r;"classList"in document.documentElement?(o=function(e,t){return e.classList.contains(t)},n=function(e,t){e.classList.add(t)},r=function(e,t){e.classList.remove(t)}):(o=function(e,i){return t(i).test(e.className)},n=function(e,t){o(e,t)||(e.className=e.className+" "+t)},r=function(e,i){e.className=e.className.replace(t(i)," ")});var s={hasClass:o,addClass:n,removeClass:r,toggleClass:i,has:o,add:n,remove:r,toggle:i};"function"==typeof define&&define.amd?define("classie/classie",s):e.classie=s}(window),function(e){function t(e){if(e){if("string"==typeof o[e])return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var t,n=0,r=i.length;r>n;n++)if(t=i[n]+e,"string"==typeof o[t])return t}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return t}):"object"==typeof exports?module.exports=t:e.getStyleProperty=t}(window),function(e){function t(e){var t=parseFloat(e),i=-1===e.indexOf("%")&&!isNaN(t);return i&&t}function i(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0,i=s.length;i>t;t++){var o=s[t];e[o]=0}return e}function o(e){function o(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var o=r(e);if("none"===o.display)return i();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var u=n.isBorderBox=!(!c||!o[c]||"border-box"!==o[c]),d=0,h=s.length;h>d;d++){var p=s[d],f=o[p];f=a(e,f);var m=parseFloat(f);n[p]=isNaN(m)?0:m}var g=n.paddingLeft+n.paddingRight,v=n.paddingTop+n.paddingBottom,y=n.marginLeft+n.marginRight,w=n.marginTop+n.marginBottom,b=n.borderLeftWidth+n.borderRightWidth,x=n.borderTopWidth+n.borderBottomWidth,_=u&&l,S=t(o.width);S!==!1&&(n.width=S+(_?0:g+b));var k=t(o.height);return k!==!1&&(n.height=k+(_?0:v+x)),n.innerWidth=n.width-(g+b),n.innerHeight=n.height-(v+x),n.outerWidth=n.width+y,n.outerHeight=n.height+w,n}}function a(e,t){if(n||-1===t.indexOf("%"))return t;var i=e.style,o=i.left,r=e.runtimeStyle,s=r&&r.left;return s&&(r.left=e.currentStyle.left),i.left=t,t=i.pixelLeft,i.left=o,s&&(r.left=s),t}var l,c=e("boxSizing");return function(){if(c){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[c]="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=r(e);l=200===t(o.width),i.removeChild(e)}}(),o}var n=e.getComputedStyle,r=n?function(e){return n(e,null)}:function(e){return e.currentStyle},s=["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"],o):"object"==typeof exports?module.exports=o(require("get-style-property")):e.getSize=o(e.getStyleProperty)}(window),function(e){function t(t){var i=e.event;return i.target=i.target||i.srcElement||t,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(e,t,i){e.addEventListener(t,i,!1)}:i.attachEvent&&(o=function(e,i,o){e[i+o]=o.handleEvent?function(){var i=t(e);o.handleEvent.call(o,i)}:function(){var i=t(e);o.call(e,i)},e.attachEvent("on"+i,e[i+o])});var n=function(){};i.removeEventListener?n=function(e,t,i){e.removeEventListener(t,i,!1)}:i.detachEvent&&(n=function(e,t,i){e.detachEvent("on"+t,e[t+i]);try{delete e[t+i]}catch(o){e[t+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:e.eventie=r}(this),function(e){function t(e){"function"==typeof e&&(t.isReady?e():r.push(e))}function i(e){var i="readystatechange"===e.type&&"complete"!==n.readyState;if(!t.isReady&&!i){t.isReady=!0;for(var o=0,s=r.length;s>o;o++){var a=r[o];a()}}}function o(o){return o.bind(n,"DOMContentLoaded",i),o.bind(n,"readystatechange",i),o.bind(e,"load",i),t}var n=e.document,r=[];t.isReady=!1,"function"==typeof define&&define.amd?(t.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],o)):e.docReady=o(e.eventie)}(this),function(){function e(){}function t(e,t){for(var i=e.length;i--;)if(e[i].listener===t)return i;return-1}function i(e){return function(){return this[e].apply(this,arguments)}}var o=e.prototype,n=this,r=n.EventEmitter;o.getListeners=function(e){var t,i,o=this._getEvents();if(e instanceof RegExp){t={};for(i in o)o.hasOwnProperty(i)&&e.test(i)&&(t[i]=o[i])}else t=o[e]||(o[e]=[]);return t},o.flattenListeners=function(e){var t,i=[];for(t=0;e.length>t;t+=1)i.push(e[t].listener);return i},o.getListenersAsObject=function(e){var t,i=this.getListeners(e);return i instanceof Array&&(t={},t[e]=i),t||i},o.addListener=function(e,i){var o,n=this.getListenersAsObject(e),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===t(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(e){return this.getListeners(e),this},o.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},o.removeListener=function(e,i){var o,n,r=this.getListenersAsObject(e);for(n in r)r.hasOwnProperty(n)&&(o=t(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},o.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},o.manipulateListeners=function(e,t,i){var o,n,r=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(o=i.length;o--;)r.call(this,t,i[o]);else for(o in t)t.hasOwnProperty(o)&&(n=t[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(e){var t,i=typeof e,o=this._getEvents();if("string"===i)delete o[e];else if(e instanceof RegExp)for(t in o)o.hasOwnProperty(t)&&e.test(t)&&delete o[t];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(e,t){var i,o,n,r,s=this.getListenersAsObject(e);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(e,i.listener),r=i.listener.apply(this,t||[]),r===this._getOnceReturnValue()&&this.removeListener(e,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},o.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return n.EventEmitter=r,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}.call(this),function(e,t){function i(e,t){return e[a](t)}function o(e){if(!e.parentNode){var t=document.createDocumentFragment();t.appendChild(e)}}function n(e,t){o(e);for(var i=e.parentNode.querySelectorAll(t),n=0,r=i.length;r>n;n++)if(i[n]===e)return!0;return!1}function r(e,t){return o(e),i(e,t)}var s,a=function(){if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,o=e.length;o>i;i++){var n=e[i],r=n+"MatchesSelector";if(t[r])return r}}();if(a){var l=document.createElement("div"),c=i(l,"div");s=c?i:r}else s=n;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return s}):window.matchesSelector=s}(this,Element.prototype),function(e){function t(e,t){for(var i in t)e[i]=t[i];return e}function i(e){for(var t in e)return!1;return t=null,!0}function o(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function n(e,n,r){function a(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var l=r("transition"),c=r("transform"),u=l&&c,d=!!r("perspective"),h={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[l],p=["transform","transition","transitionDuration","transitionProperty"],f=function(){for(var e={},t=0,i=p.length;i>t;t++){var o=p[t],n=r(o);n&&n!==o&&(e[o]=n)}return e}();t(a.prototype,e.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(e){var t=this.element.style;for(var i in e){var o=f[i]||i;t[o]=e[i]}},a.prototype.getPosition=function(){var e=s(this.element),t=this.layout.options,i=t.isOriginLeft,o=t.isOriginTop,n=parseInt(e[i?"left":"right"],10),r=parseInt(e[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var a=this.layout.size;n-=i?a.paddingLeft:a.paddingRight,r-=o?a.paddingTop:a.paddingBottom,this.position.x=n,this.position.y=r},a.prototype.layoutPosition=function(){var e=this.layout.size,t=this.layout.options,i={};t.isOriginLeft?(i.left=this.position.x+e.paddingLeft+"px",i.right=""):(i.right=this.position.x+e.paddingRight+"px",i.left=""),t.isOriginTop?(i.top=this.position.y+e.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+e.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var m=d?function(e,t){return"translate3d("+e+"px, "+t+"px, 0)"}:function(e,t){return"translate("+e+"px, "+t+"px)"};a.prototype._transitionTo=function(e,t){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(e,10),r=parseInt(t,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(e,t),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=e-i,l=t-o,c={},u=this.layout.options;a=u.isOriginLeft?a:-a,l=u.isOriginTop?l:-l,c.transform=m(a,l),this.transition({to:c,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},a.prototype.moveTo=u?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(e,t){this.position.x=parseInt(e,10),this.position.y=parseInt(t,10)},a.prototype._nonTransition=function(e){this.css(e.to),e.isCleaning&&this._removeStyles(e.to);for(var t in e.onTransitionEnd)e.onTransitionEnd[t].call(this)},a.prototype._transition=function(e){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(e),void 0;var t=this._transn;for(var i in e.onTransitionEnd)t.onEnd[i]=e.onTransitionEnd[i];for(i in e.to)t.ingProperties[i]=!0,e.isCleaning&&(t.clean[i]=!0);if(e.from){this.css(e.from);var o=this.element.offsetHeight;o=null}this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0};var g=c&&o(c)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:g,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(h,this,!1))},a.prototype.transition=a.prototype[l?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},a.prototype.onotransitionend=function(e){this.ontransitionend(e)};var v={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,o=v[e.propertyName]||e.propertyName;if(delete t.ingProperties[o],i(t.ingProperties)&&this.disableTransition(),o in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[o]),o in t.onEnd){var n=t.onEnd[o];n.call(this),delete t.onEnd[o]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(e){var t={};for(var i in e)t[i]="";this.css(t)};var y={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(y)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!l||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var e=this;this.on("transitionEnd",function(){return e.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options;this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options;this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=document.defaultView,s=r&&r.getComputedStyle?function(e){return r.getComputedStyle(e,null)}:function(e){return e.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],n):(e.Outlayer={},e.Outlayer.Item=n(e.EventEmitter,e.getSize,e.getStyleProperty))}(window),function(e){function t(e,t){for(var i in t)e[i]=t[i];return e}function i(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(i(e))t=e;else if(e&&"number"==typeof e.length)for(var o=0,n=e.length;n>o;o++)t.push(e[o]);else t.push(e);return t}function n(e,t){var i=p(t,e);-1!==i&&t.splice(i,1)}function r(e){return e.replace(/(.)([A-Z])/g,function(e,t,i){return t+"-"+i }).toLowerCase()}function s(i,s,d,p,f,m){function g(e,i){if("string"==typeof e&&(e=a.querySelector(e)),!e||!h(e))return l&&l.error("Bad "+this.constructor.namespace+" element:"+e),void 0;this.element=e,this.options=t({},this.options),this.option(i);var o=++y;this.element.outlayerGUID=o,w[o]=this,this._create(),this.options.isInitLayout&&this.layout()}function v(e,i){e.prototype[i]=t({},g.prototype[i])}var y=0,w={};return g.namespace="outlayer",g.Item=m,g.prototype.options={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},t(g.prototype,d.prototype),g.prototype.option=function(e){t(this.options,e)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),t(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(e){for(var t=this._filterFindItemElements(e),i=this.constructor.Item,o=[],n=0,r=t.length;r>n;n++){var s=t[n],a=new i(s,this);o.push(a)}return o},g.prototype._filterFindItemElements=function(e){e=o(e);for(var t=this.options.itemSelector,i=[],n=0,r=e.length;r>n;n++){var s=e[n];if(h(s))if(t){f(s,t)&&i.push(s);for(var a=s.querySelectorAll(t),l=0,c=a.length;c>l;l++)i.push(a[l])}else i.push(s)}return i},g.prototype.getItemElements=function(){for(var e=[],t=0,i=this.items.length;i>t;t++)e.push(this.items[t].element);return e},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var e=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=p(this.element)},g.prototype._getMeasurement=function(e,t){var i,o=this.options[e];o?("string"==typeof o?i=this.element.querySelector(o):h(o)&&(i=o),this[e]=i?p(i)[t]:o):this[e]=0},g.prototype.layoutItems=function(e,t){e=this._getItemsForLayout(e),this._layoutItems(e,t),this._postLayout()},g.prototype._getItemsForLayout=function(e){for(var t=[],i=0,o=e.length;o>i;i++){var n=e[i];n.isIgnored||t.push(n)}return t},g.prototype._layoutItems=function(e,t){function i(){o.emitEvent("layoutComplete",[o,e])}var o=this;if(!e||!e.length)return i(),void 0;this._itemsOn(e,"layout",i);for(var n=[],r=0,s=e.length;s>r;r++){var a=e[r],l=this._getItemLayoutPosition(a);l.item=a,l.isInstant=t||a.isLayoutInstant,n.push(l)}this._processLayoutQueue(n)},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(e){for(var t=0,i=e.length;i>t;t++){var o=e[t];this._positionItem(o.item,o.x,o.y,o.isInstant)}},g.prototype._positionItem=function(e,t,i,o){o?e.goTo(t,i):e.moveTo(t,i)},g.prototype._postLayout=function(){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))},g.prototype._getContainerSize=u,g.prototype._setContainerMeasure=function(e,t){if(void 0!==e){var i=this.size;i.isBorderBox&&(e+=t?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),e=Math.max(e,0),this.element.style[t?"width":"height"]=e+"px"}},g.prototype._itemsOn=function(e,t,i){function o(){return n++,n===r&&i.call(s),!0}for(var n=0,r=e.length,s=this,a=0,l=e.length;l>a;a++){var c=e[a];c.on(t,o)}},g.prototype.ignore=function(e){var t=this.getItem(e);t&&(t.isIgnored=!0)},g.prototype.unignore=function(e){var t=this.getItem(e);t&&delete t.isIgnored},g.prototype.stamp=function(e){if(e=this._find(e)){this.stamps=this.stamps.concat(e);for(var t=0,i=e.length;i>t;t++){var o=e[t];this.ignore(o)}}},g.prototype.unstamp=function(e){if(e=this._find(e))for(var t=0,i=e.length;i>t;t++){var o=e[t];n(o,this.stamps),this.unignore(o)}},g.prototype._find=function(e){return e?("string"==typeof e&&(e=this.element.querySelectorAll(e)),e=o(e)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var e=0,t=this.stamps.length;t>e;e++){var i=this.stamps[e];this._manageStamp(i)}}},g.prototype._getBoundingRect=function(){var e=this.element.getBoundingClientRect(),t=this.size;this._boundingRect={left:e.left+t.paddingLeft+t.borderLeftWidth,top:e.top+t.paddingTop+t.borderTopWidth,right:e.right-(t.paddingRight+t.borderRightWidth),bottom:e.bottom-(t.paddingBottom+t.borderBottomWidth)}},g.prototype._manageStamp=u,g.prototype._getElementOffset=function(e){var t=e.getBoundingClientRect(),i=this._boundingRect,o=p(e),n={left:t.left-i.left-o.marginLeft,top:t.top-i.top-o.marginTop,right:i.right-t.right-o.marginRight,bottom:i.bottom-t.bottom-o.marginBottom};return n},g.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},g.prototype.bindResize=function(){this.isResizeBound||(i.bind(e,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){i.unbind(e,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function e(){t.resize(),delete t.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var t=this;this.resizeTimeout=setTimeout(e,100)},g.prototype.resize=function(){var e=p(this.element),t=this.size&&e;t&&e.innerWidth===this.size.innerWidth||this.layout()},g.prototype.addItems=function(e){var t=this._itemize(e);return t.length&&(this.items=this.items.concat(t)),t},g.prototype.appended=function(e){var t=this.addItems(e);t.length&&(this.layoutItems(t,!0),this.reveal(t))},g.prototype.prepended=function(e){var t=this._itemize(e);if(t.length){var i=this.items.slice(0);this.items=t.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(t,!0),this.reveal(t),this.layoutItems(i)}},g.prototype.reveal=function(e){var t=e&&e.length;if(t)for(var i=0;t>i;i++){var o=e[i];o.reveal()}},g.prototype.hide=function(e){var t=e&&e.length;if(t)for(var i=0;t>i;i++){var o=e[i];o.hide()}},g.prototype.getItem=function(e){for(var t=0,i=this.items.length;i>t;t++){var o=this.items[t];if(o.element===e)return o}},g.prototype.getItems=function(e){if(e&&e.length){for(var t=[],i=0,o=e.length;o>i;i++){var n=e[i],r=this.getItem(n);r&&t.push(r)}return t}},g.prototype.remove=function(e){e=o(e);var t=this.getItems(e);if(t&&t.length){this._itemsOn(t,"remove",function(){this.emitEvent("removeComplete",[this,t])});for(var i=0,r=t.length;r>i;i++){var s=t[i];s.remove(),n(s,this.items)}}},g.prototype.destroy=function(){var e=this.element.style;e.height="",e.position="",e.width="";for(var t=0,i=this.items.length;i>t;t++){var o=this.items[t];o.destroy()}this.unbindResize(),delete this.element.outlayerGUID,c&&c.removeData(this.element,this.constructor.namespace)},g.data=function(e){var t=e&&e.outlayerGUID;return t&&w[t]},g.create=function(e,i){function o(){g.apply(this,arguments)}return Object.create?o.prototype=Object.create(g.prototype):t(o.prototype,g.prototype),o.prototype.constructor=o,v(o,"options"),t(o.prototype.options,i),o.namespace=e,o.data=g.data,o.Item=function(){m.apply(this,arguments)},o.Item.prototype=new m,s(function(){for(var t=r(e),i=a.querySelectorAll(".js-"+t),n="data-"+t+"-options",s=0,u=i.length;u>s;s++){var d,h=i[s],p=h.getAttribute(n);try{d=p&&JSON.parse(p)}catch(f){l&&l.error("Error parsing "+n+" on "+h.nodeName.toLowerCase()+(h.id?"#"+h.id:"")+":"+f);continue}var m=new o(h,d);c&&c.data(h,e,m)}}),c&&c.bridget&&c.bridget(e,o),o},g.Item=m,g}var a=e.document,l=e.console,c=e.jQuery,u=function(){},d=Object.prototype.toString,h="object"==typeof HTMLElement?function(e){return e instanceof HTMLElement}:function(e){return e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},p=Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var i=0,o=e.length;o>i;i++)if(e[i]===t)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):e.Outlayer=s(e.eventie,e.docReady,e.EventEmitter,e.getSize,e.matchesSelector,e.Outlayer.Item)}(window),function(e){function t(){function e(t){for(var i in e.defaults)this[i]=e.defaults[i];for(i in t)this[i]=t[i]}return i.Rect=e,e.defaults={x:0,y:0,width:0,height:0},e.prototype.contains=function(e){var t=e.width||0,i=e.height||0;return this.x<=e.x&&this.y<=e.y&&this.x+this.width>=e.x+t&&this.y+this.height>=e.y+i},e.prototype.overlaps=function(e){var t=this.x+this.width,i=this.y+this.height,o=e.x+e.width,n=e.y+e.height;return o>this.x&&t>e.x&&n>this.y&&i>e.y},e.prototype.getMaximalFreeRects=function(t){if(!this.overlaps(t))return!1;var i,o=[],n=this.x+this.width,r=this.y+this.height,s=t.x+t.width,a=t.y+t.height;return this.ys&&(i=new e({x:s,y:this.y,width:n-s,height:this.height}),o.push(i)),r>a&&(i=new e({x:this.x,y:a,width:this.width,height:r-a}),o.push(i)),this.x=e.width&&this.height>=e.height},e}var i=e.Packery=function(){};"function"==typeof define&&define.amd?define("packery/js/rect",t):(e.Packery=e.Packery||{},e.Packery.Rect=t())}(window),function(e){function t(e){function t(e,t,i){this.width=e||0,this.height=t||0,this.sortDirection=i||"downwardLeftToRight",this.reset()}t.prototype.reset=function(){this.spaces=[],this.newSpaces=[];var t=new e({x:0,y:0,width:this.width,height:this.height});this.spaces.push(t),this.sorter=i[this.sortDirection]||i.downwardLeftToRight},t.prototype.pack=function(e){for(var t=0,i=this.spaces.length;i>t;t++){var o=this.spaces[t];if(o.canFit(e)){this.placeInSpace(e,o);break}}},t.prototype.placeInSpace=function(e,t){e.x=t.x,e.y=t.y,this.placed(e)},t.prototype.placed=function(e){for(var i=[],o=0,n=this.spaces.length;n>o;o++){var r=this.spaces[o],s=r.getMaximalFreeRects(e);s?i.push.apply(i,s):i.push(r)}this.spaces=i,t.mergeRects(this.spaces),this.spaces.sort(this.sorter)},t.mergeRects=function(e){for(var t=0,i=e.length;i>t;t++){var o=e[t];if(o){var n=e.slice(0);n.splice(t,1);for(var r=0,s=0,a=n.length;a>s;s++){var l=n[s],c=t>s?0:1;o.contains(l)&&(e.splice(s+c-r,1),r++)}}}return e};var i={downwardLeftToRight:function(e,t){return e.y-t.y||e.x-t.x},rightwardTopToBottom:function(e,t){return e.x-t.x||e.y-t.y}};return t}if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],t);else{var i=e.Packery=e.Packery||{};i.Packer=t(i.Rect)}}(window),function(e){function t(e,t,i){var o=e("transform"),n=function(){t.Item.apply(this,arguments)};n.prototype=new t.Item;var r=n.prototype._create;return n.prototype._create=function(){r.call(this),this.rect=new i,this.placeRect=new i},n.prototype.dragStart=function(){this.getPosition(),this.removeTransitionStyles(),this.isTransitioning&&o&&(this.element.style[o]="none"),this.getSize(),this.isPlacing=!0,this.needsPositioning=!1,this.positionPlaceRect(this.position.x,this.position.y),this.isTransitioning=!1,this.didDrag=!1},n.prototype.dragMove=function(e,t){this.didDrag=!0;var i=this.layout.size;e-=i.paddingLeft,t-=i.paddingTop,this.positionPlaceRect(e,t)},n.prototype.dragStop=function(){this.getPosition();var e=this.position.x!==this.placeRect.x,t=this.position.y!==this.placeRect.y;this.needsPositioning=e||t,this.didDrag=!1},n.prototype.positionPlaceRect=function(e,t,i){this.placeRect.x=this.getPlaceRectCoord(e,!0),this.placeRect.y=this.getPlaceRectCoord(t,!1,i)},n.prototype.getPlaceRectCoord=function(e,t,i){var o=t?"Width":"Height",n=this.size["outer"+o],r=this.layout[t?"columnWidth":"rowHeight"],s=this.layout.size["inner"+o];t||(s=Math.max(s,this.layout.maxY),this.layout.rowHeight||(s-=this.layout.gutter));var a;if(r){r+=this.layout.gutter,s+=t?this.layout.gutter:0,e=Math.round(e/r);var l;l=this.layout.options.isHorizontal?t?"ceil":"floor":t?"floor":"ceil";var c=Math[l](s/r);c-=Math.ceil(n/r),a=c}else a=s-n;return e=i?e:Math.min(e,a),e*=r||1,Math.max(0,e)},n.prototype.copyPlaceRectPosition=function(){this.rect.x=this.placeRect.x,this.rect.y=this.placeRect.y},n}"function"==typeof define&&define.amd?define("packery/js/item",["get-style-property/get-style-property","outlayer/outlayer","./rect"],t):e.Packery.Item=t(e.getStyleProperty,e.Outlayer,e.Packery.Rect)}(window),function(e){function t(e,t,i,o,n,r){function s(e,t){return e.position.y-t.position.y||e.position.x-t.position.x}function a(e,t){return e.position.x-t.position.x||e.position.y-t.position.y}var l=i.create("packery");return l.Item=r,l.prototype._create=function(){i.prototype._create.call(this),this.packer=new n,this.stamp(this.options.stamped);var e=this;this.handleDraggabilly={dragStart:function(t){e.itemDragStart(t.element)},dragMove:function(t){e.itemDragMove(t.element,t.position.x,t.position.y)},dragEnd:function(t){e.itemDragEnd(t.element)}},this.handleUIDraggable={start:function(t){e.itemDragStart(t.currentTarget)},drag:function(t,i){e.itemDragMove(t.currentTarget,i.position.left,i.position.top)},stop:function(t){e.itemDragEnd(t.currentTarget)}}},l.prototype._resetLayout=function(){this.getSize(),this._getMeasurements();var e=this.packer;this.options.isHorizontal?(e.width=Number.POSITIVE_INFINITY,e.height=this.size.innerHeight+this.gutter,e.sortDirection="rightwardTopToBottom"):(e.width=this.size.innerWidth+this.gutter,e.height=Number.POSITIVE_INFINITY,e.sortDirection="downwardLeftToRight"),e.reset(),this.maxY=0,this.maxX=0},l.prototype._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},l.prototype._getItemLayoutPosition=function(e){return this._packItem(e),e.rect},l.prototype._packItem=function(e){this._setRectSize(e.element,e.rect),this.packer.pack(e.rect),this._setMaxXY(e.rect)},l.prototype._setMaxXY=function(e){this.maxX=Math.max(e.x+e.width,this.maxX),this.maxY=Math.max(e.y+e.height,this.maxY)},l.prototype._setRectSize=function(e,i){var o=t(e),n=o.outerWidth,r=o.outerHeight,s=this.columnWidth+this.gutter,a=this.rowHeight+this.gutter;n=this.columnWidth?Math.ceil(n/s)*s:n+this.gutter,r=this.rowHeight?Math.ceil(r/a)*a:r+this.gutter,i.width=Math.min(n,this.packer.width),i.height=r},l.prototype._getContainerSize=function(){return this.options.isHorizontal?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},l.prototype._manageStamp=function(e){var t,i=this.getItem(e);if(i&&i.isPlacing)t=i.placeRect;else{var n=this._getElementOffset(e);t=new o({x:this.options.isOriginLeft?n.left:n.right,y:this.options.isOriginTop?n.top:n.bottom})}this._setRectSize(e,t),this.packer.placed(t),this._setMaxXY(t)},l.prototype.sortItemsByPosition=function(){var e=this.options.isHorizontal?a:s;this.items.sort(e)},l.prototype.fit=function(e,t,i){var o=this.getItem(e);o&&(this._getMeasurements(),this.stamp(o.element),o.getSize(),o.isPlacing=!0,t=void 0===t?o.rect.x:t,i=void 0===i?o.rect.y:i,o.positionPlaceRect(t,i,!0),this._bindFitEvents(o),o.moveTo(o.placeRect.x,o.placeRect.y),this.layout(),this.unstamp(o.element),this.sortItemsByPosition(),o.isPlacing=!1,o.copyPlaceRectPosition())},l.prototype._bindFitEvents=function(e){function t(){o++,2===o&&i.emitEvent("fitComplete",[i,e])}var i=this,o=0;e.on("layout",function(){return t(),!0}),this.on("layoutComplete",function(){return t(),!0})},l.prototype.resize=function(){var e=t(this.element),i=this.size&&e,o=this.options.isHorizontal?"innerHeight":"innerWidth";i&&e[o]===this.size[o]||this.layout()},l.prototype.itemDragStart=function(e){this.stamp(e);var t=this.getItem(e);t&&t.dragStart()},l.prototype.itemDragMove=function(e,t,i){function o(){r.layout(),delete r.dragTimeout}var n=this.getItem(e);n&&n.dragMove(t,i);var r=this;this.clearDragTimeout(),this.dragTimeout=setTimeout(o,40)},l.prototype.clearDragTimeout=function(){this.dragTimeout&&clearTimeout(this.dragTimeout)},l.prototype.itemDragEnd=function(t){var i,o=this.getItem(t);if(o&&(i=o.didDrag,o.dragStop()),!o||!i&&!o.needsPositioning)return this.unstamp(t),void 0;e.add(o.element,"is-positioning-post-drag");var n=this._getDragEndLayoutComplete(t,o);o.needsPositioning?(o.on("layout",n),o.moveTo(o.placeRect.x,o.placeRect.y)):o&&o.copyPlaceRectPosition(),this.clearDragTimeout(),this.on("layoutComplete",n),this.layout()},l.prototype._getDragEndLayoutComplete=function(t,i){var o=i&&i.needsPositioning,n=0,r=o?2:1,s=this;return function(){return n++,n!==r?!0:(i&&(e.remove(i.element,"is-positioning-post-drag"),i.isPlacing=!1,i.copyPlaceRectPosition()),s.unstamp(t),s.sortItemsByPosition(),o&&s.emitEvent("dragItemPositioned",[s,i]),!0)}},l.prototype.bindDraggabillyEvents=function(e){e.on("dragStart",this.handleDraggabilly.dragStart),e.on("dragMove",this.handleDraggabilly.dragMove),e.on("dragEnd",this.handleDraggabilly.dragEnd)},l.prototype.bindUIDraggableEvents=function(e){e.on("dragstart",this.handleUIDraggable.start).on("drag",this.handleUIDraggable.drag).on("dragstop",this.handleUIDraggable.stop)},l.Rect=o,l.Packer=n,l}"function"==typeof define&&define.amd?define(["classie/classie","get-size/get-size","outlayer/outlayer","packery/js/rect","packery/js/packer","packery/js/item"],t):e.Packery=t(e.classie,e.getSize,e.Outlayer,e.Packery.Rect,e.Packery.Packer,e.Packery.Item)}(window)),"function"!=typeof window.imagesLoaded&&(function(){function e(){}function t(e,t){for(var i=e.length;i--;)if(e[i].listener===t)return i;return-1}function i(e){return function(){return this[e].apply(this,arguments)}}var o=e.prototype,n=this,r=n.EventEmitter;o.getListeners=function(e){var t,i,o=this._getEvents();if("object"==typeof e){t={};for(i in o)o.hasOwnProperty(i)&&e.test(i)&&(t[i]=o[i])}else t=o[e]||(o[e]=[]);return t},o.flattenListeners=function(e){var t,i=[];for(t=0;e.length>t;t+=1)i.push(e[t].listener);return i},o.getListenersAsObject=function(e){var t,i=this.getListeners(e);return i instanceof Array&&(t={},t[e]=i),t||i},o.addListener=function(e,i){var o,n=this.getListenersAsObject(e),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===t(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(e){return this.getListeners(e),this},o.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},o.removeListener=function(e,i){var o,n,r=this.getListenersAsObject(e);for(n in r)r.hasOwnProperty(n)&&(o=t(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},o.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},o.manipulateListeners=function(e,t,i){var o,n,r=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(o=i.length;o--;)r.call(this,t,i[o]);else for(o in t)t.hasOwnProperty(o)&&(n=t[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(e){var t,i=typeof e,o=this._getEvents();if("string"===i)delete o[e];else if("object"===i)for(t in o)o.hasOwnProperty(t)&&e.test(t)&&delete o[t];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(e,t){var i,o,n,r,s=this.getListenersAsObject(e);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(e,i.listener),r=i.listener.apply(this,t||[]),r===this._getOnceReturnValue()&&this.removeListener(e,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},o.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return n.EventEmitter=r,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}.call(this),function(e){function t(t){var i=e.event;return i.target=i.target||i.srcElement||t,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(e,t,i){e.addEventListener(t,i,!1)}:i.attachEvent&&(o=function(e,i,o){e[i+o]=o.handleEvent?function(){var i=t(e);o.handleEvent.call(o,i)}:function(){var i=t(e);o.call(e,i)},e.attachEvent("on"+i,e[i+o])});var n=function(){};i.removeEventListener?n=function(e,t,i){e.removeEventListener(t,i,!1)}:i.detachEvent&&(n=function(e,t,i){e.detachEvent("on"+t,e[t+i]);try{delete e[t+i]}catch(o){e[t+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):e.eventie=r}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(i,o){return t(e,i,o)}):"object"==typeof exports?module.exports=t(e,require("eventEmitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(this,function(e,t,i){function o(e,t){for(var i in t)e[i]=t[i];return e}function n(e){return"[object Array]"===h.call(e)}function r(e){var t=[];if(n(e))t=e;else if("number"==typeof e.length)for(var i=0,o=e.length;o>i;i++)t.push(e[i]);else t.push(e);return t}function s(e,t,i){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=r(e),this.options=o({},this.options),"function"==typeof t?i=t:o(this.options,t),i&&this.on("always",i),this.getImages(),c&&(this.jqDeferred=new c.Deferred);var n=this;setTimeout(function(){n.check()})}function a(e){this.img=e}function l(e){this.src=e,p[e]=this}var c=e.jQuery,u=e.console,d=void 0!==u,h=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var i=this.elements[e];"IMG"===i.nodeName&&this.addImage(i);for(var o=i.querySelectorAll("img"),n=0,r=o.length;r>n;n++){var s=o[n];this.addImage(s)}}},s.prototype.addImage=function(e){var t=new a(e);this.images.push(t)},s.prototype.check=function(){function e(e,n){return t.options.debug&&d&&u.log("confirm",e,n),t.progress(e),i++,i===o&&t.complete(),!0}var t=this,i=0,o=this.images.length;if(this.hasAnyBroken=!1,!o)return this.complete(),void 0;for(var n=0;o>n;n++){var r=this.images[n];r.on("confirm",e),r.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var i=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[i](t)}})},c&&(c.fn.imagesLoaded=function(e,t){var i=new s(this,e,t);return i.jqDeferred.promise(c(this))}),a.prototype=new t,a.prototype.check=function(){var e=p[this.img.src]||new l(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,i){return t.confirm(e.isLoaded,i),!0}),e.check()},a.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var p={};return l.prototype=new t,l.prototype.check=function(){if(!this.isChecked){var e=new Image;i.bind(e,"load",this),i.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},l.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},l.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},l.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},l.prototype.unbindProxyEvents=function(e){i.unbind(e.target,"load",this),i.unbind(e.target,"error",this)},s})),"undefined"==typeof jQuery.fn.tinyNav&&function(e,t,i){e.fn.tinyNav=function(o){var n=e.extend({active:"selected",header:"",indent:"- ",label:"",place:""},o);return this.each(function(){i++;var o=e(this),r="tinynav",s=r+i,a=e("