jQuery(document).ready(function(){
	
	// TOP BANNERS
        jQuery("#fullscreen").jbgallery({
            menu  : 'numbers',
            style : 'zoom',
			caption : false,
            randomize : 0,
            slideshow:true
        });
		
		
	// MAIN NAVIGATION		

        $("ul.sf-menu-second").supersubs({ 
            minWidth:    12,   // minimum width of sub-menus in em units 
            maxWidth:    27,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish();  // call supersubs first, then superfish, so that subs are 
                         // not display:none when measuring. Call before initialising 
                         // containing tabs for same reason. 
		
		
	// IMAGE GALLERY JCAROUSEL
			
		jQuery('#mycarousel').jcarousel();
		
	// SHOW/HIDE BOOK NOW

		$(".book").toggle(function(){
		$(".book").animate({  top: '148' }, { duration: 300, step: function( now, fx ){$( ".block:gt(0)" ).css( "left", now ); }});
		$("#book").animate({  top: '189' }, { duration: 300, step: function( now, fx ){$( ".block:gt(0)" ).css( "left", now ); }});
		$(".close").fadeIn(300).css("display","block");$(".book").css("background-position","bottom");
		},function(){
		$(".book").animate({  top: '484' }, { duration: 300, step: function( now, fx ){$( ".block:gt(0)" ).css( "left", now ); }});
		$("#book").animate({  top: '525' }, { duration: 300, step: function( now, fx ){$( ".block:gt(0)" ).css( "left", now ); }});
		$(".close").fadeOut(300);$(".book").css("background-position","top");});
		
		
	// SHOW/HIDE GALLERY
		$("#photo_gallery").hide(); 
		$("#gallery_btn").toggle(function () {
			$("#photo_gallery").slideDown("normal");
			$("#gallery_btn").css("background-position","bottom");
		},function(){
			$("#photo_gallery").slideUp("normal");
			$("#gallery_btn").css("background-position","top");
		});
		
	// LINK ANIMATION		
		$("a img").mouseover(function () {
			$(this).fadeTo("fast", 0.33);
		});
		$("a img").mouseout(function () {
			$(this).fadeTo("normal", 1);
		});


	// ACCORDION	

		$("#accordion").accordion({ 
			autoHeight: false,
			navigation: true,
			active: '.selected'
		});




		
});
	

