jQuery(document).ready(function($) {
	// put all your jQuery goodness in here.
	
	$('#ajaxloader').hide();
	$("#twitloading").hide();
	
	/*
	$("#ajaxloader").ajaxStart(function() {
		$('#ygdiload').fadeOut('fast');
		$(this).slideDown('fast');
	});
	
	$("#ajaxloader").ajaxStop(function() {
		$(this).slideUp('fast');
		$('#ygdiload').fadeIn('fast');
	});
	*/
	
	$('#showitems li a').each(function() {
		$(this).click(function(event) {
			if ($(this).hasClass('rss')) {
				//alert('helo');
			} else {
				event.preventDefault();
				
				$('#ygdiload').fadeOut('fast');
				$("#ajaxloader").slideDown('fast');				
				
				$('#showitems li a').removeClass('active');
				var href = $(this).attr("href");
				$(this).addClass('active');
				$('#ygdiload').load( href );
				
				$("#ajaxloader").slideUp('fast');
				$('#ygdiload').fadeIn('fast');
			}
		});
		
	});
	
	$('a.refresh').click(function(event) {
		event.preventDefault();
		
		$('#twitloadlist').fadeOut('fast');
		$("a.refresh").fadeOut('fast');
		$("#twitloading").fadeIn('fast');
		
		var rel = $(this).attr('rel');
		$('#twitloadlist').load( rel );
		
		$("a.refresh").fadeIn('fast');
		$("#twitloading").fadeOut('fast');
		$('#twitloadlist').fadeIn('fast');
	});
	
	$('a.hei').each(function() {
		$(this).click(function(event) {
			event.preventDefault();	
			var href = $(this).attr("href");	
			$('#ygdiload').load( href );
		});
	});
});


