$(document).ready(function() {
	// $('a#login').click(function() {
	//     	$('#uberpanel').slideToggle();
	// 	var txt = $('#login').text();
	// 	// alert(txt);
	// 	if (txt == "Login") {
	//     	$('#login').text('Close');
	// 	} else {
	// 		$('#login').text('Login');
	// 	}		
	//     	return false;
	//  });
	$(function(){
		$('#nav li a')
			.css( {backgroundPosition: "0 0"} )
			.mouseover(function(){
				$(this).stop().animate({backgroundPosition:"(0 -150px)"}, {duration:500})
			})
			.mouseout(function(){
				$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:500})
			})
	});
	$(function(){
		$('#nav li.on a')
			.css( {backgroundPosition: "0 -250px"} )
			.mouseover(function(){
				$(this).stop().animate({backgroundPosition:"(0 -100px)"}, {duration:500})
			})
			.mouseout(function(){
				$(this).stop().animate({backgroundPosition:"(0 -250px)"}, {duration:500})
			})
	});
	$('a').click(function() {
		var ext = $(this).attr('rel');
		if(ext == 'external') {
	    	window.open(this.href);
	    	return false;			
		}
	 });
	$('a.external').click(function() {
    	window.open(this.href);
    	return false;
	 });
	$('#copyright a').click(function() {
    	$.scrollTo( '#container', 500 );
    	return false;
	 });
	 $('a.toolTip').tooltip({
	 	track: true,
	 	delay: 0,
	 	showURL: false,
	 	fixPNG: true,
	 	fade: 250
	 	// left: -120
	 });
	 $('.carousel').carousel({
	 	direction: 'vertical',
	 	loop: true,
	 	autoSlide: true, 
	 	autoSlideInterval: 6000
	 });
});
