/*
 * site-specific JS
 */
(function(){

	$(document).ready(function(){

		
		// detect page id and page class, for section-specific JS
		var $body = $('body'),
			bodyId = $body.attr('id'), 
			bodyClass = $body.attr('class');
		
		if (bodyClass == "home" && !!caseStudy) {
				caseStudy.init();
		}
			
		/*
		 * jQuery tools scrollable initialisation
		 * Only init if there are more slides than are currently visible
		 * for scrollable API, see: http://flowplayer.org/tools/scrollable/index.html
		 */
			if (bodyClass == "case-studies" && !!caseStudy) {
				caseStudy.init();
			}
			
			
			
		/*
		 * Google map with bespoke marker on contact page
		 */
			if (bodyId == "contact") {
				contact.init();
			}
		
		
		/*
		 * Initialise 'our clients' functionality
		 */
			if (bodyId == "our-clients" && !!ourClients) {
				ourClients.init();
			}
		
		
		/*
		 * IE6 fixes
		 */
			if ($('html').hasClass('ie6')) {
				
				// nav hover
				$("ul#primary-navigation li").hover(
					function(e){ $(this).addClass('hover'); },
					function(e){ $(this).removeClass('hover'); }
				);
				
			}
			
	});
	
})();
