$(document).ready(function() {
	var flag=0;
	$('.hoverDiv').hover(function() {
		$('.focus').css("display","none"); 
		$('.namePhoto').stop(true, true).slideDown();
		$('.nameGalery').stop(true, true).slideDown();
	}, function() {
		$('.focus').css("display","block");
		$('.namePhoto').stop(true, true).slideUp();
		$('.nameGalery').stop(true, true).slideUp();
	});	
	
	
	$('.infoImage').hover(function() {
		$('.namePhoto').stop(true, true).slideDown();
		$('.nameGalery').stop(true, true).slideDown();
	}, function() {
		$('.namePhoto').stop(true, true).slideUp();
		$('.nameGalery').stop(true, true).slideUp();
	});
	
	$('.priorImage').hover(function() {
		$('.priorImage').animate({backgroundPosition: '0 -91px'});	
	}, function() {	
		$('.priorImage').animate({backgroundPosition: '0 0'});	
	});
	$('.priorImage').click(function() {
		$('.priorImage').animate({backgroundPosition: '0 -185px'});	
		$('.priorImage').animate({backgroundPosition: '0 0'});		
	
	});
	
	
	$('.nextImage').hover(function() {
		$('.nextImage').animate({backgroundPosition: '0 -91px'});	
	}, function() {	
		$('.nextImage').animate({backgroundPosition: '0 0'});	
	});
	$('.nextImage').click(function() {
		$('.nextImage').animate({backgroundPosition: '0 -185px'});	
		$('.nextImage').animate({backgroundPosition: '0 0'});		
	
	});
	
});

$(document).ready(
    function() {
        $('img').each(function() {
            if ($(this).attr("swapsrc")) {
                $(this).hover(
                    function () {
                        var tmp = $(this).attr('src');
                        $(this).attr('src',$(this).attr('swapsrc'));
                        $(this).attr('swapsrc',tmp);
                    },
                    function () {
                        var tmp = $(this).attr('src');
                        $(this).attr('src',$(this).attr('swapsrc'));
                        $(this).attr('swapsrc',tmp);
                    }
                )                    
            };
        })
});
