// JavaScript Document


$(document).ready(function () {    
       
    $('#nav li').hover(   
        function () {   
            //show its submenu   
            $('ul', this).slideDown(400);   
  
        },    
        function () {   
            //hide its submenu   
            $('ul', this).slideUp(400);            
        }   
    );   
       
});   


// Fadein

$(document).ready(function(){
                $('.fadein').css({ display: 'none'}).fadeIn(4000);
});


$(document).ready(function(){
                $('.fadein2').css({ display: 'none'}).fadeIn(2000);
});



	$(document).ready(function(){
$(".fade").fadeTo("slow", 1.0); // This sets the opacity of the thumbs to fade down to 60% when the page loads

$(".fade").hover(function(){
$(this).fadeTo("slow", 0.4); // This should set the opacity to 100% on hover
},function(){
$(this).fadeTo("slow", 1.0); // This should set the opacity back to 60% on mouseout
});
});
	
// Accordian

jQuery(document).ready(function(){
	$('.accordion .head').click(function() {
		$(this).next().toggle();
		return false;
	}).next().hide();
});

$(function() {
setInterval ("rotateImages()", 5000);
});


// Photoshow

function rotateImages() {
var oCurPhoto = $("#photoshow div.current");
var oNxtPhoto = oCurPhoto.next();
if (oNxtPhoto.length == 0)
	oNxtPhoto = $("#photoshow div:first");	
	
oCurPhoto.removeClass('current').addClass('previous');

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

}





