﻿function AjustarPagina() {
    var nodeList = document.getElementsByTagName("p");

    var defaultPoweredByLogo = null;

    for (i = 0; i < nodeList.length; i++) {
        if (nodeList[i].getAttribute("id") == "ctl00_sitefinityLogo") {
            defaultPoweredByLogo = nodeList[i];
            break;
        }
    }

    if (defaultPoweredByLogo != null) {
        var filler = document.createElement("span");
        filler.style.display = "none";

        var parent = defaultPoweredByLogo.parentNode;
        parent.replaceChild(filler, defaultPoweredByLogo);
    }
}
function Fonte() {
    Cufon.set('fontFamily', 'Arial Rounded MT Bold').replace('h1')('h2')('h3')('h4');
    Cufon.now();
}

$(document).ready(function() {
    $('textarea').addClass("idleField");
    $('select').addClass("idleField");
    $('input[type="checkbox"]').addClass("idleField");
    $('input[type="text"]').addClass("idleField");
    $('input[type="password"]').addClass("idleField");

    $('input[type="text"]').focus(function() {
        $(this).removeClass("idleField").addClass("focusField");
        if (this.value != this.defaultValue) {
            this.select();
        }
    });
    $('input[type="password"]').focus(function() {
        $(this).removeClass("idleField").addClass("focusField");
        if (this.value != this.defaultValue) {
            this.select();
        }
    });
    $('textarea').focus(function() {
        $(this).removeClass("idleField").addClass("focusField");
        if (this.value != this.defaultValue) {
            this.select();
        }
    });
    $('select').focus(function() {
        $(this).removeClass("idleField").addClass("focusField");
        //  if (this.value != this.defaultValue) {
        //     this.select();
        //}
    });
    $('input[type="text"]').blur(function() {
        $(this).removeClass("focusField").addClass("idleField");
    });
    $('input[type="password"]').blur(function() {
        $(this).removeClass("focusField").addClass("idleField");
    });
    $('textarea').blur(function() {
        $(this).removeClass("focusField").addClass("idleField");
    });
    $('select').blur(function() {
        $(this).removeClass("focusField").addClass("idleField");
    });
});