function hoverimage() {
		$("a[class^='lightbox']").each(function() {	
			var $image = $(this).contents("img");


		$hoverclass = 'hover_image';
			
		if ($image.length > 0)
		{	
			var $hoverbg = $("<span class='"+$hoverclass+"'></span>").appendTo($(this));
			
				$(this).bind('mouseenter', function(){
				$height = $image.height();
				$width = $image.width();
				$pos =  $image.position();		
				$hoverbg.css({height:$height, width:$width, top:$pos.top, left:$pos.left});
			});
		}
	
	});	

	$("a[class^='lightbox']").contents("img").hover(function() {
			$(this).stop().animate({"opacity": "0.2"}, 200);
			},function() {
			$(this).stop().animate({"opacity": "1"},200);
	});
}


jQuery(function(){
hoverimage();


jQuery(".p_img").preloadify({ imagedelay:500 });

});
