jQuery(document).ready(function(){
if(jQuery('.triggerverticalmenu').length){
jQuery( ".triggerverticalmenu" ).click(function(event) {
event.preventDefault();
jQuery('.newnav').slideToggle("triggered");
});
}
if(jQuery('.mobmyacc-button').length){
jQuery( ".mobmyacc-button" ).click(function(event) {
event.preventDefault();
jQuery('.mobmyacc-submenus').slideToggle();
});
}
if(jQuery(".trustcarousel").length){
jQuery(".trustcarousel").slick({
infinite: true,
dots: false,
arrows: true,
fade: false,
centerMode: false,
variableWidth: false,
adaptiveHeight: false,
centerPadding: '0px',
speed: 300,
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
pauseOnHover: false,
autoplaySpeed: 4000,
prevArrow: '',
nextArrow: ''
});
} // if
/*
if(jQuery( ".langs-wrapper" ).length){
jQuery( ".langs-wrapper" ).click(function() {
jQuery( ".langs" ).addClass( "langs-opened" );
jQuery(this).find( "li" ).fadeIn();
jQuery(".langs li").css('background-color', '#ffffff');
});
} */
/*********************************************************************************************************** Superfish Menu *********************************************************************/
/* toggle nav */
jQuery("#menu-icon").on("click", function(){
jQuery(".sf-menu-phone").slideToggle();
jQuery(this).toggleClass("active");
});
jQuery('.sf-menu-phone').find('li.parent').append('');
jQuery('.sf-menu-phone li.parent strong').on("click", function(){
if (jQuery(this).attr('class') == 'opened') { jQuery(this).removeClass().parent('li.parent').find('> ul').slideToggle(); }
else {
jQuery(this).addClass('opened').parent('li.parent').find('> ul').slideToggle();
}
});
/*********************************************************************************************************** Cart Truncated *********************************************************************/
jQuery('.truncated span').click(function(){
jQuery(this).parent().find('.truncated_full_value').stop().slideToggle();
});
/*********************************************************************************************************** Product View Accordion *********************************************************************/
jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);
};
jQuery('.box-collateral').not('.box-up-sell').find('h2').append('');
jQuery('.form-add').find('.box-collateral-content').css({'display':'block'}).parents('.form-add').find('> h2 > span').addClass('opened');
jQuery('.box-collateral > h2').click(function(){
OpenedClass = jQuery(this).find('> span').attr('class');
if (OpenedClass == 'toggle opened') { jQuery(this).find('> span').removeClass('opened'); }
else { jQuery(this).find('> span').addClass('opened'); }
jQuery(this).parents('.box-collateral').find(' > .box-collateral-content').slideFadeToggle()
});
/*********************************************************************************************************** Sidebar Accordion *********************************************************************/
jQuery('.sidebar .block .block-title').append('');
jQuery('.sidebar .block .block-title').on("click", function(){
if (jQuery(this).find('> span').attr('class') == 'toggle opened') { jQuery(this).find('> span').removeClass('opened').parents('.block').find('.block-content').slideToggle(); }
else {
jQuery(this).find('> span').addClass('opened').parents('.block').find('.block-content').slideToggle();
}
});
/*********************************************************************************************************** Footer Accordion *********************************************************************/
jQuery('.footer .footer-col > h4').append('');
jQuery('.footer h4').on("click", function(){
if (jQuery(this).find('span').attr('class') == 'toggle opened') { jQuery(this).find('span').removeClass('opened').parents('.footer-col').find('.footer-col-content').slideToggle(); }
else {
jQuery(this).find('span').addClass('opened').parents('.footer-col').find('.footer-col-content').slideToggle();
}
});
/*********************************************************************************************************** Header Buttons *********************************************************************/
jQuery('.header-button').not('.top-login').on("click", function(e){
var ul=jQuery(this).find('ul')
if(ul.is(':hidden'))
ul.slideDown()
,jQuery(this).addClass('active')
else
ul.slideUp()
,jQuery(this).removeClass('active')
jQuery('.header-button').not(this).removeClass('active'),
jQuery('.header-button').not(this).find('ul').slideUp()
jQuery('.header-button ul li').click(function(e){
e.stopPropagation();
});
return false
});
jQuery(document).on('click',function(){
jQuery('.header-button').removeClass('active').find('ul').slideUp()
});
jQuery(".price-box.map-info a").click(function() {
jQuery(".map-popup").toggleClass("displayblock");
});
jQuery('.map-popup-close').on('click',function(){
jQuery('.map-popup').removeClass('displayblock');
});
if(jQuery(".category-products").length){ jQuery('.products-grid .add-to-links li > a, .products-list .add-to-links li > a ').tooltip('hide') };
qwe = jQuery('.lang-list ul li span').text();
jQuery('.lang-list > a').text(qwe);
jQuery(window).bind('load resize',function(){
sw = jQuery('.container').width();
if ( sw > 723 ) {
jQuery('body').addClass('opened-1');
} else {
jQuery('body').removeClass('opened-1');
};
});
/*********************************************************************************************************** Header Cart *********************************************************************/
jQuery('.block-cart-header .cart-content').hide();
if (jQuery('.container').width() < 800) {
jQuery('.block-cart-header .summary, .block-cart-header .cart-content, .block-cart-header .empty').click(function(){
jQuery('.block-cart-header .cart-content').stop(true, true).slideToggle(300);
}
)
}
else {
jQuery('.block-cart-header .summary, .block-cart-header .cart-content, .block-cart-header .empty').hover(
function(){jQuery('.block-cart-header .cart-content').stop(true, true).slideDown(400);},
function(){ jQuery('.block-cart-header .cart-content').stop(true, true).delay(400).slideUp(300);}
);
};
});
/*************************************************************************************************************back-top*****************************************************************************/
jQuery(function () {
jQuery(window).scroll(function () {
if (jQuery(this).scrollTop() > 100) {
jQuery('#back-top').fadeIn();
} else {
jQuery('#back-top').fadeOut();
}
});
// scroll body to 0px on click
jQuery('#back-top a').click(function () {
jQuery('body,html').stop(false, false).animate({
scrollTop: 0
}, 800);
return false;
});
});
/***************************************************************************************************** Magento class **************************************************************************/
jQuery(document).ready(function() {
jQuery('.sidebar .block').last().addClass('last_block');
jQuery('.sidebar .block').first().addClass('first');
jQuery('.box-up-sell li').eq(2).addClass('last');
jQuery('.form-alt li:last-child').addClass('last');
jQuery('.product-collateral #customer-reviews dl dd, #cart-sidebar .item').last().addClass('last');
jQuery('.header .row-2 .links').first().addClass('LoginLink');
jQuery('#checkout-progress-state li:odd').addClass('odd');
jQuery('.product-view .product-img-box .product-image').append('');
jQuery('.links a.top-link-cart').parent().addClass('top-car');
if (jQuery('.container').width() < 766) {
jQuery('.my-account table td.order-id').prepend('Order #:');
jQuery('.my-account table td.order-date').prepend('Date: ');
jQuery('.my-account table td.order-ship').prepend('Ship To: ');
jQuery('.my-account table td.order-total').prepend('Order Total: ');
jQuery('.my-account table td.order-status').prepend('Status: ');
jQuery('.my-account table td.order-sku').prepend('SKU: ');
jQuery('.my-account table td.order-price').prepend('Price: ');
jQuery('.my-account table td.order-subtotal').prepend('Subtotal: ');
jQuery('.multiple-checkout td.order-qty, .multiple-checkout th.order-qty').prepend('Qty: ');
jQuery('.multiple-checkout td.order-shipping, .multiple-checkout th.order-shipping, ').prepend('Send To: ');
jQuery('.multiple-checkout td.order-subtotal, .multiple-checkout th.order-subtotal').prepend('Subtotal: ');
jQuery('.multiple-checkout td.order-price, .multiple-checkout th.order-price').prepend('Price: ');
}
jQuery('.breadcrumbs .category4 a').replaceWith('Index of Products');
});
jQuery(document).ready(function() {
if (jQuery('.container').width() < 724) {
jQuery('.related-carousel').jcarousel({
vertical: false,
visible:1,
scroll: 1
});
}
else {
jQuery('.related-carousel').jcarousel({
vertical: false,
visible:3,
scroll: 1
});
}
});
(function(doc) {
var addEvent = 'addEventListener',
type = 'gesturestart',
qsa = 'querySelectorAll',
scales = [1, 1],
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
function fix() {
meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
doc.removeEventListener(type, fix, true);
}
if ((meta = meta[meta.length - 1]) && addEvent in doc) {
fix();
scales = [.25, 1.6];
doc[addEvent](type, fix, true);
}
}(document));