
function mycarousel_initCallback(carousel)
{
    // 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() {
    jQuery('#carousel').jcarousel({
        auto: 5,
    	wrap: 'circular',
        initCallback: mycarousel_initCallback
    });
});


$(document).ready(function(){
	
	$('.rotator').cycle({
		fx: 'fade',
		timeout:7000
	});

							
    $('.slideshow').cycle({
		fx: 'fade',
		random: 1,
		cleartypeNoBg:   false,
		timeout:8000
	});
	
	 /*--tabs--*/
							 
	$('#splashContent').tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 10000, true);

	$('#splashContent').bind('tabsselect', function(event, ui) {
	
			//Determine the currently selected class
			var tabSelected = null;			
			switch (ui.tab.hash) {
			case '#slide-1': case '#slide-2': case '#slide-3': 
				tabSelected = 'One';
				break;
			case '#slide-4': case '#slide-5': case '#slide-6': 
				tabSelected = 'Two';
				break;
			case '#slide-7': case '#slide-8': case '#slide-9': 
				tabSelected = 'Three';
				break;
			case '#slide-10': case '#slide-11': case '#slide-12': 
				tabSelected = 'Four';
				break;
			}
	
			if (tabSelected != null) {
				//Highlight the root li anchor
				$(ui.tab).parents('li').not('.tabSelect').children('a:first').addClass('' + tabSelected);
				
				//Remove the highlight from any others
				var tabs = ['One','Two','Three','Four'];
				for(var i in tabs) {
					if (tabs[i] == tabSelected) {
						$(".splashBtn" + tabs[i]).addClass("ui-state-active" + tabs[i]);
					} else {
						$(".splashBtn" + tabs[i]).removeClass("ui-state-active" + tabs[i]);
					}
				}
			}
	
		});
	
	
	
	
	/*--Fade--*/
		
	$(".quoteOpen").hover( 
		function () {
		  $("> .quoteUp", this).fadeIn('slow');
		},
		function () {
		  $("> .quoteUp", this).fadeOut('fast');
		}
	); 
		
  });
  
	
	
	
