jQuery(document).ready(function() {

	//Nav Font Replace
	Cufon.replace('.nav > li > a', { fontFamily: '2006' });
	
	//Add 1px trim to first link block
	$(".usp li:first").addClass('trim');
	
	//commas
	$('.explore ul li:not(:last)').append(',&nbsp;');
	$('.otherpages li:not(:last)').append(',&nbsp;');
	
	//Rounded corner on form
	$(".search").corner('5px');
	
	//Pretty selects
	$('p.line select').selectbox();
	$('p.shortboxes select').selectbox_short();
	$('p.shortboxes-left select').selectbox_short_left();
	
	//Show me some menu
//	$(".nav > li").mouseenter(function() {
//		$(this).find('ul').show();
//    });
//	$(".nav > li").mouseleave(function() {
//		$(this).find('ul').hide();
//    });

	$(".nav ul").css({display: "none"}); // Opera Fix 
	$(".nav li").hover(function(){ 
	$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(); 
	},function(){ 
		$(this).find('ul:first').css({visibility: "hidden"}); 
	}); 


	//make whole block clickable
	$(".clickable").click(function(){ window.location = $(this).attr("title");});

	//removes title attribute for image hovers
	$(".special").removeAttr("title");
	
	//forms
	$('.datepicker').datepicker({showOn: 'both', buttonImage: '/wp-content/themes/sain1/images/calendar.png', buttonImageOnly: true, dateFormat: "mm/dd/yy"});

	//hide conferencing from cat menu
	$('.conferencing .conf_cat').find('Conferencing').hide();

	$("#listedcat").change(function(){
		var url = $("#listedcat").val();
		if (url != ''){
			document.location.href=url;
		}
	});
	
	//pipe
	$('.foot li:not(:first)').prepend(' | ');
});