$(function(){
    $("#footer p").css("width", 678);
    $(".ie6 #footer p").attr("style", "width:660px");	

		// events
		var currentImg = 1;
		var totalF = $('.list ul li').length;

		$('#paginate').html(currentImg+'/'+totalF);

		$('#list_next').click(function(){
			if (currentImg < totalF) {
				currentImg++
				$('#paginate').html(currentImg+'/'+totalF);
			};
		  });

		$('#list_prev').click(function(){
			if (currentImg <= totalF && currentImg != 1) {
				currentImg--;
				$('#paginate').html(currentImg+'/'+totalF);
			}
		});

		$(".list").jCarouselLite({
		  btnNext: "#list_next",
		  btnPrev: "#list_prev",
		  visible: 1,
		  circular: false,
			afterEnd: function(button) {
		    $('#paginate').html(currentImg+'/'+totalF);
		  }
		});

		// Menu
		$("#menu img").each(function(index) {
			$(new Image()).attr("src", $(this).attr("src").replace("_on", "").replace(".jpg", "_on.jpg"));
		});
		$("#menu img").hover(function() {
			$(this).attr("src", $(this).attr("src").replace("_on", "").replace(".jpg", "_on.jpg"));
		}, function() {
			$(this).attr("src", $(this).attr("src").replace("_on", ""));
		});
});
