// JavaScript Document by DistantClarity - distantclarity.com

	function mycarousel_initCallback(carousel) {
		jQuery('#arrowright').bind('click', function() {
			carousel.next();
			return false;
		});
	
		jQuery('#arrowleft').bind('click', function() {
			carousel.prev();
			return false;
		});
	};

	jQuery(document).ready(function() {
		jQuery('#slider').jcarousel({
        scroll: 1,
		initCallback: mycarousel_initCallback,
        buttonNextHTML: null,
        buttonPrevHTML: null
    	});

		jQuery('.slide img').css('opacity', 0.5);
		jQuery('#arrowleft').css('opacity', 0.3);
		jQuery('#arrowright').css('opacity', 0.3);

		jQuery('.slide img').hover(
			// hover state
			function() {
				jQuery(this).animate({opacity: "1.0"}, {queue:false, duration:250} );
			},
			// back to off
			function() {
				jQuery(this).animate({opacity: "0.5"}, {queue:false, duration:250} );
        });

		jQuery('#arrowright').hover(
			// hover state
			function() {
				$("#arrowright").animate({opacity: "1.0"}, {queue:false, duration:250} );
			},
			// back to off
			function() {
				$("#arrowright").animate({opacity: "0.3"}, {queue:false, duration:250} );
        });

		jQuery('#arrowleft').hover(
			// hover state
			function() {
				$("#arrowleft").animate({opacity: "1.0"}, {queue:false, duration:250} );
			},
			// back to off
			function() {
				$("#arrowleft").animate({opacity: "0.3"}, {queue:false, duration:250} );
        });

		$('#nav_main li').hover(function(){
			$(this).addClass('active');
			}, function() {
			$(this).removeClass('active');
		});

	});
