$(document).ready(function() {
	if($.browser.safari){
		$('#subnavigation li a').css('padding-top', '4px');
		$('#subnavigation li a').css('height', '16px');
		$('#subnavigation li a.triangle span').css('background-position', '0px 2px');
	 }
	
 	$('.thirdnavigation').hide();
	$('.home-subnavigation .triangle').toggle(
		function(){
			$(this).addClass('active');
			$('.thirdnavigation').show();	
		},
		function(){
			$(this).removeClass('active');
			$('.thirdnavigation').hide();
		}
	);
	
	var validator = $("#formOrder").validate({
		errorContainer: $("#error-message"),
		onblur: function(el)
		 {
		  if(validator.check(el))
		   $(el.form).find("label[for=" + el.id + "]").removeClass('error-label');
		  else
		   $(el.form).find("label[for=" + el.id + "]").addClass('error-label');
		 },
		 onkeyup: function(el)
		 {
		  if(validator.check(el))
		   $(el.form).find("label[for=" + el.id + "]").removeClass('error-label');
		  else
		   $(el.form).find("label[for=" + el.id + "]").addClass('error-label');
		 },
		 highlight: function(el, errorClass) {
		     $(el.form).find("label[for=" + el.id + "]").addClass('error-label');
		  }
		
	});
	
	//find all form with class jqtransform and apply the plugin
  $("select").uniform(); 
	
	
});
