jQuery.fn.fadeToggle = function(speed, easing, callback) { 
   return this.animate({opacity: 'toggle'}, speed, easing, callback); 
}; 

$("document").ready(function() { 

	$('#sub1,#sub2,#sub3, #sub4').hide();

	$('#guest, #sub1').hover(function() { $('#sub1').show(); }, function (){ $('#sub1').hide(); });
	$('#facil, #sub2').hover(function() { $('#sub2').show(); }, function() { $('#sub2').hide(); });
	$('#about, #sub3').hover(function() { $('#sub3').show(); }, function() { $('#sub3').hide(); });
	$('#contact, #sub4').hover(function() { $('#sub4').show(); }, function() { $('#sub4').hide(); });


	$("a:has(img.gallery)").click(function() {
		var largePath = $(this).attr("href");	
		$("#photo_large").attr({src: largePath });
		return false;
	});

$(".blogLoopSingle:last").css("border", "none");
	
	setInterval("rotateImages()", 8000);
});


        function rotateImages() {
            var oCurPhoto = $('#homePhotoShow div.current');
            var oNxtPhoto = oCurPhoto.next();
            if (oNxtPhoto.length == 0)
                oNxtPhoto = $('#homePhotoShow div:first');

            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
        }
