$(document).ready(function(){ 

	$("input").focus(function(){
		$(this).attr("value","");
	});
						
	$('ul.sidebarnav li').hover(function() {
	$(this).css("background","transparent url(/wp-content/themes/ubroad/images/sidebar-headline-active-bg.png) no-repeat scroll left top");
	}, function(){ 
	$(this).css("background","none");
	});
	
	$('ul.sidebarnav-half li').hover(function() {
	$(this).css("background","transparent url(/wp-content/themes/ubroad/images/sidebar-headline-active-bg.png) no-repeat scroll left top");
	}, function(){ 
	$(this).css("background","none");
	});
	
	$('ul.sidebarnav li.sanav').hover(function() {
	$(this).css("background","transparent url(/wp-content/themes/ubroad/images/sidebar-headline-active-bg.png) no-repeat scroll left top");
	$("#saimg").css("display", "block"); 
	}, function(){ 
	$(this).css("background","none");      
	$("#saimg").css("display", "none");
	});	
	
	$('ul.sidebarnav li.afnav').hover(function() {
	$(this).css("background","transparent url(/wp-content/themes/ubroad/images/sidebar-headline-active-bg.png) no-repeat scroll left top");
	$("#afimg").css("display", "block"); 
	}, function(){ 
	$(this).css("background","none");       
	$("#afimg").css("display", "none");
	});	
	
	$('ul.sidebarnav li.nanav').hover(function() {
	$(this).css("background","transparent url(/wp-content/themes/ubroad/images/sidebar-headline-active-bg.png) no-repeat scroll left top");
	$("#naimg").css("display", "block"); 
	}, function(){  
	$(this).css("background","none");      
	$("#naimg").css("display", "none");
	});	
	
	$('ul.sidebarnav li.ocnav').hover(function() {
	$(this).css("background","transparent url(/wp-content/themes/ubroad/images/sidebar-headline-active-bg.png) no-repeat scroll left top");
	$("#ocimg").css("display", "block"); 
	}, function(){  
	$(this).css("background","none");      
	$("#ocimg").css("display", "none");
	});	
	
	$('ul.sidebarnav li.asynav').hover(function() {
	$(this).css("background","transparent url(/wp-content/themes/ubroad/images/sidebar-headline-active-bg.png) no-repeat scroll left top");
	$("#asyimg").css("display", "block"); 
	}, function(){  
	$(this).css("background","none");      
	$("#asyimg").css("display", "none");
	});	
	
	$("table").tablesorter();
	
	$('table').find("tr:odd").css({background:"#F0F0F0"});
	
	
	//Set default open/close settings
	$('.acc_container').hide(); //Hide/close all containers
	$('.acc_trigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container
	 
	//On Click
	$('.acc_trigger').click(function(){
		if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
			$('.acc_trigger').removeClass('acc_active').next().slideUp(); //Remove all .acc_trigger classes and slide up the immediate next container
			$(this).toggleClass('acc_active').next().slideDown(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
		}
		return false; //Prevent the browser jump to the link anchor
	});
});


