////////////////////////////
// jQuery Functions v.1.1 //
////////////////////////////

/* css styling */
$(document).ready(function(){
	$('.boxCaption').css({opacity:'0.8'});
	$('#lightbox-nav-btnPrev').css({zoom:'1'});	
	$('#lightbox-nav-btnNext').css({zoom:'1'});	
});

/* carousel and lightbox */
jQuery(document).ready(function() {
	jQuery("#homeCarousel").jcarousel({
		auto: 5,
		wrap: "last",
		scroll: 2,
		initCallback: mycarousel_initCallback
	});
	jQuery("#pageCarousel").jcarousel({
		auto: 5,
		wrap: 'last',
		scroll: 4,
		initCallback: mycarousel_initCallback
	});
	jQuery("#video-2").jcarousel({
		auto: 5,
		wrap: 'last',
		scroll: 4,
		initCallback: mycarousel_initCallback
	});
	jQuery("#video-3").jcarousel({
		auto: 5,
		wrap: 'last',
		scroll: 4,
		initCallback: mycarousel_initCallback
	});
	$('#homeCarousel li').hover(function(){
		$(".boxCaption", this).show();
		$(".boxCaption", this).stop().animate({
			top:'185px'
		},{
			queue:false, 
			duration:300
		});
	}, function() {
		$(".boxCaption", this).stop().animate({
			top:'300px'
		},{
			queue:false, 
			duration:300
		});
	});
	/*
	$(".colorbox").colorbox();
	$(".youtube").colorbox({
		iframe:true, 
		width:650, 
		height:550
	});
	$("a[rel='gallery']").colorbox({transition:"fade"});	
	$(".iframe").colorbox({
		iframe:true,
		width:"80%", 
		height:"80%"
	});	
	$(".image").colorbox({
	});*/		
});

/* carousel function */
function mycarousel_initCallback(carousel){
	carousel.buttonNext.bind('click', function() {
		carousel.startAuto(0);
	});
	carousel.buttonPrev.bind('click', function() {
		carousel.startAuto(0);
	});
	carousel.clip.hover(function() {
		carousel.stopAuto();
	}, function() {
		carousel.startAuto();
	});
};