$(document).ready(function() {	
$('.slideshow').cycle({
		fx: 'shuffle',
		speed: 300,
		timeout: 0
	});
 //$('.slideshow').cycle('pause');
 $('.slideshow').hover(function(){
 	 $(this).cycle({
		fx: 'shuffle',
		speed: 300,
		timeout: 2000,
		after: onAfter
	});	 
 	},function(){
 		 $(this).cycle('pause');
 		});  
 		
function onAfter()
	{
	var id = this.id;
	var id_index = id.charAt(11);
	var image_title = $("#"+id).find("img").attr("title").substring(0,20);
	$("#photo_title"+id_index).html(image_title);
	var rating = $("#"+id).find("img").attr("rating");
	$("#photo_rating"+id_index).attr("src","/images/stars/star_"+rating+".jpg");
	}
   
});
