﻿// JavaScript Document
$(document).ready(function() {
    $('label.insideTextarea').labelInsideTextarea();
    $("#body p:eq(0)").each(function() {
        var t = $(this).text();
        var f = t.substring(0, 1);
        var l = t.length;
        if ($.browser.opera)
            t = "<p class='operap'>" + t + "</p>";
        else t = "<p class='firstp'>" + t + "</p>";
        $(this).hide().replaceWith(t).show();
    });

    $(".partnerScroller").jCarouselLite({
        auto: 40,
        speed: 4000,
        easing: 'linear',
        visible: 5
    });

});

jQuery.fn.labelInsideTextarea = function() {
    return this.each(function() {
        var $field = $('#' + $(this).attr('for'));
        var $label = $(this);
        if ($field) {
            if ($field.val()) {
                $label.hide();
            }
            $field.focus(function() {
                $label.hide();
            }).blur(function() {
                if (!$(this).val()) $label.show();
            });
        }
    });
};

