????
Current Path : /home2/morganrand/backup.morganrand.com/wp-content/themes/wanderfuls/js/ |
Current File : /home2/morganrand/backup.morganrand.com/wp-content/themes/wanderfuls/js/functions.js |
!function(e){"use strict";var i={init:function(){this.config(),this.bindEvents()},config:function(){this.config={$window:e(window),$document:e(document),$windowWidth:e(window).width(),$windowHeight:e(window).height(),$windowTop:e(window).scrollTop(),$body:e("body"),$mobileMenuBreakpoint:960,$siteHeader:null,$siteHeaderHeight:0,$siteHeaderTop:0,$siteHeaderBottom:0,$siteLogo:null,$siteLogoHeight:0,$siteLogoSrc:null,$siteNavWrap:null,$localScrollOffset:0,$localScrollSpeed:600,$localScrollArray:[],$mobileMenuStyle:null,$footerReveal:!1,$hasTopBar:!1,$hasHeaderOverlay:!1,$hasStickyHeader:!1,$stickyHeaderBreakPoint:960,$hasStickyMobileHeader:!1,$hasStickyTopBar:!1,$stickyTopBar:null,$stickyTopBarHeight:0,$is_rtl:!1,$retinaLogo:null,$isMobile:!1,$verticalHeaderActive:!1}},bindEvents:function(){var i=this;i.config.$document.on("ready",function(){i.initUpdateConfig(),i.pageAnimations(),i.superFish(),i.megaMenusWidth(),i.mobileMenu(),i.navNoClick(),i.hideEditLink(),i.customMenuWidgetAccordion(),i.inlineHeaderLogo(),i.menuSearch(),i.headerCart(),i.backTopLink(),i.smoothCommentScroll(),i.tipsyTooltips(),i.customHovers(),i.toggleBar(),i.localScrollLinks(),i.customSelects(),i.skillbar(),i.milestone(),i.owlCarousel(),i.archiveMasonryGrids(),i.iLightbox(),i.wooSelects(),i.footerRevealLoadShow(),i.overlayHovers(),i.isotopeGrids()}),i.config.$window.on("load",function(){i.windowLoadUpdateConfig(),i.megaMenusTop(),i.flushDropdownsTop(),i.equalHeights(),i.footerRevealMainMargin(),i.overlayHeaderTopWrapPadding(),i.fadeIn(),i.parallax(),i.cartSearchDropdownsRelocate(),i.sliderPro(),e.fn.animsition&&tbLocalize.pageAnimation&&tbLocalize.pageAnimationInDuration?setTimeout(function(){i.stickyTopBar(),i.stickyHeader()},tbLocalize.pageAnimationInDuration):(i.stickyTopBar(),i.stickyHeader()),i.stickyHeaderShrink(),window.setTimeout(function(){i.scrollToHash(i)},500),i.config.$window.on("hashchange",function(){i.scrollToHash(i)})}),i.config.$window.resize(function(){i.config.$window.width()!=i.config.$windowWidth&&(i.resizeUpdateConfig(),i.megaMenusWidth(),i.overlayHeaderTopWrapPadding(),i.inlineHeaderLogo())}),i.config.$window.scroll(function(){i.config.$windowTop=i.config.$window.scrollTop(),i.localScrollHighlight(),i.footerRevealScrollShow()}),i.config.$window.on("orientationchange",function(){i.resizeUpdateConfig(),i.isotopeGrids(),i.archiveMasonryGrids(),i.inlineHeaderLogo()}),i.config.$document.click(function(){e("#searchform-dropdown, #searchform-header-replace").removeClass("show"),e("a.search-dropdown-toggle").parent("li").removeClass("active"),e("#toggle-bar-wrap").removeClass("active-bar");var i=e("a.toggle-bar-btn");0!==i.length&&i.children(".fa").removeClass(i.data("icon-hover")).addClass(i.data("icon"))})},initUpdateConfig:function(){this.config.$isMobile=this.mobileCheck(),tbLocalize.localScrollSpeed&&(this.config.$localScrollSpeed=parseInt(tbLocalize.localScrollSpeed)),e("#site-header").length&&(this.config.$siteHeader=e("#site-header")),e("#site-logo img").length&&(this.config.$siteLogo=e("#site-logo img"),this.config.$siteLogoSrc=this.config.$siteLogo.attr("src")),e("#site-navigation-wrap").length&&(this.config.$siteNavWrap=e("#site-navigation-wrap")),e("#site-navigation-wrap").length&&(this.config.$mobileMenuStyle=tbLocalize.mobileMenuStyle),this.config.$localScrollArray=this.localScrollLinksArray(),e(".footer-reveal").length&&e("#wrap").length&&e("#main").length&&(this.config.$footerReveal=!0),this.config.$siteHeader&&this.config.$siteHeader.hasClass("fix-overlay-header")&&(this.config.$hasHeaderOverlay=!0),tbLocalize.isRTL&&(this.config.$isRTL=!0),e("#top-bar-wrap").length&&(this.config.$hasTopBar=!0,e("#top-bar-wrap").hasClass("tb-top-bar-sticky")&&(this.config.$stickyTopBar=e("#top-bar-wrap"))),tbLocalize.localScrollSpeed&&(this.config.localScrollSpeed=parseInt(tbLocalize.localScrollSpeed)),this.config.$stickyTopBar&&(tbLocalize.hasStickyTopBarMobile||this.config.$windowWidth>=tbLocalize.stickyTopBarBreakPoint?this.config.$hasStickyTopBar=!0:this.config.$hasStickyTopBar=!1),this.config.$hasStickyMobileHeader=tbLocalize.hasStickyMobileHeader,tbLocalize.hasStickyHeader&&(tbLocalize.stickyHeaderBreakPoint&&(this.config.$stickyHeaderBreakPoint=tbLocalize.stickyHeaderBreakPoint),this.config.$hasStickyMobileHeader||this.config.$windowWidth>=this.config.$stickyHeaderBreakPoint?this.config.$hasStickyHeader=!0:this.config.$hasStickyHeader=!1),"undefined"!=typeof $tbRetinaLogo&&window.devicePixelRatio>=2&&(this.config.retinaLogo=$tbRetinaLogo),"toggle"==this.config.$mobileMenuStyle&&(this.config.$hasStickyMobileHeader=!1),this.config.$body.hasClass("tb-has-vertical-header")&&(this.config.$verticalHeaderActive=!0);var i=e(".dropdown-menu a");i.each(function(){var i=e(this),t=i.attr("href");t&&-1!=t.indexOf("localscroll-")&&i.parent("li.current-menu-item").removeClass("current-menu-item")})},windowLoadUpdateConfig:function(){if(this.config.$siteHeader){var e=this.config.$siteHeader.offset().top;this.config.$windowHeight=this.config.$window.height(),this.config.$siteHeaderHeight=this.config.$siteHeader.outerHeight(),this.config.$siteHeaderBottom=e+this.config.$siteHeaderHeight,this.config.$siteHeaderTop=e,this.config.$siteLogo&&(this.config.$siteLogoHeight=this.config.$siteLogo.height())}this.config.$localScrollOffset=this.parseLocalScrollOffset()},resizeUpdateConfig:function(){this.config.$windowHeight=this.config.$window.height(),this.config.$windowWidth=this.config.$window.width(),this.config.$windowTop=this.config.$window.scrollTop(),this.config.$siteHeader&&(e(".tb-sticky-header-holder").length&&e(".tb-sticky-header-holder").height(""),this.config.$siteHeaderHeight=this.config.$siteHeader.outerHeight(),e(".tb-sticky-header-holder").length&&e(".tb-sticky-header-holder").height(this.config.$siteHeaderHeight)),this.config.$windowWidth<960?this.config.$verticalHeaderActive=!1:this.config.$body.hasClass("tb-has-vertical-header")&&(this.config.$verticalHeaderActive=!0),this.config.$stickyTopBar&&(this.config.$stickyTopBarHeight=this.config.$stickyTopBar.outerHeight(),e(".tb-sticky-top-bar-holder").height(this.config.$stickyTopBarHeight)),this.config.$hasStickyTopBar&&(this.stickyTopBar("unstick"),tbLocalize.hasStickyTopBarMobile||this.config.$windowWidth>=tbLocalize.stickyTopBarBreakPoint?(this.config.$hasStickyTopBar=!0,this.stickyTopBar()):tbLocalize.hasStickyTopBarMobile||(this.config.$hasStickyTopBar=!1)),tbLocalize.hasStickyHeader&&(this.stickyHeader("unstick"),this.stickyHeaderShrink("destroy"),this.config.$hasStickyMobileHeader||this.config.$windowWidth>=tbLocalize.stickyHeaderBreakPoint?(this.config.$hasStickyHeader=!0,this.stickyHeader(),this.stickyHeaderShrink()):this.config.$hasStickyMobileHeader||(this.config.$hasStickyHeader=!1)),this.config.$localScrollOffset=this.parseLocalScrollOffset()},mobileCheck:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?(this.config.$body.addClass("tb-is-mobile-device"),!0):void 0},pageAnimations:function(){e.fn.animsition&&tbLocalize.pageAnimation&&e(".animsition").animsition({touchSupport:!1,inClass:tbLocalize.pageAnimationIn,outClass:tbLocalize.pageAnimationOut,inDuration:tbLocalize.pageAnimationInDuration,outDuration:tbLocalize.pageAnimationOutDuration,linkElement:'a[href]:not([target="_blank"]):not([href^="#"]):not([href*="javascript"]):not([href*=".jpg"]):not([href*=".jpeg"]):not([href*=".gif"]):not([href*=".png"]):not([href*=".mov"]):not([href*=".swf"]):not([href*=".mp4"]):not([href*=".flv"]):not([href*=".avi"]):not([href*=".mp3"]):not([href^="mailto:"]):not([href*="?"]):not([href*="#localscroll"]):not([class="wcmenucart"])',loading:!0})},superFish:function(){e.fn.superfish&&e("#site-navigation ul.sf-menu").superfish({delay:tbLocalize.superfishDelay,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:tbLocalize.superfishSpeed,speedOut:tbLocalize.superfishSpeedOut,cssArrows:!1,disableHI:!1})},megaMenusWidth:function(){if(this.config.$siteHeader&&"one"===tbLocalize.siteHeaderStyle){var i=e("#site-navigation-wrap"),t=this.config.$siteHeader.find(".container").outerWidth(),o=i.outerWidth(),a=i.css("right"),a=parseInt(a);"auto"==a&&(a=0);var n=t-o-a;e("#site-navigation-wrap .megamenu > ul").css({width:t,"margin-left":-n})}},megaMenusTop:function(){if(this.config.$siteHeaderHeight&&this.config.$siteNavWrap&&this.config.$siteHeader.hasClass("header-one")&&!e("#site-navigation-wrap").hasClass("tb-flush-dropdowns")&&this.config.$siteHeader.hasClass("header-one")){var i=this.config.$siteNavWrap.outerHeight(),t=this.config.$siteHeaderHeight-i;e("#site-navigation-wrap .megamenu > ul").css({top:t/2+i})}},flushDropdownsTop:function(){if(this.config.$siteHeaderHeight&&this.config.$siteNavWrap&&this.config.$siteNavWrap.hasClass("tb-flush-dropdowns")){var i=this.config.$siteNavWrap.outerHeight(),t=this.config.$siteHeaderHeight-i;e("#site-navigation-wrap .dropdown-menu > .menu-item-has-children > ul").css({top:t/2+i})}},mobileMenu:function(i){var t=this;if("sidr"==this.config.$mobileMenuStyle&&"undefined"!=typeof tbLocalize.sidrSource){var t=this;e("a.mobile-menu-toggle, li.mobile-menu-toggle > a").sidr({name:"sidr-main",source:tbLocalize.sidrSource,side:tbLocalize.sidrSide,displace:tbLocalize.sidrDisplace,speed:parseInt(tbLocalize.sidrSpeed),renaming:!0,onOpen:function(i){t.config.$body.addClass("tb-noscroll");var o=e(".sidr-class-menu-item-has-children");o.children("a").append('<span class="sidr-class-dropdown-toggle"></span>'),e(".sidr-class-dropdown-toggle").on(t.config.$isMobile?"touchstart":"click",function(i){var t=e(this).parent("a"),a=t.parent("li"),n=a.parents("li");a.children("ul");return a.hasClass("active")?a.removeClass("active").children("ul").slideUp("fast"):(o.not(n).removeClass("active").children("ul").slideUp("fast"),a.addClass("active").children("ul").slideDown("fast")),!1}),t.config.$body.append('<div class="tb-sidr-overlay tb-hidden"></div>'),e(".tb-sidr-overlay").fadeIn(tbLocalize.sidrSpeed),e("#sidr-main").bind("mousewheel DOMMouseScroll",function(e){var i=e.originalEvent,t=i.wheelDelta||-i.detail;this.scrollTop+=30*(0>t?1:-1),e.preventDefault()}),e("a.sidr-class-toggle-sidr-close").on(t.config.$isMobile?"touchstart":"click",function(i){return e.sidr("close","sidr-main"),!1}),e(".tb-sidr-overlay").on(t.config.$isMobile?"touchstart":"click",function(i){return e.sidr("close","sidr-main"),!1}),t.config.$window.resize(function(){t.config.$windowWidth>=t.config.$mobileMenuBreakpoint&&e.sidr("close","sidr-main")})},onClose:function(i){t.config.$body.removeClass("tb-noscroll"),e(".sidr-class-menu-item-has-children.active").removeClass("active").children("ul").hide(),e(".tb-sidr-overlay").fadeOut(tbLocalize.sidrSpeed,function(){e(this).remove()})}}),e("li.sidr-class-local-scroll > a").click(function(){var i=e(this.hash);return e.sidr("close","sidr-main"),t.scrollTo(i),!1})}else if("toggle"==this.config.$mobileMenuStyle&&this.config.$siteHeader){if(e("#tb-mobile-menu-fixed-top").length?e("#tb-mobile-menu-fixed-top").append('<nav class="mobile-toggle-nav clr"></nav>'):e('<nav class="mobile-toggle-nav clr"></nav>').insertAfter(this.config.$siteHeader),e("#mobile-menu-alternative").length)var o=e("#mobile-menu-alternative .dropdown-menu").html();else var o=e("#site-navigation .dropdown-menu").html();e(".mobile-toggle-nav").html('<ul class="mobile-toggle-nav-ul">'+o+"</ul>"),e(".mobile-toggle-nav-ul, .mobile-toggle-nav-ul *").children().each(function(){this.attributes;e(this).removeAttr("style")}),e(".mobile-toggle-nav-ul").addClass("container"),e(".mobile-menu-toggle").on(t.config.$isMobile?"touchstart":"click",function(i){return tbLocalize.animateMobileToggle?e(".mobile-toggle-nav").slideToggle("fast").toggleClass("visible"):e(".mobile-toggle-nav").toggle().toggleClass("visible"),!1}),t.config.$window.resize(function(){t.config.$windowWidth>=t.config.$mobileMenuBreakpoint&&e(".mobile-toggle-nav").length&&e(".mobile-toggle-nav").hide().removeClass("visible")})}else if("full_screen"==this.config.$mobileMenuStyle&&this.config.$siteHeader){var a=tbLocalize.fullScreenMobileMenuStyle?tbLocalize.fullScreenMobileMenuStyle:!1;if(t.config.$body.append('<div class="full-screen-overlay-nav clr '+a+'"><span class="full-screen-overlay-nav-close"></span><nav class="full-screen-overlay-nav-ul-wrapper"><ul class="full-screen-overlay-nav-ul"></ul></nav></div>'),e("#mobile-menu-alternative").length)var o=e("#mobile-menu-alternative .dropdown-menu").html();else var o=e("#site-navigation .dropdown-menu").html();e(".full-screen-overlay-nav-ul").html(o),e(".full-screen-overlay-nav, .full-screen-overlay-nav *").children().each(function(){this.attributes;e(this).removeAttr("style")}),e(".mobile-menu-toggle").on(t.config.$isMobile?"touchstart":"click",function(i){return e(".full-screen-overlay-nav").addClass("visible"),t.config.$body.addClass("tb-noscroll"),!1}),e(".full-screen-overlay-nav-close").on(t.config.$isMobile?"touchstart":"click",function(i){return e(".full-screen-overlay-nav").removeClass("visible"),t.config.$body.removeClass("tb-noscroll"),!1})}},navNoClick:function(){e("li.nav-no-click > a, li.sidr-class-nav-no-click > a").live("click",function(){return!1})},stickyTopBar:function(i){if(this.config.$hasTopBar&&this.config.$hasStickyTopBar&&this.config.$stickyTopBar){var t=this;if("unstick"==i&&e(".tb-sticky-top-bar-holder").length)return t.config.$stickyTopBar.unstick(),t.config.$stickyTopBarHeight=e("#top-bar-wrap").outerHeight(),void e(".tb-sticky-top-bar-holder").height("");if(t.config.$hasStickyTopBar&&!e(".tb-sticky-top-bar-holder").length){var o=e("#tb-mobile-menu-fixed-top");if(o.is(":visible"))var a=o.outerHeight();else var a=0;t.config.$stickyTopBar.sticky({topSpacing:a,getWidthFrom:"#wrap",responsiveWidth:!0,wrapperClassName:"tb-sticky-top-bar-holder"}),t.config.$stickyTopBar.on("sticky-start",function(){e(".tb-sticky-top-bar-holder").height(t.config.$stickyTopBar.outerHeight())})}}},stickyHeader:function(i){var t=this,o=e(".fixed-nav"),a=0,n=e("#tb-mobile-menu-fixed-top");if("unstick"==i){if(e(".tb-sticky-header-holder").length){t.stickyHeaderShrink("resize_destroy"),e("#site-header.fixed-scroll").unstick(),e(".tb-sticky-header-holder").css("height","");var s=t.config.retinaLogo?t.config.retinaLogo:t.config.$siteLogoSrc;s&&t.config.$siteLogo.attr("src",s)}e(".tb-sticky-menu-holder").length&&e(".fixed-nav").unstick()}else{if(!this.config.$siteHeader||!this.config.$hasStickyHeader)return;if(t.config.$hasStickyTopBar&&(a+=t.config.$stickyTopBar.outerHeight()),n.is(":visible")&&(a+=n.outerHeight()),e(".tb-sticky-header-holder").length)return;t.config.$siteHeader.hasClass("fixed-scroll")?(t.config.$siteHeader.sticky({topSpacing:a,getWidthFrom:"#wrap",responsiveWidth:!0,wrapperClassName:"tb-sticky-header-holder"}),e(".tb-sticky-header-holder").height(t.config.$siteHeaderHeight),t.config.$siteHeader.on("sticky-start",function(){t.config.$siteLogo&&tbLocalize.stickyheaderCustomLogo&&!t.config.$siteHeader.hasClass("tb-shrink-sticky-header")&&t.config.$siteLogo.attr("src",tbLocalize.stickyheaderCustomLogo)}),t.config.$siteHeader.on("sticky-end",function(){if(!t.config.$siteHeader.hasClass("tb-shrink-sticky-header")){var e=t.config.retinaLogo?t.config.retinaLogo:t.config.$siteLogoSrc;e&&t.config.$siteLogo.attr("src",e)}})):o.length&&(o.sticky({topSpacing:a,getWidthFrom:"#wrap",responsiveWidth:!0,wrapperClassName:"tb-sticky-menu-holder"}),o.on("sticky-start",function(){e(".tb-sticky-menu-holder").height(o.outerHeight())}))}},stickyHeaderShrink:function(i){function t(){if(a.config.$siteHeader.hasClass("tb-header-shrunk")){n.stop(!0,!0).animate({height:l,"padding-top":s,"padding-bottom":r},{duration:d,queue:!1});var e=a.config.retinaLogo?a.config.retinaLogo:a.config.$siteLogoSrc;e&&a.config.$siteLogo.attr("src",e),a.config.$siteLogo&&a.config.$siteLogo.stop(!0,!0).animate({height:a.config.$siteLogoHeight},{duration:d,queue:!1}),setTimeout(function(){a.config.$siteHeaderHeight=a.config.$siteHeader.outerHeight(),a.megaMenusTop(),a.flushDropdownsTop()},d),a.config.$siteHeader.removeClass("tb-header-shrunk")}}function o(){n.css({height:"","padding-top":"","padding-bottom":""});var e=a.config.retinaLogo?a.config.retinaLogo:a.config.$siteLogoSrc;e&&a.config.$siteLogo.attr("src",e),a.config.$siteLogo&&a.config.$siteLogo.css({height:a.config.$siteLogoHeight}),a.config.$siteHeaderHeight=a.config.$siteHeader.outerHeight(),a.megaMenusTop(),a.flushDropdownsTop(),a.config.$siteHeader.removeClass("tb-header-shrunk")}if(this.config.$siteHeader&&this.config.$siteHeader.hasClass("tb-shrink-sticky-header")&&e(".tb-sticky-header-holder").length){var a=this,n=e("#site-header-inner"),s=e("#site-header-inner").css("padding-top"),r=e("#site-header-inner").css("padding-bottom"),l=n.outerHeight(),c=70,h=parseInt(tbLocalize.shrinkHeaderLogoHeight),d=300;if("destroy"==i)return void t();if("resize_destroy"==i)return void o();var g=tbLocalize.stickyShrinkOffset;a.config.$siteHeaderBottom&&(g=a.config.$siteHeaderBottom),a.config.$window.scroll(function(){a.config.$hasStickyHeader&&(a.config.$windowTop>g?a.config.$siteHeader.hasClass("tb-header-shrunk")||(n.stop(!0,!0).animate({height:c,"padding-top":"0","padding-bottom":"0"},{duration:d,queue:!1}),a.config.$siteLogo&&a.config.$siteLogo.stop(!0,!0).animate({height:h},{duration:d,queue:!1}),a.config.$siteLogo&&tbLocalize.stickyheaderCustomLogo&&a.config.$siteLogo.attr("src",tbLocalize.stickyheaderCustomLogo),setTimeout(function(){a.config.$siteHeaderHeight=a.config.$siteHeader.outerHeight(),a.megaMenusTop(),a.flushDropdownsTop()},d),a.config.$siteHeader.addClass("tb-header-shrunk")):t())})}},overlayHeaderTopWrapPadding:function(){if(this.config.$hasTopBar&&this.config.$hasHeaderOverlay){var i=e("boxed"==tbLocalize.mainLayout?"#wrap":"#outer-wrap");e(i).css({"padding-top":e("#top-bar-wrap").outerHeight()}),e("#site-header.overlay-header").css({top:e("#top-bar-wrap").outerHeight()});var t=e(".offset-overlay-header").first();t.length&&this.config.$siteHeaderHeight&&t.css({"padding-top":this.config.$siteHeaderHeight+60})}},menuSearch:function(){if("drop_down"==tbLocalize.menuSearchStyle)e("a.search-dropdown-toggle").click(function(i){return e("#searchform-dropdown").toggleClass("show"),e("#searchform-dropdown input").focus(),e(this).parent("li").toggleClass("active"),e("div#current-shop-items-dropdown").removeClass("show"),e("li.wcmenucart-toggle-dropdown").removeClass("active"),!1}),e("#searchform-dropdown").click(function(e){e.stopPropagation()});else if("overlay"==tbLocalize.menuSearchStyle){if(!e.fn.leanerModal)return;var i=e("a.search-overlay-toggle");i.leanerModal({id:"#searchform-overlay",top:100,overlay:.8}),i.click(function(){e("#site-searchform input").focus()})}else if("header_replace"==tbLocalize.menuSearchStyle){var t=e("#searchform-header-replace");e("a.search-header-replace-toggle").click(function(e){return t.toggleClass("show"),t.find("input").focus(),!1}),e("#searchform-header-replace-close").click(function(){return t.removeClass("show"),!1}),t.click(function(e){e.stopPropagation()})}},headerCart:function(){if(!e("a.wcmenucart").hasClass("go-to-shop"))if("drop_down"==tbLocalize.wooCartStyle)e(".toggle-cart-widget").click(function(i){return e("#searchform-dropdown").removeClass("show"),e("a.search-dropdown-toggle").parent("li").removeClass("active"),e("div#current-shop-items-dropdown").toggleClass("show"),e(this).toggleClass("active"),!1}),e("div#current-shop-items-dropdown").click(function(e){e.stopPropagation()}),this.config.$document.click(function(){e("div#current-shop-items-dropdown").removeClass("show"),e("li.wcmenucart-toggle-dropdown").removeClass("active")}),e("#current-shop-items-dropdown").bind("mousewheel DOMMouseScroll",function(e){var i=e.originalEvent,t=i.wheelDelta||-i.detail;this.scrollTop+=30*(0>t?1:-1),e.preventDefault()});else if("overlay"==tbLocalize.wooCartStyle){if(!e.fn.leanerModal)return;e(".toggle-cart-widget").leanerModal({id:"#current-shop-items-overlay",top:100,overlay:.8})}},cartSearchDropdownsRelocate:function(){var i=e("#site-navigation .dropdown-menu > li:nth-last-child(1)");if(!this.config.$hasHeaderOverlay&&this.config.$siteHeader&&i.length&&this.config.$siteHeader.hasClass("tb-reposition-cart-search-drops")){var t=e("#searchform-dropdown"),o=e("#current-shop-items-dropdown"),a=i.position();if(t.length){var n=a.left-t.outerWidth()+i.width();t.css({right:"auto",left:n})}if(o.length){var s=a.left-o.outerWidth()+i.width();o.css({right:"auto",left:s})}}},hideEditLink:function(){e("a.hide-post-edit").click(function(){return e("div.post-edit").hide(),!1})},customMenuWidgetAccordion:function(){var i=this;e("#main .widget_nav_menu .current-menu-ancestor").addClass("active").children("ul").show(),e("#main .widget_nav_menu").each(function(){var t=(e(this),e(this).find(".menu-item-has-children"));t.children(".sub-menu");t.each(function(){e(this).addClass("parent");var o=e(this).children("a");o.on(i.config.$isMobile?"touchstart":"click",function(i){var o=e(this).parent("li"),a=o.parents("li");return o.hasClass("active")?o.removeClass("active").children(".sub-menu").slideUp("fast"):(t.not(a).removeClass("active").children(".sub-menu").slideUp("fast"),o.addClass("active").children(".sub-menu").slideDown("fast")),!1})})})},inlineHeaderLogo:function(){if("five"==tbLocalize.siteHeaderStyle){var i=e("#site-header-inner > .header-five-logo"),t=e("#site-header-inner .navbar-style-five"),o=t.children("#site-navigation").children("ul").children("li").size(),a=Math.round(o/2)-parseInt(tbLocalize.headerFiveSplitOffset),n=e(".menu-item-logo .header-five-logo");this.config.$windowWidth>=this.config.$mobileMenuBreakpoint&&i.length&&t.length&&(e('<li class="menu-item-logo"></li>').insertAfter(t.find("#site-navigation > ul > li:nth( "+a+" )")),i.appendTo(t.find(".menu-item-logo"))),this.config.$windowWidth<this.config.$mobileMenuBreakpoint&&n.length&&(n.prependTo(e("#site-header-inner")),e(".menu-item-logo").remove()),i.addClass("display")}},backTopLink:function(){var i=this,t=e("a#site-scroll-top");if(t.length){var o=tbLocalize.windowScrollTopSpeed?tbLocalize.windowScrollTopSpeed:2e3,o=parseInt(o);this.config.$window.scroll(function(){e(this).scrollTop()>100?t.addClass("show"):t.removeClass("show")}),t.on(i.config.$isMobile?"touchstart":"click",function(i){return e("html, body").stop(!0,!0).animate({scrollTop:0},o),!1})}},smoothCommentScroll:function(){e(".single li.comment-scroll a").click(function(i){return e("html, body").stop(!0,!0).animate({scrollTop:e(this.hash).offset().top-180},"normal"),!1})},tipsyTooltips:function(){e("a.tooltip-left").tipsy({fade:!0,gravity:"e"}),e("a.tooltip-right").tipsy({fade:!0,gravity:"w"}),e("a.tooltip-up").tipsy({fade:!0,gravity:"s"}),e("a.tooltip-down").tipsy({fade:!0,gravity:"n"})},customHovers:function(){e(".tb-data-hover").each(function(){var i=e(this),t=e(this).css("backgroundColor"),o=e(this).css("color"),a=e(this).attr("data-hover-background"),n=e(this).attr("data-hover-color");i.hover(function(){"undefined"!==CSSStyleDeclaration.prototype.setProperty?(a&&this.style.setProperty("background-color",a,"important"),n&&this.style.setProperty("color",n,"important")):(a&&i.css("background-color",a),n&&i.css("color",n))},function(){"undefined"!==CSSStyleDeclaration.prototype.setProperty?(a&&this.style.setProperty("background-color",t,"important"),n&&this.style.setProperty("color",o,"important")):(a&&t&&i.css("background-color",t),n&&o&&i.css("color",o))})})},toggleBar:function(){var i=this,t=e("a.toggle-bar-btn");t.length&&(t.on(i.config.$isMobile?"touchstart":"click",function(i){var o=e(".toggle-bar-btn").find(".fa");return o.toggleClass(t.data("icon")),o.toggleClass(t.data("icon-hover")),e("#toggle-bar-wrap").toggleClass("active-bar"),!1}),e("#toggle-bar-wrap").click(function(e){e.stopPropagation()}))},skillbar:function(){e(".vcex-skillbar").each(function(){var i=e(this);i.appear(function(){i.find(".vcex-skillbar-bar").animate({width:e(this).attr("data-percent")},800)})},{accX:0,accY:0})},milestone:function(){e(".vcex-animated-milestone").each(function(){e(this).appear(function(){e(this).find(".vcex-milestone-time").countTo({formatter:function(e,i){return e.toFixed(i.decimals).replace(/\B(?=(?:\d{3})+(?!\d))/g,",")}})},{accX:0,accY:0})})},parallax:function(){e(".tb-parallax-bg").each(function(){var i=e(this);i.scrolly2().trigger("scroll"),i.css({opacity:1})})},parseLocalScrollOffset:function(){if(tbLocalize.localScrollOffset)return tbLocalize.localScrollOffset;if(!this.config.$siteHeader||this.config.$verticalHeaderActive)return 0;var i=0;return this.config.$siteHeaderHeight&&this.config.$siteHeader.hasClass("fixed-scroll")?!this.config.$hasStickyMobileHeader&&this.config.$windowWidth<=tbLocalize.stickyHeaderBreakPoint?i=0:this.config.$siteHeader.hasClass("tb-shrink-sticky-header")?i+=70:i=this.config.$siteHeaderHeight:e("#site-navigation-wrap").hasClass("fixed-nav")&&this.config.$windowWidth>=tbLocalize.stickyHeaderBreakPoint&&(i+=e("#site-navigation-wrap").outerHeight()),this.config.$hasStickyTopBar&&this.config.$stickyTopBarHeight&&(i+=this.config.$stickyTopBarHeight),i},localScrollLinksArray:function(){var i=[];if(!e("li.local-scroll").length)return i;for(var t=e("#site-navigation li.local-scroll").children("a"),o=0;o<t.length;o++){var a=t[o],n="#"+e(a).attr("href").replace(/^.*?(#|$)/,"");e(n).length&&i.push(n)}return i},scrollTo:function(i,t,o){var a=this,n=e(i);if(n.length){var s=t?t:n.offset().top-a.config.$localScrollOffset;e(".mobile-toggle-nav").length?tbLocalize.animateMobileToggle?e(".mobile-toggle-nav").slideUp("fast",function(){e(".mobile-toggle-nav").removeClass("visible"),e("html,body").stop(!0,!0).animate({scrollTop:s},a.config.$localScrollSpeed,function(){tbLocalize.localScrollUpdateHash&&(window.location.hash=i)})}):(e(".mobile-toggle-nav").hide().removeClass("visible"),e("html,body").stop(!0,!0).animate({scrollTop:s},a.config.$localScrollSpeed,function(){tbLocalize.localScrollUpdateHash&&(window.location.hash=i)})):e("html,body").stop(!0,!0).animate({scrollTop:s},a.config.$localScrollSpeed,function(){tbLocalize.localScrollUpdateHash&&(window.location.hash=i)})}},localScrollLinks:function(){var i=this;e("li.local-scroll > a, .vcex-navbar-link.local-scroll").click(function(){var e=this.hash;return i.scrollTo(e),!1}),e(".local-scroll-link").click(function(){var e=this.hash;return i.scrollTo(e),!1}),e("body.single div.entry-summary a.woocommerce-review-link").click(function(){var t=this.hash,o=e(t);if(o.length){var a=o.offset().top-i.config.$localScrollOffset-20;i.scrollTo(t,a)}return!1})},localScrollHighlight:function(){var i=this,t=this.config.$localScrollArray;if(0!==t.length){for(var o=this.config.$window.scrollTop(),a=this.config.$windowHeight,n=this.config.$document.height(),s=0;s<t.length;s++){var r=t[s];if(e(r).length){var l=e(r).offset().top-i.config.$localScrollOffset-1,c=e(r).outerHeight();o>=l&&l+c>o?e("li.local-scroll a[href='"+r+"']").parent("li").addClass("current-menu-item"):e("li.local-scroll a[href='"+r+"']").parent("li").removeClass("current-menu-item")}}var h=t[t.length-1];o+a==n&&(e(".local-scroll.current-menu-item").removeClass("current-menu-item"),e("li.local-scroll a[href='"+h+"']").parent("li").addClass("current-menu-item"))}},scrollToHash:function(e){var i=e,t=location.hash;if(-1!=t.indexOf("localscroll-")){var o=t.replace("localscroll-","");return void i.scrollTo(o)}},equalHeights:function(){e.fn.matchHeight&&e(".equal-height-column, .match-height-row .match-height-content, .vcex-feature-box-match-height .vcex-match-height, .equal-height-content, .match-height-grid .match-height-content, .blog-entry-equal-heights .blog-entry-inner, .tb-vc-row-columns-match-height .tb-vc-column-wrapper").matchHeight()},footerRevealMainMargin:function(){this.config.$footerReveal&&e("#wrap").css({"margin-bottom":e(".footer-reveal").outerHeight()})},footerRevealLoadShow:function(){this.config.$footerReveal&&e(window).height()>e("#wrap").height()&&e(".footer-reveal").show().toggleClass("footer-reveal footer-reveal-visible")},footerRevealScrollShow:function(){this.config.$footerReveal&&(this.config.$windowTop>e("#main").offset().top?e(".footer-reveal").hasClass("visible")||e(".footer-reveal").show().addClass("visible"):e(".footer-reveal").hasClass("visible")&&e(".footer-reveal").removeClass("visible").hide())},customSelects:function(){e(tbLocalize.customSelects).customSelect({customClass:"theme-select"})},fadeIn:function(){e(".fade-in-image, .tb-show-on-load").addClass("no-opacity")},owlCarousel:function(){var i=this;e(".tb-carousel").each(function(){var t=e(this),o=t.data();t.owlCarousel({animateIn:!1,animateOut:!1,lazyLoad:!1,smartSpeed:i.parseData(o.smartSpeed,tbLocalize.carouselSpeed),rtl:i.config.$isRTL,dots:o.dots,nav:o.nav,items:o.items,slideBy:o.slideby,center:o.center,loop:o.loop,margin:o.margin,autoplay:o.autoplay,autoplayTimeout:o.autoplayTimeout,navText:['<span class="fa fa-chevron-left"><span>','<span class="fa fa-chevron-right"></span>'],responsive:{0:{items:o.itemsMobilePortrait},480:{items:o.itemsMobileLandscape},768:{items:o.itemsTablet},960:{items:o.items}}})})},sliderPro:function(){var i=this;e(".tb-slider").each(function(){var t=e(this),o=t.data();e(".tb-slider-slide, .tb-slider-thumbnails").css({opacity:1,display:"block"});var a=e(".tb-slider").prev(".tb-slider-preloaderimg"),n=a.length?a.outerHeight():null,s=i.parseData(o.heightAnimationDuration,500);t.sliderPro({responsive:!0,width:"100%",height:n,fade:i.parseData(o.fade,600),touchSwipe:i.parseData(o.touchSwipe,!0),fadeDuration:i.parseData(o.animationSpeed,600),slideAnimationDuration:i.parseData(o.animationSpeed,600),autoHeight:i.parseData(o.autoHeight,!0),heightAnimationDuration:s,arrows:i.parseData(o.arrows,!0),fadeArrows:i.parseData(o.fadeArrows,!0),autoplay:i.parseData(o.autoPlay,!0),autoplayDelay:i.parseData(o.autoPlayDelay,5e3),buttons:i.parseData(o.buttons,!0),shuffle:i.parseData(o.shuffle,!1),orientation:i.parseData(o.direction,"horizontal"),loop:i.parseData(o.loop,!1),keyboard:!1,fullScreen:i.parseData(o.fullscreen,!1),slideDistance:i.parseData(o.slideDistance,0),thumbnailHeight:i.parseData(o.thumbnailHeight,70),thumbnailWidth:i.parseData(o.thumbnailWidth,70),thumbnailPointer:i.parseData(o.thumbnailPointer,!1),updateHash:i.parseData(o.updateHash,!1),thumbnailArrows:!1,fadeThumbnailArrows:!1,thumbnailTouchSwipe:!0,fadeCaption:i.parseData(o.fadeCaption,!0),captionFadeDuration:500,waitForLayers:!0,autoScaleLayers:!0,forceSize:"none",thumbnailPosition:"bottom",reachVideoAction:"playVideo",leaveVideoAction:"pauseVideo",endVideoAction:"nextSlide",init:function(i){t.prev(".tb-slider-preloaderimg").hide(),t.parent(".gallery-format-post-slider")&&e(".blog-masonry-grid").length&&setTimeout(function(){e(".blog-masonry-grid").isotope("layout")},s+1)},gotoSlideComplete:function(i){t.parent(".gallery-format-post-slider")&&e(".blog-masonry-grid").length&&e(".blog-masonry-grid").isotope("layout")}})}),e(".woo-product-entry-slider").click(function(){return!1})},isotopeGrids:function(){var i=this;e(".vcex-isotope-grid").each(function(){var t=e(this);t.imagesLoaded(function(){t.isotope({itemSelector:".vcex-isotope-entry",transformsEnabled:!0,isOriginLeft:i.config.$isRTL?!1:!0,transitionDuration:t.data("transition-duration")?t.data("transition-duration")+"s":"0.4s",layoutMode:t.data("layout-mode")?t.data("layout-mode"):"masonry",filter:t.data("filter")?t.data("filter"):""})});var o=t.prev("ul.vcex-filter-links");if(o.length){var a=o.find("a");a.click(function(){var i=e(this).attr("data-filter");return t.isotope({filter:i}),e(this).parents("ul").find("li").removeClass("active"),e(this).parent("li").addClass("active"),!1})}})},archiveMasonryGrids:function(){var i=this,t=e(".blog-masonry-grid,div.tb-row.portfolio-masonry,div.tb-row.portfolio-no-margins,div.tb-row.staff-masonry,div.tb-row.staff-no-margins");t.each(function(){var t=e(this),o=t.data(),a=i.parseData(o.transitionDuration,"0.0");i.parseData(o.layoutMode,"masonry");t.imagesLoaded(function(){ t.isotope({itemSelector:".isotope-entry",transformsEnabled:!0,isOriginLeft:i.config.$isRTL?!1:!0,transitionDuration:a+"s"})})})},iLightbox:function(){var i=this;e(".tb-lightbox").each(function(){var t=e(this);if(!t.hasClass("tb-lightbox-group-item")){var o=t.data();t.iLightBox({skin:i.parseData(o.skin,tbLocalize.iLightbox.skin),controls:{fullscreen:tbLocalize.iLightbox.controls.fullscreen},show:{title:tbLocalize.iLightbox.show.title,speed:parseInt(tbLocalize.iLightbox.show.speed)},hide:{speed:parseInt(tbLocalize.iLightbox.hide.speed)},effects:{reposition:!0,repositionSpeed:200,switchSpeed:300,loadedFadeSpeed:tbLocalize.iLightbox.effects.loadedFadeSpeed,fadeSpeed:tbLocalize.iLightbox.effects.fadeSpeed},overlay:tbLocalize.iLightbox.overlay,social:tbLocalize.iLightbox.social})}}),e(".tb-lightbox-video, .wpb_single_image.video-lightbox a, .tb-lightbox-autodetect, .tb-lightbox-autodetect a").each(function(){var t=e(this),o=t.data();t.iLightBox({smartRecognition:!0,skin:i.parseData(o.skin,tbLocalize.iLightbox.skin),path:"horizontal",controls:{fullscreen:tbLocalize.iLightbox.controls.fullscreen},show:{title:tbLocalize.iLightbox.show.title,speed:parseInt(tbLocalize.iLightbox.show.speed)},hide:{speed:parseInt(tbLocalize.iLightbox.hide.speed)},effects:{reposition:!0,repositionSpeed:200,switchSpeed:300,loadedFadeSpeed:tbLocalize.iLightbox.effects.loadedFadeSpeed,fadeSpeed:tbLocalize.iLightbox.effects.fadeSpeed},overlay:tbLocalize.iLightbox.overlay,social:tbLocalize.iLightbox.social})}),e(".lightbox-group").each(function(){var t=e(this),o=t.find("a.tb-lightbox-group-item"),a=t.data();o.iLightBox({skin:i.parseData(a.skin,tbLocalize.iLightbox.skin),path:i.parseData(a.path,tbLocalize.iLightbox.path),infinite:!0,show:{title:tbLocalize.iLightbox.show.title,speed:parseInt(tbLocalize.iLightbox.show.speed)},hide:{speed:parseInt(tbLocalize.iLightbox.hide.speed)},controls:{arrows:i.parseData(a.arrows,tbLocalize.iLightbox.controls.arrows),thumbnail:i.parseData(a.thumbnails,tbLocalize.iLightbox.controls.thumbnail),fullscreen:tbLocalize.iLightbox.controls.fullscreen,mousewheel:tbLocalize.iLightbox.controls.mousewheel},effects:{reposition:!0,repositionSpeed:200,switchSpeed:300,loadedFadeSpeed:tbLocalize.iLightbox.effects.loadedFadeSpeed,fadeSpeed:tbLocalize.iLightbox.effects.fadeSpeed},overlay:tbLocalize.iLightbox.overlay,social:tbLocalize.iLightbox.social})}),e(".tb-lightbox-gallery").on("click",function(i){var t=e(this).data("gallery").split(",");return t&&e.iLightBox(t,{skin:tbLocalize.iLightbox.skin,path:"horizontal",infinite:!0,show:{title:tbLocalize.iLightbox.show.title,speed:parseInt(tbLocalize.iLightbox.show.speed)},hide:{speed:parseInt(tbLocalize.iLightbox.hide.speed)},controls:{arrows:tbLocalize.iLightbox.controls.arrows,thumbnail:tbLocalize.iLightbox.controls.thumbnail,fullscreen:tbLocalize.iLightbox.controls.fullscreen,mousewheel:tbLocalize.iLightbox.controls.mousewheel},effects:{reposition:!0,repositionSpeed:200,switchSpeed:300,loadedFadeSpeed:tbLocalize.iLightbox.effects.loadedFadeSpeed,fadeSpeed:tbLocalize.iLightbox.effects.fadeSpeed},overlay:tbLocalize.iLightbox.overlay,social:tbLocalize.iLightbox.social}),!1})},overlayHovers:function(){e(".overlay-parent-title-push-up").each(function(){var i=e(this),t=i.find(".overlay-title-push-up"),o=i.find("a"),a=o.find("img"),n=t.outerHeight();i.imagesLoaded(function(){t.css({bottom:-n}),o.css({height:a.outerHeight()}),a.css({position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}),i.hover(function(){a.css({top:-20}),t.css({bottom:0})},function(){a.css({top:"0"}),t.css({bottom:-n})})})})},wooSelects:function(){void 0!==e.fn.select2&&e("#calc_shipping_country").select2()},parseData:function(e,i){return"undefined"!=typeof e?e:i}};i.init(),e.fn.extend({followTo:function(i,t){var o=e(this),a=o.offset().top,n=function(){e(window).scrollTop()>a?i.offset().top>e(window).scrollTop()+o.outerHeight()+t/2?o.css({position:"fixed",top:t+30,right:0}):i.offset().top<=e(window).scrollTop()+o.outerHeight()-t&&o.css({position:"relative",top:0}):e(window).scrollTop()<=a&&o.css({position:"relative",top:0})};e(window).resize(function(){n()}),e(window).scroll(function(){n()})}}),0!=e(".preview-img-listAQ").length&&(e(window).width()<=500&&e(".preview-img-listAQ").followTo(e(".breaker"),60),e(function(){var i="/wp-content/uploads/2015/11/",t=["burgundy","metallicburgundy","cabernet","metallicred","red","metallicpink","pink","azalea","coral","hotpink","tangerine","orange","peach","daffodil","lightyellow","limegreen","mint","emerald","teal","hunter","sage","seafoam","celedon","turquoise","aqua","babyblue","cornflower","periwinkle","royalblue","metallicblue","navy","purple","metallicpurple","lavender","metallichotpink","eggplant","brown","mustard","gold","irridescentwhite","ivory","white","silver","black"];e(".preview-link").click(function(){var o=e(this).attr("id_node")-1;e("#wandswap").attr("src",i+t[o]+"-wand.jpg")})}))}(jQuery);