$(function()
{
	$(document).ready(function()
	{
		// Make transparent png's as compatible as possible
		$('#container').supersleight({shim: '/images/transparent.gif'});
	
		// Setup background image based on path, if not ie6
		if(!$.browser.msie || ($.browser.msie && $.browser.version.substr(0,1) > 6))
		{
			switch(window.location.pathname.split("/")[1])
			{
				/*case 'contact-us':
					$.backstretch("/images/full-bg/garden.jpg");
					break;*/
				case 'what-we-do':
					$.backstretch("/images/full-bg/large_conference2.jpg");
					break;
				case 'what-our-clients-say':
					$.backstretch("/images/full-bg/large_conference3.jpg");
					break;
				default:
					// Homepage and default
					$.backstretch("/images/full-bg/bldg_front.jpg");
					break;
			}
		}
			
		// Setup Clients Scroller
		$('#clients-scroller').jcarousel({
			scroll: 3,
			wrap: 'circular',
			buttonNextHTML: '',
	        buttonPrevHTML: ''
		});
		
		// Setup Custom Previous/Next Buttons
		$('#clients-container .previous').click(function()
		{
			$('#clients-scroller').jcarousel('prev');
			return false;
		});
		
		$('#clients-container .next').click(function()
		{
			$('#clients-scroller').jcarousel('next');
			return false;
		});
		
		// Setup Home Page Services - hover and click
		$('.service-section').hover(
		function()
		{
			$(this).addClass('over');
		},
		function()
		{
			$(this).removeClass('over');
		}).click(function()
		{
			var url = $(this).find('a.service-header').attr('href');
			window.location = url;
		});

	});

});
