/* thumbnailer with a callback */

jQuery.fn.thumbsImg = function()
{
	return this.each(
		function()
		{
			// reset resize variables
			//alert(jQuery(this).width() + " " + jQuery(this).height());

			xOffsetPre = Math.round(jQuery(this).width() - 165);
			if(xOffsetPre > 0){
				xOffset = (xOffsetPre / 2) * -1;
			}else if(xOffsetPre == 0){
				xOffset = 0;	
			}else{
				xOffsetPre = xOffsetPre * -1;
				xOffset = xOffsetPre / 2;
			}
			
			yOffsetPre = Math.round(jQuery(this).height() - 120);
			if(yOffsetPre > 0){
				yOffset = (yOffsetPre / 2) * -1;
			}else if(yOffsetPre == 0){
				yOffset = 0;	
			}else{
				yOffsetPre = yOffsetPre * -1;
				yOffset = yOffsetPre / 2;
			}			
			
			jQuery(this).css('top', xOffset + 'px');
			jQuery(this).css('left', yOffset + 'px');
		}
	)
}	

