/*查看大图*/
var screenheight = $(window).height();
var screenwidth = $(window).width();
var loadCSS = function(){
var screenwidth = $(window).width();
var screenheight = $(window).height();
$("div.lookBigPicture").css({"left":screenwidth*0.2,"top":screenheight*0.15+$(document).scrollTop(),
"width":screenwidth*0.6,"height":screenheight*0.7});
$("img.bigImg").css({"max-width":(screenwidth*0.6 - 30),"max-height":screenheight*0.7-40});
$("img.bigImg").load(function(){
$("img.bigImg").css("top",(screenheight*0.7 - 30 - $("img.bigImg").height())*0.5 + 30);
});
$("img.bigImg").css("top",(screenheight*0.7 - 30 - $("img.bigImg").height())*0.5 + 30);
$.log("$(document).height():"+$(document).height());
};
$("a#bigPic").click(function(){
$.log("screenheight:"+screenheight+"screenwidth:"+screenwidth);
str = $("img[img-size]").attr("src");
$("body").append("
");//灰色底层
$("body").append("
");
$("div.grey").css( "height",$(document).height());
loadCSS();
$("body").css({overflow:"hidden"}); //禁用滚动条
});
$("body").delegate("div.grey,a.bigpicclose","click",function(){
$("body").css({overflow:"visible"}); //恢复滚动条
$("div.lookBigPicture").remove();
$("div.grey").remove();
});
//当浏览器窗口大小改变时
$(window).resize(function () {
loadCSS();
});