$(document).ready(function(){
	$(".zoom-image").each(function(){
		$(this).parent().append('<span class="zoom-icon">+</span>');
		imgSize = $(this).width();
		imgMargin = $(this).css('marginTop')+' '+$(this).css('marginRight')+' '+$(this).css('marginBottom')+' '+$(this).css('marginLeft');
		imgPaddingRight =  parseInt($(this).css('paddingRight'));
		imgPaddingBottom =  parseInt($(this).css('paddingBottom'));
		imgBorderRight =  parseInt($(this).css('borderRightWidth'));
		imgBorderBottom =  parseInt($(this).css('borderBottomWidth'));
		imgFloat = ($(this).css('float') == "right")?"right":"left";
		$(this).css({margin: '0'});
		$(this).parent().css({
			float: imgFloat,
			position: 'relative',
			margin: imgMargin
		});
		if(imgPaddingRight != 0 || imgPaddingBottom != 0){
			$(this).next(".zoom-icon").css({
				right: (imgPaddingRight+imgBorderRight)+'px',
				bottom: (imgPaddingBottom+imgBorderBottom)+'px'
			});
		}
	});
}); 
