
jQuery(document).ready(function(){
		
		//forces all links that are not internal to open in a new window or tab
		$("a[href^='http:']").not("[href*='"+document.domain+"']").attr('target','_blank');
			
		$("ul.sf-menu").supersubs({ 
            minWidth:    12,   // minimum width of sub-menus in em units 
            maxWidth:    23,   // 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({ 
            delay:       1000,                            // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',                          // faster animation speed 
            autoArrows:  true,                           // disable generation of arrow mark-up 
            dropShadows: false                            // disable drop shadows 
        	});
		
				
		//fade for content area tickets
		$('#content .show-desc ul.show-ticket li a.glow').append('<span class="hover"></span>').each(function () {
	  			var $span = $('> span.hover', this).css('opacity', 0);
	  		$(this).hover(function () {
	  			if($.browser.msie){ //reduce transparency for IE to reduce black
	    				$span.stop().fadeTo(300, .3); //Change the number 500 to change the speed of the Fade In
	    			}
	    			else { //use this for all other browesers
	    				$span.stop().fadeTo(300, 1); //Change the first number to change the speed of the Fade In
	    			}
	 		}, function () {
	   			$span.stop().fadeTo(800, 0); //Change the first number to change the speed of the Fade Out
	  		});
		});
		
		//fade for sidebar area tickets
		$('#sidebar ul.show-ticket li a.glow').append('<span class="hover"></span>').each(function () {
	  			var $span = $('> span.hover', this).css('opacity', 0);
	  		$(this).hover(function () {
	  			if($.browser.msie){ //reduce transparency for IE to reduce black
	    				$span.stop().fadeTo(300, .3); //Change the number 500 to change the speed of the Fade In
	    			}
	    			else { //use this for all other browesers
	    				$span.stop().fadeTo(300, 1); //Change the first number to change the speed of the Fade In
	    			}
	 		}, function () {
	   			$span.stop().fadeTo(800, 0); //Change the first number to change the speed of the Fade Out
	  		});
		});
		
		//tooltip
		$('#calendar_tooltip, #map_tooltip').tooltip();
	
		// setup ul.tabs to work as tabs for each div directly under div.panes
		$('ul.mainstage-tabs').tabs('div.mainstage-panes > div');
		$('ul.childrens-tabs').tabs('div.childrens-panes > div');
		$('ul.academy-tabs').tabs('div.academy-panes > div');
	
		// setup ul.tabs to work as tabs for each div directly under div.panes
		$('ul.press-tabs').tabs('div.press-panes > div');
	
		//prettyphoto

		$("a[rel^='prettyPhoto']").prettyPhoto({
			default_width: 720,
			default_height: 405
		});
	
		// pretty photo with video
		
		$("#hover-home-video a").hover(function(){
			$(this).find("img").stop().animate({
				opacity:0.2
			}, 350);
		}, function() {
			$(this).find("img").stop().animate({
				opacity:1
			}, 350);
		});
		
		$("#video a").hover(function(){
			$(this).find("img").stop().animate({
			opacity:0.2
			}, 350);
		}, function() {
			$(this).find("img").stop().animate({
				opacity:1
			}, 350);
		});
		
		//adds attribute for prettyPhoto to press image gallery
		$("span.pressgallery-icon a").attr('rel', 'prettyPhoto[press]');
		
	
		//toggle
		//Hide (Collapse) the toggle containers on load
		$(".toggle_content").hide(); 

		//Switch the "Open" and "Close" state per click
		$("h3.toggle").toggle(function(){
			$(this).addClass("active");
			}, function () {
			$(this).removeClass("active");
		});

		//Slide up and down on click
		$("h3.toggle").click(function(){
			$(this).next(".toggle_content").slideToggle();
		});

		// fade for map
		// on click fort worth
		$('.map ul.directions li a.fw').click(function () {
			$('.map').removeClass('airport west').addClass('fort-worth');
			$('.map .box.dfw-directions').hide();
			$('.map .box.west-directions').hide();
			$('.box.fw-directions').fadeIn(500);
		});
		//on click airport
		$(".map ul.directions li a.dfw").click(function () {
			$(".map").removeClass('fort-worth west').addClass('airport');
			$('.map .box.fw-directions').hide();
			$('.map .box.west-directions').hide();
			$('.box.dfw-directions').fadeIn(500);
		});
		//on click i35 w
		$(".map ul.directions li a.i35").click(function () {
			$(".map").removeClass('fort-worth dfw').addClass('west');
			$('.map .box.fw-directions').hide();
			$('.map .box.dfw-directions').hide();
			$('.box.west-directions').fadeIn(500);
		});
});

//Show Bios/Details toggle control
// Toggle for show cast/details action

jQuery(document).ready(function(){
  	$('.toggle-cast-details').click(function(){
  		$('#details').toggle(500);
  		$('#bio-wrapper').toggle(500); 
  		$('#toggle-cast').toggle(500);
  		$('#toggle-details').toggle(500);
	});
});

	//FontEffect - Gradient text control features
jQuery(document).ready(function(){
  		$("#title-effect").FontEffect({
    			gradient : true, // Apply the gradient effect
    			gradientColor : "#d49433", // The color of the gradient
    			gradientPosition: 40, // The start position of the gradient (perc.)*
    			gradientLength : 50, // The length of the gradient (perc.)*
    			gradientSteps : 20 // the steps of the gradient 
  		});
  
  		//spacing for the show gallery
		//$('.attachments li.g160:first-child').addClass('alpha');
		//$('.attachments li.g160:nth-child(4)').addClass('omega');
	
		

  
	});

