if (typeof Fox == 'undefined') { 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: "取消", COM_FOXCONTACT_BROWSE_FILES: "浏览文件", COM_FOXCONTACT_FAILED: "已失败", COM_FOXCONTACT_SUCCESS: "已成功", COM_FOXCONTACT_NO_RESULTS_MATCH: "No matching results found", COM_FOXCONTACT_MULTIPLE_JQUERY: "Multiple jQuery inclusion detected, please disable any extra instance.", COM_FOXCONTACT_READ_MORE: "Read more...", COM_FOXCONTACT_REMOVE_ALT: "删除", COM_FOXCONTACT_REMOVE_TITLE: "删除该文件", JURI_ROOT: "" } ); Date.monthNames = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"]; Date.dayNames = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; Date.monthNumbers = { "1月": 0, "2月": 1, "3月": 2, "4月": 3, "5月": 4, "6月": 5, "7月": 6, "8月": 7, "9月": 8, "10月": 9, "11月": 10, "12月": 11 }; // Calendar default options Fox.Options.add('calendar', { dayOfWeekStart: JSON.parse("0"), lang: 'dynamic', step: 60, i18n: { dynamic: { months: Date.monthNames, dayOfWeek: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"] } } }); })(); 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); }).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(); }); */