var pos=0;
$(document).ready(function(){
	$("#prevexample").click(function(){		
		if($("#example-"+(pos-1)).is("td"))
		{
		pos--;		
		$("#example-"+(pos)).show();
		$("#example-"+(pos+4)).hide();		
		}
		if($("#example-"+(pos-1)).is("td"))
		{
			$(this).css("cursor","pointer");
		}
		else
		{
			$(this).css("cursor","default");
		}
		return false;

	});
	$("#prevexample").mouseover(function(){		
		if($("#example-"+(pos-1)).is("td"))
		{
			$(this).css("cursor","pointer");
		}
		else
		{
			$(this).css("cursor","default");
		}
	});
	$("#nextexample").mouseover(function(){
		if($("#example-"+(pos+4)).is("td"))		
		{
			$(this).css("cursor","pointer");
		}
		else
		{
			$(this).css("cursor","default");
		}
	});
	$("#nextexample").click(function(){		
		
		if($("#example-"+(pos+4)).is("td"))
		{
		pos++;		
		$("#example-"+(pos-1)).hide();
		$("#example-"+(pos+3)).show();
		}
				if($("#example-"+(pos+4)).is("td"))		
		{
			$(this).css("cursor","pointer");
		}
		else
		{
			$(this).css("cursor","default");
		}

		return false;
	});
});
