I'm trying to figure out how i can set the slider to stop at the last item. Basically the slider still slides to left even though their aren't anymore items to follow. Here is the link to my site.

http://federalland.ph/

The slider is located below the video presentation. Here is my code

Code:
<script type="text/javascript">
$(document).ready(function(){
    
	var $item = $('div.slider_post'),
	    visible = 1,
		index = 0,
		endIndex = ( $item.length / visible ) -1
		
	$('input#slide_left').click(function(){
	    if(index < endIndex ){
		    index++;
			$item.animate({'left':'-=235px'});
		}
	});
		
	$('input#slide_right').click(function(){
	    if(index > 0){
		    index--;
			$item.animate({'left':'+=235px'});
		    }
	 });
});
</script>