$(document).ready(function () { 

function getLeaf(url) {
var splited=url.split('?');// remove all the parameter from url
url=splited[0];
return url.substring(url.lastIndexOf("/")+1);// return file name without domain and path
}

jQuery.fn.extend({
 enter: function() {//plugins creation
     return this.each(function() {
       var pth = $(this).find("img")[0];
       var pth2 = $(this).find("img")[2];
      //alert($(this).children().attr("href"));

      
       
               $(this).hover(function(){
	            	
            	   		if ($(this).attr("class") == "top" || $(this).attr("class") == "top top_double") {
            	   			$(pth).attr("src",pth.src.replace(/top.png/g, 'top-open.png'));
            	   			$(pth2).attr("src",pth2.src.replace(/bottom.png/g, 'bottom-open.png'));// mouse over Image
            	   		}
		           },function(){
		        	   if ($(this).attr("class") == "top" || $(this).attr("class") == "top top_double") {
		        		   $(pth).attr("src",pth.src.replace(/top-open.png/g, 'top.png'));
		        		   $(pth2).attr("src",pth2.src.replace(/bottom-open.png/g, 'bottom.png'));// mouse out image
		        	   }
		           });
	               
       
               });
}
});

$(function(){  // Document is ready
 $("#left_menu ul li").enter();// call the function
});
});
