/*------------------------------------------------------------------
- Formattazione date (standard e formato AS400 tipo yyyyMMdd)
------------------------------------------------------------------*/
function dtStandard() {
    $.datepicker.setDefaults($.datepicker.regional["it"]);
    $(".datepicker").datepicker({
        //showOtherMonths: true,
        //selectOtherMonths: true,
        showButtonPanel: true,
        changeMonth: true,
        changeYear: true,
        dateFormat: "dd/mm/yy"
    });
}
function dtAS400() {
    $.datepicker.setDefaults($.datepicker.regional["it"]);
    $(".datPickAS400").datepicker({
        //showOtherMonths: true,
        //selectOtherMonths: true,
        showButtonPanel: true,
        changeMonth: true,
        changeYear: true,
        dateFormat: "yymmdd"
    });
}
function setBootSwith() {
    $(".bootSwitch").bootstrapSwitch();
    //$('input[name="my-checkbox"]').bootstrapSwitch('state', true, true);
}

/*------------------------------------------------------------------
- Chiamate al DOM pagina pronta jQuery
------------------------------------------------------------------*/
$(function () {
    dtStandard();
    dtAS400();
    setBootSwith();
});
// oggetto da legare all'update parziale ajax di asp.net
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
    // re-bind your jQuery events here
    $(function () {
        dtStandard();
        dtAS400();
        setBootSwith();
    });
});