jQuery(function( $ ){
	// Remove un-content <p>
	$("p:empty").remove();
	 
	$('a').click(function(){					  
	$('.mc_depth_2 li, .mc_depth_2 li ul').removeClass('active');
});
$(document).ready(function(){
						   $('.mc_depth_1, .mc_depth_2').find('a').click(menu);
						   function menu(){
							   $(this).parents('ul:first').find('a').removeClass('active').end().end().addClass('active');
							   $(this).parent('li').addClass('active').end().end().removeClass('active');
							   $(this).parents('ul').addClass('active').end().end().removeClass('active');	
						}
function trigger(data){var el=$('.mc_depth_1, .mc_depth_2').find('a[href$="'+data.id+'"]').get(0);menu.call(el);}
if(!window.location.hash){$('.mc_depth_1 a:first, .mc_depth_2 a:first').click();}});

/*jQuery(function( $ ){
	$('a.change_section').click(function(){
	$('.mc_depth_1, .mc_depth_2 li a').removeClass('active');
	var fragment = this.getAttribute('title');
	$('.mc_depth_1, .mc_depth_2 a[title=' + fragment + ']').toggleClass('active');
	});
});*/



jQuery(function( $ ){
	$('a').click(function(){					  
	$('.mc_depth_1 li a, .mc_depth_2 li a').removeClass('active');
	var fragment = this.getAttribute('href');
	//Extract only the last part of href (IIE uses the whole URL!)
	t = fragment.indexOf("#");
	if (t != -1) {
		fragment = fragment.substring(t, fragment.length);
	}
	// $('.mc_depth_1 li[class=' + fragment2 + '], .mc_depth_2 li[class=' + fragment2 + ']').toggleClass('active');
	$('.mc_depth_1 li a[href=' + fragment + '], .mc_depth_2 li a[href=' + fragment + ']').toggleClass('active');
	});
});

});
