	$(document).ready(function() {
	
	$(".courses-list").easySlider({
		auto: false,
		continuous: false,
		nextId: "courses-slider-next",
		prevId: "courses-slider-prev"
	});	
	$(".concerts-list").easySlider({
		auto: false,
		continuous: false,
		nextId: "concerts-slider-next",
		prevId: "concerts-slider-prev"
	});
	$(".auditions-list").easySlider({
		auto: false,
		continuous: false,
		nextId: "auditions-slider-next",
		prevId: "auditions-slider-prev"
	});	

	//When page loads...
	$(".tab-content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab-content:first").show(); //Show first tab content

	//On Click Event
	
	$("ul.tabs li").click(function() {

		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab-content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
		
	});
	
	//Homepage feature slideshow
	 $('.slideshow').before('<div id="ss-pager">').cycle({
		fx: 'fade',
		pager:  '#ss-pager' 
	});
			
	//Homepage slider	
 	$("#slider").easySlider({
		auto: true,
		continuous: true,
		nextId: "slider-next",
		prevId: "slider-prev"
	});		
		
	//navigation classes 
	/*
	$("ul.sf-menu li a").addClass(function(){
  		return $(this).parent().attr("id");
	});
	*/
	$("ul.sf-menu li").each(function() {
    	$(this).children(":first").addClass(this.id);
	});
	
	//Input box clear
	$("input.text").focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});	
	
	//colorbox for extra images
	$("a[rel='colorbox']").colorbox();
	
	//New Archives Pod
	$("#news-archive-pod li.2011").hide();
	$("#news-archive-pod h2.2011").click(function() {
			$("#news-archive-pod li.2011").toggle('normal');
			$(this).toggleClass("open");
	});
	$("#news-archive-pod li.2010").hide();
	$("#news-archive-pod h2.2010").click(function() {
			$("#news-archive-pod li.2010").toggle('normal');
			$(this).toggleClass("open");
	});
	
	//back
	$("a.back")
      .click(function() {
            history.back();
            return false;
      });
      
     //add alt and last classes
	$("#latest-products ul li:last-child").addClass("last")
	$("#latest-products ul li:nth-child(even)").addClass("alt")
	
	//inline validation
	$(".app-form").validate();

	//playing days form
	$('#radio-teacher').click(function() {
	    if ($(this).is(':checked')) {
	      $('.student-q').hide('fast');
	      $('.student-q input, .student-q textarea').removeClass('required');
	    }
	    else {
	      $('.student-q').show();
	    }
	});	
	$('#radio-student').click(function() {
	    if ($(this).is(':checked')) {
	      $('.student-q').show('fast');
	       $('.student-q input, .student-q textarea').removeClass('valid');
	       $('.student-q input, .student-q textarea').addClass('required');
	    }
	    else {
	      $('.student-q').show();
	    }
	});
		
	});//onload end
	
	// initialise plugins
	jQuery(function(){
		jQuery("ul.sf-menu").superfish();
	});























