// JavaScript Document


var ajaxLoader="<div id=\"loaderGif\" style=\"text-align:center; margin-top:10px;\"><br /><img src=\"/images/ajaxLoad.gif\" /></div>";

function showBand(tagx,thisx){
	$('.bandHeaderMenu').removeClass('bandHeaderMenuSelected');
	$(thisx).addClass('bandHeaderMenuSelected');
	$('.bandItem').not('#'+tagx).hide();
 $('#'+tagx).fadeIn('fast');	
	
}



function tooltip(){	
	/* CONFIG */		
		xOffset = -5;
		yOffset = -5;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.venueLink").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
	//	$("body").append("<div class='venueInfo' id='tooltip'>"+ $("#"+this.t).html() +"</div>");
		
		$("#"+this.t)
			.css("left","50%")
			.css("top","50%")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#"+this.t).fadeOut();
    });	
			
};


function setupBandStuff(){

  
		   $('.bandItem').hide();
		   $('.bandItem:first').fadeIn('fast');
		   
		   $('.venueInfo').hide();
	
		/*    $('.sponsorsLeftItem a').hover(function() {
		
		$(this).animate({border:'1px solid red'}, 1000);
			}, function() {
			$(this).animate({border:'0px solid red'}, 1000);
			});
			*/
		   $('a').click(function(){
								 var section=$(this).attr('src');
								 pageTracker._trackPageview(section);
								 
								 });
	
}
$(function(){
		   
		 setupBandStuff();
		 $('#infoHolder a img').hover(function() {

        $(this).attr('src','/newImages/location_hover.png');
      }, function() {
         $(this).attr('src','/newImages/location.png');
      });


});


function getSection(sectionVar){
//alert(sectionVar);
	$('#mainContentHolder').fadeOut('fast', function(){
		getSectionContent(sectionVar);
	});
}

function getSectionContent(sectionVar){
	
			  
								$('#mainContentHolder').html(ajaxLoader);
								$("#mainContentHolder").fadeIn('fast');
								
						
								  
											 $.ajax({
												type: "POST",
												url: "/includes/getContent.php",
												data: "section="+sectionVar,
												success: function(html){
													
													$('#mainContentHolder').fadeOut('fast', function(){
															$("#mainContentHolder").html(html);
															setupBandStuff();
															tooltip();
															$("#mainContentHolder").fadeIn('fast');
															pageTracker._trackPageview("/"+sectionVar+"/");
													});
												}
											});	
								  
								
								
								
	
	
	
}












// starting the script on page load
$(document).ready(function(){
	tooltip();
});






var flashvars = {
  name1: "hello",
  name2: "world",
  name3: "foobar"
};
var params = {
  menu: "false",
    id: "swfPlayer",
	wmode: "window",
  name: "bannerLoader"
};
var attributes = {
  id: "swfPlayer",
  wmode: "window",
  name: "bannerLoader"
};
swfobject.embedSWF("/bannerloader.swf", "bannerLoaderContainer", "250", "250", "8.0.0", "/js/swfobject/expressInstall.swf", flashvars, params, attributes);

var flashvars = {
  name1: "hello",
  name2: "world",
  name3: "foobar"
};
var params = {
  menu: "false",
    id: "swfPlayer",
	wmode: "window",
  name: "bannerLoader"
};
var attributes = {
  id: "swfPlayer",
  wmode: "window",
  name: "bannerLoader"
};
swfobject.embedSWF("/player.swf", "jukePlayerContainer", "250", "100", "8.0.0", "/js/swfobject/expressInstall.swf", flashvars, params, attributes);

var flashvars = {
  name1: "hello",
  name2: "world",
  name3: "foobar"
};
var params = {
  menu: "false",
    id: "swfPlayer",
	wmode: "window",
  name: "menuHolder"
};
var attributes = {
  id: "swfPlayer",
  wmode: "window",
  name: "menuHolder"
};
swfobject.embedSWF("/menu.swf", "menuHolderContainer", "800", "33", "8.0.0", "/js/swfobject/expressInstall.swf", flashvars, params, attributes);
