(function(jq, that) {
jq.fn.fixBottom = function() {
var that = jq(this),
fBottom = jq('.footer_bottom'),
h = jq(this).height(),
bH = jq(document).height(),
obj = checkBrowser(),
outWrapDiff = bH - jq('#gloWrap').height(),
bottomHeight = fBottom.get(0).offsetHeight,
ie6 = false;
if(obj.name == "msie" && obj.version == 6) {
ie6 = true;
};
function resizeBottomNav() {
var cH = jq(window).height(),
diff = bH - cH,
sH = jq(window).scrollTop(),
ie6Diff = sH + cH - that.height();
if (ie6) {
that.css("top", ie6Diff - outWrapDiff + "px");
}
if (diff - sH <= bottomHeight) {
that.css("bottom", bottomHeight - (diff - sH) + 'px');
if (ie6) {
that.css("top", sH + cH - h - (bottomHeight - (diff - sH)) - outWrapDiff + 5 + "px");
}
} else {
that.css('bottom', 0);
}
}
if(jq(this).is(":visible")) {
resizeBottomNav();
}
jq(window).on('scroll resize', resizeBottomNav);
};
var docInit = {
init:function() {
docInit.ctrlBarWidth();
jq(window).bind("scroll resize", function() {
if (jq(window).scrollTop() > 550) {
jq('.bottom_nav').css('visibility', 'visible');
} else {
jq('.bottom_nav').css('visibility', 'hidden');
}
docInit.ctrlBarWidth();
});
},
ctrlBarWidth:function() {
var winWidth = jq(window).width(),
obj = checkBrowser(),
bottom_nav = jq(".bottom_nav > .container"),
to8to_townid = getCookie('to8to_townid');
var bar = jq(".top_bar"),
nav = jq(".top_bar > a"),
html = jq("html"),
nav_span = jq('.top_bar > a > span'),
hot = nav_span.eq(1).next('i'),
nav_num = nav.length;
if(nav_num == 4) {//支持装修贷
if(winWidth < 1400) {
if(obj.name != "firefox") {
nav_span.css('zoom', '.9');
} else {
nav_span.css('transform', 'scale(.9)');
}
hot.css('margin-left', '120px');
} else {
if(obj.name != "firefox") {
nav_span.css('zoom', '1');
} else {
nav_span.css('transform', 'scale(1)');
}
hot.css('margin-left', '140px');
}
if(winWidth <= 1220) {
bar.width('1220px');
nav.width('305px');
bottom_nav.addClass("m_l");
html.css("overflow-x","scroll");
} else {
bar.width('100%');
if(obj.name == "msie" && obj.version < 9){
nav.width(Math.ceil(winWidth/4));
bar.width(winWidth+5);
html.css("overflow-x","hidden");
} else {
nav.width(winWidth/4);
html.css("overflow-x","visible");
}
bottom_nav.removeClass("m_l");
}
} else {
if(winWidth <= 1220) {
bar.width('1220px');
nav.width('407px');
nav.eq(0).width('406px');
bottom_nav.addClass("m_l");
html.css("overflow-x","scroll");
} else {
bar.width('100%');
nav.width(winWidth/3);
bottom_nav.removeClass("m_l");
bottom_nav.removeClass("m_l");
}
}
}
};
var zxdai = {
init: function() {
initJHCalc();
docInit.init();
setTimeout(function() {
jq(".bottom_nav").fixBottom();
},500);
}
};
var fl= 0;//费率
var period = new Array();//周期
var fl_period = new Array();//周期费率