 $(function(){
   var path = window.location.pathname.substring(1);
	 var filename = window.location.pathname.substring(url.lastIndexOf('/')+1);
	 var project = filename.substring(0,7)
	 if ( path ) {
     $('#menu a[href$="' + path + '"]').attr('class', 'selected');
	 } ;
	 if ( project == 'project' ) {
     $('#menu a[href$="test/work.php"]').attr('class', 'selected');
	 }
 });

var url = window.location.pathname;
var filename = url.substring(url.lastIndexOf('/')+1);
