(function($){ "use strict"; jQuery(document).on('mouseup',function (e){ var container=jQuery('.header-search .product-categories'); var container_cart; if(!container.is(e.target)&&container.has(e.target).length===0&&!jQuery('.cate-toggler').is(e.target)){ if(jQuery('.header-search .product-categories').hasClass('open')){ jQuery('.header-search .product-categories').removeClass('open'); }} container=jQuery('.atc-notice-wrapper'); if(!container.is(e.target)&&container.has(e.target).length===0){ jQuery('.atc-notice-wrapper').fadeOut(); } container=jQuery('.searchform'); if(!container.is(e.target)&&container.has(e.target).length===0){ jQuery(".ws").removeClass("show"); }}); var heightbody=jQuery('.page-wrapper').height(); if(heightbody < jQuery(window).height()){ jQuery('body').addClass('small-body'); }else{ jQuery('body').removeClass('small-body'); } var oldCateMenuH, realMMH, realCateMenuH; jQuery(document).ready(function(){ if(jQuery('.categories-menu-container').length > 0||jQuery('.categories-menu > ul').length > 0){ jQuery('.morelesscate').css('display', 'none'); jQuery('.morelesscate').addClass('alwayshide'); } if(jQuery('#categories ul.mega_main_menu_ul > li.menu-item').length < debaco_menu_number){ jQuery('.morelesscate').css('display', 'none'); jQuery('.morelesscate').addClass('alwayshide'); } oldCateMenuH=debaco_menu_number * jQuery('#categories ul.mega_main_menu_ul > li.menu-item').outerHeight() + jQuery('.morelesscate').outerHeight() ; realMMH=jQuery('#categories ul.mega_main_menu_ul > li.menu-item').length * jQuery('#categories ul.mega_main_menu_ul > li.menu-item').outerHeight(); realCateMenuH=realMMH + jQuery('.morelesscate').outerHeight() ; if(jQuery('#categories').css('display')=='block'){ jQuery('.categories-menu').addClass('show'); jQuery('.catemenu-inner').css('height', oldCateMenuH); if(jQuery('#categories ul.mega_main_menu_ul > li.menu-item').length < debaco_menu_number){ jQuery('.catemenu-inner').css('height', realMMH); }}else{ jQuery('.categories-menu').removeClass('show'); jQuery('.catemenu-inner').css('height', realCateMenuH); } if(jQuery('.categories-menu-container').length > 0||jQuery('.categories-menu > ul').length > 0){ oldCateMenuH=jQuery('ul.categories-menu > li.menu-item').length * jQuery('ul.categories-menu > li.menu-item').outerHeight(); jQuery('.catemenu-inner').css('height', oldCateMenuH); } jQuery('.catemenu-toggler').on('click', function(){ if(jQuery('.categories-menu > ul').css('display')=='none'){ jQuery('.categories-menu > ul').css('display', 'block'); }else{ jQuery('.categories-menu > ul').css('display', 'none'); } if(jQuery('.categories-menu-container').css('display')=='none'){ jQuery('.categories-menu').addClass('show'); jQuery('.catemenu-inner').css({'height': 'auto'}); jQuery('.categories-menu-container').css('display', 'block'); }else{ jQuery('.categories-menu').removeClass('show'); jQuery('.catemenu-inner').css({'height': 0}); jQuery('.categories-menu-container').css('display', 'none'); } if(jQuery('#categories').css('display')=='none'){ jQuery('.categories-menu').addClass('show'); jQuery('#categories').css('display', 'block'); jQuery('#categories').animate({'opacity': 1}, 100, function(){ if(!jQuery('.morelesscate').hasClass('alwayshide')){ jQuery('.morelesscate').fadeIn('fast'); } oldCateMenuH=debaco_menu_number * jQuery('#categories ul.mega_main_menu_ul > li.menu-item').outerHeight() + jQuery('.morelesscate').outerHeight(); realMMH=jQuery('#categories ul.mega_main_menu_ul > li.menu-item').length * jQuery('#categories ul.mega_main_menu_ul > li').outerHeight(); realCateMenuH=realMMH + jQuery('.morelesscate').outerHeight(); if(jQuery('.morecate').css('display')=='none'){ jQuery('.catemenu-inner').css({'height': realCateMenuH}); }else{ jQuery('.catemenu-inner').css({'height': oldCateMenuH}); if(jQuery('#categories ul.mega_main_menu_ul > li.menu-item').length < debaco_menu_number){ jQuery('.catemenu-inner').css('height', realMMH); }} }); }else{ jQuery('#categories').animate({'opacity': 0}, 200, function(){ jQuery('.categories-menu').removeClass('show'); jQuery('#categories').css('display', 'none'); jQuery('.morelesscate').css('display', 'none'); oldCateMenuH=debaco_menu_number * jQuery('#categories ul.mega_main_menu_ul > li.menu-item').outerHeight(); realMMH=jQuery('#categories ul.mega_main_menu_ul > li.menu-item').length * jQuery('#categories ul.mega_main_menu_ul > li').outerHeight(); realCateMenuH=realMMH + jQuery('.morelesscate').outerHeight(); jQuery('.catemenu-inner').css({'height': oldCateMenuH}); }); }}); var catemidx=1; jQuery('#categories ul.mega_main_menu_ul > li').each(function(){ if(catemidx > debaco_menu_number&&jQuery('.morecate').css('display')!='none'){ jQuery(this).css('display', 'none'); jQuery(this).addClass('mhide'); } catemidx++; }); jQuery('.morelesscate').on('click', function(){ oldCateMenuH=debaco_menu_number * jQuery('#categories ul.mega_main_menu_ul > li.menu-item').outerHeight() + jQuery('.morelesscate').outerHeight(); realMMH=jQuery('#categories ul.mega_main_menu_ul > li.menu-item').length * jQuery('#categories ul.mega_main_menu_ul > li').outerHeight(); realCateMenuH=realMMH + jQuery('.morelesscate').outerHeight(); if(jQuery('.morecate').css('display')=='none'){ jQuery('.catemenu-inner').animate({'height': oldCateMenuH}, function(){ jQuery('.morecate').css('display', 'block'); jQuery('.lesscate').css('display', 'none'); jQuery('.mhide').css('display', 'none'); }); }else{ jQuery('.mhide').css('display', 'block'); jQuery('.catemenu-inner').animate({'height': realCateMenuH}, function(){ jQuery('.morecate').css('display', 'none'); jQuery('.lesscate').css('display', 'block'); }); }}); jQuery(".wsearchsubmit").on('click',function(){ if(jQuery(".ws").width()==0){ if(jQuery(".ws").hasClass("show")){ jQuery(".ws").removeClass("show"); }else{ jQuery(".ws").addClass("show"); return false; }} }); jQuery('.search-dropdown').on('mouseover', function(){ jQuery(this).find('.searchform').stop(true, true).slideDown(); }); jQuery('.search-dropdown').on('mouseleave', function(){ jQuery(this).find('.searchform').stop(true, true).slideUp(); }); jQuery('.wpml-ls .wpml-ls-sub-menu li').parent().addClass('hasChild'); var item_procat='.product-categories > li'; jQuery(item_procat).on('click', function(){ if(jQuery(this).hasClass('hidesub')){ jQuery(this).removeClass('hidesub').find('.children').slideUp(); }else{ jQuery(item_procat).removeClass('hidesub').find('.children').slideUp(); jQuery(this).addClass('hidesub').find('.children').slideDown(); }}); jQuery('.vmenu-toggler').on('mouseover', function(){ jQuery(this).find('.vmenu-content').stop(true, true).slideDown(); }); jQuery('.vmenu-toggler').on('mouseleave', function(){ jQuery(this).find('.vmenu-content').stop(true, true).slideUp(); }); jQuery('.horizontal-menu .nav-menu > ul').superfish({ delay: 100, speed: 'fast' }); jQuery('.primary-menu-container ul.nav-menu').superfish({ delay: 100, speed: 'fast' }); jQuery('.mobile-menu').each(function(){ var mobileMenuWrapper=jQuery(this).find('.mobile-menu-container'); mobileMenuWrapper.find('.menu-item-has-children').each(function(){ var linkItem=jQuery(this).find('a').first(); linkItem.after(''); }); var totalMenuLevelFirst=jQuery(this).find('.mobile-menu-container .nav-menu > li').length; var mobileMenuH=totalMenuLevelFirst*40 + 10; jQuery('.mbmenu-toggler').on('click', function(){ var mobileMenuHi=jQuery('div.nav-menu > ul').outerHeight(); if(jQuery('.mobile-menu div.nav-menu').outerHeight()==0){ jQuery('.mobile-menu div.nav-menu').animate({'height': mobileMenuHi}, 'fast'); }else{ jQuery('.mobile-menu div.nav-menu').animate({'height': 0}, 'fast'); } if(mobileMenuWrapper.hasClass('open')){ mobileMenuWrapper.removeClass('open'); mobileMenuWrapper.animate({'height': 0}, 'fast'); }else{ mobileMenuWrapper.addClass('open'); mobileMenuWrapper.animate({'height': mobileMenuH}, 'fast'); }}); jQuery(this).find('.mobile-menu-container li.menu-item-has-children').each(function(){ jQuery(this).css({'height': 40, 'overflow': 'hidden'}); }); jQuery(this).find('.mobile-menu-container li.menu-item-has-children').each(function(){ var parentLi=jQuery(this); var dropdownUl=parentLi.find('ul.sub-menu').first(); parentLi.find('.fa').first().on('click', function(){ parentLi.parents('li.menu-item-has-children').css('height', 'auto'); mobileMenuWrapper.css({'height': 'auto'}); var dropdownUlheight=dropdownUl.outerHeight() + 40; if(parentLi.hasClass('opensubmenu')){ parentLi.removeClass('opensubmenu'); parentLi.animate({'height': 40}, 'fast', function(){ mobileMenuH=mobileMenuWrapper.outerHeight(); }); parentLi.find('.fa').first().removeClass('fa-angle-down'); parentLi.find('.fa').first().addClass(' fa-angle-right'); }else{ parentLi.addClass('opensubmenu'); parentLi.animate({'height': dropdownUlheight}, 'fast', function(){ mobileMenuH=mobileMenuWrapper.outerHeight(); }); parentLi.find('.fa').first().addClass('fa-angle-down'); parentLi.find('.fa').first().removeClass(' fa-angle-right'); }}); }); }); if(jQuery(window).width() > 1024){ jQuery('.widget_shopping_cart').each(function(){ jQuery(this).on('mouseover', function(){ var mCartHeight=jQuery(this).find('.mini_cart_inner').outerHeight(); var cCartHeight=jQuery(this).find('.mini_cart_content').outerHeight(); if(cCartHeight < mCartHeight){ jQuery(this).find('.mini_cart_content').stop(true, false).animate({'height': mCartHeight}); }}); jQuery(this).on('mouseleave', function(){ jQuery(this).find('.mini_cart_content').animate({'height':'0'}); }); }); } jQuery('.widget_shopping_cart').each(function(){ jQuery(this).on('click', function(event){ if(jQuery(window).width() < 1025){ var closed=false; var mCartHeight=jQuery(this).find('.mini_cart_inner').outerHeight(); var mCartToggler=jQuery(this).find('.cart-toggler'); if(jQuery(this).find('.mini_cart_content').height()==0){ closed=true; } if(mCartToggler.is(event.target)||mCartToggler.has(event.target).length!=0||mCartToggler.is(event.target)){ event.preventDefault(); if(closed){ jQuery(this).find('.mini_cart_content').animate({'height': mCartHeight}); closed=false; }else{ jQuery(this).find('.mini_cart_content').animate({'height':'0'}, function(){ closed=true; }); }} }}); }); var cateToggler=jQuery('.cate-toggler'); jQuery('.header-search .product-categories').prepend('
  • '+cateToggler.html()+'
  • '); cateToggler.on('click', function(){ jQuery('.header-search .product-categories').toggleClass('open'); }); var searchCat=''; var currentCat=RoadgetParameterByName('product_cat', jQuery('.header-search .product-categories .current-cat a').attr('href')); var currentCatName=jQuery('.current-cat a').html(); if(currentCatName!=''){ cateToggler.html(currentCatName); jQuery('.wsearchsubmit').on('click', function(){ if(searchCat==''){ jQuery('.searchform').attr('action', jQuery('.header-search .product-categories .current-cat a').attr('href')); }}); } if(currentCat!=''){ if(!(jQuery('#product_cat').length > 0)){ jQuery('.searchform').append(''); } jQuery('#product_cat').val(currentCat); } jQuery('.header-search .product-categories a').each(function(){ jQuery(this).on('click', function(event){ event.preventDefault(); jQuery('.header-search .product-categories a.active').removeClass('active'); jQuery(this).addClass('active'); jQuery('.header-search .product-categories').removeClass('open'); jQuery('.searchform').attr('action', jQuery(this).attr('href')); cateToggler.html(jQuery(this).html()); searchCat=jQuery(this).attr('href'); if(!(jQuery('#product_cat').length > 0)&&(RoadgetParameterByName('product_cat', jQuery(this).attr('href'))!='')){ jQuery('.searchform').append(''); } jQuery('#product_cat').val(RoadgetParameterByName('product_cat', jQuery(this).attr('href'))); }); }); jQuery('body').append('
    '); jQuery('.atc-notice-wrapper .close').on('click', function(){ jQuery('.atc-notice-wrapper').fadeOut(); jQuery('.atc-notice').html(''); }); var ajaxPId=0; jQuery('body').on('adding_to_cart', function(event, button, data){ ajaxPId=button.attr('data-product_id'); }); jQuery('body').on('added_to_cart', function(event, fragments, cart_hash){ jQuery.post(ajaxurl, { 'action': 'get_productinfo', 'data': {'pid': ajaxPId}}, function(response){ jQuery('.atc-notice').html(response); jQuery('.atc-notice-wrapper').fadeIn(); } ); }); jQuery('a.yith_magnifier_thumbnail').live('click', function(){ jQuery('a.yith_magnifier_thumbnail').removeClass('active'); jQuery(this).addClass('active'); }); jQuery('.toolbar .orderby').chosen({disable_search: true, width: "auto"}); jQuery('#lang_choice_1').chosen({disable_search: true, width: "auto"}); jQuery('.image-slider').each(function(){ var items_1500up=parseInt(jQuery(this).attr('data-1500up')); var items_1200_1499=parseInt(jQuery(this).attr('data-1200-1499')); var items_992_1199=parseInt(jQuery(this).attr('data-992-1199')); var items_768_991=parseInt(jQuery(this).attr('data-768-991')); var items_640_767=parseInt(jQuery(this).attr('data-640-767')); var items_480_639=parseInt(jQuery(this).attr('data-480-639')); var items_0_479=parseInt(jQuery(this).attr('data-0-479')); var navigation=true; if(parseInt(jQuery(this).attr('data-navigation'))!==1){navigation=false} ; var pagination=false; if(parseInt(jQuery(this).attr('data-pagination'))==1){pagination=true} ; var item_margin=parseInt(jQuery(this).attr('data-margin')); var auto=false; if(parseInt(jQuery(this).attr('data-auto'))==1){auto=true} ; var loop=false; if(parseInt(jQuery(this).attr('data-loop'))==1){loop=true} ; var speed=parseInt(jQuery(this).attr('data-speed')); jQuery(this).addClass('owl-carousel owl-theme').owlCarousel({ nav:navigation, dots:pagination, margin:item_margin, loop:loop, autoplay:auto, smartSpeed:speed, addClassActive:false, responsiveClass: true, responsive:{ 0: { items: items_0_479, }, 480: { items: items_480_639, }, 640: { items: items_640_767, }, 768: { items: items_768_991, }, 992: { items: items_992_1199, }, 1200: { items: items_1200_1499, }, 1500: { items: items_1500up, }, }}); }); jQuery('.brands-carousel').each(function(){ var items_1500up=parseInt(jQuery(this).attr('data-1500up')); var items_1200_1499=parseInt(jQuery(this).attr('data-1200-1499')); var items_992_1199=parseInt(jQuery(this).attr('data-992-1199')); var items_768_991=parseInt(jQuery(this).attr('data-768-991')); var items_640_767=parseInt(jQuery(this).attr('data-640-767')); var items_480_639=parseInt(jQuery(this).attr('data-480-639')); var items_0_479=parseInt(jQuery(this).attr('data-0-479')); var navigation=true; if(parseInt(jQuery(this).attr('data-navigation'))!==1){navigation=false} ; var pagination=false; if(parseInt(jQuery(this).attr('data-pagination'))==1){pagination=true} ; var item_margin=parseInt(jQuery(this).attr('data-margin')); var auto=false; if(parseInt(jQuery(this).attr('data-auto'))==1){auto=true} ; var loop=false; if(parseInt(jQuery(this).attr('data-loop'))==1){loop=true} ; var speed=parseInt(jQuery(this).attr('data-speed')); jQuery(this).addClass('owl-carousel owl-theme').owlCarousel({ nav:navigation, dots:pagination, margin:item_margin, loop:loop, autoplay:auto, smartSpeed:speed, addClassActive:false, responsiveClass: true, responsive:{ 0: { items: items_0_479, }, 480: { items: items_480_639, }, 640: { items: items_640_767, }, 768: { items: items_768_991, }, 992: { items: items_992_1199, }, 1200: { items: items_1200_1499, }, 1500: { items: items_1500up, }, }}); }); jQuery('.inner-brands .brands-carousel').each(function(){ var plantmore_brandcols=jQuery(this).attr('data-col'); jQuery(this).slick({ infinite: true, slidesToShow: 5, slidesToScroll: plantmore_brandscrollnumber, speed: plantmore_brandanimate, easing: 'linear', dots: true, arrows: false, autoplay: plantmore_brandscroll, autoplaySpeed: plantmore_brandpause, responsive: [ { breakpoint: 1199, settings: { slidesToShow: 4, }}, { breakpoint: 767, settings: { slidesToShow: 3, }}, { breakpoint: 479, settings: { slidesToShow: 1, }} ] }); }); jQuery('.countdown').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')+''+'Hours
    '+'
    '+''+event.strftime('%M')+''+'Mins
    '+'
    '+''+event.strftime('%S')+''+'Secs
    ' ); }); }); 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')+''+'Hours
    '+'
    '+''+event.strftime('%M')+''+'Mins
    '+'
    '+''+event.strftime('%S')+''+'Secs
    ' ); }); }); jQuery('.posts-carousel.roadthemes-slider').each(function(){ var items_1500up=parseInt(jQuery(this).attr('data-1500up')); var items_1200_1499=parseInt(jQuery(this).attr('data-1200-1499')); var items_992_1199=parseInt(jQuery(this).attr('data-992-1199')); var items_768_991=parseInt(jQuery(this).attr('data-768-991')); var items_640_767=parseInt(jQuery(this).attr('data-640-767')); var items_480_639=parseInt(jQuery(this).attr('data-480-639')); var items_0_479=parseInt(jQuery(this).attr('data-0-479')); var navigation=true; if(parseInt(jQuery(this).attr('data-navigation'))!==1){navigation=false} ; var pagination=false; if(parseInt(jQuery(this).attr('data-pagination'))==1){pagination=true} ; var item_margin=parseInt(jQuery(this).attr('data-margin')); var auto=false; if(parseInt(jQuery(this).attr('data-auto'))==1){auto=true} ; var loop=false; if(parseInt(jQuery(this).attr('data-loop'))==1){loop=true} ; var speed=parseInt(jQuery(this).attr('data-speed')); jQuery(this).addClass('owl-carousel owl-theme').owlCarousel({ nav:navigation, dots:pagination, margin:item_margin, loop:loop, autoplay:auto, smartSpeed:speed, addClassActive:false, responsiveClass: true, responsive:{ 0: { items: items_0_479, }, 480: { items: items_480_639, }, 640: { items: items_640_767, }, 768: { items: items_768_991, }, 992: { items: items_992_1199, }, 1200: { items: items_1200_1499, }, 1500: { items: items_1500up, }, }}); }); jQuery('.testimonials-wrapper').each(function(){ var navigation=false; if(parseInt(jQuery(this).attr('data-navigation'))==1){navigation=true} ; var pagination=true; if(parseInt(jQuery(this).attr('data-pagination'))!==0){pagination=true} ; var auto=false; if(parseInt(jQuery(this).attr('data-auto'))==1){auto=true} ; var loop=false; if(parseInt(jQuery(this).attr('data-loop'))==1){loop=true} ; var speed=parseInt(jQuery(this).attr('data-speed')); jQuery(this).find('.testimonials-list').addClass('owl-carousel owl-theme').owlCarousel({ items:1, margin:0, nav:navigation, dots:pagination, loop:loop, autoplay:auto, smartSpeed:speed, }); }); jQuery('.upsells .shop-products').addClass('owl-carousel').owlCarousel({ items:4, margin:30, nav:true, dots:false, responsive:{ 0:{ items: 1, }, 480:{ items: 2, }, 768:{ items: 2, }, 992:{ items: 3, }, 1200:{ items: 4, }, 1500:{ items: 4, }, }}); jQuery('.related .shop-products').addClass('owl-carousel').owlCarousel({ items:4, margin:30, nav:true, dots:false, responsive:{ 0:{ items: 1, }, 480:{ items: 1, }, 768:{ items: 2, }, 992:{ items: 3, }, 1200:{ items: 4, }, 1500:{ items: 4, }, }}); jQuery('.cross-sells .shop-products').addClass('owl-carousel').owlCarousel({ items:4, margin:30, nav:true, dots:false, responsive:{ 0:{ items: 1, }, 480:{ items: 1, }, 768:{ items: 2, }, 992:{ items: 3, }, 1200:{ items: 4, }, 1500:{ items: 4, }, }}); jQuery('.roadthemes-slider').each(function(){ var total=jQuery(this).find('.owl-stage .owl-item.active').length; jQuery(this).find('.owl-stage .owl-item.active').each(function(index){ if(index===0){ jQuery(this).addClass('firstActiveItem'); } if(index===total - 1){ jQuery(this).addClass('lastActiveItem'); }}); jQuery(this).on('translated.owl.carousel', function(event){ jQuery(this).find('.owl-stage .owl-item').removeClass('firstActiveItem lastActiveItem'); jQuery(this).find('.owl-stage .owl-item.active').each(function(index){ if(index===0){ jQuery(this).addClass('firstActiveItem'); } if(index===total - 1){ jQuery(this).addClass('lastActiveItem'); }}); }); }); jQuery('.vc_tta-tabs .vc_tta-tab > a').each(function(){ jQuery(this).on('click', function(event){ event.preventDefault(); }); }); jQuery('.testimonials-wrapper .quote').each(function(){ jQuery(this).find('.testimonials-text').insertAfter(jQuery(this).find('.author')); }); jQuery(document).ready(function($){ jQuery(document).on('added_to_wishlist removed_from_wishlist', function(){ var counter=jQuery('.wishlist-count'); $.ajax({ url: yith_wcwl_l10n.ajax_url, data: { action: 'yith_wcwl_update_wishlist_count' }, dataType: 'json', success: function(data){ counter.html(data.count); }, beforeSend: function(){ counter.block(); }, complete: function(){ counter.unblock(); }}) }) }); jQuery('.view-mode').each(function(){ jQuery(this).find('.grid').on('click', function(event){ event.preventDefault(); jQuery('.view-mode').find('.grid').addClass('active'); jQuery('.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('.view-mode').find('.list').addClass('active'); jQuery('.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').each(function(){ debacotip(jQuery(this), 'html'); }); var compareText=jQuery('.single-product-info .compare').html(); jQuery('.single-product-info .compare').html(''+compareText+''); jQuery('.comparetip').each(function(){ debacotip(jQuery(this), 'html'); }); jQuery('.compare-button a').each(function(){ debacotip(jQuery(this), 'html'); }); jQuery('.add_to_cart_inline a').each(function(){ debacotip(jQuery(this), 'html'); }); jQuery('.quickviewbtn .quickview').each(function(){ debacotip(jQuery(this), 'html'); }); jQuery('.sharefriend a').each(function(){ debacotip(jQuery(this), 'html'); }); jQuery('.social-icons a').each(function(){ debacotip(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('
    '); var arrIdx=0; var quickviewArr=Array(); var nextArrID=0; var prevArrID=0; jQuery('.quickview').each(function(){ var quickviewLink=jQuery(this); var productID=quickviewLink.attr('data-quick-id'); if(quickviewArr.indexOf(productID)==-1){ quickviewArr[arrIdx]=productID; arrIdx++; } quickviewLink.on('click', function(event){ event.preventDefault(); prevArrID=quickviewArr[quickviewArr.indexOf(productID) - 1]; nextArrID=quickviewArr[quickviewArr.indexOf(productID) + 1]; jQuery('.qvprev').attr('data-quick-id', prevArrID); jQuery('.qvnext').attr('data-quick-id', nextArrID); showQuickView(productID, quickviewArr); }); }); jQuery('.qvprev').on('click', function(){ showQuickView(jQuery(this).attr('data-quick-id'), quickviewArr); }); jQuery('.qvnext').on('click', function(){ showQuickView(jQuery(this).attr('data-quick-id'), quickviewArr); }); jQuery('.closeqv').on('click', function(){ hideQuickView(); }); jQuery('.counter-number span').counterUp({ delay: 10, time: 1000 }); jQuery('#back-top').on('click', function(){ jQuery("html, body").animate({ scrollTop: 0 }, "slow"); }); jQuery('.landing-link a').each(function(){ var menulinkID=jQuery(this).attr('href'); if(jQuery(menulinkID).length > 0){ var targetOffset=jQuery(menulinkID).offset().top; jQuery(this).on('click', function(event){ event.preventDefault(); jQuery("html, body").animate({ scrollTop: targetOffset }, "slow"); }); }}); if(debaco_sticky_header==true&&jQuery('.header-sticky').length > 0){ var headerSpaceH=jQuery('.header-sticky').height(); jQuery('.header-sticky').after('
    '); }}); var currentP=0; var stickyOffset=0; if(debaco_sticky_header==true&&jQuery('.header-sticky').length > 0){ stickyOffset=jQuery('.header-sticky').offset().top; stickyOffset +=jQuery('.header-sticky').outerHeight(); } jQuery(window).scroll(function(){ var headerH=jQuery('.header-container').height(); var scrollP=jQuery(window).scrollTop(); if(jQuery(window).width() > 300){ if(scrollP!=currentP){ if(scrollP >=headerH){ jQuery('#back-top').addClass('show'); }else{ jQuery('#back-top').removeClass('show'); } if(debaco_sticky_header==true&&jQuery('.header-sticky').length > 0){ if(scrollP >=stickyOffset){ jQuery('#back-top').addClass('show'); jQuery('.header-sticky').addClass('ontop'); jQuery('.headerSpace').addClass('show'); jQuery('.logo-scroll').show(); jQuery('.hide-scroll').hide(); }else{ jQuery('#back-top').removeClass('show'); jQuery('.header-sticky').removeClass('ontop show'); jQuery('.header-sticky .nav-container').removeClass('container'); jQuery('.headerSpace').removeClass('show'); jQuery('.hide-scroll').show(); jQuery('.logo-scroll').hide(); } if(scrollP >=(stickyOffset)){ jQuery('.header-sticky').addClass('show'); jQuery('.header-sticky .nav-container').addClass('container'); }} currentP=jQuery(window).scrollTop(); }} }); jQuery(window).load(function(){ jQuery('.list_projects #projects_list').shuffle({ itemSelector: '.project' }); jQuery('.filter-options .btn').on('click', function(){ var filterBtn=jQuery(this), isActive=filterBtn.hasClass('active'), group=isActive ? 'all':filterBtn.data('group'); if(!isActive){ jQuery('.filter-options .active').removeClass('active'); } filterBtn.toggleClass('active'); jQuery('.list_projects #projects_list').shuffle('shuffle', group); }); }); })(jQuery); "use strict"; function RoadgetParameterByName(name, string){ name=name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex=new RegExp("[\\?&]" + name + "=([^&#]*)"), results=regex.exec(string); return results===null ? "":decodeURIComponent(results[1].replace(/\+/g, " ")); } function roadtabCarousel(element, itemnumbers1, itemnumbers2, itemnumbers3, itemnumbers4, itemnumbers5){ jQuery(element).addClass('owl-carousel').owlCarousel({ items:itemnumbers1, margin:30, nav:true, dots:false, responsive:{ 0:{ items: itemnumbers5, }, 480:{ items: itemnumbers4, }, 768:{ items: itemnumbers3, }, 992:{ items: itemnumbers2, }, 1200:{ items: itemnumbers1, }, }}); } function roadMiniCartRemove(url, itemid){ jQuery('.mini_cart_content').addClass('loading'); jQuery('.cart-form').addClass('loading'); jQuery.get(url, function(data,status){ if(status=='success'){ jQuery.post(ajaxurl, { 'action': 'get_cartinfo' }, function(response){ var cartinfo=response.split("|"); var itemAmount=cartinfo[0]; var cartTotal=cartinfo[1]; var orderTotal=cartinfo[2]; 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(); var mCartHeight=jQuery('.mini_cart_inner').outerHeight(); jQuery('.mini_cart_content').animate({'height': mCartHeight}); }, 1000); jQuery('.mini_cart_content').removeClass('loading'); jQuery('.cart-form').removeClass('loading'); }}); } function debacotip(element, content){ if(content=='html'){ var tipText=element.html(); }else{ var tipText=element.attr('title'); } element.on('mouseover', function(){ if(jQuery('.debacotip').length==0){ element.before(''); var tipWidth=jQuery('.debacotip').outerWidth(); var tipPush=-(tipWidth/2 - element.outerWidth()/2); jQuery('.debacotip').css('margin-left', tipPush); jQuery('.debacotip').fadeIn(); }}); element.on('mouseleave', function(){ jQuery('.debacotip').fadeOut(); jQuery('.debacotip').remove(); }); } function showQuickView(productID, quickviewArr){ prevArrID=quickviewArr[quickviewArr.indexOf(productID) - 1]; nextArrID=quickviewArr[quickviewArr.indexOf(productID) + 1]; jQuery('.qvprev').attr('data-quick-id', prevArrID); jQuery('.qvnext').attr('data-quick-id', nextArrID); jQuery('body').addClass('quickview'); window.setTimeout(function(){ jQuery('.quickview-wrapper').addClass('open'); jQuery('.qvloading').fadeIn(); jQuery.post(ajaxurl, { 'action': 'product_quickview', 'data': productID }, function(response){ jQuery('#quickview-content').html(response); jQuery('.qvloading').fadeOut(); jQuery('.variations_form').wc_variation_form(); jQuery('.variations_form .variations select').change(); jQuery('.quick-thumbnails').addClass('owl-carousel').owlCarousel({ items: 4, margin: 10, nav:false, dots:true, }); 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'; }); } ); }, 300); } function hideQuickView(){ jQuery('.quickview-wrapper').removeClass('open'); window.setTimeout(function(){ jQuery('body').removeClass('quickview'); }, 500); }; (function($){ jQuery(document).ready(function(){ mmm_reversal_z_index(); mmm_sticky_menu(); mmm_fullwidth_menu(); mmm_keep_open(); mmm_height_of_tabs_dropdown(); mmm_pushing_content(); mmm_mobile_double_tap_to_go(); mmm_mobile_toggle_menu(); mmm_smooth_scroll_to_anchor(); mmm_accessibility_actions(); jQuery(window).on('resize orientationchange', function(){ mmm_sticky_menu(); mmm_fullwidth_menu(); mmm_height_of_tabs_dropdown(); mmm_pushing_content(); mmm_smooth_scroll_to_anchor(); }); function mmm_reversal_z_index (){ var z_index=1000; function_selector='.mega_main_menu'; jQuery(function_selector).unbind(); jQuery(function_selector).each(function(index,element){ z_index=z_index - 10; jQuery(element).css({ 'z-index':z_index }); }); } function mmm_mobile_toggle_menu (){ function_selector='.mobile_toggle'; jQuery(function_selector).unbind(); jQuery('.mobile_menu_active').removeClass('mobile_menu_active'); jQuery(function_selector).on('click', function(){ if(jQuery(this).parent().hasClass('mobile_menu_active')){ jQuery(this).parent().removeClass('mobile_menu_active'); jQuery(this).parent().parent().removeClass('mobile_menu_active'); jQuery('.mega_main_menu .keep_open').removeClass('keep_open'); }else{ jQuery(this).parent().addClass('mobile_menu_active'); jQuery(this).parent().parent().addClass('mobile_menu_active'); }}); } function mmm_mobile_double_tap_to_go (){ function_selector='.mega_main_menu li:has(.mega_dropdown) > .item_link, .mega_main_menu li:has(.post_details) > .processed_image'; jQuery(function_selector).unbind(); if(/iphone|ipad|ipod|android|webos|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())){ var clicked_item=false; jQuery(function_selector).on('click', function(index){ if(clicked_item!=this){ index.preventDefault(); if(jQuery(this).parent().parent().parent().hasClass('keep_open')){ }else{ jQuery('.mega_main_menu .keep_open').removeClass('keep_open'); } jQuery(this).parent().addClass('keep_open'); clicked_item=this; }}); }} function mmm_sticky_menu (){ function_selector='.mega_main_menu > .menu_holder'; jQuery(function_selector).unbind(); jQuery(function_selector).each(function(index,element){ var stickyoffset=[]; var menu_inner_width=[]; var menu_inner=[]; var style_attr=[]; menu_inner[ index ]=jQuery(element).find('.menu_inner'); stickyoffset[ index ]=jQuery(element).data('stickyoffset') * 1; if(jQuery(element).hasClass('coercive_styles-enable')){ rules_priority=' !important'; }else{ rules_priority=''; } if(jQuery(element).attr('data-sticky')=='1'&&stickyoffset[ index ]==0){ menu_inner_width[ index ]=menu_inner[ index ].parents('.mega_main_menu').width(); menu_inner[ index ].attr('style' , 'width:' + menu_inner_width[ index ] + 'px;'); jQuery(element).addClass('sticky_container'); }else{ jQuery(window).on('scroll', function(){ if(jQuery(element).attr('data-sticky')=='1'){ scrollpath=jQuery(window).scrollTop(); if(scrollpath > stickyoffset[ index ]){ menu_inner_width[ index ]=menu_inner[ index ].parents('.mega_main_menu').width(); jQuery(element).find('.menu_inner').attr('style' , 'width:' + menu_inner_width[ index ] + 'px;'); jQuery(element).find('.mmm_fullwidth_container').attr('style' , 'left: 0px' + rules_priority + ';'); if(!jQuery(element).hasClass('sticky_container')){ jQuery(element).addClass('sticky_container'); }}else{ mmm_fullwidth_menu(); jQuery(element).removeClass('sticky_container'); style_attr[ index ]=jQuery(menu_inner[ index ]).attr('style'); if(typeof style_attr[ index ]!=='undefined'&&style_attr[ index ]!==false){ menu_inner[ index ].removeAttr('style'); }} }else{ jQuery(element).removeClass('sticky_container'); }}); }}); } function mmm_fullwidth_menu (){ function_selector='.mega_main_menu.direction-horizontal.fullwidth-enable'; jQuery(function_selector).unbind(); body_width=jQuery('body').width(); jQuery(function_selector).each(function(index, element){ offset_left=jQuery(element).offset().left; if(jQuery(element).hasClass('coercive_styles-enable')){ rules_priority=' !important'; }else{ rules_priority=''; } jQuery(element).find('.mmm_fullwidth_container').attr('style' , 'width:' + body_width + 'px' + rules_priority + ';left: -' + offset_left + 'px' + rules_priority + ';right:auto' + rules_priority + ';'); }); } function mmm_height_of_tabs_dropdown (){ function_selector='.mega_main_menu .tabs_dropdown > .mega_dropdown > li'; jQuery(function_selector).unbind(); jQuery('.mega_main_menu .tabs_dropdown').on('hover mouseleave mouseenter', function(event){ my_el=jQuery(this).find('.mega_dropdown > li').first(); jQuery(my_el).parent().css({ "min-height": jQuery(my_el).find('.mega_dropdown').outerHeight(true) }); jQuery(my_el).find(' > .mega_dropdown').css({ "min-height": jQuery(my_el).closest('.mega_dropdown').outerHeight(true) }); jQuery(my_el).addClass('keep_open'); }); jQuery('.dropdowns_trigger-hover' + function_selector).on('hover mouseenter transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd', function(event){ jQuery(this).parent().css({ "min-height": jQuery(this).find('.mega_dropdown').outerHeight(true) }); jQuery(this).find(' > .mega_dropdown').css({ "min-height": jQuery(this).closest('.mega_dropdown').outerHeight(true) }); }); jQuery('.dropdowns_trigger-hover' + function_selector).on('mouseleave ', function(event){ jQuery(this).parent().css({ "min-height": '0px' }); jQuery(this).find(' > .mega_dropdown').css({ "min-height": '0px' }); jQuery(this).removeClass('keep_open'); }); jQuery('.dropdowns_trigger-click' + function_selector).on('click', function(){ jQuery(this).parent().parent().find('.mega_dropdown').css({ "min-height": '0px' }); jQuery(this).parent().css({ "min-height": jQuery(this).find(' > .mega_dropdown').outerHeight(true) }); }); } function mmm_pushing_content (){ function_selector='.mega_main_menu.direction-horizontal.pushing_content-enable'; jQuery(function_selector).unbind(); jQuery(function_selector).each(function(index, element){ if(jQuery(element).hasClass('coercive_styles-enable')){ rules_priority=' !important'; }else{ rules_priority=''; } menu_holder_height=jQuery(element).find('.menu_holder').outerHeight(true); click_item=false; if(jQuery(element).hasClass('dropdowns_trigger-click')){ dropdowns_trigger='click'; if(jQuery('.mega_main_menu .nav_logo.mobile_menu_active').length){ }else{ jQuery('body').on(dropdowns_trigger, function(body_el){ menu_item_class=jQuery(body_el.target).closest('.menu-item').attr('class'); if(typeof jQuery(body_el.target).parents('.menu-item').attr('class')!='undefined'){ jQuery(element).css({ height: menu_holder_height + jQuery(this).find('.mega_main_menu_ul > li.keep_open > .mega_dropdown').outerHeight(true) + rules_priority }); if(click_item==menu_item_class){ jQuery(element).css({ height: menu_holder_height }); click_item=false; }else{ click_item=jQuery(body_el.target).closest('.menu-item').attr('class'); }}else{ jQuery(element).css({ height: menu_holder_height }); click_item=false; }}); }}else{ dropdowns_trigger='hover mouseleave'; if(jQuery('.mega_main_menu .nav_logo.mobile_menu_active').length){ }else{ jQuery(element).find('li').on(dropdowns_trigger, function(body_el){ jQuery(element).delay(200).css({ height: menu_holder_height + jQuery(element).find('.mega_main_menu_ul > li:hover > .mega_dropdown').outerHeight(true) + rules_priority }); }); }} }); } function mmm_smooth_scroll_to_anchor (){ function_selector='.mega_main_menu a[href*="#"]:not([href="#"])'; jQuery(function_selector).on('click', function(){ if(location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&location.hostname==this.hostname){ var target=jQuery(this.hash); target=target.length ? target:jQuery('[name=' + this.hash.slice(1) +'], [id=' + this.hash.slice(1) +']'); if(target.length){ jQuery('.mega_main_menu .current-menu-item').removeClass('current-menu-item'); jQuery(this).parent().addClass('current-menu-item'); jQuery('html,body').animate({ scrollTop: target.offset().top - 90 }, 600); jQuery('.mega_main_menu .mobile_menu_active').removeClass('mobile_menu_active'); }} }); }; function mmm_keep_open (){ /* function_selector='.mega_main_menu .menu-item *'; jQuery(function_selector).unbind(); jQuery(function_selector).on('focus', function(index){ jQuery(this).parents('.menu-item, .post_item').addClass('keep_open'); }) jQuery(function_selector).on('hover', function(index){ jQuery(this).parents('.menu-item, .post_item').removeClass('keep_open'); }) jQuery(function_selector).on('blur', function(index){ jQuery(this).parents('.menu-item, .post_item').removeClass('keep_open'); }) */ click_item_2=false; /* if(true!=/iphone|ipad|ipod|android|webos|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())){ } */ jQuery('body').on('click', function(body_el){ menu_item_class=jQuery(body_el.target).closest('.menu-item').attr('class'); if(( click_item_2!=menu_item_class)&&(typeof jQuery(body_el.target).closest('.mega_main_menu.dropdowns_trigger-click .menu-item:has(.mega_dropdown)').attr('class')!='undefined')){ if(jQuery(body_el.target).closest('.menu-item').find('.mega_dropdown').length){ body_el.preventDefault(); } jQuery('.mega_main_menu .keep_open').removeClass('keep_open'); jQuery(body_el.target).parents('.menu-item').addClass('keep_open'); click_item_2=jQuery(body_el.target).closest('.menu-item').attr('class'); }else if(jQuery(body_el.target).is('.mega_main_menu .mega_dropdown form *:focus')){ jQuery('.mega_main_menu .keep_open').removeClass('keep_open'); jQuery(body_el.target).parents('.menu-item').addClass('keep_open'); }else if(( click_item_2==menu_item_class)){ jQuery(body_el.target).closest('.menu-item').removeClass('keep_open'); click_item_2=false; }else{ jQuery('.menu-item').removeClass('keep_open'); click_item_2=false; }}); } function mmm_accessibility_actions (){ window.onkeydown=function(onkeydown_event){ if(jQuery(onkeydown_event.target).hasClass('item_link')){ if(onkeydown_event.keyCode==32){ onkeydown_event.preventDefault(); check_condition=jQuery(onkeydown_event.target).parent('.menu-item').hasClass('keep_open'); jQuery('.mega_main_menu .keep_open').removeClass('keep_open'); jQuery('.mega_main_menu [aria-expanded="true"]').attr('aria-expanded', false); jQuery(onkeydown_event.target).parents('.menu-item').addClass('keep_open'); jQuery(onkeydown_event.target).attr('aria-expanded', true); jQuery(onkeydown_event.target).siblings(".mega_dropdown").attr('aria-expanded', true); if(check_condition){ jQuery(onkeydown_event.target).parent('.menu-item').removeClass('keep_open'); jQuery(onkeydown_event.target).attr('aria-expanded', false); jQuery(onkeydown_event.target).siblings(".mega_dropdown").attr('aria-expanded', false); }} }else{ jQuery('.mega_main_menu .keep_open').removeClass('keep_open'); jQuery('.mega_main_menu [aria-expanded="true"]').attr('aria-expanded', false); }};}}); })(jQuery); !function(n,r){var t,e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,t=n._,(e=n._=r()).noConflict=function(){return n._=t,e})}(this,function(){var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},e=Array.prototype,o=Object.prototype,s="undefined"!=typeof Symbol?Symbol.prototype:null,u=e.push,a=e.slice,p=o.toString,t=o.hasOwnProperty,i="undefined"!=typeof ArrayBuffer,f="undefined"!=typeof DataView,c=Array.isArray,l=Object.keys,h=Object.create,v=i&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(u,i){return i=null==i?u.length-1:+i,function(){for(var n=Math.max(arguments.length-i,0),r=Array(n),t=0;t":">",'"':""","'":"'","`":"`"},$n=zn(Ln),Cn=zn(jn(Ln)),Kn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Jn=/(.)^/,Gn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Hn=/\\|'|\r|\n|\u2028|\u2029/g;function Qn(n){return"\\"+Gn[n]}var Xn=/^\s*(\w|\$)+\s*$/;var Yn=0;function Zn(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);t=On(n.prototype),u=n.apply(t,u);return _(u)?u:t}var nr=j(function(u,i){function o(){for(var n=0,r=i.length,t=Array(r),e=0;e/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(t){return(a=a||_.template(s("#tmpl-"+e).html(),n))(t)}}),wp.ajax={settings:t.ajax||{},post:function(t,e){return wp.ajax.send({data:_.isObject(t)?t:_.extend(e||{},{action:t})})},send:function(n,t){var e,a;return _.isObject(n)?t=n:(t=t||{}).data=_.extend(t.data||{},{action:n}),t=_.defaults(t||{},{type:"POST",url:wp.ajax.settings.url,context:this}),(e=(a=s.Deferred(function(a){t.success&&a.done(t.success),t.error&&a.fail(t.error),delete t.success,delete t.error,a.jqXHR=s.ajax(t).done(function(t){var e;"1"!==t&&1!==t||(t={success:!0}),_.isObject(t)&&!_.isUndefined(t.success)?(e=this,a.done(function(){n&&n.data&&"query-attachments"===n.data.action&&a.jqXHR.hasOwnProperty("getResponseHeader")&&a.jqXHR.getResponseHeader("X-WP-Total")?e.totalAttachments=parseInt(a.jqXHR.getResponseHeader("X-WP-Total"),10):e.totalAttachments=0}),a[t.success?"resolveWith":"rejectWith"](this,[t.data])):a.rejectWith(this,[t])}).fail(function(){a.rejectWith(this,arguments)})})).promise()).abort=function(){return a.jqXHR.abort(),this},e}}}(jQuery); !function(C,d,e,n){function t(t){var a=this;a.$form=t,a.$attributeFields=t.find(".variations select"),a.$singleVariation=t.find(".single_variation"),a.$singleVariationWrap=t.find(".single_variation_wrap"),a.$resetVariations=t.find(".reset_variations"),a.$product=t.closest(".product"),a.variationData=t.data("product_variations"),a.useAjax=!1===a.variationData,a.xhr=!1,a.loading=!0,a.$singleVariationWrap.show(),a.$form.off(".wc-variation-form"),a.getChosenAttributes=a.getChosenAttributes.bind(a),a.findMatchingVariations=a.findMatchingVariations.bind(a),a.isMatch=a.isMatch.bind(a),a.toggleResetLink=a.toggleResetLink.bind(a),t.on("click.wc-variation-form",".reset_variations",{variationForm:a},a.onReset),t.on("reload_product_variations",{variationForm:a},a.onReload),t.on("hide_variation",{variationForm:a},a.onHide),t.on("show_variation",{variationForm:a},a.onShow),t.on("click",".single_add_to_cart_button",{variationForm:a},a.onAddToCart),t.on("reset_data",{variationForm:a},a.onResetDisplayedVariation),t.on("reset_image",{variationForm:a},a.onResetImage),t.on("change.wc-variation-form",".variations select",{variationForm:a},a.onChange),t.on("found_variation.wc-variation-form",{variationForm:a},a.onFoundVariation),t.on("check_variations.wc-variation-form",{variationForm:a},a.onFindVariation),t.on("update_variation_values.wc-variation-form",{variationForm:a},a.onUpdateAttributes),setTimeout(function(){t.trigger("check_variations"),t.trigger("wc_variation_form"),a.loading=!1},100)}t.prototype.onReset=function(t){t.preventDefault(),t.data.variationForm.$attributeFields.val("").change(),t.data.variationForm.$form.trigger("reset_data")},t.prototype.onReload=function(t){var a=t.data.variationForm;a.variationData=a.$form.data("product_variations"),a.useAjax=!1===a.variationData,a.$form.trigger("check_variations")},t.prototype.onHide=function(t){t.preventDefault(),t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-is-unavailable").addClass("disabled wc-variation-selection-needed"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")},t.prototype.onShow=function(t,a,i){t.preventDefault(),i?(t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("disabled wc-variation-selection-needed wc-variation-is-unavailable"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-disabled").addClass("woocommerce-variation-add-to-cart-enabled")):(t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-selection-needed").addClass("disabled wc-variation-is-unavailable"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled"))},t.prototype.onAddToCart=function(t){C(this).is(".disabled")&&(t.preventDefault(),C(this).is(".wc-variation-is-unavailable")?d.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):C(this).is(".wc-variation-selection-needed")&&d.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text))},t.prototype.onResetDisplayedVariation=function(t){var a=t.data.variationForm;a.$product.find(".product_meta").find(".sku").wc_reset_content(),a.$product.find(".product_weight, .woocommerce-product-attributes-item--weight .woocommerce-product-attributes-item__value").wc_reset_content(),a.$product.find(".product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value").wc_reset_content(),a.$form.trigger("reset_image"),a.$singleVariation.slideUp(200).trigger("hide_variation")},t.prototype.onResetImage=function(t){t.data.variationForm.$form.wc_variations_image_update(!1)},t.prototype.onFindVariation=function(t){var a=t.data.variationForm,i=a.getChosenAttributes(),e=i.data;if(i.count===i.chosenCount)if(a.useAjax)a.xhr&&a.xhr.abort(),a.$form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),e.product_id=parseInt(a.$form.data("product_id"),10),e.custom_data=a.$form.data("custom_data"),a.xhr=C.ajax({url:wc_add_to_cart_variation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_variation"),type:"POST",data:e,success:function(t){t?a.$form.trigger("found_variation",[t]):(a.$form.trigger("reset_data"),i.chosenCount=0,a.loading||(a.$form.find(".single_variation").after('

    '+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"

    "),a.$form.find(".wc-no-matching-variations").slideDown(200)))},complete:function(){a.$form.unblock()}});else{a.$form.trigger("update_variation_values");var r=a.findMatchingVariations(a.variationData,e).shift();r?a.$form.trigger("found_variation",[r]):(a.$form.trigger("reset_data"),i.chosenCount=0,a.loading||(a.$form.find(".single_variation").after('

    '+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"

    "),a.$form.find(".wc-no-matching-variations").slideDown(200)))}else a.$form.trigger("update_variation_values"),a.$form.trigger("reset_data");a.toggleResetLink(0"),c=e.val()||"",_=!0;if(!e.data("attribute_html")){var d=e.clone();d.find("option").removeAttr("disabled attached").removeAttr("selected"),e.data("attribute_options",d.find("option"+n).get()),e.data("attribute_html",d.html())}s.html(e.data("attribute_html"));var m=C.extend(!0,{},F);m[r]="";var v=y.findMatchingVariations(y.variationData,m);for(var l in v)if("undefined"!=typeof v[l]){var g=v[l].attributes;for(var f in g)if(g.hasOwnProperty(f)){var u=g[f],h="";if(f===r)if(v[l].variation_is_active&&(h="enabled"),u){u=C("
    ").html(u).text();var p=s.find("option");if(p.length)for(var w=0,b=p.length;w=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)}else{index=$tabs.tabs("option","active");var length=$tabs.find(".wpb_tab").length;index=jQuery(this).parent().hasClass("wpb_next_slide")?length<=index+1?0:index+1:index-1<0?length-1:index-1,$tabs.tabs("option","active",index)}})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,$this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).click(function(e){e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0);getColumnsCount(jQuery(this));jQuery(this).hasClass("columns_count_1")&&900;var carousele_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).resize(function(){screen_size!=(screen_size=getSizeName())&&window.setTimeout("location.reload()",20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1
    ')}),vc_initVideoBackgrounds(),callSkrollInit=!1,window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSize,skrollrStart,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),($parallaxElement=$("
    ").addClass("vc_parallax-inner").appendTo($(this))).height(skrollrSize+"%"),(youtubeId=vcExtractYoutubeId(parallaxImage=$(this).data("vcParallaxImage")))?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrStart=-(skrollrSize-100),$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: 0%;")}),callSkrollInit&&window.skrollr&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();function getSizeName(){var screen_w=jQuery(window).width();return 1170
    ').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px"):(iframeH=(iframeW=containerW)*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px"),iframeW+="px",iframeH+="px",$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}function vcExtractYoutubeId(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}if("function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var $ui_panel,$google_maps,panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$line_charts=panel.find(".vc_line-chart"),$carousel=panel.find('[data-ride="vc_carousel"]');if(vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),$ui_panel=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$ui_panel.length&&$ui_panel.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")){var $frame=$google_maps.find("iframe");$frame.attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")}panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),"function"!=typeof window.vc_googleMapsPointer)function vc_googleMapsPointer(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.click(function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.mouseleave(function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}function vc_setHoverBoxPerspective(hoverBox){hoverBox.each(function(){var $this=jQuery(this),perspective=4*$this.width()+"px";$this.css("perspective",perspective)})}function vc_setHoverBoxHeight(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=backHeight":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===s.fn.jquery.substr(0,3)){var n=s();s.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e.isTouchscreen=function(){return"undefined"==typeof e._isTouchscreenCache&&(e._isTouchscreenCache="ontouchstart"in document.documentElement),e._isTouchscreenCache},e}),e.define("select2/results",["jquery","./utils"],function(h,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=h('
      ');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h(''),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{"class":"select2-results__options select2-results__options--nested",role:"listbox"});p.append(l),s.attr("role","list"),s.append(r),s.append(p)}else this.template(e,t);return h.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("data-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[data-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var s=l.$results.offset().top,r=o.offset().top,a=l.$results.scrollTop()+(r-s);0===i?l.$results.scrollTop(0):r-s<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[data-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var o=l.$results.offset().top+l.$results.outerHeight(!1),s=i.offset().top+i.outerHeight(!1),r=l.$results.scrollTop()+s-o;0===n?l.$results.scrollTop(0):othis.$results.outerHeight()||s<0)&&this.$results.scrollTop(o)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),o=n(e,t);null==o?t.style.display="none":"string"==typeof o?t.innerHTML=i(o):h(t).append(o)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(i,e,o){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=i('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},n.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.options.get("minimumResultsForSearch"),Infinity;this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===o.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),window.setTimeout(function(){n.$selection.focus()},1),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},n.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||i.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},n.prototype._attachCloseHandler=function(e){i(document.body).on("mousedown.select2."+e.id,function(e){var t=i(e.target),n=t.closest(".select2");i(".select2.select2-container--open").each(function(){var e=i(this);this!=n[0]&&(e.data("element").select2("close"),setTimeout(function(){e.find("*:focus").blur(),t.focus()},1))})})},n.prototype._detachCloseHandler=function(e){i(document.body).off("mousedown.select2."+e.id)},n.prototype.position=function(e,t){t.find(".selection").append(e)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},n}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},o.prototype.bind=function(t,e){var n=this;o.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.attr("role","combobox"),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("keydown",function(e){!t.isOpen()&&48<=e.which&&e.which<=90&&t.open()}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(e){n.update(e.data)})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return e("")},o.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},o}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function o(e,t){o.__super__.constructor.apply(this,arguments)}return a.Extend(o,e),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
        '),e},o.prototype.bind=function(t,e){var n=this;o.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!n.options.get("disabled")){var t=i(this).parent().data("data");n.trigger("unselect",{originalEvent:e,data:t})}}),this.$selection.on("keydown",function(e){!t.isOpen()&&48<=e.which&&e.which<=90&&t.open()}),t.on("focus",function(){n.focusOnSearch()})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return i('
      • ')},o.prototype.focusOnSearch=function(){var e=this;"undefined"!=typeof e.$search&&setTimeout(function(){e._keyUpPrevented=!0,e.$search.focus()},1)},o.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×');n.data("data",t),this.$selection.find(".select2-selection__rendered").prepend(n)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,e,a){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(e,i,t){var o=this,n=i.id+"-results";e.call(this,i,t),i.on("open",function(){o.$search.attr("aria-owns",n),o.$search.trigger("focus")}),i.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.removeAttr("aria-owns"),o.$search.trigger("focus")}),i.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),i.on("disable",function(){o.$search.prop("disabled",!0)}),i.on("focus",function(e){o.$search.trigger("focus")}),i.on("results:focus",function(e){o.$search.attr("aria-activedescendant",e.data._resultId)}),this.$selection.on("focusin",".select2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){o._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===a.BACKSPACE&&""===o.$search.val()){var t=o.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,i,o){var s=this;this.current(function(e){var t=null!=e?e.length:0;0=s.maximumSelectionLength?s.trigger("results:message",{message:"maximumSelected",args:{maximum:s.maximumSelectionLength}}):n.call(s,i,o)})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(s,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=s('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this,o=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){s(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.attr("aria-owns",o),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-activedescendant"),i.$search.removeAttr("aria-owns"),i.$search.val("")}),t.on("focus",function(){t.isOpen()||i.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.data._resultId)})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(o){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=o.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+50&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=o.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=o('
      • '),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||f(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,o="resize.select2."+t.id,s="orientationchange.select2."+t.id,r=this.$container.parents().filter(a.hasScroll);r.each(function(){f(this).data("select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),r.on(i,function(e){var t=f(this).data("select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(i+" "+o+" "+s,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+i+" "+o)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var r=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ao.bottom+r,d={left:o.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();d.top-=h.top,d.left-=h.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=s.top-h.top-r),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=Infinity),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function o(e){for(var t=0,n=0;n');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},u}),e.define("select2/compat/utils",["jquery"],function(r){return{syncCssClasses:function a(e,t,n){var i,o,s=[];(i=r.trim(e.attr("class")))&&r((i=""+i).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&s.push(this)}),(i=r.trim(t.attr("class")))&&r((i=""+i).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(o=n(this))&&s.push(o)}),e.attr("class",s.join(" "))}}}),e.define("select2/compat/containerCss",["jquery","./utils"],function(r,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";r.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var o=i;i=function(e){var t=o(e);return null!=t?t+" "+e:e}}var s=this.options.get("containerCss")||{};return r.isFunction(s)&&(s=s(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(s),t.addClass(n),t},e}),e.define("select2/compat/dropdownCss",["jquery","./utils"],function(r,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";r.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var o=i;i=function(e){var t=o(e);return null!=t?t+" "+e:e}}var s=this.options.get("dropdownCss")||{};return r.isFunction(s)&&(s=s(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(s),t.addClass(n),t},e}),e.define("select2/compat/initSelection",["jquery"],function(i){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return e.prototype.current=function(e,t){var n=this;this._isInitialized?e.call(this,t):this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,i.isArray(e)||(e=[e]),t(e)})},e}),e.define("select2/compat/inputData",["jquery"],function(r){function e(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `