/*$.getScript("http://g.tbcdn.cn//shop/wangpu/1.0.0/init.js", function () { $("#go").click(function () { $(".block").animate({backgroundColor: 'pink'}, 1000).animate({backgroundColor: 'blue'}, 1000); }); });*/ function browserRedirect() { var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; var bIsMidp = sUserAgent.match(/midp/i) == "midp"; var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb"; var bIsAndroid = sUserAgent.match(/android/i) == "android"; var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; if(bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM){ window.location.href = "http://myingjia.cms.g107.com/"; } } browserRedirect();function GetUrlRelativePath() { var url = document.location.toString(); var arrUrl = url.split("//"); var start = arrUrl[1].indexOf("/"); var relUrl = arrUrl[1].substring(start); //stop省略,截取从start开始到结尾的所有字符 if(relUrl.indexOf("?") != -1){ relUrl = relUrl.split("?")[0]; } return relUrl; } $("#main_nav a[href='"+GetUrlRelativePath()+"']").addClass('on'); var browserName = navigator.userAgent.toLowerCase().indexOf("msie"); //IE兼容 $(function () { if (browserName == -1) { var mySwiper = new Swiper('#bannerSwiper', { loop: true, autoplay:true, direction : 'horizontal', navigation:{ nextEl: '.arrow-right', prevEl: '.arrow-left', }, }); $("#bannerSwiper").mouseover(function () { mySwiper.autoplay.start(); }); $("#bannerSwiper").mouseout(function () { mySwiper.autoplay.start(); }); } else { var mySwiper = new Swiper('#bannerSwiper', { loop: true, autoplay:true, direction : 'horizontal', navigation:{ nextEl: '.arrow-right', prevEl: '.arrow-left', }, }); $('.arrow-left').on('click', function (e) { e.preventDefault() mySwiper.swipePrev() }); $('.arrow-right').on('click', function (e) { e.preventDefault() mySwiper.swipeNext() }); } var bannerHeight = $("#banner").height(); $(".dk.infoblock").css({ "margin-top": bannerHeight * 0.4, "opacity": 1 }); });var swiper = new Swiper('.swiper-container-about', { pagination: '.swiper-pagination', paginationClickable: '.swiper-pagination', nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', spaceBetween: 30, effect: 'fade', loop: true }); var mySwiper = new Swiper('#bkpro-slider', { loop: true, autoplay: 5000, grabCursor: true, //为true时,鼠标覆盖Swiper时指针会变成手掌形状 navigation:{ nextEl: '.arrow-right', prevEl: '.arrow-left', }, slidesPerView: 3, slidesPerColumn: 2, spaceBetween: 30, //parallax: true, //longSwipesRatio: 0.2, //触发swiper所需要的最小拖动距离比例 最大0.5 });$(document).ready(function(){ $(".suspend").mouseover(function() { $(this).stop(); $(this).animate({width: 160}, 400); }) $(".suspend").mouseout(function() { $(this).stop(); $(this).animate({width: 40}, 400); }); });