
var ac;
var curTogglerIdx = -1;

var hilight = function(e) {
	 	$(this).toggleClass('hilight_tog');
}

var hilightTopItem = function() {
	this.toggleClass('highlight_menu_item');
}

var makeActive = function(el) {
		if (! $(this).hasClass('wf_here') )
		{
			var current = $('.wf_here');
			current.removeClass('wf_here');
			current.next().hide(400);
			$(this).addClass('wf_here');
			$(this).next().show(400);
		}
}

function initAcc() {
	// find the current toggler
	 
	 var tog = $('span.toggler');

	 jQuery.each(tog, function(i, elem) {
	 	 var element = $(elem);
	 	 if(element.hasClass('wf_here')) {
	 	    curTogglerIdx = i;
	 	 }	 	 
	 	 else {
	 	 	 element.next().hide();
	 	 }
		  element.bind('mouseover', hilight);	
		  element.bind('mouseout', hilight);	 
		  element.bind('click', makeActive);	 
	});
	

}

$(document).ready(function() {
	initAcc();
})
