/* Js for http://www.baidu.com, Version=1766121869 */ 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 : ","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.agreement = "close";; $().ready(function() { $('a.btn-oauth').each(function() { fingerprint = getFingerprint(); $(this).attr('href', $(this).attr('href').replace('fingerprintval', fingerprint) ) }) }); ;$().ready(function() { $('#execIcon').tooltip({title:$('#execInfoBar').html(), html:true, placement:'right'}); }); ;$(function() { if(v.agreement == 'open') { $('#submit').attr('disabled', true); $('input[name=agreement]').change(function() { if($('input[name=agreement]').prop('checked')) { $('#submit').attr('disabled', false); } if(!$('input[name=agreement]').prop('checked')) { $('#submit').attr('disabled', true); } }); } $('#mailSender').click(function() { var data = {email: $('#email').val()}; var url = $(this).attr('href'); $.post(url, data, function(response) { if(response.result == 'success') { $('#mailSender').popover({trigger:'manual', content:response.message, placement:'right'}).popover('show'); $('#mailSender').next('.popover').addClass('popover-success'); function distroy(){$('#mailSender').popover('destroy')} setTimeout(distroy,3000); } else { bootbox.alert(response.message); } }, 'json') return false; }) }); if(screen.width > 767){ $('#siteNav').insertAfter('#navbarWrapper'); } $('#foot').insertBefore('#footer'); $('.carousel').insertAfter('#header'); var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); if(screen.width > 767){ $('#siteNav').insertAfter('#navbarWrapper'); } $('#foot').insertBefore('#footer'); $('.carousel').insertAfter('#header'); ; 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});