$(function(){

	//menutop
	$("#menu2").removeClass("cssonly");
	$("#menu2 li a.rootNav").hover(function(){ 
		$(this).addClass("bgcol");

		$(this).parent().find("ul.subnav").fadeIn(0);
		$(this).parent().hover(function() {
		}, function() {
			$(this).parent().find("ul.subnav").fadeOut(0);
			$("#menu2 li a.rootNav").removeClass("bgcol");
			
		})
	});
	
	//jScrollPane
	$('#pane1').jScrollPane();
	$('#fpnews').jScrollPane();
	$('#fpnews2').jScrollPane();
	$('.festival_box_text').jScrollPane();
	
	$('.roundcorner').corner("10px");
	
	//tabs
	$("ul.tabs").tabs("div.panes > div.test");
	$("ul.fptabs").tabs("div.fppanes > div.fptest");
	
	$("#productcarousel").CloudCarousel(		
		{			
			xPos: 304,
			yPos: 50,
			xRadius: 264,
			yRadius: 25,
			buttonLeft: $("#carouselleft"),
			buttonRight: $("#carouselright"),
			altBox: $("#alt-text"),
			mouseWheel: true,
			titleBox: $("#title-text"),
			updateOnHover: false
		}
	);
	
//end functions
});

$().ready(function() {
 $('.truncate').truncate({
  max_length: 1000,
  more: 'more'
  });
  $('.tickets_truncate').truncate({
  max_length: 200,
  more: 'more'
  });
});

function openWindow(page, name, params)
{
if (! window.focus)return true;
window.open(page, name, params);
return false;
}	

function checkSizeDropDown(field,message){
	if(field.value == ""){
		alert(message);
		return false;
	} else {
		return true;
	}
}
