function pageLoaded()
{
	$("#waiting").fadeOut("slow");
	$("#waiting-menu").fadeOut("slow");
	
}
function loadFeed(url,show,place,finished)
{
	$.getFeed({
		url: 'assets/rssproxy.php?url='+url,
		success: function(feed)
		{
		
			var html = '<ul class="news-story">';
			for(var i = 0; i < feed.items.length && i < show; i++)
			{
				var item = feed.items[i];
				html += '<li>'+
				'<span class="headline-rss"><a href ="' + item.link + '" target="_new">' + item.title + '</a></span> ' + '<br />' +
				item.description +
				'</li>';
			}

			html += '</ul>';
			$(place).append(html);
		
			if(finished)
			{
				$(".block").equalHeights();
			}
		}
	
	});

}

 
$(document).ready(function()
{	
	(function($) {
		$.fn.equalHeights = function(minHeight, maxHeight) {
			tallest = (minHeight) ? minHeight : 0;
			this.each(function() {
				if($(this).height() > tallest) {
					tallest = $(this).height();
				}
			});
			if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
			return this.each(function() {
				$(this).height(tallest).css("overflow","auto");
			});
		};
	})(jQuery);

//	$(".block").equalHeights();
		
	$("#page-edit-info").click(function()
	{
		$("#additional-info").slideToggle("fast");
	});
	
	$("#sidebar").removeClass("loading");
	
	$('div#sidepix').fadr(
		{
			speed: 1000,
			timeout: 4000,
			type: 'random_start',
			//containerheight: '600px',
			controls_style: "none",
			autoplay: true
		});
});
