$(document).ready(function() 
	{
		$('#indicator').fadeTo('fast',0);
	    $('#mycarousel').jcarousel({
	        // size: 4
	    });
		$('#mycarousel a').click(function() 
		{
			var link = this.href;
			$.ajax(
					{
						type: "POST",
						url: this.href,
						datatype: "html",
						cache: false,
						success: function(html)
						{
							$('#bilde #foto').remove();
							$('#bilde #caption').remove();
							$('#bilde').append(html);
						}
					});					
			return false;
		});
		 $('#indicator').ajaxStart(function() 
			{
				$(this).fadeTo('slow', 0.4);
		 		
		 	}).ajaxStop(function() 
			{
				$(this).fadeTo('slow', 0);
		 		
		 	});

		var subsubmenu = $('#submenu li[ul] ul');
	
		$('#submenu li[ul] ul:not(".ping")').hide(); 		
	
		$('#submenu li[ul] > a').toggle(function()
		{
			$(this).parent().children('ul').addClass('ping').show(200);

		}, function()
		{
			$(this).parent().children('ul').removeClass('ping').hide(200);

		});			
			
	});

