$(document).ready(function() {
 				
 	nd.rollover.init();
 
 	$('#footer #copyright p').css('opacity', '.5');
 	
 	Cufon.replace('h1');
 	
 	$("#accordion").accordion( { active:false, collapsible: true, autoHeight: false} );

	$('#email').click(function() {
		$(this).attr('value', '');
	});

	$('#go-btn').click(function() {
		$('#signupfrm').submit();
	});

 	if ($('#slideshow').length > 0 ) {
	 	$('#slideshow').cycle({ 
			fx: 		 'fade',
	    	speed:       300, 
	    	timeout:     3000, 
	    	pager:      '#slideshow-nav', 
	   		pagerEvent: 'mouseover', 
	    	pauseOnPagerHover: true  
		});
		
		var count = 1;
		$('#slideshow-nav a').each(function(){
			$(this).attr('id', 'nav-'+count);
			$(this).html('');
			count++;
		});
	}
	
	if ( $('.home_events').length > 0 ) {
		$('.dotted-seperator:last').hide();
	}
	
	if ( $('.whats-on-container').length > 0 ) {
		$('.whats-on-left .dotted-seperator:last').hide();
		$('.whats-on-right .dotted-seperator:last').hide();
	
		
		$(".whats-on-left .contain").hover(
	      function () {
	        $(this).addClass('hover');
	      }, 
	      function () {
	        $(this).removeClass('hover');
	      }
	    );
	    
	    $(".whats-on-left .contain").click(function() {
	    	
	    	$(".whats-on-left .contain.hover2").removeClass('hover2');
	    	$(".whats-on-right .special_offer.hover2").removeClass('hover2');
	    	$(this).addClass('hover2');
	    	
	    	var tmp = $(this).attr('class').split(' ');
	    	var lastclass = tmp[1];
	    	var tmpdata = $(".inactive."+lastclass).html();
	    	
	    	//console.log($(".inactive."+lastclass));
	    	//alert(tmpdata);
	    	$('.active-container').html(tmpdata).show('slow');
	    })
	    
	    
	    $(".whats-on-right .special_offer").click(function() {
	    
	    	$(".whats-on-right .special_offer.hover2").removeClass('hover2');
	    	$(".whats-on-left .contain.hover2").removeClass('hover2');
	    	$(this).addClass('hover2');
	    	var tmp = $(this).attr('class').split(' ');
	    	var lastclass = tmp[1];
	    	var tmpdata = $(".inactive."+lastclass).html();
	    	
	    	//console.log($(".inactive."+lastclass));
	    	//alert(tmpdata);
	    	$('.active-container').html(tmpdata).show('slow');
	    })
	    
	    $(".whats-on-right .special_offer").hover(
	      function () {
	        $(this).addClass('hover');
	      }, 
	      function () {
	        $(this).removeClass('hover');
	      }
	    );
	
	}
	
	
	if ($('.contact_slide').length > 0 ) {
		$('#contact-hero-1').click(function() {
			$(this).hide('slow');
			$('#contact-hero-2').show('slow');
		});
		
		$('#contact-hero-2').click(function() {
			$(this).hide('slow');
			$('#contact-hero-1').show('slow');
		});
	}
	

});