$(window).load(function(){
	$('#right_sidebar li')
	.css('position', 'relative')
	.mouseover(function(){
		$('img.imgOriginal', this).css('visibility', 'hidden');
		$('img.imgCloned', this).css('display', 'block');
	}).mouseout(function(){
		$('img.imgOriginal', this).css('visibility', 'visible');
		$('img.imgCloned', this).css('display', 'none');
	});

	$('#right_sidebar img').each(function(){
		var clone = $(this)
			.addClass('imgOriginal')
			.clone()
				.prependTo($(this).parent())
				.removeClass('imgOriginal')
				.addClass('imgCloned');
		
		//$(clone).load(function(){
			var oldWidth = clone.width();
			var oldHeight = clone.height();
			var newWidth = oldWidth * 1.15;
			var newHeight = newWidth / oldWidth * oldHeight;
			clone.width(newWidth).height(newHeight);
			clone.css('left', (oldWidth - newWidth) / 2).css('top', (oldHeight - newHeight) / 2);
		//}
	});
	
	$('.testimonial, .contact_card')
	.mouseover(function(){
		$(this).css('background-color', '#EBF1FE');
	})
	.mouseout(function(){
		$(this).css('background-color', 'transparent');
	});
});

