﻿$(document).ready(function() {

    $(".box").hover(function() {
        $(this).addClass("visible")
    }, function() {
        $(this).removeClass("visible")
    });

    $(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");
        });
    });
});


function OpenCidades() {
    document.getElementById('cidadessp').style.display = 'inline';
    document.getElementById('lnkFechar').style.display = 'inline';
    document.getElementById('lnkExibir').style.display = 'none';
}
function CloseCidades() {
    document.getElementById('cidadessp').style.display = 'none';
    document.getElementById('lnkFechar').style.display = 'none';
    document.getElementById('lnkExibir').style.display = 'inline';
}
