(function($){"use strict";function include(url){document.write('')} $(document).ready(function(){$('#openLogin').on('click',function(){$('#login_pop').toggle("normal");});$('#closeLogin').on('click',function(){$('#login_pop').toggle("normal");});$('.popView').on('click',function(){$('#popup_wrap').toggle();});$('#closeView').on('click',function(){$('#popup_wrap').toggle();});});$(document).ready(function(){if($.fn.fitVids) jQuery(".main-sldier").fitVids();if($.fn.fitVids) jQuery(".main-sldier,.videoslider, .box-video ").fitVids({customSelector:"iframe[src^='http://socialcam.com']"});}) $(window).load(function(){$(".togglec").hide();$(".togglet").click(function(){$(this).toggleClass("toggleta").next(".togglec").slideToggle("normal").parent().toggleClass('active');return true;});$(window).scroll(function(){if($(this).scrollTop()>450){$('#gotoTop').fadeIn();}else{$('#gotoTop').fadeOut();}});$('#gotoTop').click(function(){$('body,html').animate({scrollTop:0},400);return false;});if($.fn.tipsy){$('.social a').tipsy({gravity:'e'});$('.list-social li a').tipsy({gravity:'se'});$('.v_tool_up').tipsy({gravity:'s'});$('.v_tool_left').tipsy({gravity:'e'});$('.v_tool_right').tipsy({gravity:'w'});$('.v_tool_down').tipsy({gravity:'n'});} $('.box-work figure a').append('');$('.box-work figure a').append('');$('.foto-carousel figure ').append('');$('.foto-carousel figure ').append('');$('.accordeon_css3_video ul li .block-accordeon figure a ').append('');$('.accordeon_css3_video ul li .block-accordeon figure a ').append('');$('.box-photo a').append('');$('.box-photo a').append('');$('.process-nav div:last-child,.process_steps_v2 li:last-child').addClass('last');$('.btn-large.btn-shadow').wrapInner('');$(".block-team li").hover(function(){$(this).addClass("z-hover");},function(){$(this).removeClass("z-hover");});$('.accordeon_css3_video ul li ').hover(function(){$(this).find('b').stop().animate({opacity:'1',top:'50%'},300,'easeOutQuad')},function(){$(this).find('b').stop().animate({opacity:'0',top:'20%'},300,'easeOutQuad')});$("#shop-cart #cart-dropdown ").slideUp();$('#shop-cart .btn-cart').toggle(function(){$(this).parent().find("#cart-dropdown ").slideDown();$(this).addClass("active");},function(){$(this).parent().find("#cart-dropdown ").slideUp();$(this).removeClass("active");})});$(window).scroll(function(){if(jQuery(this).scrollTop()>130){jQuery('.header_top').addClass('scrolled');}else{jQuery('.header_top').removeClass('scrolled');}});if(typeof gvcsingle!='undefined'&&qvcsingle.length){var qvcs=qvcsingle.owlCarousel({itemsCustom:[[1199,3],[992,3],[768,3],[480,3],[300,3]],autoPlay:false,slideSpeed:1000,autoHeight:true});$('.qv_btn_single_prev').on('click',function(){qvcs.trigger('owl.prev');});$('.qv_btn_single_next').on('click',function(){qvcs.trigger('owl.next');});} $(function(){$(".maxheight").each(function(){$(this).contents().wrapAll("
");})});(function($){$.fn.equalHeights=function(minHeight,maxHeight){tallest=(minHeight)?minHeight:0;this.each(function(){if($(">.box_inner",this).outerHeight()>tallest){tallest=$(">.box_inner",this).outerHeight()}});if((maxHeight)&&tallest>maxHeight)tallest=maxHeight;return this.each(function(){$(this).height(tallest)})}})(jQuery) $(function(){var viewportmeta=document.querySelector&&document.querySelector('meta[name="viewport"]'),ua=navigator.userAgent,gestureStart=function(){viewportmeta.content="width=device-width, minimum-scale=0.25, maximum-scale=1.6";},scaleFix=function(){if(viewportmeta&&/iPhone|iPad/.test(ua)&&!/Opera Mini/.test(ua)){viewportmeta.content="width=device-width, minimum-scale=1.0, maximum-scale=1.0";document.addEventListener("gesturestart",gestureStart,false);}};scaleFix();});jQuery(document).ready(function(){jQuery('#accordion2 .accordion-body').prev().removeClass("active") jQuery('#accordion2 .accordion-body.in').prev().addClass("active") jQuery('#accordion2 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion2 .accordion-heading').removeClass("active") jQuery(this).addClass("active")}}) jQuery('#accordion3 .accordion-body').prev().removeClass("active") jQuery('#accordion3 .accordion-body.in').prev().addClass("active") jQuery('#accordion3 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion3 .accordion-heading').removeClass("active") jQuery(this).addClass("active")}}) jQuery('#accordion4 .accordion-body').prev().removeClass("active") jQuery('#accordion4 .accordion-body.in').prev().addClass("active") jQuery('#accordion4 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion4 .accordion-heading').removeClass("active") jQuery(this).addClass("active")}}) jQuery('#accordion5 .accordion-body').prev().removeClass("active") jQuery('#accordion5 .accordion-body.in').prev().addClass("active") jQuery('#accordion5 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion5 .accordion-heading').removeClass("active") jQuery(this).addClass("active")}}) jQuery('#accordion6 .accordion-body').prev().removeClass("active") jQuery('#accordion6 .accordion-body.in').prev().addClass("active") jQuery('#accordion6 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion6 .accordion-heading').removeClass("active") jQuery(this).addClass("active")}}) jQuery('#accordion7 .accordion-body').prev().removeClass("active") jQuery('#accordion7 .accordion-body.in').prev().addClass("active") jQuery('#accordion7 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion7 .accordion-heading').removeClass("active") jQuery(this).addClass("active")}})});jQuery(document).ready(function(){$('.custom_select').each(function(){var list=$(this).children('ul'),select=$(this).find('select'),title=$(this).find('.select_title');if(typeof($('select option:selected').text())!="undefined"){var selected_var=$('select option:selected',$(this)).text();title.text(selected_var);} title.css('',title.outerWidth());for(var i=0,len=select.children('option').length;i'+select.children('option').eq(i).text()+'')} select.hide();title.on('click',function(){list.slideToggle(400);$(this).toggleClass('active');});list.on('click','li',function(){var val=$(this).text();var rel=$(this).attr('rel');title.text(val);list.slideUp(400);select.val(rel);title.toggleClass('active');});});window.responsiveMenu=function(){var nav=$('.nav-collapse .nav'),header=$('body>header');$('').appendTo(nav.find('.sub-menu').children('a'));$('.nav-collapse_ .nav > li > a').append('');var rMenu=new Object();rMenu.init=function(){rMenu.checkWindowSize();window.onresize=rMenu.checkWindowSize;} rMenu.checkWindowSize=function(){if($(window).width()<769){rMenu.Activate();}else{rMenu.Deactivate();}} rMenu.Activate=function(){header.off('click').on('click.responsivemenu','#menu_button',rMenu.openClose);header.on('click.responsivemenu','.sf-menu li a',rMenu.openCloseSubMenu);} rMenu.Deactivate=function(){header.off('.responsivemenu');nav.removeAttr('style').find('li').removeClass('current_click').end().find('ul').removeAttr('style');$('#menu_button').removeClass('active');} rMenu.openClose=function(){$(this).toggleClass('active');nav.stop().slideToggle();} jQuery(function($){var open=false;function resizeMenu(){if($(window).width()<769){if(!open){$(".list-panel").hide();} $("#menu-button").hide();}else if($(window).width()>=768){if(!open){$(".list-panel").show();} $("#menu-button").hide();if($('#styleSwitcher').length==0){$("a[href^='#']").each(function(index){var id=$(this).attr("href");if(id=='#'){return;} try{if($("a"+id+", "+'a[name="'+id.substr(1)+'"]').length){$("a"+id+", "+'a[name="'+id.substr(1)+'"]').css('margin-top','-300px').css('height','300px').css('display','block').css('visibility','hidden');}}catch(err){return;}});}}} function setupMenuButton(){$("#menu-button").click(function(e){e.preventDefault();if(open){$(".list-panel").fadeOut();$("#menu-button").toggleClass("selected");}else{$(".list-panel").fadeIn();$("#menu-button").toggleClass("selected");} open=!open;});} $(window).on(resizeMenu);resizeMenu();setupMenuButton();$(".block-form #form-search ").fadeOut();$('.block-form .btn-search').toggle(function(){$(this).parent().find("#form-search ").fadeIn();$(this).addClass("active");},function(){$(this).parent().find("#form-search ").fadeOut();$(this).removeClass("active");})});$(function(){$('.slct').click(function(){var dropBlock=$(this).parent().find('.drop');if(dropBlock.is(':hidden')){dropBlock.slideDown();$(this).addClass('active');$('.drop').find('li').click(function(){var selectResult=$(this).html();$(this).parent().parent().find('input').val(selectResult);$('.slct').removeClass('active').html(selectResult);dropBlock.slideUp();});}else{$(this).removeClass('active');dropBlock.slideUp();} return false;});$('.slct2').click(function(){var dropBlock=$(this).parent().find('.drop2');if(dropBlock.is(':hidden')){dropBlock.slideDown();$(this).addClass('active');$('.drop2').find('li').click(function(){var selectResult=$(this).html();$(this).parent().parent().find('input').val(selectResult);$('.slct2').removeClass('active').html(selectResult);dropBlock.slideUp();});}else{$(this).removeClass('active');dropBlock.slideUp();} return false;});});rMenu.openCloseSubMenu=function(e){var self=$(this);if(self.next('ul').length||self.next('.mega_menu_container').length){self.parent().addClass('current_click').siblings().removeClass('current_click').children(':not(a)').slideUp();self.next().stop().slideToggle();self.parent().siblings().children('a').removeClass('prevented');if(!(self.hasClass('prevented'))){e.preventDefault();self.addClass('prevented');}else{self.removeClass('prevented');}}} rMenu.init();} responsiveMenu();function getCount(element){var len=element.length-1,parentWidth=element.parent().outerWidth(),margin=parentWidth/len-element.outerWidth()-(len+1);element.not(":last-child").css('margin-right',margin);} (function(){var container,pag,track;if($('.process-wrap').length){$('.process-wrap').owlCarousel({singleItem:true,pagination:true,autoHeight:true,transitionStyle:"backSlide",afterInit:function(){container=$('.process-wrap').find('.owl-pagination').addClass('clearfix');pag=container.children('div');container.parent().append('
');getCount(pag);track=$('.process-wrap').find('.track').children('.fill');},afterMove:function(){var currentSlide=container.children('.active').index();pag.eq(currentSlide).prevAll().addClass('active');pag=container.children('div');var offset=pag.eq(currentSlide).position().left;track.stop().animate({'width':offset},150);},afterUpdate:function(){pag=container.children('div');getCount(pag);var currentSlide=container.children('.active').index();pag.eq(currentSlide).prevAll().addClass('active');var offset=pag.eq(currentSlide).position().left;track.css('width',offset);}});}})();});(function(){var pr=$('.popup_wrap .qv_preview > img');$('.popup_wrap .qv_carousel .owl-item:first-child li').addClass('active');$('.popup_wrap .qv_carousel').on('click','li:not(.active)',function(){$(this).addClass('active').parent().siblings().children('li').removeClass('active');var src=$(this).data('src');if(!($('html').hasClass('ie9'))){pr.addClass('hide');setTimeout(function(){pr.attr('src',src).removeClass('hide');},400);}else{pr.attr('src',src);} $('.popup_wrap [class*="qv_carousel"]').each(function(){var pr=$(this).closest('.qv_carousel_wrap').prev('.qv_preview').children('img');$(this).on('click','li',function(){var src=$(this).data('src');if(!($('html').hasClass('ie9'))){pr.addClass('hide');setTimeout(function(){pr.attr('src',src).removeClass('hide');},400);}else{pr.attr('src',src);}});});});})();(function(){if($('[data-zoom-image]').length){var button=$('.qv_preview [class*="button_type_"]');$("#zoom_image").elevateZoom({gallery:'product-showoff',zoomWindowFadeIn:500,zoomWindowFadeOut:500});button.on("click",function(e){var ez=$('#zoom_image').data('elevateZoom');var cuimg=ez.getCurrentImage();var alt=$('a[data-zoom-image="'+cuimg+'"]').attr('title');if(alt){alt=$('#zoom_image').attr('alt');} var data=[{URL:cuimg,caption:alt}];$.iLightBox(data,{innerToolbar:true,overlay:{opacity:0.1}});e.preventDefault();});}})();(function(){var qvc=$('.qv_carousel'),qvcsingle=$('.qv_carousel_single');if(qvc.length){var qv=qvc.owlCarousel({items:3,autoPlay:false,slideSpeed:1000,autoHeight:true});$('.qv_btn_prev').on('click',function(){qv.trigger('owl.prev');});$('.qv_btn_next').on('click',function(){qv.trigger('owl.next');});} if(qvcsingle.length){var qvcs=qvcsingle.owlCarousel({itemsCustom:[[1199,3],[992,3],[768,3],[480,3],[300,3]],autoPlay:false,touchDrag:true,slideSpeed:1000,autoHeight:true});$('.qv_btn_single_prev').on('click',function(){qvcs.trigger('owl.prev');});$('.qv_btn_single_next').on('click',function(){qvcs.trigger('owl.next');});}})();$(document).ready(function(){$('#q_up').click(function(){var q_val_up=parseInt($("input#quantity_wanted").val());if(isNaN(q_val_up)){q_val_up=0;} $("input#quantity_wanted").val(q_val_up+1).keyup();});$('#q_down').click(function(){var q_val_up=parseInt($("input#quantity_wanted").val());if(isNaN(q_val_up)){q_val_up=0;} if(q_val_up>1){$("input#quantity_wanted").val(q_val_up-1).keyup();};});$('#q_up2').click(function(){var q_val_up=parseInt($("input#quantity_wanted2").val());if(isNaN(q_val_up)){q_val_up=0;} $("input#quantity_wanted2").val(q_val_up+1).keyup();});$('#q_down2').click(function(){var q_val_up=parseInt($("input#quantity_wanted2").val());if(isNaN(q_val_up)){q_val_up=0;} if(q_val_up>1){$("input#quantity_wanted2").val(q_val_up-1).keyup();};});$('#q_up3').click(function(){var q_val_up=parseInt($("input#quantity_wanted3").val());if(isNaN(q_val_up)){q_val_up=0;} $("input#quantity_wanted3").val(q_val_up+1).keyup();});$('#q_down3').click(function(){var q_val_up=parseInt($("input#quantity_wanted3").val());if(isNaN(q_val_up)){q_val_up=0;} if(q_val_up>1){$("input#quantity_wanted3").val(q_val_up-1).keyup();};});$('#q_up4').click(function(){var q_val_up=parseInt($("input#quantity_wanted4").val());if(isNaN(q_val_up)){q_val_up=0;} $("input#quantity_wanted4").val(q_val_up+1).keyup();});$('#q_down4').click(function(){var q_val_up=parseInt($("input#quantity_wanted4").val());if(isNaN(q_val_up)){q_val_up=0;} if(q_val_up>1){$("input#quantity_wanted4").val(q_val_up-1).keyup();};});});(function(){var cf=$('#contactform');cf.append('
');cf.on("submit",function(event){var self=$(this),text;var request=$.ajax({url:"bat/mail.php",type:"post",data:self.serialize()});request.then(function(data){if(data=="1"){text="Your message has been sent successfully!";cf.find('input:not([type="submit"]),textarea').val('');$('.message_container').html('

'+text+'

').delay(150).slideDown(300).delay(4000).slideUp(300,function(){$(this).html("");});}else{if(cf.find('textarea').val().length<20){text="Message must contain at least 20 characters!"} if(cf.find('input').val()==""){text="All required fields must be filled!";} $('.message_container').html('

'+text+'

').delay(150).slideDown(300).delay(4000).slideUp(300,function(){$(this).html("");});}},function(){$('.message_container').html('

Connection to server failed!

').delay(150).slideDown(300).delay(4000).slideUp(300,function(){$(this).html("");});});event.preventDefault();});})();var isSmall;$(document).ready(function(){checkResponcive();myAccordeon($('.accordeon_3'));myAccordeon($('.accordeon_4'));});$(window).resize(checkResponcive);function checkResponcive(){isSmall=$(window).width()<=769;if(isSmall){$('.last_accord').removeClass('last_accord');}} function myAccordeon($cont){var $list=$cont.find('li');$list.on('mouseover',function(){if(isSmall)return;$list.removeClass('last_accord');$(this).addClass('last_accord');});$cont.on('mouseout',function(){if(isSmall)return;$list.removeClass('last_accord');$list.first().addClass('last_accord');});} (function(){var subscribe=$('[id^="newsletter"]');subscribe.append('
');var message=$('.message_container_subscribe'),text;subscribe.on('submit',function(e){var self=$(this);if(self.find('input[type="email"]').val()==''){text="Please enter your e-mail!";message.html('

'+text+'

').slideDown().delay(4000).slideUp(function(){$(this).html("");});}else{self.find('span.error').hide();$.ajax({type:"POST",url:"bat/newsletter.php",data:self.serialize(),success:function(data){if(data=='1'){text="Your email has been sent successfully!";message.html('

'+text+'

').slideDown().delay(4000).slideUp(function(){$(this).html("");}).prevAll('input[type="email"]').val("");}else{text="Invalid email address!";message.html('

'+text+'

').slideDown().delay(4000).slideUp(function(){$(this).html("");});}}});} e.preventDefault();});})();$(' .ie9 [placeholder]').each(function(){var self=$(this),ph=self.attr('placeholder');self.val(ph);self.on('focus',function(){if($(this).val()==ph){$(this).val("");}}).on('blur',function(){if($(this).val()==""){$(this).val(ph);}});});jQuery(window).load(function(){jQuery('#accordion li.level0 ul').each(function(index){jQuery(this).prev().addClass('idCatSubcat')});jQuery('#accordion li.level0 ul').css('display','none');jQuery('#accordion li.active').each(function(){jQuery('#accordion li.active > span').addClass('expanded');});jQuery('#accordion li.level0.active > ul').css('display','block');jQuery('#accordion li.level0.active > ul li.active > ul').css('display','block');jQuery('#accordion li.level0.active > ul li.active > ul li.active > ul').css('display','block');jQuery('#accordion li.level0 ul').each(function(index){jQuery(this).prev().addClass('close').click(function(){if(jQuery(this).next().css('display')=='none'){jQuery(this).next().slideDown(200,function(){jQuery(this).prev().removeClass('collapsed').addClass('expanded');});}else{jQuery(this).next().slideUp(200,function(){jQuery(this).prev().removeClass('expanded').addClass('collapsed');jQuery(this).find('ul').each(function(){jQuery(this).hide().prev().removeClass('expanded').addClass('collapsed');});});} return false;});});});jQuery(document).ready(function($){$('.navigation_grid .hasTooltip , #product_list.v_grid .hasTooltip').tooltip('hide');var cc=$('list_grid');if(cc=='g'){$('#product_list').addClass('v_list');$('#product_list').removeClass('v_grid');$('.Clist').addClass('active');$('.Cgrid').removeClass('active');}else{$('#product_list').removeClass('v_list');$('#product_list').addClass('v_grid');$('.Cgrid').addClass('active');$('.Clist').removeClass('active');} $('.Cgrid').click(function(){console.log(1);$(this).addClass('active');$('.Clist').removeClass('active');$('#product_list').fadeOut(300,function(){$(this).addClass('v_grid').removeClass('v_list').fadeIn(300);});return false;});$('.Clist').click(function(){console.log(2);$(this).addClass('active');$('.Cgrid').removeClass('active');$('#product_list').fadeOut(300,function(){$(this).removeClass('v_grid').addClass('v_list').fadeIn(300);});return false;});});(function(){$('.popup').on('popup/position',function(){var _this=$(this),pos=setTimeout(function(){var mt=_this.outerHeight()/-2,ml=_this.outerWidth()/-2;_this.css({'margin-left':ml,'margin-top':mt});clearTimeout(pos);},100);});var close=$('.popup > .close');if($('[data-popup]').length){$("body").on('click','[data-popup]',function(e){var popup=$(this).data('popup'),pc=$(popup).find('.popup');pc.trigger('popup/position');$(popup).fadeIn(function(){var scroll=$('.custom_scrollbar');if(scroll.length){var isVisible=setInterval(function(){if(scroll.is(':visible')){scroll.customScrollbar({preventDefaultScroll:true});clearInterval(isVisible);}},100);} $(popup).on('click',function(e){if($(e.target).hasClass('popup_wrap')){$(this).fadeOut();}});});e.preventDefault();});} close.on('click',function(){$(this).closest('.popup_wrap').fadeOut();});})();jQuery(document).ready(function(){$('#product_list div.limitted_offer').each(function(){var tip=$(this).find('div.count_holder_small');$(this).hover(function(){tip.appendTo('body');},function(){tip.appendTo(this);}).mousemove(function(e){var x=e.pageX+60,y=e.pageY-50,w=tip.width(),h=tip.height(),dx=$(window).width()-(x+w),dy=$(window).height()-(y+h);if(dx<50)x=e.pageX-w-60;if(dy<50)y=e.pageY-h+130;tip.css({left:x,top:y});});});});$(document).ready(function(){$(".menu_link").click(function(){setTimeout(function(){location.reload();},100);});});function animate(){$("[data-appear-animation]").each(function(){var self=$(this);self.addClass("appear-animation");if($(window).width()>800){self.appear(function(){var delay=(self.attr("data-appear-animation-delay")?self.attr("data-appear-animation-delay"):1);if(delay>1)self.css("animation-delay",delay+"ms");self.addClass(self.attr("data-appear-animation"));setTimeout(function(){self.addClass("appear-animation-visible");},delay);},{accX:0,accY:-150});}else{self.addClass("appear-animation-visible");}});} animate();$(window).on('resize',animate);(function(){var slider;if($('#price').length){slider=$('#price').slider({orientation:"horizontal",range:true,values:[0,237],min:0,max:250,slide:function(event,ui){$(this).next().find('.first_limit').val('$'+ui.values[0]);$(this).next().find('.last_limit').val('$'+ui.values[1]);}});} var color=$('.select_color').on('click',function(){$(this).addClass('active').parent().siblings().children('button').removeClass('active');});$('.close_fieldset').on('click',function(){$(this).closest('fieldset').animate({'opacity':'0'},function(){$(this).slideUp();});});$('button[type="reset"]:not(#styleswitcher button[type="reset"])').on('click',function(){color.eq(0).addClass('active').parent().siblings().children('button').removeClass('active');slider.slider("option","values",[0,237]);});$('.categories_list').on('click','a',function(e){if($(this).parent().children('ul').length){$(this).parent().toggleClass('active').end().next().slideToggle();e.preventDefault();}});$('.categories_list > li > a').on('click',function(e){if($(this).parent().children('ul').length){$(this).toggleClass('scheme_color').toggleClass('color_dark');e.preventDefault();}});})();$(function(){$("#selectBackgroundImg button").click(function(){$("#selectBackgroundImg button").removeClass("img_active");$(this).toggleClass("img_active");})});})(jQuery);$('iframe[src^="/readyscript"]').iframeAutoHeight({heightOffset:40});