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 = ["一月", "二月", "三月", "四月", "五", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]; Date.dayNames = ["週日", "週一", "週二", "週三", "週四", "週五", "週六"]; Date.monthNumbers = { "一月": 0, "二月": 1, "三月": 2, "四月": 3, "五": 4, "六月": 5, "七月": 6, "八月": 7, "九月": 8, "十月": 9, "十一月": 10, "十二月": 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(); }); */