$(document).ready(function(){
// Drop Down Menu
	$("#topNav, #leftNav, #topNav2")
		.superfish({
			animation : { opacity:"show"}
	});
	// clear input on focus
	jQuery('.searchClear').focus(function()
	{
	if(jQuery(this).val()==$(this).attr('title'))
	{
	clearMePrevious = $(this).val();
	jQuery(this).val('');
	}
	});
	// if field is empty afterward, add text again
	jQuery('.searchClear').blur(function()
	{
	if(jQuery(this).val()=='')
	{
	jQuery(this).val(clearMePrevious);
	}
	});
   /* $("div#topLogo").pngFix();*/		

	$('a.external').click(function(){
	window.open(this.href);
	return false;
    });
	
	// initialise plugins
	jQuery(function(){
		jQuery('ul.sf-menu').superfish();
	});



//The accordion wasn't working in ie. I realized that superfish seemed to be trying to controll the same bit of menue as the accordion. When I commented out the accordion script, the menu worked fine in all browsers. That's why the code below is commented out - josh 8/23/10
	
//	jQuery('#navigation').accordion({
//		active: false,
//		header: '.head',
//		navigation: true,
//		event: 'mouseover',
//		fillSpace: false,
//		animated: 'easeslide'
//	});

// bind to change event of select to control first and seconds accordion
// similar to tab's plugin triggerTab(), without an extra method

//	var accordions = jQuery('#navigation');
//	
//	jQuery('#switch select').change(function() {
//		accordions.accordion("activate", this.selectedIndex-1 );
//	});
//	jQuery('#close').click(function() {
//		accordions.accordion("activate", -1);
//	});
//	jQuery('#switch2').change(function() {
//		accordions.accordion("activate", this.value);
//	});
//	jQuery('#enable').click(function() {
//		accordions.accordion("enable");
//	});
//	jQuery('#disable').click(function() {
//		accordions.accordion("disable");
//	});
//	jQuery('#remove').click(function() {
//		accordions.accordion("destroy");
//		wizardButtons.unbind("click");
//	});	
});	
