jQuery(document).ready(function() {

	/* hide navigation if empty */
	if($(".navigation .alignleft").text() == "" && $(".navigation .alignright").text() == ""){ $(".navigation").remove(); }
	
	/* hover #submit */
	$("#submit").addClass("submit");
	$("#submit").hover(
		function() {
			$(this).removeClass("submit");
			$(this).addClass("submitOv");
		},
		function() {
			$(this).removeClass("submitOv");
			$(this).addClass("submit");
		}
	);

	/* add classes */
	$("#menuMain LI:first-child").addClass("first");
	$("#menuMain LI:last-child").addClass("last");
	$(".menuFooter LI:first-child").addClass("first");

	/**/
	function mycarousel_initCallback(carousel) {
		// Disable autoscrolling if the user clicks the prev or next button.
		/*carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});
		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});*/
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	};
	jQuery('#slideshow').jcarousel({
		auto: 3,
		wrap: 'last',
		scroll: 1,
		initCallback: mycarousel_initCallback
	});

});
