$(document).ready(function(){
   	$("#home").hover(
	 function(){$(this).attr("src", "/images/home_over.jpg");},
	 function(){$(this).attr("src", "/images/home.jpg");}
	 );  
						   
   	$("#about").hover(
	 function(){$(this).attr("src", "/images/about_over.jpg");},
	 function(){$(this).attr("src", "/images/about.jpg");}
	 );  

   	$("#events").hover(
	 function(){$(this).attr("src", "/images/events_over.jpg");},
	 function(){$(this).attr("src", "/images/events.jpg");}
	 );  
	
   	$("#blog").hover(
	 function(){$(this).attr("src", "/images/blog_over.jpg");},
	 function(){$(this).attr("src", "/images/blog.jpg");}
	 );  

   	$("#forum").hover(
	 function(){$(this).attr("src", "/images/forum_over.jpg");},
	 function(){$(this).attr("src", "/images/forum.jpg");}
	 );  
	
   	$("#project").hover(
	 function(){$(this).attr("src", "/images/project_over.jpg");},
	 function(){$(this).attr("src", "/images/project.jpg");}
	 );  
	
   	$("#photo").hover(
	 function(){$(this).attr("src", "/images/photo_over.jpg");},
	 function(){$(this).attr("src", "/images/photo.jpg");}
	 );  
	
   	$("#register").hover(
	 function(){$(this).attr("src", "/images/register_over.jpg");},
	 function(){$(this).attr("src", "/images/register.jpg");}
	 );  
	
   	$("#login").hover(
	 function(){$(this).attr("src", "/images/login_over.jpg");},
	 function(){$(this).attr("src", "/images/login.jpg");}
	 );  
	
   	$("#logout").hover(
	 function(){$(this).attr("src", "/images/logout_over.jpg");},
	 function(){$(this).attr("src", "/images/logout.jpg");}
	 );
	
	 $("#profile").hover(
	 function(){$(this).attr("src", "/images/profile_over.jpg");},
	 function(){$(this).attr("src", "/images/profile.jpg");}
	 );  
	
	$("#twitter").getTwitter({
		userName: "912projectidaho",
		numTweets: 1,
		loaderText: "Loading tweets...",
		slideIn: true,
		slideDuration: 750,
		showHeading: true,
		headingText: "Latest Tweets",
		showProfileLink: false,
		showTimestamp: false
	});
	
  //hide the all of the element with class event_details
      $(".event_details").hide();
  //toggle the componenet with class event_details
      $(".more").click(function()
	  {
		  $(this).next('.event_details').slideToggle(600);
	  });
	  
	$(".more").toggle(
		function(){
			$(this).html("<span class='event'>Details:</span> Less [-]");
		},
		
		function(){
			$(this).html("<span class='event'>Details:</span> More [+]");
		}
	  );
	
	
	var currentTab = "el";
	
	$("#google_container").hide();
	
	$(".google").click(function(){
		$("#list_container").hide();
		$("#google_container").show();
		$(this).attr('src', '/images/calendar_tab_over.jpg');
		$(".events").attr('src', '/images/event_tab.jpg');
		currentTab = "gl";
	});
	
	$(".events").click(function(){
		$("#list_container").show();
		$("#google_container").hide();
		$(this).attr('src', '/images/event_tab_over.jpg');
		$(".google").attr('src', '/images/calendar_tab.jpg');
		currentTab = "el";
	});
	
	$(".events").mouseover(function(){
		if(currentTab != "el"){
			$(".events").attr("src", "/images/event_tab_over.jpg");
		}
	});
	
	$(".events").mouseout(function(){
		if(currentTab != "el"){
			$(".events").attr("src", "/images/event_tab.jpg");
		}
	});
	
	$(".google").mouseover(function(){
		if(currentTab != "gl"){
			$(".google").attr("src", "/images/calendar_tab_over.jpg");
		}
	});
	
	$(".google").mouseout(function(){
		if(currentTab != "gl"){
			$(".google").attr("src", "/images/calendar_tab.jpg");
		}
	});
	

});





