/* generated javascript */
var skin = 'monobook';
var stylepath = '/skins';

/* MediaWiki:Common.js */
/* Cualquier código JavaScript escrito aquí se cargará para todos los usuarios en cada carga de página. */

/* Botones adicionales */
 
 if (typeof(mwCustomEditButtons) != 'undefined') {

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/inciclopedia/images/3/35/Bot%C3%B3n_Super%C3%ADndice.png",
     "speedTip": "Superíndice",
     "tagOpen": "<sup>",
     "tagClose": "</sup>",
     "sampleText": "superíndice"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/inciclopedia/images/b/bd/Bot%C3%B3n_Sub%C3%ADndice.png",
     "speedTip": "Subíndice",
     "tagOpen": "<sub>",
     "tagClose": "</sub>",
     "sampleText": "subíndice"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/inciclopedia/images/8/83/Bot%C3%B3n_C%C3%B3digofuente.png",
     "speedTip": "Código fuente",
     "tagOpen": "<code><nowiki>",
     "tagClose": "</"+ "nowiki></code>",
     "sampleText": "código fuente"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/inciclopedia/images/4/49/Bot%C3%B3n_plantilla.png",
     "speedTip": "Plantillas",
     "tagOpen": "{{",
     "tagClose": "}}",
     "sampleText": "plantilla"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/inciclopedia/images/4/43/Enlace_a_usuario.png",
     "speedTip": "Enlace a usuario",
     "tagOpen": "[[user:",
     "tagClose": "|]]",
     "sampleText": "usuario"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/inciclopedia/images/6/64/Bot%C3%B3n_categor%C3%ADa.png",
     "speedTip": "Categoría",
     "tagOpen": "[[Categoría:",
     "tagClose": "]]",
     "sampleText": "Nombre categoría"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/inciclopedia/images/7/7a/Bot%C3%B3n_tablas.png",
     "speedTip": "Insertar tabla",
     "tagOpen": '{| {' + '{tablaB}}\n|-\n',
     "tagClose": "\n|}",
     "sampleText": "!| encabezado 1\n!| encabezado 2\n!| encabezado 3\n|-\n|| dato 1\n|| dato 2\n|| dato 3\n|-\n|| dato 4\n|| dato 5\n|| dato 6"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.wikibello.cl/images/e/e9/Button_r.png",
     "speedTip": "Redirección",
     "tagOpen": "#REDIRECT [[",
     "tagClose": "]]",
     "sampleText": "Página"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.wikibello.cl/images/a/ac/Button_ref.PNG",
     "speedTip": "Referencia",
     "tagOpen": "<ref>",
     "tagClose": "</ref>",
     "sampleText": "Link o cita"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.wikibello.cl/images/b/b2/Button_ref2.PNG",
     "speedTip": "Insertar referencias (Usar al final del artículo)",
     "tagOpen": "<references/>",
     "tagClose": "",
     "sampleText": ""};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.wikibello.cl/images/1/11/Button_profesor.PNG",
     "speedTip": "Insertar plantilla profesor",
     "tagOpen": "{{Profesor2\n",
     "tagClose": "}}",
     "sampleText": "| Imagen       = \n| Nombre       = \n| Asignatura   = \n| Departamento = \n| Desde        = \n| Sobrenombre  = \n| Situación    = \n"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.wikibello.cl/images/1/1f/Button_autor.PNG",
     "speedTip": "Insertar plantilla autor",
     "tagOpen": "{{Autor\n",
     "tagClose": "}}",
     "sampleText": "|Imagen                = \n|Nombre                = \n|Nacionalidad          = \n|Nacimiento            = \n|Defunción             = \n|Intereses principales = \n|Influencias           = \n|Influenció a          = \n|Ideas notables        = \n|Universidad           = \n"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.wikibello.cl/images/5/50/Button_ayud.PNG",
     "speedTip": "Insertar plantilla ayudante",
     "tagOpen": "{{Ayudante\n",
     "tagClose": "}}",
     "sampleText": "| Imagen       = \n| Nombre       = \n| Asignatura   = \n| Departamento = \n| Ayudante de  = \n| Desde        = \n| Sobrenombre  = \n| Situación    = \n"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.wikibello.cl/images/3/37/Button_univ.PNG",
     "speedTip": "Insertar plantilla universidad",
     "tagOpen": "{{Universidad\n",
     "tagClose": "}}",
     "sampleText": "|nombre               = \n|Imagen               = \n|lema                 = \n|fundación            = \n|tipo                 = \n|rector               = \n|estudiantes          = \n|ciudad               = \n|país                 = \n|afiliación           = \n|dirección            = \n|teléfono             = \n|sitio web            = \n"};
 }

/** Dynamic Navigation Bars (experimental) *************************************
 *
 *  Description: See [[Wikipedia:NavFrame]].
 *  Maintainers: UNMAINTAINED
 */
 
// set up the words in your language
var NavigationBarHide = '[' + collapseCaption + ']';
var NavigationBarShow = '[' + expandCaption + ']';
 
// shows and hides content and picture (if available) of navigation bars
// Parameters:
//     indexNavigationBar: the index of navigation bar to be toggled
function toggleNavigationBar(indexNavigationBar)
{
    var NavToggle = document.getElementById("NavToggle" + indexNavigationBar);
    var NavFrame = document.getElementById("NavFrame" + indexNavigationBar);
 
    if (!NavFrame || !NavToggle) {
        return false;
    }
 
    // if shown now
    if (NavToggle.firstChild.data == NavigationBarHide) {
        for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) {
            if (hasClass(NavChild, 'NavContent') || hasClass(NavChild, 'NavPic')) {
                NavChild.style.display = 'none';
            }
        }
    NavToggle.firstChild.data = NavigationBarShow;
 
    // if hidden now
    } else if (NavToggle.firstChild.data == NavigationBarShow) {
        for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) {
            if (hasClass(NavChild, 'NavContent') || hasClass(NavChild, 'NavPic')) {
                NavChild.style.display = 'block';
            }
        }
        NavToggle.firstChild.data = NavigationBarHide;
    }
}
 
// adds show/hide-button to navigation bars
function createNavigationBarToggleButton()
{
    var indexNavigationBar = 0;
    // iterate over all < div >-elements 
    var divs = document.getElementsByTagName("div");
    for (var i = 0; NavFrame = divs[i]; i++) {
        // if found a navigation bar
        if (hasClass(NavFrame, "NavFrame")) {
 
            indexNavigationBar++;
            var NavToggle = document.createElement("a");
            NavToggle.className = 'NavToggle';
            NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar);
            NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');');
 
            var isCollapsed = hasClass( NavFrame, "collapsed" );
            /*
             * Check if any children are already hidden.  This loop is here for backwards compatibility:
             * the old way of making NavFrames start out collapsed was to manually add style="display:none"
             * to all the NavPic/NavContent elements.  Since this was bad for accessibility (no way to make
             * the content visible without JavaScript support), the new recommended way is to add the class
             * "collapsed" to the NavFrame itself, just like with collapsible tables.
             */
            for (var NavChild = NavFrame.firstChild; NavChild != null && !isCollapsed; NavChild = NavChild.nextSibling) {
                if ( hasClass( NavChild, 'NavPic' ) || hasClass( NavChild, 'NavContent' ) ) {
                    if ( NavChild.style.display == 'none' ) {
                        isCollapsed = true;
                    }
                }
            }
            if (isCollapsed) {
                for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) {
                    if ( hasClass( NavChild, 'NavPic' ) || hasClass( NavChild, 'NavContent' ) ) {
                        NavChild.style.display = 'none';
                    }
                }
            }
            var NavToggleText = document.createTextNode(isCollapsed ? NavigationBarShow : NavigationBarHide);
            NavToggle.appendChild(NavToggleText);
 
            // Find the NavHead and attach the toggle link (Must be this complicated because Moz's firstChild handling is borked)
            for(var j=0; j < NavFrame.childNodes.length; j++) {
                if (hasClass(NavFrame.childNodes[j], "NavHead")) {
                    NavFrame.childNodes[j].appendChild(NavToggle);
                }
            }
            NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);
        }
    }
}
 
addOnloadHook( createNavigationBarToggleButton );

/* MediaWiki:Monobook.js */
/* El código JavaScript que se ponga aquí será cargado por los usuarios de la piel MonoBook */