jQuery( '.registration-section' ).hide(); jQuery(document).ready(function($){ var touch = $('.menu-toggle'); var menu = $('.main-menu-container'); var header = $('header.masthead'); $(touch).on('click', function(e) { e.preventDefault(); menu.slideToggle(); header.toggleClass("menu-on"); }); $(window).resize(function(){ var w = $(window).width(); if(w > 767 && menu.is(':hidden')) { menu.removeAttr('style'); header.removeClass("menu-on"); } }); jQuery('#myCarousel').slick({ responsive: [ { breakpoint: 480, settings: { arrows: false, dots: true } } ] }); $(".thumbnail, .photo, .list-article .img-thumb").imgLiquid({ // fill: true, // horizontalAlign: "center", // verticalAlign: "center" }); respondify(); $(".btn-search").click(function () { $(this).toggleClass("active"); $(".form-search-box").toggleClass("active"); $(".search-box").val(''); $(".search-box").focus(); $(".main-menu").toggleClass("search-active"); }); if ( jQuery( '.nav-added-sticky-here' ).length > 0 ) { var distance = jQuery( '.nav-added-sticky-here' ).offset().top; distance = distance-3; var this_window = jQuery( window ); this_window.scroll(function() { if ( this_window.scrollTop() >= distance ) { jQuery( '.nav-added-sticky-here' ).addClass( 'navbar-mino-sticky' ); } else { jQuery( '.nav-added-sticky-here' ).removeClass( 'navbar-mino-sticky' ); } }); } }); jQuery(window).resize(function($) { respondify(); }); function respondify(){ jQuery('iframe[src*="embed.spotify.com"]').each( function() { jQuery(this).css('width',jQuery(this).parent(1).css('width')); jQuery(this).attr('src',jQuery(this).attr('src')); }); } jQuery( '#wp-calendar tbody td:has(a)' ).hover(function(){ jQuery( this ).css( 'background', '#23a0bf' ).find( 'a' ).css( 'color', '#fff' ); }, function() { jQuery( this ).css( 'background', 'transparent' ).find( 'a' ).css( 'color', '#23a0bf' ); }); jQuery( '.register-btn' ).click(function(){ jQuery( '.login-section' ).hide(); jQuery( '.registration-section' ).fadeIn(); }); jQuery( '.login-btn' ).click(function(){ jQuery( '.registration-section' ).hide(); jQuery( '.login-section' ).fadeIn(); }); jQuery( '.price_slider_wrapper' ).ready(function(){ jQuery( '.price_slider_wrapper .btn' ).css( 'display', 'inline-block' ); jQuery( '.price_slider_wrapper .btn' ).show(); }); jQuery( 'a.ecommerce-ext-menu' ).on( 'click', function(){ return false; }); jQuery( '.account-menu' ).on( 'click', '.menu-item-link', function(e){ jQuery( '.item-content' ).each(function(){ jQuery( this ).hide(); }); var id = e.currentTarget.hash; id = id.replace( '#', '' ); id = id.replace( 'to-', '' ); jQuery( '#' + id ).fadeIn(); }); jQuery( '.product' ).on( 'click', '.add_to_cart_button', function( e ){ var currentTarget = jQuery( this ).closest( '.product' ); checkAddedCart( currentTarget ); }); function checkAddedCart( currentTarget ) { var cloneTag = jQuery( currentTarget ).find( '.added_to_cart' ); if ( cloneTag.length > 0 ) { var divAdded = '