var sliderHeight = "110px";

 
function bindSlidingContent(ID) {
	$(document).ready(function(){
	    $(ID).each(function () {
	                var current = $(this);
	                current.attr("box_h", current.height());
	            }
	     );
	
	 

	    $(ID).css("height", sliderHeight);
	
	    //$(".slider_menu").html('<a href="javascript:void">Read More</a>');
	
	    //$(".slider_menu a").click(function() { openSlider() })
	//    $(ID).bind("mouseenter",function() { openSlider(ID) })
	//    $(ID).bind("mouseleave",function() { closeSlider(ID) })
	
    //   $(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});  
	
	         //Caption Sliding (Partially Hidden to Visible)  
	         $(ID).hover(function(){  
	        	 openSlider(ID);
	             //$(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});  
	         }, function() {  
	        	 closeSlider(ID);
	             //$(".cover", this).stop().animate({top:'220px'},{queue:false,duration:160});  
	         });  	    
	});
}
 

function openSlider(ID)

{

    var open_height = $(ID).attr("box_h") + "px";
    
    $(ID).stop().animate({"height": open_height}, {queue:false,duration: "slow" });

    //$(".slider_menu").html('<a href="javascript:void">Close</a>');

    //$(".slider_menu a").bind("mouseenter",function() { closeSlider() })

}


function closeSlider(ID)

{

    $(ID).stop().animate({"height": sliderHeight}, {queue:false,duration: "slow" });

    //$(".slider_menu").html('<a href="javascript:void">Read More</a>');

    //$(".slider_menu a").click(function() { openSlider() })
}

var n = 0;
$("div.enterleave").bind("mouseenter",function(){
  $("p:first",this).text("mouse enter");
  $("p:last",this).text(++n);
}).bind("mouseleave",function(){
  $("p:first",this).text("mouse leave");
});


