(function($){ 'use strict'; if(typeof wpcf7==='undefined'||wpcf7===null){ return; } wpcf7=$.extend({ cached: 0, inputs: [] }, wpcf7); $(function(){ wpcf7.supportHtml5=(function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[ value ]=input.type!=='text'; }); return features; })(); $('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_wpcf7_\w+_free_text_/)){ var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, ''); detail.inputs.push({ name: owner + '-free-text', value: field.value }); }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; var $message=$('.wpcf7-response-output', $form); switch(data.status){ case 'validation_failed': $.each(data.invalidFields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); $message.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': $message.addClass('wpcf7-acceptance-missing'); $form.addClass('unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': $message.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': $message.addClass('wpcf7-aborted'); $form.addClass('aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': $message.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': $message.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: var customStatusClass='custom-' + data.status.replace(/[^0-9a-z]+/i, '-'); $message.addClass('wpcf7-' + customStatusClass); $form.addClass(customStatusClass); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $message.html('').append(data.message).slideDown('fast'); $message.attr('role', 'alert'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $response.html('').attr('role', '').append(data.message); if(data.invalidFields){ var $invalids=$('
e&&(e=O(this).height())}),O(".with_aside .four.columns .widget-area").css("min-height",e+"px")}}function L(){var a=O(window).height(),s=0;1
")}),f=window.navigator.userAgent,0<(m=f.indexOf("MSIE "))&&9==parseInt(f.substring(m+5,f.indexOf(".",m)))&&O("body").addClass("ie");var _,w,y,C,k,T=navigator.userAgent;function x(){O(".mfn-jplayer").each(function(){var e=O(this).attr("data-m4v"),t=O(this).attr("data-img"),i=O(this).attr("data-swf"),a="#"+O(this).closest(".mfn-jcontainer").attr("id");O(this).jPlayer({ready:function(){O(this).jPlayer("setMedia",{m4v:e,poster:t})},play:function(){O(this).jPlayer("pauseOthers")},size:{cssClass:"jp-video-360p",width:"100%",height:"360px"},swfPath:i,supplied:"m4v",cssSelectorAncestor:a,wmode:"opaque"})})}function S(e,t){var i=e.attr("data-rel");t.isotope({filter:i}),setTimeout(function(){O(window).trigger("resize")},50)}!(/WebKit/.test(T)&&/Mobile/.test(T))&&768<=window.innerWidth?"stellar"==mfn.parallax?O.stellar({horizontalScrolling:!1,responsive:!0}):O(window).enllax():O("div[data-enllax-ratio], div[data-stellar-ratio]").css("background-attachment","scroll"),O(".pager_load_more").on("click",function(e){e.preventDefault();var i=O(this),a=i.closest(".pager_lm"),s=i.attr("href"),o=O(".lm_wrapper").index(i.closest(".isotope_wrapper").find(".lm_wrapper"));i.fadeOut(50),a.addClass("loading"),O.get(s,function(e){var t=O(".lm_wrapper:eq("+o+")",e).wrapInner("").html();O(".lm_wrapper:eq("+o+")").hasClass("isotope")?O(".lm_wrapper:eq("+o+")").append(O(t)).isotope("reloadItems").isotope({sortBy:"original-order"}):O(t).hide().appendTo(".lm_wrapper:eq("+o+")").fadeIn(1e3),s=O(".lm_wrapper:eq("+o+")",e).next().find(".pager_load_more").attr("href"),a.removeClass("loading"),s&&(i.fadeIn(),i.attr("href",s)),b(),x(),d(),O(".lm_wrapper.isotope").imagesLoaded().progress(function(){O(".lm_wrapper.isotope").isotope("layout")})})}),O(".filters_buttons .open").on("click",function(e){e.preventDefault();var t=O(this).closest("li").attr("class");O(".filters_wrapper").show(200),O(".filters_wrapper ul."+t).show(200),O(".filters_wrapper ul:not(."+t+")").hide()}),O(".filters_wrapper .close a").on("click",function(e){e.preventDefault(),O(".filters_wrapper").hide(200)}),O(".portfolio_next_js").on("click",function(e){e.preventDefault();var t=O(this).closest(".portfolio-item").next();t.length&&O("html, body").animate({scrollTop:t.offset().top-I()},500)}),O(".portfolio_prev_js").on("click",function(e){e.preventDefault();var t=O(this).closest(".portfolio-item").prev();t.length&&O("html, body").animate({scrollTop:t.offset().top-I()},500)}),O(".scroll > a, a.scroll").on("click",function(e){location.href.replace(/\/#.*|#.*/,"")==this.href.replace(/\/#.*|#.*/,"")&&e.preventDefault();var t=this.hash,i=O(".header-fixed.ab-show #Action_bar").innerHeight()+O(t).siblings(".ui-tabs-nav").innerHeight()+H();t&&O(t).length&&O("html, body").animate({scrollTop:O(t).offset().top-i-I()},500)}),O(".jq-tabs").tabs(),O(".mfn-acc").each(function(){var e=O(this);if(e.hasClass("openAll"))e.find(".question").addClass("active").children(".answer").show();else{var t=e.attr("data-active-tab");e.hasClass("open1st")&&(t=1),t&&e.find(".question").eq(t-1).addClass("active").children(".answer").show()}}),O(".mfn-acc .question > .title").on("click",function(){O(this).parent().hasClass("active")?O(this).parent().removeClass("active").children(".answer").slideToggle(100):(O(this).closest(".mfn-acc").hasClass("toggle")||O(this).parents(".mfn-acc").children().each(function(){O(this).hasClass("active")&&O(this).removeClass("active").children(".answer").slideToggle(100)}),O(this).parent().addClass("active"),O(this).next(".answer").slideToggle(100)),setTimeout(function(){O(window).trigger("resize")},50)}),O(".wpb_wrapper .vc_tta-panel-title").on("click","a",function(){setTimeout(function(){O(window).trigger("resize")},50)}),O(".helper .link.toggle").on("click",function(e){e.preventDefault();var t=O(this),i=t.attr("data-rel"),a=t.closest(".helper");t.hasClass("active")?(t.removeClass("active"),a.find(".helper_content > .item-"+i).removeClass("active").slideUp(200)):(a.find(".links > .link.active").removeClass("active"),a.find(".helper_content > .item.active").slideUp(200),t.addClass("active"),a.find(".helper_content > .item-"+i).addClass("active").slideDown(200)),setTimeout(function(){O(window).trigger("resize")},50)}),x(),O(".mfn-love").on("click",function(){var t=O(this);if(t.hasClass("loved"))return!1;t.addClass("loved");var e={action:"mfn_love",post_id:t.attr("data-id")};return O.post(mfn.ajax,e,function(e){t.find(".label").html(e)}),!1}),O("#back_to_top").on("click",function(){return O("body,html").animate({scrollTop:0},500),!1}),O(".section .section-nav").on("click",function(){var e=O(this),t=e.closest(".section");e.hasClass("prev")?t.prev().length&&O("html, body").animate({scrollTop:t.prev().offset().top},500):t.next().length&&O("html, body").animate({scrollTop:t.next().offset().top},500)}),O("#Intro .intro-next").on("click",function(){var e=O(this).closest("#Intro");e.next().length&&O("html, body").animate({scrollTop:e.next().offset().top-I()-H()},500)}),O(".widget_mfn_menu ul.submenus-click").each(function(){var e=O(this);O("a",e).on("click",function(e){var t=O(this).closest("li");t.hasClass("hover")||!t.hasClass("menu-item-has-children")||(e.preventDefault(),t.siblings("li").removeClass("hover").find("li").removeClass("hover"),O(this).closest("li").addClass("hover"))})}),O("body").on("click",".add_to_cart_button",function(){O(this).closest(".product").addClass("adding-to-cart").removeClass("added-to-cart")}),O("body").on("added_to_cart",function(){O(".adding-to-cart").removeClass("adding-to-cart").addClass("added-to-cart")}),O(document).ajaxComplete(function(){setTimeout(function(){O(window).trigger("resize")},100)}),O(".isotope-filters .filters_wrapper").find("li:not(.close) a").on("click",function(e){e.preventDefault();var t=O(".isotope"),i=O(this).closest(".isotope-filters"),a=i.attr("data-parent");a&&(t=(a=i.closest("."+a)).find(".isotope").first()),i.find("li").removeClass("current-cat"),O(this).closest("li").addClass("current-cat"),S(O(this),t),setTimeout(function(){O(document).trigger("isotope:arrange")},500)}),O(".isotope-filters .filters_buttons").find("li.reset a").on("click",function(e){e.preventDefault(),O(".isotope-filters .filters_wrapper").find("li").removeClass("current-cat"),S(O(this),O(".isotope"))}),O(window).on("debouncedresize",function(){O(".masonry.isotope").isotope(),O(".masonry.gallery").isotope("layout"),E(),z(),F(),L(),q(),O(".zoom_box").each(function(){var e=O(this),t=e.height(),i=e.find(".desc_wrap"),a=(t-i.height())/2;i.css("padding-top",a+"px")}),W(),M(),O("body").hasClass("header-creative")&&768<=window.innerWidth&&O("#Top_bar").hasClass("is-sticky")&&O("#Top_bar").removeClass("is-sticky")}),_=function(e,t){return""+t+""},O(".blog_slider_ul").each(function(){var e=O(this),t=4,i=e.closest(".blog_slider").data("count");i