");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'
The content could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.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 c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{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(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.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 c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('
').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()});
!function(a){return"function"==typeof define&&define.amd?define(["jquery"],function(b){return a(b,window,document)}):"object"==typeof exports?module.exports=a(require("jquery"),window,document):a(jQuery,window,document)}(function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H;z={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",enabledClass:"has-scrollbar",flashedClass:"flashed",activeClass:"active",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},u="scrollbar",t="scroll",l="mousedown",m="mouseenter",n="mousemove",p="mousewheel",o="mouseup",s="resize",h="drag",i="enter",w="up",r="panedown",f="DOMMouseScroll",g="down",x="wheel",j="keydown",k="keyup",v="touchmove",d="Microsoft Internet Explorer"===b.navigator.appName&&/msie 7./i.test(b.navigator.appVersion)&&b.ActiveXObject,e=null,D=b.requestAnimationFrame,y=b.cancelAnimationFrame,F=c.createElement("div").style,H=function(){var a,b,c,d,e,f;for(d=["t","webkitT","MozT","msT","OT"],a=e=0,f=d.length;f>e;a=++e)if(c=d[a],b=d[a]+"ransform",b in F)return d[a].substr(0,d[a].length-1);return!1}(),G=function(a){return H===!1?!1:""===H?a:H+a.charAt(0).toUpperCase()+a.substr(1)},E=G("transform"),B=E!==!1,A=function(){var a,b,d;return a=c.createElement("div"),b=a.style,b.position="absolute",b.width="100px",b.height="100px",b.overflow=t,b.top="-9999px",c.body.appendChild(a),d=a.offsetWidth-a.clientWidth,c.body.removeChild(a),d},C=function(){var a,c,d;return c=b.navigator.userAgent,(a=/(?=.+Mac OS X)(?=.+Firefox)/.test(c))?(d=/Firefox\/\d{2}\./.exec(c),d&&(d=d[0].replace(/\D+/g,"")),a&&+d>23):!1},q=function(){function j(d,f){this.el=d,this.options=f,e||(e=A()),this.$el=a(this.el),this.doc=a(this.options.documentContext||c),this.win=a(this.options.windowContext||b),this.body=this.doc.find("body"),this.$content=this.$el.children("."+this.options.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return j.prototype.preventScrolling=function(a,b){if(this.isActive)if(a.type===f)(b===g&&a.originalEvent.detail>0||b===w&&a.originalEvent.detail<0)&&a.preventDefault();else if(a.type===p){if(!a.originalEvent||!a.originalEvent.wheelDelta)return;(b===g&&a.originalEvent.wheelDelta<0||b===w&&a.originalEvent.wheelDelta>0)&&a.preventDefault()}},j.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},j.prototype.updateScrollValues=function(){var a,b;a=this.content,this.maxScrollTop=a.scrollHeight-a.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=a.scrollTop,b=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop
=a.maxScrollTop&&a.prevScrollTop!==a.maxScrollTop?a.$el.trigger("scrollend"):0===a.contentScrollTop&&0!==a.prevScrollTop&&a.$el.trigger("scrolltop"),!1}}(this),up:function(a){return function(b){return a.isBeingDragged=!1,a.pane.removeClass(a.options.activeClass),a.doc.unbind(n,a.events[h]).unbind(o,a.events[w]),a.body.unbind(m,a.events[i]),!1}}(this),resize:function(a){return function(b){a.reset()}}(this),panedown:function(a){return function(b){return a.sliderY=(b.offsetY||b.originalEvent.layerY)-.5*a.sliderHeight,a.scroll(),a.events.down(b),!1}}(this),scroll:function(a){return function(b){a.updateScrollValues(),a.isBeingDragged||(a.iOSNativeScrolling||(a.sliderY=a.sliderTop,a.setOnScrollStyles()),null!=b&&(a.contentScrollTop>=a.maxScrollTop?(a.options.preventPageScrolling&&a.preventScrolling(b,g),a.prevScrollTop!==a.maxScrollTop&&a.$el.trigger("scrollend")):0===a.contentScrollTop&&(a.options.preventPageScrolling&&a.preventScrolling(b,w),0!==a.prevScrollTop&&a.$el.trigger("scrolltop"))))}}(this),wheel:function(a){return function(b){var c;if(null!=b)return c=b.delta||b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.detail||b.originalEvent&&-b.originalEvent.detail,c&&(a.sliderY+=-c/3),a.scroll(),!1}}(this),enter:function(a){return function(b){var c;if(a.isBeingDragged)return 1!==(b.buttons||b.which)?(c=a.events)[w].apply(c,arguments):void 0}}(this)}},j.prototype.addEvents=function(){var a;this.removeEvents(),a=this.events,this.options.disableResize||this.win.bind(s,a[s]),this.iOSNativeScrolling||(this.slider.bind(l,a[g]),this.pane.bind(l,a[r]).bind(""+p+" "+f,a[x])),this.$content.bind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.removeEvents=function(){var a;a=this.events,this.win.unbind(s,a[s]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.generate=function(){var a,c,d,f,g,h,i;return f=this.options,h=f.paneClass,i=f.sliderClass,a=f.contentClass,(g=this.$el.children("."+h)).length||g.children("."+i).length||this.$el.append(''),this.pane=this.$el.children("."+h),this.slider=this.pane.find("."+i),0===e&&C()?(d=b.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,""),c={right:-14,paddingRight:+d+14}):e&&(c={right:-e},this.$el.addClass(f.enabledClass)),null!=c&&this.$content.css(c),this},j.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},j.prototype.reset=function(){var a,b,c,f,g,h,i,j,k,l,m,n;return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),a=this.content,f=a.style,g=f.overflowY,d&&this.$content.css({height:this.$content.height()}),b=a.scrollHeight+e,l=parseInt(this.$el.css("max-height"),10),l>0&&(this.$el.height(""),this.$el.height(a.scrollHeight>l?l:a.scrollHeight)),i=this.pane.outerHeight(!1),k=parseInt(this.pane.css("top"),10),h=parseInt(this.pane.css("bottom"),10),j=i+k+h,n=Math.round(j/b*i),nthis.options.sliderMaxHeight&&(n=this.options.sliderMaxHeight),g===t&&f.overflowX!==t&&(n+=e),this.maxSliderTop=j-n,this.contentHeight=b,this.paneHeight=i,this.paneOuterHeight=j,this.sliderHeight=n,this.paneTop=k,this.slider.height(n),this.events.scroll(),this.pane.show(),this.isActive=!0,a.scrollHeight===a.clientHeight||this.pane.outerHeight(!0)>=a.scrollHeight&&g!==t?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===a.scrollHeight&&g===t?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),c=this.$content.css("position"),("static"===c||"relative"===c)&&(m=parseInt(this.$content.css("right"),10),m&&this.$content.css({right:"",marginRight:m})),this)},j.prototype.scroll=function(){return this.isActive?(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this):void 0},j.prototype.scrollBottom=function(a){return this.isActive?(this.$content.scrollTop(this.contentHeight-this.$content.height()-a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTop=function(a){return this.isActive?(this.$content.scrollTop(+a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTo=function(a){return this.isActive?(this.scrollTop(this.$el.find(a).get(0).offsetTop),this):void 0},j.prototype.stop=function(){return y&&this.scrollRAF&&(y(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},j.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),d&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass(this.options.enabledClass)&&(this.$el.removeClass(this.options.enabledClass),this.$content.css({right:""})),this},j.prototype.flash=function(){return!this.iOSNativeScrolling&&this.isActive?(this.reset(),this.pane.addClass(this.options.flashedClass),setTimeout(function(a){return function(){a.pane.removeClass(a.options.flashedClass)}}(this),this.options.flashDelay),this):void 0},j}(),a.fn.nanoScroller=function(b){return this.each(function(){var c,d;if((d=this.nanoscroller)||(c=a.extend({},z,b),this.nanoscroller=d=new q(this,c)),b&&"object"==typeof b){if(a.extend(d.options,b),null!=b.scrollBottom)return d.scrollBottom(b.scrollBottom);if(null!=b.scrollTop)return d.scrollTop(b.scrollTop);if(b.scrollTo)return d.scrollTo(b.scrollTo);if("bottom"===b.scroll)return d.scrollBottom(0);if("top"===b.scroll)return d.scrollTop(0);if(b.scroll&&b.scroll instanceof a)return d.scrollTo(b.scroll);if(b.stop)return d.stop();if(b.destroy)return d.destroy();if(b.flash)return d.flash()}return d.reset()})},a.fn.nanoScroller.Constructor=q});
(function($){
"use strict";
jQuery(document).ready(function(){
var mobileMenuWrapper=jQuery('.mobile-menu-container, .nav-container');
mobileMenuWrapper.find('.menu-item-has-children, .page_item_has_children').each(function(){
var linkItem=jQuery(this).find('a').first();
linkItem.after('');
});
var totalMenuLevelFirst=jQuery('.mobile-menu-container > ul.nav-menu > li, .nav-container > .nav-menu > ul > li').length;
var mobileMenuH=totalMenuLevelFirst*50 + 10;
jQuery('.mbmenu-toggler').on("click", function(){
if(mobileMenuWrapper.hasClass('open')){
mobileMenuWrapper.removeClass('open');
mobileMenuWrapper.animate({'height': 0}, 'fast');
}else{
mobileMenuWrapper.addClass('open');
mobileMenuWrapper.animate({'height': mobileMenuH}, 'fast');
}});
jQuery('.mobile-menu-container li.menu-item-has-children, .nav-container li.page_item_has_children').each(function(){
jQuery(this).css({'height': 50, 'overflow': 'hidden'});
});
jQuery('.mobile-menu-container li.menu-item-has-children, .nav-container li.page_item_has_children').each(function(){
var parentLi=jQuery(this);
var dropdownUl=parentLi.find('ul.sub-menu, ul.children').first();
parentLi.find('.fa').first().on('click', function(){
parentLi.parents('li.menu-item-has-children, li.page_item_has_children').css('height', 'auto');
mobileMenuWrapper.css({'height': 'auto'});
var dropdownUlheight=dropdownUl.outerHeight() + 50;
if(parentLi.hasClass('opensubmenu')){
parentLi.removeClass('opensubmenu');
parentLi.animate({'height': 50}, 'fast', function(){
mobileMenuH=mobileMenuWrapper.outerHeight();
});
parentLi.find('.fa').first().removeClass('fa-minus');
parentLi.find('.fa').first().addClass('fa-plus');
}else{
parentLi.addClass('opensubmenu');
parentLi.animate({'height': dropdownUlheight}, 'fast', function(){
mobileMenuH=mobileMenuWrapper.outerHeight();
});
parentLi.find('.fa').first().addClass('fa-minus');
parentLi.find('.fa').first().removeClass('fa-plus');
}});
});
var $header3=$('.header-style-3'),
header3H=0 - $header3.outerHeight();
if($header3.length){
$('.main-container').css('margin-top', header3H);
}
jQuery('body').append('');
jQuery('.atc-notice-wrapper .close').on("click", function(){
jQuery('.atc-notice-wrapper').fadeOut();
jQuery('.atc-notice').html('');
});
jQuery('body').on('adding_to_cart', function(event, button, data){
var ajaxPId=button.attr('data-product_id');
var ajaxPQty=button.attr('data-quantity');
jQuery.post(ajaxurl,
{
'action': 'gon_get_productinfo',
'data': {'pid': ajaxPId,'quantity': ajaxPQty}},
function(response){
jQuery('.atc-notice').html(response);
}
);
});
jQuery('body').on('added_to_cart', function(event, fragments, cart_hash){
jQuery('.atc-notice-wrapper').fadeIn();
});
jQuery("#ws").focus(function(){
var name=$("#ws").attr("data-name");
if(jQuery(this).val()==name){
jQuery(this).val("");
}});
jQuery("#ws").focusout(function(){
var name=$("#ws").attr("data-name");
if(jQuery(this).val()==""){
jQuery(this).val(name);
}});
jQuery("#wsearchsubmit").click(function(){
var name=$("#ws").attr("data-name");
if(jQuery("#ws").val()==name||jQuery("#ws").val()==""){
jQuery("#ws").focus();
return false;
}});
jQuery("#search_input").focus(function(){
var name=$("#search_input").attr("data-name");
if(jQuery(this).val()==name){
jQuery(this).val("");
}});
jQuery("#search_input").focusout(function(){
var name=$("#search_input").attr("data-name");
if(jQuery(this).val()==""){
jQuery(this).val(name);
}});
jQuery("#blogsearchsubmit").click(function(){
var name=$("#search_input").attr("data-name");
if(jQuery("#search_input").val()==name||jQuery("#search_input").val()==""){
jQuery("#search_input").focus();
return false;
}});
jQuery('.testimonials .wpb_wrapper > h3').each(function(){
var pwidgetTitle=jQuery(this).html();
jQuery(this).html(''+pwidgetTitle+'');
});
jQuery('.zoom_in_marker').on("click", function(){
jQuery.fancybox({
href: jQuery('.woocommerce-main-image').attr('href'),
openEffect: 'elastic',
closeEffect: 'elastic'
});
});
$(".related .shop-products, .upsells .shop-products, .cross-sells .shop-products").addClass('owl-carousel owl-theme');
$(".related .shop-products, .upsells .shop-products, .cross-sells .shop-products").owlCarousel({
items: 4,
responsive:{
0:{
items: 1,
},
450:{
items: 1,
},
650:{
items: 2,
},
800:{
items: 3,
},
980:{
items: 3,
},
1170:{
items: 4,
},
},
nav: false,
dots: false,
navText: ["Prev", "Next"],
});
jQuery('.view-mode').each(function(){
jQuery(this).find('.grid').on("click", function(event){
event.preventDefault();
jQuery('#archive-product .view-mode').find('.grid').addClass('active');
jQuery('#archive-product .view-mode').find('.list').removeClass('active');
jQuery('#archive-product .shop-products').removeClass('list-view');
jQuery('#archive-product .shop-products').addClass('grid-view');
jQuery('#archive-product .list-col4').removeClass('col-xs-12 col-sm-4');
jQuery('#archive-product .list-col8').removeClass('col-xs-12 col-sm-8');
});
jQuery(this).find('.list').on("click", function(event){
event.preventDefault();
jQuery('#archive-product .view-mode').find('.list').addClass('active');
jQuery('#archive-product .view-mode').find('.grid').removeClass('active');
jQuery('#archive-product .shop-products').addClass('list-view');
jQuery('#archive-product .shop-products').removeClass('grid-view');
jQuery('#archive-product .list-col4').addClass('col-xs-12 col-sm-4');
jQuery('#archive-product .list-col8').addClass('col-xs-12 col-sm-8');
});
});
jQuery('.yith-wcwl-add-to-wishlist a, .compare-button a, .add_to_cart_inline a, .quick-wrapper .quick-view, .sharefriend a').each(function(){
gontip(jQuery(this), 'html');
});
jQuery('.social-icons a, .link-follow a').each(function(){
gontip(jQuery(this), 'title');
});
jQuery('.product-wrapper').each(function(){
jQuery(this).on('mouseover click', function(){
jQuery(this).addClass('hover');
});
jQuery(this).on('mouseleave', function(){
jQuery(this).removeClass('hover');
});
});
jQuery('body').append('');
jQuery('.quickview').each(function(){
var quickviewLink=jQuery(this);
var productID=quickviewLink.attr('data-quick-id');
quickviewLink.on("click", function(event){
event.preventDefault();
jQuery('#quickview-content').html('');
jQuery('body').addClass('quickview');
window.setTimeout(function(){
jQuery('.quickview-wrapper').addClass('open');
jQuery('.quick-modal').addClass('loading');
jQuery.post(ajaxurl,
{
'action': 'gon_product_quickview',
'data': productID
},
function(response){
jQuery('#quickview-content').html(response);
jQuery('.quick-modal').removeClass('loading');
jQuery('.variations_form').wc_variation_form();
jQuery('.variations_form .variations select').change();
jQuery(".quick-thumbnails").addClass('owl-carousel owl-theme');
jQuery('.quick-thumbnails').owlCarousel({
items: 3,
responsive:{
0:{
items: 1,
},
450:{
items: 1,
},
650:{
items: 2,
},
800:{
items: 3,
},
980:{
items: 3,
},
1170:{
items: 3,
},
},
nav: true,
dots: false,
navText: ["Prev", "Next"],
});
jQuery('.quick-thumbnails a').each(function(){
var quickThumb=jQuery(this);
var quickImgSrc=quickThumb.attr('href');
quickThumb.on("click", function(event){
event.preventDefault();
jQuery('.main-image').find('img').attr('src', quickImgSrc);
});
});
jQuery('.woocommerce-review-link').on("click", function(event){
event.preventDefault();
var reviewLink=jQuery('.see-all').attr('href');
window.location.href=reviewLink + '#reviews';
});
$('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('').prepend('');
}
);
}, 300);
});
});
jQuery('.closeqv').on("click", function(event){
jQuery('.quickview-wrapper').removeClass('open');
window.setTimeout(function(){
jQuery('body').removeClass('quickview');
}, 500);
});
jQuery(".fancybox").fancybox({
openEffect: 'elastic',
closeEffect: 'fade',
beforeShow: function(){
if(this.title){
this.title +='';
this.title +=' ';
this.title +='
';
}},
afterShow: function(){
twttr.widgets.load();
},
helpers: {
title:{
type:'inside'
},
overlay:{
showEarly:false
}}
});
jQuery(".prfancybox").fancybox({
openEffect: 'fade',
closeEffect: 'elastic',
nextEffect: 'fade',
prevEffect: 'fade',
beforeShow: function(){
if(this.title){
this.title +='';
this.title +=' ';
this.title +='
';
}},
afterShow: function(){
twttr.widgets.load();
},
helpers: {
title:{
type:'inside'
},
overlay:{
showEarly:false
},
buttons:{},
thumbs:{
width:100,
height:100
}}
});
setTimeout(function(){
$('body').addClass('loaded');
setTimeout(function (){
$('#pageloader').remove();
}, 1500);
}, 1500);
gonShowNLPopup();
jQuery('.newsletterpopup .close-popup').click(function(){
gonHideNLPopup();
});
jQuery('.popupshadow').click(function(){
gonHideNLPopup();
});
jQuery('.countbox.hastime').each(function(){
var countTime=jQuery(this).attr('data-time');
jQuery(this).countdown(countTime, function(event){
jQuery(this).html(''+event.strftime('%D')+'days'+event.strftime('%H')+'hrs'+event.strftime('%M')+'mins'+event.strftime('%S')+'secs'
);
});
});
$('.lightbox-gallery').magnificPopup({
type: 'image',
tLoading: 'Loading image #%curr%...',
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0,1]
},
image: {
titleSrc: 'title',
verticalFit: true
}});
});
$(".to-top").hide();
$(function(){
$(window).scroll(function(){
if($(this).scrollTop() > 100){
$('.to-top').fadeIn();
}else{
$('.to-top').fadeOut();
}});
$('.to-top').on("click", function(){
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
});
if($('.main-container').find('.full-container')){
$('.full-container > div').removeClass('row-container');
}
$.fn.extend({
accordion: function(){
return this.each(function(){
var $jqul=$(this);
if($jqul.data('accordiated'))
return false;
$.each($jqul.find('ul, li>div'), function(){
$(this).data('accordiated', true);
$(this).hide();
});
$.each($jqul.find('span.head'), function(){
$(this).click(function(e){
activate(this);
return void(0);
});
});
var active=(location.hash)?$(this).find('a[href=' + location.hash + ']')[0]:'';
if(active){
activate(active, 'toggle');
$(active).parents().show();
}
function activate(el,effect){
$(el).parent('li').toggleClass('active').siblings().removeClass('active').children('ul, div').slideUp('fast');
$(el).siblings('ul, div')[(effect||'slideToggle')]((!effect)?'fast':null);
}});
}});
$('.product-categories li a').wrapInner("");
$("ul.product-categories li.cat-parent").each(function(){
$(this).append('');
});
$('ul.product-categories').accordion();
$("ul.product-categories li.active").each(function(){
$(this).children().next("ul").css('display', 'block');
});
var myVideo=document.getElementById("video1");
$(".main-container .video-button i").click(function (){
if(myVideo.paused)
myVideo.play();
else
myVideo.pause();
$(this).toggleClass("fa-pause").toggleClass("fa-play");
});
$('.mobile-button').addClass("active");
$('.mobile-button').click(function(){
if($(this).parents('.footer-static-title').next().is(":visible")){
$(this).addClass("active");
}else{
$(this).removeClass("active");
}
$(this).parents('.footer-static-title').next().toggle(400);
});
$('.top-category .mobile-category').on("click", function(){
$('.top-category .widget_product_categories').toggleClass('active');
$('.top-category .top-category-menu').toggle(300);
});
$('.mobile-search').on("click", function(){
$('.widget_product_search').toggle(300);
});
$('.cart-info .mobile-cart').on("click", function(){
$('.mcart-border').toggle(300);
});
})(jQuery);
function gongetParameterByName(name, string){
name=name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex=new RegExp("[\\?&]" + name + "=([^]*)"),
results=regex.exec(string);
return results===null ? "":decodeURIComponent(results[1].replace(/\+/g, " "));
}
function gonMiniCartRemove(url, itemid){
jQuery('.mcart-border').addClass('loading');
jQuery('.cart-form').addClass('loading');
jQuery.get(url, function(data,status){
if(status=='success'){
jQuery.post(ajaxurl,
{
'action': 'gon_get_cartinfo'
},
function(response){
var cartinfo=response.split("|");
var itemAmount=cartinfo[0];
var cartTotal=cartinfo[1];
var orderTotal=cartinfo[2];
var cartQuantity=cartinfo[3];
jQuery('.mcart-number').html(cartQuantity);
jQuery('.cart-quantity').html(itemAmount);
jQuery('.cart-total .amount').html(cartTotal);
jQuery('.total .amount').html(cartTotal);
jQuery('.cart-subtotal .amount').html(cartTotal);
jQuery('.order-total .amount').html(orderTotal);
}
);
jQuery('#mcitem-' + itemid).animate({'height': '0', 'margin-bottom': '0', 'padding-bottom': '0', 'padding-top': '0'});
setTimeout(function(){
jQuery('#mcitem-' + itemid).remove();
jQuery('#lcitem-' + itemid).remove();
}, 1000);
jQuery('.mcart-border').removeClass('loading');
jQuery('.cart-form').removeClass('loading');
}});
}
function gontip(element, content){
if(content=='html'){
var tipText=element.html();
}else{
var tipText=element.attr('title');
}
element.on('mouseover', function(){
if(jQuery('.gontip').length==0){
element.before(''+tipText+'');
var tipWidth=jQuery('.gontip').outerWidth();
var tipPush=-(tipWidth/2 - element.outerWidth()/2);
jQuery('.gontip').css('margin-left', tipPush);
}});
element.on('mouseleave', function(){
jQuery('.gontip').remove();
});
}
jQuery(function($){
$('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('').prepend('');
$(document).on('click', '.plus, .minus', function(){
var $qty=$(this).closest('.quantity').find('.qty'),
currentVal=parseFloat($qty.val()),
max='',
min=0,
step=1;
if(! currentVal||currentVal===''||currentVal==='NaN') currentVal=0;
if(max===''||max==='NaN') max='';
if(min===''||min==='NaN') min=0;
if(step==='any'||step===''||step===undefined||parseFloat(step)==='NaN') step=1;
if($(this).is('.plus')){
if(max&&(max==currentVal||currentVal > max)){
$qty.val(max);
}else{
$qty.val(currentVal + parseFloat(step));
}}else{
if(min&&(min==currentVal||currentVal < min)){
$qty.val(min);
}else if(currentVal > 0){
$qty.val(currentVal - parseFloat(step));
}}
$qty.trigger('change');
});
});
function gonShowNLPopup(){
if(jQuery.cookie('gonnlpopup')!="1"){
jQuery('.newsletterpopup').fadeIn();
jQuery('.popupshadow').fadeIn();
}}
function gonHideNLPopup(){
jQuery('.newsletterpopup').fadeOut();
jQuery('.popupshadow').fadeOut();
jQuery.cookie('gonnlpopup', 1);
};