Fox = {}; Fox.Strings = { add: function (object) { jQuery.extend(this, object); return this; } }; Fox.Options = { // Fox.Options.add('key', {...}); add: function (key, data) { var o = {}; o[key] = data; jQuery.extend(this, o); return this; }, // Return by copy: Fox.Options.get('key'); // Return by reference: Fox.Options['key']; get: function (key) { return jQuery.extend({}, this[key]); } }; (function () { Fox.Strings.add( { JCANCEL: "Cancelar", COM_FOXCONTACT_BROWSE_FILES: "Examinar archivos", COM_FOXCONTACT_FAILED: "Fallido", COM_FOXCONTACT_SUCCESS: "Correcto", COM_FOXCONTACT_NO_RESULTS_MATCH: "No se encontraron resultados", COM_FOXCONTACT_REMOVE_ALT: "Eliminar", JURI_ROOT: "" } ); Date.monthNames = ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"]; Date.dayNames = ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"]; Date.monthNumbers = { "Enero": 0, "Febrero": 1, "Marzo": 2, "Abril": 3, "Mayo": 4, "Junio": 5, "Julio": 6, "Agosto": 7, "Septiembre": 8, "Octubre": 9, "Noviembre": 10, "Diciembre": 11 }; // Calendar default options Fox.Options.add('calendar', { dayOfWeekStart: JSON.parse("1"), lang: 'dynamic', i18n: { dynamic: { months: Date.monthNames, dayOfWeek: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"] } } }); })(); jQuery(document).ready(function ($) { $('.fox-item-captcha-img-reload').each(function () { $(this).click(function () { var image = document.getElementById($(this).attr("data-captcha-img")); // Generates a unique id with an 8 digits fixed length var uniqueid = Math.floor(Math.random() * Math.pow(10, 8)).toString(); while (uniqueid.length < 8) { uniqueid = '0' + uniqueid; } // Update the image src image.src = image.src .replace(/uniqueid=[0-9]{8}/, "uniqueid=" + uniqueid) // non SEF case .replace(/uniqueid\/[0-9]{8}/, "uniqueid/" + uniqueid) // SEF case ; }).show(); }); }); /* Enable the following function if you want to enable autofocus to the first input of the first form in the page */ /* jQuery(document).ready(function ($) { $('.fox-form').find('input[type=text]').filter(':visible:first').focus(); }); */