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(document).ready(function() {
	
	$('.hide_info').hide();
	$('.show_info').click(function()
	{
	    _art = '#allocatcontent';
		
			$('.hide_info').show();
			$('.show_info').hide();
			$(_art).addClass('inview');
			$(_art).slideDown(250);
	}
	);
	
	$('.hide_info').click(function()
	{
	    _art = '#allocatcontent';
		
		if($(_art).hasClass('inview'))
		{
			$(_art).removeClass('inview');
			$(_art).slideUp(250);
			$('.hide_info').hide();
			$('.show_info').show();
		}
	}
	);

	
	$("ul.gallery li").hover(function() { //On hover...
		
		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
		
		//Set a background image(thumbOver) on the &lt;a&gt; tag 
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		//Fade the image to 0 
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide() //Hide the image after fade
		}); 
	} , function() { //on hover out...
		//Fade the image to 1 
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});
	
	
	
	
								
    jQuery('#mycarouselvert').jcarousel({
        vertical: true,
        scroll: 1,
		auto: 5,
		animation:1000,
		easing:'linear',
        wrap: 'both',
		initCallback: mycarousel_initCallback
    });
	
	
								
    jQuery('#mycarousel').jcarousel({
        auto: 5,
		scroll:1,
		animation:2500,
		easing:'linear',
        wrap: 'both',
        initCallback: mycarousel_initCallback,
		buttonNextEvent: 'mouseover',
		buttonPrevEvent: 'mouseover'
    });
	
	$("a[rel='gal']").colorbox();		
	$("a[rel='gal_right']").colorbox();		
	
});

