$(document).ready(function() {

	var animation_speed = 200; 				/* this value is the speed of how fast/slow this hover animates */
	var animation_speed_out = 200; 			/* this value is the speed of how fast/slow this hover animates out */
	
	var new_width = '40px'; 				/* Set new width for hovered in box */
	var new_height = '40px'; 				/* Set new height for hovered in box */
	
	var new_top_position = '20px'; 		/* Set new top position for hovered in box */
	
	var new_left_position = '20px'; 		/* Set shift of the left position for hovered in box */
	
	var new_z_index = '2'; 					/* Set new z-index for hovered in box */
	var old_z_index = '1'; 					/* Set default z-index for hovered out box */
	
	var new_img_width = '0px'; 			/* Set new width for image in hovered box */
	var new_img_height = '0px'; 			/* Set new height for image in hovered box */
	var new_font_size = '0px'; 				/* Set increase of new font-size for text in hovered box */
	
	$(".box").hover(function() {
		$(this).find('img').animate({width:'+=' + new_img_width, height:'+=' + new_img_height}, animation_speed);
		$(this).find('a').animate({fontSize: '+=' + new_font_size}, animation_speed);
		$(this).find('p').animate({fontSize: '+=' + new_font_size}, animation_speed);
		$(this).css({'z-index' : new_z_index}); /*Add a higher z-index value so this image stays on top*/ 
		$(this).animate({
			width: '+=' + new_width, 
			height:'+=' + new_height, 
			top: '-=' + new_top_position,
			left: '-=' + new_left_position
		}, animation_speed); 
	} , function() {
		$(this).find('img').animate({width:'-=' + new_img_width, height:'-=' + new_img_height}, animation_speed_out);
		$(this).find('a').animate({fontSize: '-=' + new_font_size}, animation_speed_out);
		$(this).find('p').animate({fontSize: '-=' + new_font_size}, animation_speed_out);
		$(this).css({'z-index' : old_z_index}); /* Set z-index back to 0 */
		$(this).animate({
			width: '-=' + new_width, /* Set width back to default */
			height: '-=' + new_height, /* Set height back to default */
			top: '+=' + new_top_position,
			left: '+=' + new_left_position
		}, animation_speed_out);
	});

});
