$(document).ready(function(){ 
	if($.browser.msie && parseInt($.browser.version) == 6) {
		$(document).pngFix();
	}
	
	$('div.required label').append('<span style="color:#ff0000;">*</span>');
	
	$("table.table tr:even td").css("background-color", "#e8eff4");
	$("table.table tr:odd td").css("background-color", "#d1dee8");
	//$("table.table thead th:first-child").css("border-left", "1px solid #d1dee8");
	//$("table.table thead th:last-child").css("border-right", "1px solid #d1dee8");
	
	$("ul.nav").superfish({
		delay:100,
		animation: {height:'show'},
		speed:'fast',
		autoArrows:false,
		onBeforeShow: beforeShow
	});
	
	function beforeShow() {
		if($(this).prev('a').attr('id') != undefined) {
			if($(this).prev('a').attr('id') == 'contact-us') {
				$(this).css('left','-110px');
			}
			if($(this).prev('a').attr('id') == 'events') {
				$(this).css('left','-136px');
			}
		}
	}
	
	$('#category_select').change(function(){
	  $('#category_form').submit();
	  return false;
	});
	
	$('#q').focus(function(){
	  if($(this).val() == '(Please enter your search phrase here...)') {
		  $(this).attr('value','');
	  }
	});
	$('#q').blur(function(){
	  if($(this).val() == '') {
		  $(this).val('(Please enter your search phrase here...)');
	  }
	});
	
	$('.other_trigger').change(function(){
	  if($(this).val() == 'Other') {
		  $('.other_option').slideDown('fast');
		  $('.other_option input').focus();
	  } else {
		  $('.other_option').slideUp('fast');
	  }
	});
	$('.other_trigger').change();
	
}); 
