jQuery(document).ready(function($){$.material.init();var window_width=$(window).width();$('[data-toggle="tooltip"], [rel="tooltip"]').tooltip();$('.select').dropdown({'dropdownClass':'dropdown-menu','optionClass':''});$('.carousel').carousel({interval:10000});var transparent=true;if($('.navbar-color-on-scroll').length!==0){$(window).on('scroll',debounce(function(){if($(document).scrollTop()>200){if(transparent){transparent=false;$('.navbar-color-on-scroll').removeClass('navbar-transparent');}}else{if(!transparent){transparent=true;$('.navbar-color-on-scroll').addClass('navbar-transparent');}}},17));} if(window_width>=768){var big_image=$('.page-header[data-parallax="active"]');if(big_image.length!==0){$(window).on('scroll',debounce(function(){if(isElementInViewport(big_image)){var oVal=($(window).scrollTop()/3);big_image.css({'transform':'translate3d(0,'+oVal+'px,0)','-webkit-transform':'translate3d(0,'+oVal+'px,0)','-ms-transform':'translate3d(0,'+oVal+'px,0)','-o-transform':'translate3d(0,'+oVal+'px,0)'});}},4));}} function debounce(func,wait,immediate){var timeout;return function(){var context=this,args=arguments;clearTimeout(timeout);timeout=setTimeout(function(){timeout=null;if(!immediate){func.apply(context,args);}},wait);if(immediate&&!timeout){func.apply(context,args);}};} function isElementInViewport(elem){var $elem=$(elem);var scrollElem=((navigator.userAgent.toLowerCase().indexOf('webkit')!==-1)?'body':'html');var viewportTop=$(scrollElem).scrollTop();var viewportBottom=viewportTop+$(window).height();var elemTop=Math.round($elem.offset().top);var elemBottom=elemTop+$elem.height();return((elemTopviewportTop));} $('.navbar a[href*="#"], a.btn[href*="#"]').click(function(){var menuitem=$(this).attr('class');if(menuitem==='dropdown-toggle'){return;} if(location.pathname.replace(/^\//,'')===this.pathname.replace(/^\//,'')&&location.hostname===this.hostname){var target=$(this.hash);target=target.length?target:$('[name='+this.hash.slice(1)+']');if(target.length){$('html,body').animate({scrollTop:target.offset().top},1200);return false;}}});var byRow=$('body').hasClass('home');if(typeof $('#features')!=='undefined'){$('.features .row').each(function(){$(this).children('.col-md-4').matchHeight(byRow);});} if(typeof $('#products')!=='undefined'){$('.products .row').each(function(){$(this).children('.col-md-3').matchHeight(byRow);});} if(typeof $('.products')!=='undefined'){$('.products').each(function(){$(this).children('.col-sm-6').matchHeight(byRow);});} if(typeof $('#portfolio')!=='undefined'){$('.work .row').each(function(){$(this).children('.col-md-4').matchHeight(byRow);});$('.work .row').each(function(){$(this).children('.col-md-6').matchHeight(byRow);});} if(typeof $('#team')!=='undefined'){$('.team .row').each(function(){$(this).children('.col-md-6').matchHeight(byRow);});} if(typeof $('#testimonials')!=='undefined'){$('.testimonials .row').each(function(){$(this).children('.col-md-4').matchHeight(byRow);});} if(typeof $('#pricing')!=='undefined'){$('.pricing .row .col-md-7').each(function(){$(this).children('.col-md-6').matchHeight(byRow);});} if(typeof $('#blog')!=='undefined'){$('.blogs .row').each(function(){$(this).children('.col-md-4').matchHeight(byRow);});} if(typeof $('.contact_name_wrap')!=='undefined'){if($('.contact_name_wrap').hasClass('col-sm-4')){$('.contact_name_wrap').removeClass('col-sm-4');} if($('.contact_name_wrap').hasClass('col-lg-4')){$('.contact_name_wrap').removeClass('col-lg-4');} $('.contact_name_wrap').addClass('col-md-6');$('.contact_name_wrap .form-group').addClass('label-floating');var placeholder1=$('.contact_name_wrap #pirate-forms-contact-name').attr('placeholder');$('.contact_name_wrap #pirate-forms-contact-name').removeAttr('placeholder');$('').insertBefore('.contact_name_wrap #pirate-forms-contact-name');} if(typeof $('.contact_email_wrap')!=='undefined'){if($('.contact_email_wrap').hasClass('col-sm-4')){$('.contact_email_wrap').removeClass('col-sm-4');} if($('.contact_email_wrap').hasClass('col-lg-4')){$('.contact_email_wrap').removeClass('col-lg-4');} $('.contact_email_wrap').addClass('col-md-6');$('.contact_email_wrap .form-group').addClass('label-floating');var placeholder2=$('.contact_email_wrap #pirate-forms-contact-email').attr('placeholder');$('.contact_email_wrap #pirate-forms-contact-email').removeAttr('placeholder');$('').insertBefore('.contact_email_wrap #pirate-forms-contact-email');} if(typeof $('.contact_subject_wrap')!=='undefined'){if($('.contact_subject_wrap').hasClass('col-sm-4')){$('.contact_subject_wrap').removeClass('col-sm-4');} if($('.contact_subject_wrap').hasClass('col-lg-4')){$('.contact_subject_wrap').removeClass('col-lg-4');} $('.contact_subject_wrap').addClass('col-md-12');$('.contact_subject_wrap .form-group').addClass('label-floating');var placeholder3=$('.contact_subject_wrap #pirate-forms-contact-subject').attr('placeholder');$('.contact_subject_wrap #pirate-forms-contact-subject').removeAttr('placeholder');$('').insertBefore('.contact_subject_wrap #pirate-forms-contact-subject');} if(typeof $('.contact_message_wrap')!=='undefined'){$('.contact_message_wrap textarea').attr('rows','6');$('.contact_message_wrap .form-group').addClass('label-floating');var placeholder4=$('.contact_message_wrap #pirate-forms-contact-message').attr('placeholder');$('.contact_message_wrap #pirate-forms-contact-message').removeAttr('placeholder');$('').insertBefore('.contact_message_wrap #pirate-forms-contact-message');} var searchForm=$('.search-form label');if(typeof(searchForm)!=='undefined'){var searchField=$(searchForm).find('.search-field');var placeholder=$(searchField).attr('placeholder');if($(searchField).attr('value')===0){$(searchForm).addClass('label-floating is-empty');}else{$(searchForm).addClass('label-floating');} $(searchField).removeAttr('placeholder');$('').insertBefore(searchField);} if(typeof $('.contact_submit_wrap')!=='undefined'){$('.pirate-forms-submit-button').addClass('btn btn-primary');} if(typeof $('.form_captcha_wrap')!=='undefined'){if($('.form_captcha_wrap').hasClass('col-sm-4')){$('.form_captcha_wrap').removeClass('col-sm-6');} if($('.form_captcha_wrap').hasClass('col-lg-6')){$('.form_captcha_wrap').removeClass('col-lg-6');} $('.form_captcha_wrap').addClass('col-md-12');} if(typeof $('form')!=='undefined'){$('form').addClass('form-group');} if(typeof $('input')!=='undefined'){if(typeof $('input[type="text"]')!=='undefined'){$('input[type="text"]').addClass('form-control');} if(typeof $('input[type="email"]')!=='undefined'){$('input[type="email"]').addClass('form-control');} if(typeof $('input[type="url"]')!=='undefined'){$('input[type="url"]').addClass('form-control');} if(typeof $('input[type="password"]')!=='undefined'){$('input[type="password"]').addClass('form-control');} if(typeof $('input[type="tel"]')!=='undefined'){$('input[type="tel"]').addClass('form-control');} if(typeof $('input[type="search"]')!=='undefined'){$('input[type="search"]').addClass('form-control');} if(typeof $('input.select2-input')!=='undefined'){$('input.select2-input').removeClass('form-control');}} if(typeof $('textarea')!=='undefined'){$('textarea').addClass('form-control');} if(typeof $('.form-control')!=='undefined'){$('.form-control').parent().addClass('form-group');$(window).on('scroll',function(){$('.form-control').parent().addClass('form-group');});} $(window).on('scroll',function(){if($(window).width()>=751){var hestia_scrollTop=$(window).scrollTop();var headerHeight=$('.navbar').outerHeight();var isInOneSection='no';$('#carousel-hestia-generic, section').each(function(){var thisID='#'+$(this).attr('id');var hestia_offset=$(this).offset().top;var thisHeight=$(this).outerHeight();var thisBegin=hestia_offset-headerHeight;var thisEnd=hestia_offset+thisHeight-headerHeight;if(hestia_scrollTop>=thisBegin&&hestia_scrollTop<=thisEnd){isInOneSection='yes';$('nav .active').removeClass('active');$('nav a[href$="'+thisID+'"]').parent('li').addClass('active');return false;} if(isInOneSection==='no'){$('nav .active').removeClass('active');}});}});$('body').on('added_to_cart',function(){if(typeof $('.added_to_cart')!=='undefined'){$('.added_to_cart').each(function(){if(!($(this).parent().hasClass('hestia-view-cart-wrapper'))){$(this).wrap('
');}});} if(typeof $('section.products a.add_to_cart_button.added')!=='undefined'){if(typeof $('section.products a.add_to_cart_button.added').parent()!=='undefined'){$('section.products a.add_to_cart_button.added').parent().append('
'+viewcart.view_cart_label+'
');}}});}); ;!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);