jQuery.noConflict();
jQuery(document).ready(function(){
		
		//homepage carousel
		if(jQuery('#slider1').length >0){
			featuredcontentslider.init({
				id: "slider1", //id of main slider DIV
				contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
				toc: "#increment", //Valid values: "#increment", "markup", ["label1", "label2", etc]
				nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide.
				enablefade: [true, 0.08], //[true/false, fadedegree]
				autorotate: [true, 5000], //[true/false, pausetime]
				onChange: function(previndex, curindex){ //event handler fired whenever script changes slide
				//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
				//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
				}
			});
		}
		
		//tabs
		if(jQuery('#tabs').length >0){
		   jQuery('#tabs').tabs(); 
		 }
		
		//drop down menu
		//set the timeout variable
		var thetimeout=0;
		//show the menu on hover
		jQuery(".downdepartments").hover(function(){
			//close any open drop downs
			jQuery(".dropdown").hide();
			//gets rel and removes white space
			var boxtitle = this.rel.split(' ').join('');
			jQuery("#"+boxtitle).show();
		});
		//give the user a set amount of time after leaving the hover state to hover over the drop down
		jQuery(".downdepartments").mouseleave(function(){
			var boxtitle = this.rel.split(' ').join('');
			thetimeout=setTimeout(function(){
					jQuery("#"+boxtitle).hide();
			},250);
		});
		//get rid of the timeout on mouseenter
		jQuery(".dropdown").mouseenter(function(){
			clearTimeout(thetimeout);
		});
		//hide menu on leaving
		jQuery(".dropdown").mouseleave(function(){
			jQuery(".dropdown").hide();
		});
		//if a click to close button is included this will close if it has the class .closedepartments
		jQuery(".closedepartments").click(function(){
			jQuery(".departmentsdropped").hide();
		});
});	
