// Set events

$(document).ready( function() {
	$('img.moviethumb').mouseover(thumbOver);
	$('img.moviethumb').mouseout(thumbOut);
	
});



/**
 * Mouseover on thumbs
 * @return
 */
function thumbOver() {
	// Have static?
	if($(this).attr('static') == '') {
		var sStatic = $(this).attr('src');
		if(sStatic.indexOf('.gif') == -1) {
			$(this).attr({static: sStatic});
		}
	}
	// Set source as animated
	var sAnimated = $(this).attr('animated');
	$(this).attr({src: sAnimated});
}



function thumbOut() {
	// Have static?
	var sStatic = $(this).attr('static');
	if(sStatic != '') {
		$(this).attr({src: sStatic});	
	}
}
