$(document).ready(function(){
	
	$('ul.gigs-month-list li a').click(function(){
//		console.log( $(this).parent('li:first').get(0).className );
		if( $(this).parent('li:first').get(0).className == 'info' ) return true;
		$('.gig-list-div').each(function(i){ $(this).hide() });
		$('ul.gigs-month-list li a').each(function(i){ $(this).removeClass('current') });
		$('div#l'+$(this).get(0).id).show();
		$(this).addClass('current');
		return false;
	})
	
	$('.gigs-list table tr td.tickets a span, td.ticket_rel a span').fadeTo('fast', 0.9);
	$('.gigs-list table tr td.tickets a, td.ticket_rel a').hover(function(){
		
		if( !$(this).children('span').get(0) ) return;
		
		var span = $(this).children('span').get(0);
//		console.log( $(this).children('span').height() );
		if( $.browser.msie ) $(span).css('margin-top', "-"+($(this).children('span').height()+10) + "px" ); 
		else if( $.browser.safari || $.browser.opera ) { 
			$(span).css('margin-top', "-"+($(this).children('span').height()+16) + "px" );
			$(span).css('margin-left', "-20px" );
		} else  $(span).css('margin-top', "-"+($(this).children('span').height()+30) + "px" );
		$(span).css('visibility', 'visible');
		
	}, function(){
		if( !$(this).children('span').get(0) ) return;
		var span = $(this).children('span').get(0);
//		console.log( $(this).children('span').height() ); 
		$(span).css('visibility', 'hidden');
		
	})
	
})