$(document).ready(function() {
	// validate form
	if(document.getElementById('contactForm')){
		$("#contactForm").validate({
			rules: {
				txt_name: "required",
				txt_school_name: "required",
				txt_email: {
					required: true,
					email: true
				},									
				txt_tel: "required"	,			
				txt_comments: "required",
				txt_security_code: "required"
			},
			messages: {
				txt_name: "Please enter your name.",
				txt_school_name: "Please enter your company name.",
				txt_email: "Please enter your email address.",
				txt_tel: "Please enter your telephone number.",
				txt_comments: "Please enter your comments.",
				txt_security_code: "Please enter the security code shown on the page."
			}
		});
	}
	
	if(document.getElementById('menu')){
		//menu accordian
		jQuery('#menu').accordion({ 
			header: '.head', //element that triggers accordian
			active: true, //activates accordian
			alwaysOpen: false, //state of accordian elements default state
			autoheight: false, //If set, the highest content part is used as height reference for all other parts. Provides more consistent animations.
			animated: 'easeslide', //annimation style
			event: 'mousedown', //event that triggers accordian
			navigation: true //Enables the navigation option for this accordion, matching the active accordion element to location.href
		});
	}	
	
	//browser hack to handle a safari bug
	jQuery.each(jQuery.browser, function(i) {
		if($.browser.safari){
			$("#inner #main #main-content .subnav2").css("top","8px");
		}
	});

	
});