$(document).ready(function(){   
	$("img.menuimg").hover(function() {
		var id = $(this).attr("id");
		var srcname = $(this).attr("src");
		srcname = srcname.replace('.png', '2.png');
		
		$(this).attr("src",srcname);
	
	},
	function() {
        $(this).stop(true,false); // prevents the creation of stacked actions
        $(this).attr("src", $(this).attr("src").replace('2.png', '.png'));  // removes -hover from the name of the image
	});	

	$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
	
});
