/* Author: Carlo Cruz
 * 		   me@carlocruz.com
 */



$(document).ready(function(){
	//$('select').customStyle();
	

	if($('ul.tabs').size() > 0)
	{
		var tabs = $("ul.tabs").tabs("div.panes div");
	}
	
	if($('.contactus form').size() > 0)
	{
		$("form").validate();
	}
	
	$('.steakclub #main .button').hide();
	$('.joinsteakclublarge').hover(function() {
		$('.steakclub #main .button').show()
	}, 	function() {
		$('.steakclub #main .button').hide()
	});
	
	$('.steakclub #main .button').hover(function() {
		$('.steakclub #main .button').show()
	}, 	function() {
		$('.steakclub #main .button').hide()
	});
	
	$('.shop #main .button').hide();
	$('.joinsteakclublarge').hover(function() {
		$('.shop #main .button').show()
	}, 	function() {
		$('.shop #main .button').hide()
	});
	
	$('.shop #main .button').hover(function() {
		$('.shop #main .button').show()
	}, 	function() {
		$('.shop #main .button').hide()
	});
	
	$('.carousel-feature .carousel-caption-hover').hide();
	
	$('#carousel div').hover(function() {
		$('.carousel-feature .carousel-caption-hover').hide();
	});
	
	$('#nav-cabsav').hover(function() {
		$('.carousel-feature .carousel-caption-hover').hide();
		if($('#cabsav').is(':hidden'))
		{
			$(this).children('.carousel-caption-hover').show();
		}
	}, function() {
		$('.carousel-feature .carousel-caption-hover').hide();
	});
	$('#nav-shiraz').hover(function() {
		$('.carousel-feature .carousel-caption-hover').hide();
		if($('#shiraz').is(':hidden'))
		{
			$(this).children('.carousel-caption-hover').show();
		}
	}, function() {
		$('.carousel-feature .carousel-caption-hover').hide();
	});

	$('#nav-rose').live('hover', function() {
		$('.carousel-feature .carousel-caption-hover').hide();
		if($('#rose').is(':hidden'))
		{
			$(this).children('.carousel-caption-hover').show();
		}
	}, function() {
		$('.carousel-feature .carousel-caption-hover').hide();
	});
	
    $("#carousel").featureCarousel({
        autoPlay: 0,
        topPadding: 0,
        sidePadding: 0,
        smallFeatureWidth: 0.6,
        smallFeatureHeight: 0.6,
        trackerIndividual: false,
        trackerSummation: false
    });
    
    $('.carousel-feature').click(function() {
    	$('.carousel-feature .carousel-caption-hover').hide();
    	var elemId = $(this).attr('id');
    	$('#main .wine').hide();
    	$('#'+elemId.substr(4)).show('slow');
    })


});
