//if you want to use jquery
$(document).ready( function () {					  
	
 	inputClear('#naviBar #searchText', 'Search');
			  
	
	 
	 
	 
	 
	 
	

	 $("h5.dropdownHeader").click(function(e){
											  
		e.preventDefault();
		
		//Cache the button clicked for performance benefits
		var header = $(this);
		
	//if a drop down is already expanded then execute the following code
	if($(header).hasClass('expand') == true){
		
		//Switch the class expand on or off depending on current state
		$(header).toggleClass('expand');
		
		//find the content area of the enclosed button and close it
		$(header).parent().next().stop().animate({height: "0"}, 500, 'linear', function() {
			//When closing the content area turn the display to none																  
			$(header).parent().next().css('display','none');																			  
		});

	
	}else {
		//find any expanded content areas and close them and also take out the expan class
		$('.dropdownHeaderArea').find('.expand').toggleClass('expand').parent().next().animate({height: "0"}, 500, 'linear', function() {
			//set the display of the content area to none	
			$(this).css('display','none');
			
		});
		
		//switch the expand class on or off depending on current state
		$(header).toggleClass('expand');
		//Animate the content area of related button to the full height of the content inside it
		$(header).parent().next().stop().animate({height: "100%"}, 500, 'linear', function() {});
		
	}
		
   });	
	 
	 
	
});


		  
	

// Clears input box onFocus, and adds back in if empty onBlur
// takes the ID of the input box and the default text value
function inputClear(inputID, inputText) {
	$(inputID).focus(function() {
		if ($(this).attr('value').toLowerCase() == inputText.toLowerCase())
			$(this).attr('value', '');
	});
	$(inputID).blur(function() {
		if ($(this).attr('value') == '')
			$(this).attr('value', inputText);
	});
}



/* used to get rid of _blank so your code validates w3c stylee */
function setExternalLinks() {
  var el_list = document.getElementsByTagName('A');
  for (i=0; i<el_list.length; i++) {
    if (el_list[i].getAttribute('rel') == 'external') {
      el_list[i].setAttribute('target', '_blank');
    }
  }
}

/* Check's users version of Flash */
function checkFlash (version) {
	return DetectFlashVer(version, 0, 0);
}

