var max_h = 286;
var max_w = 577;
var w1=imageData.image.width;
var h1=imageData.image.height;

if(h1>w1)
{
w1=Math.ceil(w1/h1*max_h);
h1=max_h;
}
if(w1>h1)
{
h1=Math.ceil(h1/w1*max_w);
w1=max_w;
}
//$(“div.slideshow img”).css({height:h1, width:w1});

$(“div.slideshow .current img”).css({height:h1, width:w1});

Advertisements