$(document).ready(function() {
	$('.next_page_link').hover(function() {
		$(this).css('text-decoration','underline');
		$(this).css('cursor','pointer');
	    },
	    function() {
		$(this).css('text-decoration','none');
		$(this).css('cursor','auto');
	    });
	$('.next_page_link').click(function() {
		$('#projectform #page').val($(this).attr('next_page'));
		$('#projectform').submit();
	    });

	$('.prev_page_link').hover(function() {
		$(this).css('text-decoration','underline');
		$(this).css('cursor','pointer');
	    },
	    function() {
		$(this).css('text-decoration','none');
		$(this).css('cursor','auto');
	    });
	$('.prev_page_link').click(function() {
		$('#projectform #page').val($(this).attr('previous_page'));
		$('#projectform').submit();
	    });
	$('.page_list_item').click(function() {
		if ($('#projectform #page').val() != $(this).attr('thispage')){
		    $('#projectform #page').val($(this).attr('thispage'));
		    $('#projectform').submit();
		}
		return false;
	    });
    });
