Shadowbox.init({
    // let's skip the automatic setup because we don't have any
    // properly configured link elements on the page
    skipSetup: true
});
google.setOnLoadCallback(function() 
{

	$("#realContent").css('display', 'none');
	
	$('.nav').tabs(
	{

		selected: -1,
		idPrefix: 'fermata-',
		cache: false, 
		ajaxOptions: {cache: false, data:  {ajax:1}},
		
		select:  function(event, ui)
		{	
						
			if($('#newLeftFix').is(':visible'))
			{
				if($('#spinner').is(':hidden'))
				{
					$('#spinner').slideDown('slow');
				}
				
				$(".nav").tabs('option', 'collapsible',false);
				
				$('#newLeftFix').slideUp('slow',function()
				{
					$("#wideScreen").slideDown("slow");
				});	
			}else{
				$('#spinner').slideDown('slow',function()
				{ 
					$('#realContent').slideUp('slow');
				});
			}
		},
		
		show:  function(event, ui)
		{			
			$('#realContent').slideDown('normal');	
			
			$('#spinner').slideUp('slow');
			Shadowbox.clearCache();
			Shadowbox.setup();
		},
		

	});
				
	$("#header h1 a").click(function()
	{
		if($('#newLeftFix').is(':hidden'))
		{
			$(".nav").tabs('option', 'collapsible', true);
			
			$('#wideScreen').slideUp('slow',function()
			{
				$("#realContent").css('display', 'none');
				$("#newLeftFix").slideDown("slow");
			});	
		}
		
		return false;
	});

	if (!((/Opera/.test (navigator.userAgent)) || (/MSIE 6/.test (navigator.userAgent)))) // OPERA AND IE6 BUG
	{ 
		$('#newsBg').corner("10px");
		$('#fbBox').corner("10px");
	}

	if (!(/MSIE 6/.test (navigator.userAgent))) // IE6 BUG
	{
		$('#newsBg').fadeTo(1500,0.6);
	}
	
}); 
