// JavaScript Document
var _siteRoot='index.html',_root='index.html';


/*Ticker, move it later */
$(document).ready(function(){
	
	var first = 0;
	var speed = 700;
	var pause = 3500;
	
		function removeFirst(){
			first = $('ul#listticker li:first').html();
			$('ul#listticker li:first')
			.animate({opacity: 0}, speed)
			.fadeOut('slow', function() {$(this).remove();});
			addLast(first);
		}
		
		function addLast(first){
			last = '<li style="display:none">'+first+'</li>';
			$('ul#listticker').append(last)
			$('ul#listticker li:last')
			.animate({opacity: 1}, speed)
			.fadeIn('slow')
		}
	
	interval = setInterval(removeFirst, pause);
});



/*Navigation Menu*/
			$().ready(function() {
				$('.kwicks').kwicks({
					max : 400,
					spacing : 5
				});
			});


$(document).ready(function() {
						   $(".subtext").hide();
  $('.navelement').hover(
						 function() {$(this).find('.subtext').fadeIn(1000);} , function() {$(this).find('.subtext').fadeOut(1000);}
						 );
});


/*Twitter, move it later */
$(document).ready(function() {
				$("#twitter").getTwitter({
					userName: "iaesteindia",
					numTweets: 3,
					loaderText: "Loading tweets...",
					slideIn: true,
					slideDuration: 750,
					showHeading: true,
					headingText: "We Tweet!",
					showProfileLink: false,
					showTimestamp: true
				});
			});



/*Custom Code for the links to load*/
/*$(document).ready(function() {
				$(".navelement").click( function() {
												 $("#content").hide('slow');
												 
												var toLoad = $(this).find('a').attr('href');
												alert(toLoad);
												$("#content").load(toLoad);

												$("#content").show('slow');
												 return false;
												 });
			});*/