Cufon.replace('.cufon, H2, .left-strip H1, .show-summary H3, .comingSoon, #nav', {hover:true});

$(function() {





	// Menu animation
	$('#nav a').hover(function() {
		$(this).stop().animate( { backgroundColor: "#" + $(this).attr('rel') }, 400);
	},function() {
		$(this).stop().css( { backgroundColor: "transparent" });
	});



	
	
	/*
	
	var theColours=["#D3C11E","#17C1C3","#46B443","#A94C9B","#DF1A1B","#0D50A1"];
	
	$('#subcategories li:not(.selected) a').bind('mouseover',function(){
		$(this).css({
			'background' : theColours[ (Math.floor(Math.random() * (3 - 0 + 1)) + 0) ]
		}).bind('mouseleave',function(){
			$(this).css({ 'background' : '#fff' });
		});
	});
	
	*/
	
	
	
	
	
	
	// Table highlighting
	//$("#whats_on tbody tr:even td").addClass("altCell");
	$("#whats_on td:empty").html("&nbsp;");
	
	
	
	



	// Image Carousel
	if( $("#home #carousel").length ){ //check if #carousel exists, to prevent weird bug with jQuery UI Accordion
	
		$("#home #carousel").jCarouselLite({
			easing: "easeOutCubic",
			speed: 1000,
			scroll: 3,
			btnNext: ".cNext",
			btnPrev: ".cPrev",
			mouseWheel: true
		});
		
	};
	
	if( $("#shows #carousel").length ){
	
		$("#shows #carousel").jCarouselLite({
			easing: "easeOutCubic",
			speed: 1000,
			scroll: 2,
			btnNext: ".cNext",
			btnPrev: ".cPrev",
			mouseWheel: true
		});
		
	};





	// Contact form popup
	function showContactForm(){
		$("#contact-wrap").html('<iframe id="contact-modal" width="100%" height="100%" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto" allowtransparency="true" />').dialog("open");
		$("#contact-modal").attr("src","/html/contact_form.php");
		return false;
	};
	
	$("#contact-wrap").dialog({
		autoOpen: false,
		modal: true,
		width: 530,
		height: 520,
		show: 'scale',
		closeText: 'close'
	});

	$("#contactButton a, .black-btn").click(function(){
		//$("#contact-form").dialog('open');
		showContactForm();
		return false;
	});

});