﻿$(document).ready(function(){

	$("#vLaunch").jcarousel({
        scroll: 1
    });
	$("#vClients").jcarousel({
		wrap: 'last',
        scroll: 1,
		auto: 5,
		initCallback: vci,
        buttonNext: null,
        buttonPrev: null
    });
	function vci(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();
	    });
	};
	$("#vClientsSub").jcarousel({
	    scroll: 1,
        easing: 'easeInOutExpo'
    });
    
	


    
/*======= SMOOTH SCROLL FOR ANCHORS =======*/
    
    $('#coffee').hover(function(){
        $('#cd').addClass('cdshow').animate({
            height: 75, width: 185}, 'normal', 'easeOutQuad');
    },function(){
        $('#cd').animate({
            width: 0, height: 0}, 'normal', 'easeOutQuad').removeClass('cdshow');
    
    });
    $('#coffee').click(function(){
        self.location = 'campaigns/coffee/index.php';
        $('#cd').animate({
            width: 0, height: 0}, 'normal', 'easeOutQuad').removeClass('cdshow');
    });
        
});
