function sectionMenu() {
	
	var current = window.location.toString();
	var href = $('#section-menu ul ul li').parent().parent().find('a').attr('href');
	var pos = current.indexOf(href);
	
	// doesn't look like we're in this section so hide the menu
	if (pos == -1) {
		$('#section-menu ul ul').hide();
	}
	
	if($('#section-menu ul ul')) {
		$('#section-menu ul ul li').parent().parent().append('<span title="click to expand">&raquo;</span>');
	}
	$('#section-menu li span').click(
		function() {
			//console.log('oh herro')
			var checkElement = $(this).prev();
			if((checkElement.is('ul ul')) && (checkElement.is(':visible'))) {
				checkElement.slideUp('normal');
				return false;
			}
			if((checkElement.is('ul ul')) && (!checkElement.is(':visible'))) {
				$('#section-menu ul ul:visible').slideUp('normal');
				checkElement.slideDown('normal');
				return false;
			}
		}
	);
}
function search() {
	//global vars  
 
	
}
$(document).ready(function() {
	
	sectionMenu();
	
	var searchBoxes = $(".text");  
	var searchBox1 = $("#mini-search");
	var searchBox1Default = "Search bathasu.com...";

	//Effects for both searchbox  
	searchBoxes.focus(function(e){  
	    $(this).addClass("active");  
	});  
	searchBoxes.blur(function(e){  
	    $(this).removeClass("active");  
	}); 
	//Searchbox2 show/hide default text if needed  
	searchBox1.focus(function(){  
	    if($(this).attr("value") == searchBox1Default) $(this).attr("value", "");  
	});  
	searchBox1.blur(function(){  
	    if($(this).attr("value") == "") $(this).attr("value", searchBox1Default);  
	});
	
});
