var CURIMAGE = 0;

//SLIDESHOW
	
	var CURIMAGE = 0;

	function slideshow()
		{
			if ($("body").attr("id") == 'home')
			{
				setTimeout("bindHome()", 5000);
			}
		}

	function bindHome()
	{
		$("#layout-image .home"+CURIMAGE).css('z-index', 10).fadeOut(2000);
		CURIMAGE++;
		if (CURIMAGE > 2)
		{
			CURIMAGE = 0;
		}
		$("#layout-image .home"+CURIMAGE).css('z-index', 20).fadeIn(3000);
	
		setTimeout("bindHome()", 6000);
	}

	
	// DROPDOWN

	function dropdown()

	{

		$("ul#layout-beam li: ul").hide();


		$("ul#layout-beam li a").click(

		function()
	
			{
	
				if ($(this).parent().hasClass("active"))
	
				{
	
					//$(this).parent().find("ul.level2").slideUp(200);
					
					$(this).parent().find("ul").hide();
	
					$(this).parent().removeClass('active');
					
				}
	
				else
	
				{
	
					//$(this).parent().find("ul.level2").slideDown(200);
					
					$(this).parent().find("ul").show();
	
					$(this).parent().addClass('active');
					
				}
	
			}
	
		);

	}

$(document).ready(function() {
	// Initialize the main object
	if ($.browser.version.charAt(0) < 7 && $.browser.msie){$("#mainnav li, #subnav li").hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});}
	dropdown();
	slideshow();
});



