﻿function dateBox() {
    $.datepicker.regional['es-AR'] = {
        monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',
		'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
        monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun',
		'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
        dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
        dayNamesShort: ['Dom', 'Lun', 'Mar', 'Mié', 'Juv', 'Vie', 'Sáb'],
        dayNamesMin: ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sá'],
        dateFormat: 'dd/mm/yy', firstDay: 0,
        renderer: $.datepicker.defaultRenderer,
        prevText: '', prevStatus: '',
        prevJumpText: '', prevJumpStatus: '',
        nextText: '', nextStatus: '',
        nextJumpText: '', nextJumpStatus: '',
        currentText: 'Hoy', currentStatus: '',
        todayText: 'Hoy', todayStatus: '',
        clearText: 'Limpiar', clearStatus: '',
        closeText: 'Cerrar', closeStatus: '',
        yearStatus: '', monthStatus: '',
        weekText: 'Sm', weekStatus: '',
        dayStatus: 'D, M d', defaultStatus: '',
        isRTL: false
    };
    $.datepicker.setDefaults($.datepicker.regional['es-AR']);
    setDatepicker();
    loadSlide();
};

function setDatepicker() {
    $(function () {
        $('.datepicker').datepicker();
    });
};

function hideDiv(idDivOcult, idDivMostrar) {
    div = document.getElementById(idDivOcult);
    div.style.display = 'none';
    div = document.getElementById(idDivMostrar);
    div.style.display = 'block';
};

function hideshowDiv(idDiv) {
    div = document.getElementById(idDiv);
    div.style.display = div.style.display == 'none' ? 'block' : 'none';
};

function showFancy() {
    $(function () {
        $("a[rel=example_group]").fancybox({
            'transitionIn': 'none',
            'transitionOut': 'none',
            'titlePosition': 'over',
            'titleFormat': function (title, currentArray, currentIndex, currentOpts) {
                return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
            }
        });
    });
};

function showFancyPopUp() {

    $("#lnkFancy").fancybox({
        'scrolling': 'no',
        'titleShow': false,
        'onClosed': function () {
            $("#login_error").hide();
        }
    });
};

function loadSlide() {
    $(function () {
        $('#slider').nivoSlider({ effect: 'fade', controlNav: false, directionNav: false, animSpeed: 500 });
    });
    
};
