【138平】四室:簡約風(fēng)格就是簡單而有品位
- 14/1
- 14/2
- 14/3
- 14/4
- 14/5
- 14/6
- 14/7
- 14/8
- 14/9
- 14/10
- 14/11
- 14/12
- 14/13
- 14/14
var head_bottom_height = $("#s_site")[0].offsetHeight + $(".i_tit")[0].offsetHeight + $(".menu")[0].offsetHeight + document.getElementById("imglist").offsetHeight;
var galleries = $('#gallery').adGallery({ cycle: false, head_bottom_height: head_bottom_height, description_wrapper: false, loader_image: 'https://static.zhuangyi.com/gallery/images/loader.gif'
, callbacks: {
beforeImageVisible: function () {
$(".ad-image").css("left", ($("#gallery")[0].offsetWidth - $(".ad-image").width()) / 2);
$(".ad-image").append('預(yù)約設(shè)計(jì)');
//var pictitle = $("#ad-title").html();
//document.title = $("#ad-title").html() + "-裝修效果圖-" + "";
}
}
});
window.onload = window.onresize = function () {
set();
}
function windowHeight() {
var de = document.documentElement;
return self.innerHeight || (de && de.clientHeight) || document.body.clientHeight;
}
function set() {
var wh = windowHeight();
var w_height = (wh - $("#s_site")[0].offsetHeight - $(".i_tit")[0].offsetHeight - $(".menu")[0].offsetHeight - document.getElementById("imglist").offsetHeight);
var image = new Image();
image.src = $(".ad-image img").attr("src");
var w_width = image.width * w_height / image.height;
var newimg_width = image.width;
var newimg_height = image.height;
if (image.width > w_width) {
newimg_width = w_width;
newimg_height = image.height * w_width / image.width;
}
if (image.height > w_height) {
newimg_width = image.width * w_height / image.height;
newimg_height = w_height;
}
$(".ad-image-wrapper").height((w_height) + "px");
$(".ad-image").height((newimg_height) + "px");
$(".ad-image").width((newimg_width) + "px");
$(".ad-image").css("top", (w_height - newimg_height) / 2);
$(".ad-image").css("left", ($("#gallery")[0].offsetWidth - newimg_width) / 2);
$(".ad-image img").attr("height", newimg_height);
$(".ad-image img").attr("width", newimg_width);
$(".ad-next").css("height", w_height);
$(".ad-prev").css("height", w_height);
var thumbsW = $("#imglist")[0].offsetWidth - 246;
if (thumbsW > 837) {
thumbsW = 837;
}
$(".ad-thumbs").css("width", thumbsW);
$(".ad-nav").css("width", thumbsW + 60);
}