od47(document).ready(function()

{

od47('#guides-navigation').cycle(
	{ 
		fx:     'fade', 
		timeout:  8500,
		startingSlide: 0
	});

od47('#guides-navigation').cycle('stop');
// comment the above line to resume the image rotation.

if (od47.browser.msie6)
	{
		od47('#guides-navigation .menu-content').css('opacity' , '0.85');
	}

od47('#guides-navigation .menu-content').hover(function()
	{
		od47('#guides-navigation').cycle('pause');
	},function()
	{
		od47('#guides-navigation').cycle('resume');
	});


od47('#homepage-navigation li').click(function()
	{
		od47('#homepage-navigation li').removeAttr('class');
		od47(this).addClass('current');
		var href= od47(this).find('a').attr('href');
		var hrefSplit=href.split("/");
		od47('#guides-navigation .main-menu').css({"z-index" : 0, opacity: 1.0, left: 0, top: 0, height: "100%"}).hide();
		od47('#guides-navigation').cycle('stop');
		if (!od47.browser.msie6)
			{
				od47('#guides-navigation #'+hrefSplit[1]+'-menu').css('z-index' , '4').fadeIn(400);
			}
		else
			{
				od47('#guides-navigation #'+hrefSplit[1]+'-menu').css('z-index' , '4').show();
			}
		return false;
	});

od47('.latest-news').click(function()
	{
		var url = od47(this).find('h2 a').attr('href');
		window.location = url;
	});

if (od47.browser.msie6)
	{
		od47('.first').hover(function()
			{	
				od47(this).addClass('first-hover');
			},function()
			{
				od47(this).removeClass('first-hover');
			});
		
		od47('.second').hover(function()
					{	
						od47(this).addClass('second-hover');
					},function()
					{
						od47(this).removeClass('second-hover');
			});
		
		od47('.third').hover(function()
					{	
						od47(this).addClass('third-hover');
					},function()
					{
						od47(this).removeClass('third-hover');
			});
	}

});