﻿/// <reference path="jquery-1.4.1.js" />
jQuery.fadeToNextBanner = function (i) {
    if (jQuery(".banner-nav-overlay").length == 0)
        return;
    if (jQuery(".banner-nav-overlay:visible").length > 0)
        jQuery(".banner-nav-overlay:visible").fadeOut(1500, function () { setTimeout("jQuery.fadeToNextBanner(" + i + ");", 500) });
    else {
        if (i >= jQuery(".banner-nav-overlay").length)
            i = 0;
        jQuery(".banner-nav-overlay:eq(" + i + ")").fadeIn(1000, function () { setTimeout("jQuery.fadeToNextBanner(" + (i + 1) + ")", 500); });
    }

};
$(document).ready(function () {
    $('#coda-slider-5').codaSlider({
        dynamicArrows: false,
        dynamicTabs: false
    });
    setTimeout("jQuery.fadeToNextBanner(0)", 2000);



    $(".text-box input,.text-area textarea").each(function () {
        var val = $(this).val();
        if (val.length > 0) {
            $(this).focus(function () { if($(this).val() == val) $(this).val(""); });
            $(this).blur(function () { if ($(this).val().length == 0) $(this).val(val); });
        }
    });
});

