/* Js for , Version=1555084468 */ v.theme = {"template":"mobile","theme":"default","device":"mobile"};;placee51e2eefe66ed88faa0274e28760ac05='IDLIST_PLACEHOLDERIDLIST_PLACEHOLDER';;v.pageLayout = "global";;$(function() { /* Set current active topNav. */ var hasActive = false; if(v.categoryID > 0 && $('.nav-product-' + v.categoryID).length >= 1) { hasActive = true; $('.nav-product-' + v.categoryID).addClass('active'); } if(v.categoryPath && v.categoryPath.length) { $.each(v.categoryPath, function(index, category) { if(!hasActive) { if($('.nav-product-' + category).length >= 1) hasActive = true; $('.nav-product-' + category).addClass('active'); } }); } else if(v.path && v.path.length) { $.each(v.path, function(index, category) { if(!hasActive) { if($('.nav-product-' + category).length >= 1) hasActive = true; $('.nav-product-' + category).addClass('active'); } }); if(!hasActive) $('.nav-product-0').addClass('active'); } if(v.categoryID !== 0) $('#category' + v.categoryID).parent().addClass('active'); }) ; $(function() { var countLink = '/cart-count.mhtml'; var browseLink = '/cart-browse.mhtml'; $.refreshCart = function(twinkle) { $.getJSON(countLink, function(data) { if($.isPlainObject(data) && data.result === 'success') { var $count = $('.cart-count').text(data.count).toggleClass('hide', data.count < 1); if(data.count > 0 && twinkle) { $count.addClass('twinkle'); setTimeout(function(){$count.removeClass('twinkle')}, 200); if(window.v && window.v.addToCartSuccess) $.messager.success(window.v.addToCartSuccess + "
" + window.v.gotoCart + "
" + data.count + "
", {time: 10000, cssClass: 'msger-cart'}); } } }); }; $.refreshCart(); });