flowplayer("videobox", "http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf", {

    // default controls with the same background color as the page background
    clip: {
        // Clip is an object, hence '{...}'
        autoPlay: false,
        autoBuffering: true
    },

    plugins: {
        controls: {
            play: true,
            volume: false,
            mute: false,
            time: true,
            stop: false,
            tooltips: false,
            playlist: false,
            fullscreen: false,
            fontColor: '#ffffff',
            timeFontColor: '#333333',
            autoHide: 'always',
            backgroundColor: '#000000',
            backgroundGradient: 'none',
            opacity: 0.7,
            scrubber: true,
            timeColor: '#FFFFFF',
            scrubberHeightRatio: 0.3,
            scrubberBarHeightRatio: 0.5,
            timeBgHeightRatio: 0.0,
            durationColor: '#FFFFFF',
            height: 25,
            sliderColor: '#222222',
            progressColor: '#999999',
            bufferColor: '#707070',
            timeBgColor: '#000000',
            buttonColor: '#111111',
            buttonOverColor: '#444444',
            tooltipColor: '#000000',
            tooltipTextColor: '#999999'
        }
    },

    // fiercy red background color with a little gradient and curving
    canvas: {
        backgroundColor: '#000',
        backgroundGradient: [0, 0],
        opacity: 0.5
    }
});

$(function() {
    $("#teamCamps").tabs({
        fx: {
            opacity: 'toggle'
        }
    });
    $("#teamResults").tabs({
        fx: {
            opacity: 'toggle'
        }
    });
});

$(function() {
    $("#mainFeature").tabs({
        fx: {
            opacity: 'toggle',
            duration: 'fast'
        }
    });
});

$(document).ready(function() {
    $("a#watchPreview").fancybox({
        'transitionIn': 'none',
        'transitionOut': 'none',
        'overlayColor': '#222'
    });
    $("a#watchVideo").fancybox({
        'transitionIn': 'none',
        'transitionOut': 'none',
        'overlayColor': '#222'
    });

    $("a#caseStudy").fancybox({
        'transitionIn': 'none',
        'transitionOut': 'none',
        'overlayColor': '#222',
        'overlayOpacity': 0.6
    });

    $("a#caseStudy2").fancybox({
        'transitionIn': 'none',
        'transitionOut': 'none',
        'overlayColor': '#222',
        'overlayOpacity': 0.6
    });

    $("a#caseStudy3").fancybox({
        'transitionIn': 'none',
        'transitionOut': 'none',
        'overlayColor': '#222',
        'overlayOpacity': 0.6
    });

    $("a#caseStudy4").fancybox({
        'transitionIn': 'none',
        'transitionOut': 'none',
        'overlayColor': '#222',
        'overlayOpacity': 0.6
    });

    $("a#shoppingCartBtn").fancybox({
        'transitionIn': 'none',
        'transitionOut': 'none',
        'overlayColor': '#000',
        'overlayOpacity': 0.1
    });

    $("a.gallery1").fancybox({
        'transitionIn': 'none',
        'transitionOut': 'none',
        'overlayColor': '#222',
        'overlayOpacity': 0.6,
        'hideOnOverlayClick': false
    });

    $("a.gallery1").click(function() {
        $('#videobox_api').hide();
    });

    $("a#fancybox-close").click(function() {
        $('#videobox_api').show();
    });
});

$().ready(function() {
    var container = $('div.error');
    // validate the form when it is submitted
    $("#example1").validate({
        errorContainer: container,
        errorLabelContainer: $("ol", container),
        wrapper: 'li',
        meta: "validate"
    });

    var container = $('div.error');
    // validate the form when it is submitted
    $("#programSignupForm").validate({
        errorContainer: container,
        errorLabelContainer: $("ol", container),
        wrapper: 'li',
        meta: "validate"
    });
});

$(function() {
    $("#datepickerbegin").datepicker();
    $("#datepickerend").datepicker();
});

