// JavaScript Document
$(document).ready(function () {
    //$('#accord1').accordion({ autoheight: false });
	$('.accordianRight').accordion({header:'cite',autoheight: true, selectedClass:'citesel'});
	
	var linkContainers = $('div.evnt-container > div');
	linkContainers.hide().filter(':first').fadeIn('slow');
	
	$('div.evnt-container ul.linkNavigation a').click(function () {
		linkContainers.hide();
		linkContainers.filter(this.hash).fadeIn('slow');
		$('div.evnt-container ul.linkNavigation a').removeClass('selected');
		$(this).addClass('selected');
		return false;
	}).filter(':first').click();
	
	var drawerContainers = $('.drawer .details');
	
	$('.drawer h3.tab').click(function () {
		var self = false;
		drawerContainers.slideUp();
		if (!$(this).hasClass('sel'))
			$("#" + this.id.substr(0,2)).slideDown('slow');
		else
			self = true;
		$('.drawer .tab').removeClass('sel');
		if (!self)
			$(this).addClass('sel');
		return false;
	});//.filter(':first').click();
	
	
	var evntContainers = $('#evntWidDivHolder .evntWidgetDiv');
    
    /* listing blue tabs */
	$('#evntWidget ul#evntWidgetTabs li a').click(function () {
        $('#evntWidget ul#evntWidgetTabs li a').removeClass('sel');
		//$('#evntWidget ul#evntWidgetTabs li a span').remove();
		//$('#evntWidget ul#evntWidgetTabs li a').prepend("<span>&GT;&nbsp;&nbsp;&nbsp;</span>");
		//$("span",this).remove();
		$(this).addClass('sel');
		
		evntContainers.hide().filter(this.hash).fadeIn('slow');
        
        return false;
    }).filter(':first').click();
		
	$('#evntWidget ul#evntWidgetTabs li a').mouseover(function(){
		//$("span",this).remove();													   
	}).mouseout(function(){
		/*if(!$(this).hasClass("sel")){
			$(this).prepend("<span>&GT;&nbsp;&nbsp;&nbsp;</span>");
		}*/
	});
	
	
	$('.evntWidgetDiv ul li').bind("mouseover", function(e){
		$("span.evntMonth",this).css("backgroundColor","#f3a33a");	
		$("span.evntDay",this).css("backgroundColor","#666666");
		$("span.evntDesc",this).css("backgroundColor","#f2f2f2");	
		$("span.evntSelect",this).addClass("hov");
		$("span.evntDesc a",this).css({'color':'#215290','fontWeight':'bold'});
	});
	$('.evntWidgetDiv ul li').bind("mouseout", function(e){
		$("span.evntMonth",this).css("backgroundColor","#cccccc");
		$("span.evntDay",this).css("backgroundColor","#999999");
		$("span.evntDesc",this).css("backgroundColor","#ffffff");
		$("span.evntSelect",this).removeClass("hov");
		$("span.evntDesc a",this).css({'color':'#000000','fontWeight':'normal'});
	});
	
	$('.evntWidgetDiv ul li:first').trigger('mouseover');
	
	
	/*$('.accordianRight cite').not(".citesel").mouseover(function() {
		$(this).css({"backgroundPosition":"right top"});
		//$(this).addClass('citesel');
		
	}).mouseout(function(){
		$(this).css({"backgroundPosition":"left top"});	
		//$(this).removeClass('citesel');
		$('.accordianRight cite.citesel').css({"backgroundPosition":"right top"});
	});*/
	 
	//$('.accordianRight cite:first').css('backgroundPosition','right top')
});

