﻿jQuery(function ($) {
   var path = document.location.href;
    path = path.substring(path.lastIndexOf("/")+1,path.length);
    $("ul li a").each(function(){
    	if($(this).attr("href") == path){
    		$(this).addClass("active");
    		if($(this).text().length>38) $(this).attr("class","active2");
    		return false;
    	}
    })
    $('a[href='+path+']').parent().parent().show();
    $('a[href='+path+']').next('ul .menu-sub').show('slow');
});