(function($){ 'use strict'; $.fn.pt_plus_animated_svg=function(){ return this.each(function(){ var $self=$(this); var data_id=$self.data("id"); var data_duration=$self.data("duration"); var data_type=$self.data("type"); var data_stroke=$self.data("stroke"); var data_fill_color=$self.data("fill_color"); new Vivus(data_id, {type: data_type, duration: data_duration,forceRender:true,start: 'inViewport',onReady: function (myVivus){ var c=myVivus.el.childNodes; if(data_stroke!=''){ for (var i=0; i < c.length; i++){ $(c[i]).attr("fill", data_fill_color); $(c[i]).attr("stroke",data_stroke); var child=c[i]; var pchildern=child.children; if(pchildern!=undefined){ for(var j=0; j < pchildern.length; j++){ $(pchildern[j]).attr("fill", data_fill_color); $(pchildern[j]).attr("stroke",data_stroke); }} }} }}); }); }; $(window).load(function(){ setTimeout(function(){ $('.pt_plus_animated_svg').pt_plus_animated_svg(); }, 100); }); }(jQuery)); (function($){ 'use strict'; $(document).ready(function (){ $('.pt_plus_countdown').each(function (){ var timer1=$(this).attr("data-timer"); var res=timer1.split("-"); $(this).downCount({ date: res[1]+"/"+res[0]+"/"+res[2]+" 12:00:00", offset: +1 }); }); }); }(jQuery)); (function($){ 'use strict'; $(document).ready(function(){ var elements=document.querySelectorAll('.pt-plus-piechart'); Array.prototype.slice.apply(elements).forEach(function(el){ var $el=jQuery(el); new Waypoint({ element: el, handler: function(){ if(!$el.hasClass("done-progress")){ setTimeout(function(){ $el.circleProgress({ value: $el.data('value'), emptyFill: $el.data("emptyfill"), startAngle: -Math.PI/4*2, }); }, 800); $el.addClass("done-progress"); }}, offset: '80%' }); }); }); $(window).on("load resize scroll", function(){ $(".pt-plus-peicharts").each(function(){ var height=$('canvas',this).outerHeight(); var width=$('canvas',this).outerWidth(); $(".pt-plus-circle",this).css("height",height+'px'); $(".pt-plus-circle",this).css("width",width+'px'); }); }); }(jQuery)); jQuery(document).ready(function($){ "use strict"; var animationDelay=2500, barAnimationDelay=3800, barWaiting=barAnimationDelay - 3000, lettersDelay=50, typeLettersDelay=150, selectionDuration=500, typeAnimationDelay=selectionDuration + 800, revealDuration=600, revealAnimationDelay=1500; pt_plus_initHeadline(); function pt_plus_initHeadline(){ singleLetters($('.pt-plus-cd-headline.letters').find('b')); animateHeadline($('.pt-plus-cd-headline')); } function singleLetters($words){ $words.each(function(){ var i; var word=$(this), letters=word.text().split(''), selected=word.hasClass('is-visible'); for (i in letters){ if(word.parents('.rotate-2').length > 0) letters[i]='' + letters[i] + ''; letters[i]=(selected) ? '' + letters[i] + '': '' + letters[i] + ''; } var newLetters=letters.join(''); word.html(newLetters).css('opacity', 1); }); } function animateHeadline($headlines){ var duration=animationDelay; $headlines.each(function(){ var headline=$(this); if(headline.hasClass('loading-bar')){ duration=barAnimationDelay; setTimeout(function(){ headline.find('.cd-words-wrapper').addClass('is-loading') }, barWaiting); }else if(headline.hasClass('clip')){ var spanWrapper=headline.find('.cd-words-wrapper'), newWidth=spanWrapper.width() + 10 spanWrapper.css('width', newWidth); }else if(!headline.hasClass('type')){ var words=headline.find('.cd-words-wrapper b'), width=0; words.each(function(){ var wordWidth=$(this).width(); if(wordWidth > width) width=wordWidth; }); headline.find('.cd-words-wrapper').css('width', width); }; setTimeout(function(){ hideWord(headline.find('.is-visible').eq(0)) }, duration); }); } function hideWord($word){ var nextWord=takeNext($word); if($word.parents('.pt-plus-cd-headline').hasClass('type')){ var parentSpan=$word.parent('.cd-words-wrapper'); parentSpan.addClass('selected').removeClass('waiting'); setTimeout(function(){ parentSpan.removeClass('selected'); $word.removeClass('is-visible').addClass('is-hidden').children('i').removeClass('in').addClass('out'); }, selectionDuration); setTimeout(function(){ showWord(nextWord, typeLettersDelay) }, typeAnimationDelay); }else if($word.parents('.pt-plus-cd-headline').hasClass('letters')){ var bool=($word.children('i').length >=nextWord.children('i').length) ? true:false; hideLetter($word.find('i').eq(0), $word, bool, lettersDelay); showLetter(nextWord.find('i').eq(0), nextWord, bool, lettersDelay); }else if($word.parents('.pt-plus-cd-headline').hasClass('loading-bar')){ $word.parents('.cd-words-wrapper').removeClass('is-loading'); switchWord($word, nextWord); setTimeout(function(){ hideWord(nextWord) }, barAnimationDelay); setTimeout(function(){ $word.parents('.cd-words-wrapper').addClass('is-loading') }, barWaiting); }else{ switchWord($word, nextWord); setTimeout(function(){ hideWord(nextWord) }, animationDelay); }} function showWord($word, $duration){ if($word.parents('.pt-plus-cd-headline').hasClass('type')){ showLetter($word.find('i').eq(0), $word, false, $duration); $word.addClass('is-visible').removeClass('is-hidden'); }} function hideLetter($letter, $word, $bool, $duration){ $letter.removeClass('in').addClass('out'); if(!$letter.is(':last-child')){ setTimeout(function(){ hideLetter($letter.next(), $word, $bool, $duration); }, $duration); }else if($bool){ setTimeout(function(){ hideWord(takeNext($word)) }, animationDelay); } if($letter.is(':last-child')&&$('html').hasClass('no-csstransitions')){ var nextWord=takeNext($word); switchWord($word, nextWord); }} function showLetter($letter, $word, $bool, $duration){ $letter.addClass('in').removeClass('out'); if(!$letter.is(':last-child')){ setTimeout(function(){ showLetter($letter.next(), $word, $bool, $duration); }, $duration); }else{ if($word.parents('.pt-plus-cd-headline').hasClass('type')){ setTimeout(function(){ $word.parents('.cd-words-wrapper').addClass('waiting'); }, 200);} if(!$bool){ setTimeout(function(){ hideWord($word) }, animationDelay) }} } function takeNext($word){ return (!$word.is(':last-child')) ? $word.next():$word.parent().children().eq(0); } function takePrev($word){ return (!$word.is(':first-child')) ? $word.prev():$word.parent().children().last(); } function switchWord($oldWord, $newWord){ $oldWord.removeClass('is-visible').addClass('is-hidden'); $newWord.removeClass('is-hidden').addClass('is-visible'); }}); !function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t:e.fluidvids=t()}(this,function(){"use strict";function e(e){return new RegExp("^(https?:)?//(?:"+d.players.join("|")+").*$","i").test(e)}function t(e,t){return parseInt(e,10)/parseInt(t,10)*100+"%"}function i(i){if((e(i.src)||e(i.data))&&!i.getAttribute("data-fluidvids")){var n=document.createElement("div");i.parentNode.insertBefore(n,i),i.className+=(i.className?" ":"")+"fluidvids-item",i.setAttribute("data-fluidvids","loaded"),n.className+="fluidvids",n.style.paddingTop=t(i.height,i.width),n.appendChild(i)}}function n(){var e=document.createElement("div");e.innerHTML="

x

",r.appendChild(e.childNodes[1])}var d={selector:["iframe","object"],players:["www.youtube.com","player.vimeo.com"]},o=[".fluidvids {","width: 100%; max-width: 100%; position: relative;","}",".fluidvids-item {","position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;","}"].join(""),r=document.head||document.getElementsByTagName("head")[0];return d.render=function(){for(var e=document.querySelectorAll(d.selector.join()),t=e.length;t--;)i(e[t])},d.init=function(e){for(var t in e)d[t]=e[t];d.render(),n()},d}); (function($){ "use strict"; var initFluidVids=function(){ fluidvids.init({ selector: ['iframe:not(.pt-plus-bg-video)'],players: ['www.youtube.com', 'player.vimeo.com']}) }; $(window).on('load', initFluidVids); $('body').on('post-load', initFluidVids); })(jQuery); ! function(e){ "use strict"; function t(t){ var a=t.find("video"), n=t.find(".ts-video-lazyload"); if(t.is("[data-grow]")&&t.css("max-width", "none"), t.find(".ts-video-title, .ts-video-description, .ts-video-play-btn, .ts-video-thumbnail").addClass("ts-video-hidden"), n.length){ var i=n.data(); e("").attr(i).insertAfter(n) } a.length&&a.get(0).play() } function a(){ e(".ts-video-wrapper[data-inview-lazyload]").one("inview", function(a, n){ n&&t(e(this)) }) } e(document).on("click", '[data-mode="lazyload"] .ts-video-play-btn', function(a){ a.preventDefault(), t(e(this).closest(".ts-video-wrapper")) }), a(), e(document).ajaxComplete(function(){ a() }), e(document).on("lity:open", function(){ /*e("*").not(".lity, .lity-wrap, .lity-close").filter(function(){ return "fixed"===e(this).css("position") }).addClass("ts-video-hidden").attr("data-hidden-fixed", "true")*/ }), e(document).on("lity:ready", function(t, a){ var n=a.element(), i=n.find("video"), r=n.find(".ts-video-lazyload"); if(e(".lity-wrap").attr("id", "ts-video"), r.length) e("").attr(r.data()).insertAfter(r); i.length&&i.get(0).play() }), e(document).on("lity:close", function(t, a){ a.element().find("video").length&&a.element().find("video").get(0).pause(), e(".ts-video-lity-container .pt-plus-video-frame").remove(), e("[data-hidden-fixed]").removeClass("ts-video-hidden") }), e(document).ready(function(){ e(".ts-video-lightbox-link").off() }) }(jQuery); (function($){ 'use strict'; $(document).ready(function(){ $('.pt_plus_cf7_styles').each(function(){ $('body').addClass("pt_plus_cf7_form"); var style=$(this).data("style"); var radio_checkbox=$(this).data("style-radio-checkbox"); var svg_path=''; var line_svg=''; if(style=='style-3'){ svg_path=''; } if(style=='style-11'){ line_svg=''; } var i=1; $(".wpcf7-form-control.wpcf7-text, .wpcf7-form-control.wpcf7-number, .wpcf7-form-control.wpcf7-date, .wpcf7-form-control.wpcf7-textarea, .wpcf7-form-control.wpcf7-select",this).each(function(){ var placeholder_name=$(this).attr('placeholder'); if($(this).hasClass("wpcf7-select")){ placeholder_name=$("option:first-child",this).text(); } $(this).parents(".wpcf7-form-control-wrap").append(''+svg_path); $(this).attr('placeholder',''); $(this).attr('id',style+'-cf-input-'+i); $(this).addClass('input__field input__field--'+style); $(this).parents(".wpcf7-form-control-wrap").addClass('input--'+style); i++; }); $(".wpcf7-form-control.wpcf7-select",this).each(function(){ $(this).parents(".wpcf7-form-control-wrap").addClass("input--filled"); }); $(".wpcf7-form-control.wpcf7-radio .wpcf7-list-item",this).each(function(){ var text_val=$(this).find('.wpcf7-list-item-label').text(); $(this).find('.wpcf7-list-item-label').remove(); var label_Tags=$('input[type="radio"]',this); if(label_Tags.parent().is('label')){ label_Tags.unwrap(); } var radio_name=$(this).find('input[type="radio"]').attr('name'); $(this).append(''); $(this).find('input[type="radio"]').attr('id',radio_name+i); $(this).find('input[type="radio"]').addClass("input-radio-check"); $(this).parents(".wpcf7-form-control-wrap").addClass(radio_checkbox); i++; }); $(".wpcf7-form-control.wpcf7-checkbox .wpcf7-list-item",this).each(function(){ var text_val=$(this).find('.wpcf7-list-item-label').text(); $(this).find('.wpcf7-list-item-label').remove(); var label_Tags=$('input[type="checkbox"]',this); if(label_Tags.parent().is('label')){ label_Tags.unwrap(); } $(this).append(''); $(this).find('input[type="checkbox"]').attr('id',radio_checkbox+i); $(this).find('input[type="checkbox"]').addClass("input-checkbox-check"); $(this).parents(".wpcf7-form-control-wrap").addClass(radio_checkbox); i++; }); $(".wpcf7-form-control-wrap input[type='file']",this).each(function(){ var file_name=$(this).attr('name'); $(this).attr('id',file_name+i); $(this).attr('data-multiple-caption',"{count} files selected"); $(this).parents(".wpcf7-form-control-wrap").append(''); $(this).parents(".wpcf7-form-control-wrap").addClass("cf7-style-file"); i++; }); }); $("input.wpcf7-form-control,textarea.wpcf7-form-control").focus(function(){ $(this).parents(".wpcf7-form-control-wrap").addClass("input--filled"); }); $('input.wpcf7-form-control,textarea.wpcf7-form-control').blur(function(){ if(!$(this).val()){ $(this).parents(".wpcf7-form-control-wrap").removeClass('input--filled'); }}); $('.wpcf7-form-control-wrap select').on('change',function(){ var select_val=$(this).find(':selected').val(); if(select_val!=''){ $(this).parents(".wpcf7-form-control-wrap").addClass("input--filled"); }}); $(".wpcf7-form-control.wpcf7-textarea.input__field--style-9").each(function(){ var height_textarea=$(this).outerHeight(); $("head").append(''); }); $(".pt_plus_cf7_styles .wpcf7-form-control-wrap.input--style-12").each(function(){ var height_textarea=$(this).outerHeight(); $("head").append(''); }); $(window).load(function(){ $(".pt_plus_cf7_styles").find(".minimal-form-input").removeClass("minimal-form-input"); }); }); $(document).on('load resize',function(){ $(".wpcf7-form-control.wpcf7-textarea.input__field--style-9").each(function(){ var height_textarea=$(this).outerHeight(); $("head").append(''); }); $(".pt_plus_cf7_styles .wpcf7-form-control-wrap.input--style-12").each(function(){ var height_textarea=$(this).outerHeight(); $("head").append(''); }); }); }(jQuery)); 'use strict'; ;(function(document, window, index){ var inputs=document.querySelectorAll('.wpcf7-form-control.wpcf7-file'); Array.prototype.forEach.call(inputs, function(input){ var label=''; var labelVal=''; var i=0; input.addEventListener('change', function(e){ label=input.nextElementSibling; if(i==0){ labelVal=label.innerHTML; } var fileName=''; if(this.files&&this.files.length > 1) fileName=(this.getAttribute('data-multiple-caption')||'').replace('{count}', this.files.length); else fileName=e.target.value.split('\\').pop(); if(fileName) label.querySelector('span').innerHTML=fileName; else label.innerHTML=labelVal; i++; }); input.addEventListener('focus', function(){ input.classList.add('has-focus'); }); input.addEventListener('blur', function(){ input.classList.remove('has-focus'); }); }); }(document, window, 0)); (function($){ $.fn.pt_plus_VideoBgInit=function(){ return this.each(function(){ var $self=$(this), ratio=1.778, pWidth=$self.parent().width(), pHeight=$self.parent().height(), selfWidth, selfHeight; var setSizes=function(){ if(pWidth / ratio < pHeight){ selfWidth=Math.ceil(pHeight * ratio); selfHeight=pHeight; $self.css({ 'width': selfWidth, 'height': selfHeight }); }else{ selfWidth=pWidth; selfHeight=Math.ceil(pWidth / ratio); $self.css({ 'width': selfWidth, 'height': selfHeight }); }}; setSizes(); $(window).on('resize', setSizes); }); }; $(window).load(function(){ setTimeout(function(){ $('.columns-video-bg video, .columns-video-bg .columns-bg-frame').pt_plus_VideoBgInit(); $('.self-hosted-videos').each(function(){ var $self=$(this); $self[0].play(); }); }, 100); if($('.columns-youtube-bg').length > 0){ var tag=document.createElement('script'); tag.src="//www.youtube.com/iframe_api"; var firstScriptTag=document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var players={}; window.onYouTubeIframeAPIReady=function(){ $('.columns-youtube-bg iframe').each(function(){ var $self=$(this), id=$self.attr('id'); players[id]=new YT.Player(id, { playerVars: {autoplay:1}, events: { onReady: function(e){ if($self.data('muted')&&$self.data('muted')=='1'){ e.target.mute(); } e.target.playVideo(); }} }); }); };} if($('.columns-vimeo-bg').length > 0){ $(document).ready(function(){ $('.columns-vimeo-bg iframe').each(function(){ var $self=$(this); if(window.addEventListener){ window.addEventListener('message', onMessageReceived, false); }else{ window.attachEvent('onmessage', onMessageReceived, false); } function onMessageReceived(e){ var data=JSON.parse(e.data); switch (data.event){ case 'ready': $self[0].contentWindow.postMessage('{"method":"play", "value":1}','*'); if($self.data('muted')&&$self.data('muted')=='1'){ $self[0].contentWindow.postMessage('{"method":"setVolume", "value":0}','*'); } break; }} }); }); }}); })(jQuery); !function(){"use strict";function e(e){function t(t,n){var s,h,k=t==window,y=n&&n.message!==undefined?n.message:undefined;if(!(n=e.extend({},e.blockUI.defaults,n||{})).ignoreIfBlocked||!e(t).data("blockUI.isBlocked")){if(n.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,n.overlayCSS||{}),s=e.extend({},e.blockUI.defaults.css,n.css||{}),n.onOverlayClick&&(n.overlayCSS.cursor="pointer"),h=e.extend({},e.blockUI.defaults.themedCSS,n.themedCSS||{}),y=y===undefined?n.message:y,k&&p&&o(window,{fadeOut:0}),y&&"string"!=typeof y&&(y.parentNode||y.jquery)){var m=y.jquery?y[0]:y,g={};e(t).data("blockUI.history",g),g.el=m,g.parent=m.parentNode,g.display=m.style.display,g.position=m.style.position,g.parent&&g.parent.removeChild(m)}e(t).data("blockUI.onUnblock",n.onUnblock);var v,I,w,U,x=n.baseZ;v=e(r||n.forceIframe?'':''),I=e(n.theme?'':''),n.theme&&k?(U='"):n.theme?(U='"):U=k?'':'',w=e(U),y&&(n.theme?(w.css(h),w.addClass("ui-widget-content")):w.css(s)),n.theme||I.css(n.overlayCSS),I.css("position",k?"fixed":"absolute"),(r||n.forceIframe)&&v.css("opacity",0);var C=[v,I,w],S=e(k?"body":t);e.each(C,function(){this.appendTo(S)}),n.theme&&n.draggable&&e.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var O=f&&(!e.support.boxModel||e("object,embed",k?null:t).length>0);if(u||O){if(k&&n.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(u||!e.support.boxModel)&&!k)var E=a(t,"borderTopWidth"),T=a(t,"borderLeftWidth"),M=E?"(0 - "+E+")":0,B=T?"(0 - "+T+")":0;e.each(C,function(e,t){var o=t[0].style;if(o.position="absolute",e<2)k?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+n.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),k?o.setExpression("width",'jQuery.support.boxModel&&document.documentElement.clientWidth||document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),B&&o.setExpression("left",B),M&&o.setExpression("top",M);else if(n.centerY)k&&o.setExpression("top",'(document.documentElement.clientHeight||document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah=document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "px"'),o.marginTop=0;else if(!n.centerY&&k){var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "+(n.css&&n.css.top?parseInt(n.css.top,10):0)+') + "px"';o.setExpression("top",i)}})}if(y&&(n.theme?w.find(".ui-widget-content").append(y):w.append(y),(y.jquery||y.nodeType)&&e(y).show()),(r||n.forceIframe)&&n.showOverlay&&v.show(),n.fadeIn){var j=n.onBlock?n.onBlock:c,H=n.showOverlay&&!y?j:c,z=y?j:c;n.showOverlay&&I._fadeIn(n.fadeIn,H),y&&w._fadeIn(n.fadeIn,z)}else n.showOverlay&&I.show(),y&&w.show(),n.onBlock&&n.onBlock.bind(w)();if(i(1,t,n),k?(p=w[0],b=e(n.focusableElements,p),n.focusInput&&setTimeout(l,20)):d(w[0],n.centerX,n.centerY),n.timeout){var W=setTimeout(function(){k?e.unblockUI(n):e(t).unblock(n)},n.timeout);e(t).data("blockUI.timeout",W)}}}function o(t,o){var s,l=t==window,d=e(t),a=d.data("blockUI.history"),c=d.data("blockUI.timeout");c&&(clearTimeout(c),d.removeData("blockUI.timeout")),o=e.extend({},e.blockUI.defaults,o||{}),i(0,t,o),null===o.onUnblock&&(o.onUnblock=d.data("blockUI.onUnblock"),d.removeData("blockUI.onUnblock"));var r;r=l?e(document.body).children().filter(".blockUI").add("body > .blockUI"):d.find(">.blockUI"),o.cursorReset&&(r.length>1&&(r[1].style.cursor=o.cursorReset),r.length>2&&(r[2].style.cursor=o.cursorReset)),l&&(p=b=null),o.fadeOut?(s=r.length,r.stop().fadeOut(o.fadeOut,function(){0==--s&&n(r,a,o,t)})):n(r,a,o,t)}function n(t,o,n,i){var s=e(i);if(!s.data("blockUI.isBlocked")){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),s.removeData("blockUI.history")),s.data("blockUI.static")&&s.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),d=l.width(),a=l[0].style.width;l.width(d-1).width(d),l[0].style.width=a}}function i(t,o,n){var i=o==window,l=e(o);if((t||(!i||p)&&(i||l.data("blockUI.isBlocked")))&&(l.data("blockUI.isBlocked",t),i&&n.bindEvents&&(!t||n.showOverlay))){var d="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(d,n,s):e(document).unbind(d,s)}}function s(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&p&&t.data.constrainTabKey){var o=b,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){l(i)},10),!1}var s=t.data,d=e(t.target);return d.hasClass("blockOverlay")&&s.onOverlayClick&&s.onOverlayClick(t),d.parents("div."+s.blockMsgClass).length>0||0===d.parents().children().filter("div.blockUI").length}function l(e){if(b){var t=b[!0===e?b.length-1:0];t&&t.focus()}}function d(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-a(n,"borderLeftWidth"),l=(n.offsetHeight-e.offsetHeight)/2-a(n,"borderTopWidth");t&&(i.left=s>0?s+"px":"0"),o&&(i.top=l>0?l+"px":"0")}function a(t,o){return parseInt(e.css(t,o),10)||0}e.fn._fadeIn=e.fn.fadeIn;var c=e.noop||function(){},r=/MSIE/.test(navigator.userAgent),u=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),f=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){t(window,e)},e.unblockUI=function(e){o(window,e)},e.growlUI=function(t,o,n,i){var s=e('
');t&&s.append("

"+t+"

"),o&&s.append("

"+o+"

"),n===undefined&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css("opacity");s.mouseover(function(){l({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(o){if(this[0]===window)return e.blockUI(o),this;var n=e.extend({},e.blockUI.defaults,o||{});return this.each(function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,t(this,o)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){o(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"

Please wait...

",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var p=null,b=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(); jQuery(function(e){if("undefined"==typeof wc_add_to_cart_params)return!1;var t=function(){e(document.body).on("click",".add_to_cart_button",this.onAddToCart).on("click",".remove_from_cart_button",this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("added_to_cart",this.updateCartPage).on("added_to_cart removed_from_cart",this.updateFragments)};t.prototype.onAddToCart=function(t){var a=e(this);if(a.is(".ajax_add_to_cart")){if(!a.attr("data-product_id"))return!0;t.preventDefault(),a.removeClass("added"),a.addClass("loading");var o={};e.each(a.data(),function(t,a){o[t]=a}),e(document.body).trigger("adding_to_cart",[a,o]),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),o,function(t){t&&(t.error&&t.product_url?window.location=t.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?e(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash,a]):window.location=wc_add_to_cart_params.cart_url)})}},t.prototype.onRemoveFromCart=function(t){var a=e(this),o=a.closest(".woocommerce-mini-cart-item");t.preventDefault(),o.block({message:null,overlayCSS:{opacity:.6}}),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),{cart_item_key:a.data("cart_item_key")},function(t){t&&t.fragments?e(document.body).trigger("removed_from_cart",[t.fragments,t.cart_hash,a]):window.location=a.attr("href")}).fail(function(){window.location=a.attr("href")})},t.prototype.updateButton=function(t,a,o,r){(r=void 0!==r&&r)&&(r.removeClass("loading"),r.addClass("added"),wc_add_to_cart_params.is_cart||0!==r.parent().find(".added_to_cart").length||r.after(' '+wc_add_to_cart_params.i18n_view_cart+""),e(document.body).trigger("wc_cart_button_updated",[r]))},t.prototype.updateCartPage=function(){var t=window.location.toString().replace("add-to-cart","added-to-cart");e(".shop_table.cart").load(t+" .shop_table.cart:eq(0) > *",function(){e(".shop_table.cart").stop(!0).css("opacity","1").unblock(),e(document.body).trigger("cart_page_refreshed")}),e(".cart_totals").load(t+" .cart_totals:eq(0) > *",function(){e(".cart_totals").stop(!0).css("opacity","1").unblock(),e(document.body).trigger("cart_totals_refreshed")})},t.prototype.updateFragments=function(t,a){a&&(e.each(a,function(t){e(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),e.each(a,function(t,a){e(t).replaceWith(a),e(t).stop(!0).css("opacity","1").unblock()}),e(document.body).trigger("wc_fragments_loaded"))},new t}); window.jQuery(document).ready(function($){ $('body').on('adding_to_cart', function(event, $button, data){ $button&&$button.hasClass('vc_gitem-link')&&$button .addClass('vc-gitem-add-to-cart-loading-btn') .parents('.vc_grid-item-mini') .addClass('vc-woocommerce-add-to-cart-loading') .append($('
')); }).on('added_to_cart', function(event, fragments, cart_hash, $button){ if('undefined'===typeof($button)){ $button=$('.vc-gitem-add-to-cart-loading-btn'); } $button&&$button.hasClass('vc_gitem-link')&&$button .removeClass('vc-gitem-add-to-cart-loading-btn') .parents('.vc_grid-item-mini') .removeClass('vc-woocommerce-add-to-cart-loading') .find('.vc_wc-load-add-to-loader-wrapper').remove(); }); });