
$(document).ready(function() {

	//Calculation for corners
	var w = Math.round($('.qitem').width()) ;	
	var h = Math.round($('.qitem').height()) ;
	
	$('.qitem').each(function () {
	
		img = $(this).find('h2').find('img').attr('src');
		
		$('h2', this).remove();
		$(this).append('<div class="search"></div>');
		$(this).children('div').css('background-image','url('+ img + ')');

		$(this).find('div.search').css({top:0, left:0, width:w , height:h});

	}).hover(function () {
		$(this).find('div.search').stop(false, true).fadeOut("fast");	
	},
	
	function () {
		$(this).find('div.search').stop(false, true).fadeIn("fast");
	})

});
