var CURRENT_URL = ""; $(document).ready(function () { CURRENT_URL = document.location.href; ScriptHelper.InitForm(); }); var SearchButtonClicked = function (btn) { if ($(btn).parents("form").length > 0) { var formObj = $($(btn).parents("form")[0]); formObj.attr("action", ScriptHelper.ReplaceParamVal(formObj.attr("action"), "CurrentPageIndex", "1")); } }; $(function () { $(window).scroll(function () { "use strict"; var scroll = $(window).scrollTop(); if (scroll > 60) { $(".header").addClass("sticky"); } else { $(".header").removeClass("sticky"); } }); if ('ontouchstart' in window) { $("#switch").bind("touchstart", toggle); } else { $("#switch").bind("click", toggle); } function toggle() { if ($('#menu').hasClass('menu-show')) { $('#menu').removeClass('menu-show slideInDown animated'); $('#switch').removeClass('switch-show'); } else { $('#menu').addClass('menu-show slideInDown animated'); $('#switch').addClass('switch-show'); } } $(window).resize(function () { if ($(window).width() < 768) { $("#menu").removeClass('menu-show fadeInDown animated'); } }); //高度不够 固定底部位置 function fixedfooter() { var h = 0; $("body").children().each(function () { if (!$(this).is(":hidden") && !$(this).hasClass("header")) { h = h + $(this).height(); } }); if ($(window).height() - h > 0) { $(".footer").attr("style", "position:fixed;bottom:0;"); } else { $(".footer").removeAttr("style"); } } $(".side").resize(function () { fixedfooter(); }); $(window).resize(function () { fixedfooter(); }); fixedfooter(); //小屏幕下用户中心菜单不展开 if ($(window).width() < 768) { $("#side-menu-toggle .side-menu-toggle-sub").removeClass("side-menu-toggle-sub-show"); } $(window).resize(function () { if ($(window).width() < 768) { $("#side-menu-toggle .side-menu-toggle-sub").removeClass("side-menu-toggle-sub-show"); } }); //wow animations ie8不支持 var wow = new WOW( { boxClass: 'wow', // animated element css class (default is wow) animateClass: 'animated', // animation css class (default is animated) offset: 100, // distance to the element when triggering the animation (default is 0) mobile: false // trigger animations on mobile devices (true is default) } ); if (navigator.appName == "Microsoft Internet Explorer") { var version = navigator.appVersion.match(/MSIE \d.0/i) if (version == 'MSIE 8.0' || version == 'MSIE 7.0') { $(".header").before("