/* Js for http://www.baidu.com, Version=1741234365 */
v.lang = {"confirmDelete":"Do you want to delete it?","deleteing":"Deleting","doing":"Doing","loading":"Loading","updating":"Updating","timeout":"Timeout. Please try it again.","errorThrown":"
Error <\/h4>","continueShopping":"Continue shopping","required":"Required","back":"Back","continue":"Continue","bindWechatTip":"Posting sets the limit for binding WeChat. Please bind WeChat user first.","importTip":"Old layout data will be replaced","fullImportTip":"Old article, product, layout data will be replaced and import test data"};;v.show = "Show";;v.id = 0;;v.orderBy = "id";;$().ready(function() { $('#execIcon').tooltip({title:$('#execInfoBar').html(), html:true, placement:'right'}); }); ;$(function()
{
$("ul li a[id=category" + v.id + "]").addClass('active');
$('#toggleToc').click(function()
{
$('ol').toggle();
if($('ol').is(':visible'))
{
$('a span').text(v.lang.hide);
}
else
{
$('a span').text(v.show);
}
});
$(document).on('click', '.faqList li a', function()
{
$.get(createLink('faq', 'view', 'id=' + $(this).data('id')));
})
$('#faqTab li').removeClass('active');
if(v.orderBy == 'views_desc')
{
$('li.hotFaqList').addClass('active');
}
else
{
$('li.faqList').addClass('active');
}
$('.has-list').addClass('open in');
});
;
function loadCartInfo(twinkle)
{
$('#siteNav').load(createLink('misc', 'printTopBar'),
function()
{
if(twinkle)
{
bootbox.dialog(
{
message: v.addToCartSuccess,
buttons:
{
back:
{
label: v.lang.continueShopping,
className: 'btn-primary',
callback: function(){location.reload();}
},
cart:
{
label: v.gotoCart,
className: 'btn-primary',
callback: function(){location.href = createLink('cart', 'browse');}
}
}
});
}
}
);
}
;
var hash = window.location.hash.substring(1);
var browserLanguage = navigator.language || navigator.userLanguage;
var resolution = screen.availWidth + ' X ' + screen.availHeight;
$.get(createLink('log', 'record', "hash=" + hash), {browserLanguage:browserLanguage, resolution:resolution});