$(function () { bank_1($('.bxslider01')); bank_1($('.bxslider02')); //窗口改变大小回调ratio; var rtime = new date(); var timeout = false; var delta = 200; $(window).resize(function () { rtime = new date(); if (timeout === false) { timeout = true; if (!$("html").hasclass("ie7")) { settimeout(resizeend, delta); //resize只回调最后一次 } } }); function resizeend() { //window.resize回调 if (new date() - rtime < delta) { settimeout(resizeend, delta); } else { timeout = false; bank_1($('.bxslider01')); bank_1($('.bxslider02')); } } $(window).resize(function () { maxheight($(".o_qt02 dl")); maxheight($(".hight_con dl")); $('.hight_con dl:nth-child(3n)').css({ 'margin-right':0 }); $('.hight_con dl:nth-child(2n)').css({ 'background':"#f6fbfd" }); }); maxheight($(".o_qt02 dl")); maxheight($(".hight_con dl")); //五大亮点 $('.hight_con dl:nth-child(3n)').css({ 'margin-right':0 }); $('.hight_con dl:nth-child(2n)').css({ 'background':"#f6fbfd" }); $('.hight_con dl').hover(function(){ $(this).find('dt img').addclass('flipiny animated'); },function(){ $(this).find('dt img').removeclass('flipiny animated'); }); $('.map_con .add').click(function(){ var $this=$(this); var coum=0; coum=$this.index()-1; $('.map_con .add').find('img').attr('src',$this.find('img').data('src2')); $this.find('img').attr('src',$this.find('img').data('src')); $('#lay_right').find('.address').eq(coum).addclass('hover').siblings().removeclass('hover'); }) // $('.map_con .add').hover(function(){ // $(this).find('img').addclass('flipiny animated'); // },function(){ // $(this).find('img').removeclass('flipiny animated'); // }); }); function maxheight(domh){ domh.attr("style", ""); var narray = new array(); domh.each(function () { narray.push($(this).innerheight()); }) domh.css({ "min-height": math.max.apply(null, narray) }) } function bank_1(aaa) { aaa.each(function (index, element) { var obj = $(this) var num = 3; obj.find(".bx-clone").remove() obj.find("ul li,ul").attr({ "style": "" }) var ulhtml = obj.find("ul") obj.remove(".bx-wrapper"); obj.html(ulhtml); if ($(window).width() < 900) num = 2; if ($(window).width() < 550) num = 1; var xl = obj.width() / num; if (obj.find("ul li").size() >= num) { obj.find("ul").bxslider({ auto: false, mode: 'horizontal', minslides: num, maxslides: num, moveslides: 1, slidewidth: xl, slidemargin: 30, pager:false }); } }); } $(function () { bank_22($('.bxslider001')); //窗口改变大小回调ratio; var rtime = new date(); var timeout = false; var delta = 200; $(window).resize(function () { rtime = new date(); if (timeout === false) { timeout = true; if (!$("html").hasclass("ie7")) { settimeout(resizeend, delta); //resize只回调最后一次 } } }); function resizeend() { //window.resize回调 if (new date() - rtime < delta) { settimeout(resizeend, delta); } else { timeout = false; bank_22($('.bxslider001')); } } function bank_22(aaa) { aaa.each(function (index, element) { var obj = $(this) var num = 4; obj.find(".bx-clone").remove() obj.find("ul li,ul").attr({ "style": "" }) var ulhtml = obj.find("ul") obj.remove(".bx-wrapper"); obj.html(ulhtml); if ($(window).width() < 1100) num = 3; if ($(window).width() < 900) num = 2; if ($(window).width() < 550) num = 1; var xl = obj.width() / num; if (obj.find("ul li").size() >= num) { obj.find("ul").bxslider({ auto: false, mode: 'horizontal', minslides: num, maxslides: num, moveslides: 1, slidewidth: xl, slidemargin: 30, pager: false }); } }); } })