$(document).ready(function() {


    /* Tabs en formularios 
    ----------------------------------*/
    $("#tabs").tabs();

    /* Datepicker en formularios 
    ----------------------------------*/
    $('.datepicker').datepicker({
        altFormat: 'dd-mm-yy',
        changeMonth: true,
        changeYear: true
    });



    /* Mensajes del sistema 
    ----------------------------------*/
    $(".hideable").append("<div class='close'></div>").css("position", "relative");
    $(".close").click(function() {
        $(this).hide();
        $(this).parent().slideUp(300);
    });


    /*slider*/
    lastBlock = $("#courant");
    maxWidth = 722;
    minWidth = 51;
    $(".slide").click(
		      function() {
		          $(lastBlock).animate({ width: minWidth + "px" }, { queue: false, duration: 800 });
		          $(this).animate({ width: maxWidth + "px" }, { queue: false, duration: 800 });
		          lastBlock = this;
		      }
		    );

    /* Fancybox iframes
    ----------------------------*/
    $("a#webmail").fancybox({
        'width': '75%',
        'height': '75%',
        'autoScale': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'type': 'iframe'
    });
    $("a#tvirtual").fancybox({
        'width': 800,
        'height': 750,
        'autoScale': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'type': 'iframe'
    });
    $("a#speedtest").fancybox({
        'width': '80%',
        'height': '80%',
        'autoScale': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'type': 'iframe'
    });
    $("a#sms").fancybox({
        'width': '30%',
        'height': '40%',
        'autoScale': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'type': 'iframe'
    });
    $("a[rel=v123]").fancybox({

        'padding': 0,
        'autoScale': false,
        'type': 'swf',
        'transitionIn': 'none',
        'transitionOut': 'none'

    })
    $("a[rel=tcreel]").fancybox({

        'padding': 0,
        'autoScale': false,
        'type': 'swf',
        'transitionIn': 'none',
        'transitionOut': 'none'

    })

    /* Alternar fondo en las filas 
    ----------------------------------*/
    $("tr:odd:not(thead:first-child)").addClass("row-odd");

});


