Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorjulien <julien@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-03-09 00:22:07 +0300
committerjulien <julien@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-03-09 00:22:07 +0300
commit8c350f9ce96eb8ce44eb2d8236b259bc2d565cc3 (patch)
treebbcbbce605f44dddfb5a471872d11e44e4e1cb8f /libs
parent9f50cb020f49b85af6808241b38c4fcfc87fe36c (diff)
-Some refactoring of datatable.js and Dashboard.js
-Safari doesn't support very well dynamic javascript loading (hence the dashboard loading issues), so most *.js files are loaded in the main page now -Readded original non minified js libraries
Diffstat (limited to 'libs')
-rw-r--r--libs/jquery/original lib/jquery-calendar.js814
-rw-r--r--libs/jquery/original lib/jquery.blockUI.js361
-rw-r--r--libs/jquery/original lib/jquery.dimensions.js655
-rw-r--r--libs/jquery/original lib/jquery.js31
-rw-r--r--libs/jquery/original lib/jquery.scrollTo.js142
-rw-r--r--libs/jquery/original lib/thickbox.js10
-rw-r--r--libs/jquery/original lib/ui.mouse.js253
-rw-r--r--libs/jquery/ui.sortable_modif.js12
8 files changed, 2273 insertions, 5 deletions
diff --git a/libs/jquery/original lib/jquery-calendar.js b/libs/jquery/original lib/jquery-calendar.js
new file mode 100644
index 0000000000..e7100e2d93
--- /dev/null
+++ b/libs/jquery/original lib/jquery-calendar.js
@@ -0,0 +1,814 @@
+/* jQuery Calendar v2.7
+ Written by Marc Grabanski (m@marcgrabanski.com) and enhanced by Keith Wood (kbwood@iprimus.com.au).
+
+ Copyright (c) 2007 Marc Grabanski (http://marcgrabanski.com/code/jquery-calendar)
+ Dual licensed under the GPL (http://www.gnu.org/licenses/gpl-3.0.txt) and
+ CC (http://creativecommons.org/licenses/by/3.0/) licenses. "Share or Remix it but please Attribute the authors."
+ Date: 09-03-2007 */
+
+/* PopUp Calendar manager.
+ Use the singleton instance of this class, popUpCal, to interact with the calendar.
+ Settings for (groups of) calendars are maintained in an instance object
+ (PopUpCalInstance), allowing multiple different settings on the same page. */
+function PopUpCal() {
+ this._nextId = 0; // Next ID for a calendar instance
+ this._inst = []; // List of instances indexed by ID
+ this._curInst = null; // The current instance in use
+ this._disabledInputs = []; // List of calendar inputs that have been disabled
+ this._popUpShowing = false; // True if the popup calendar is showing , false if not
+ this._inDialog = false; // True if showing within a "dialog", false if not
+ this.regional = []; // Available regional settings, indexed by language code
+ this.regional[''] = { // Default regional settings
+ clearText: 'Clear', // Display text for clear link
+ closeText: 'Close', // Display text for close link
+ prevText: '&lt;Prev', // Display text for previous month link
+ nextText: 'Next&gt;', // Display text for next month link
+ currentText: 'Today', // Display text for current month link
+ dayNames: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Names of days starting at Sunday
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'], // Names of months
+ dateFormat: 'DMY/' // First three are day, month, year in the required order,
+ // fourth (optional) is the separator, e.g. US would be 'MDY/', ISO would be 'YMD-'
+ };
+ this._defaults = { // Global defaults for all the calendar instances
+ autoPopUp: 'focus', // 'focus' for popup on focus,
+ // 'button' for trigger button, or 'both' for either
+ appendText: '', // Display text following the input box, e.g. showing the format
+ buttonText: '...', // Text for trigger button
+ buttonImage: '', // URL for trigger button image
+ buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
+ closeAtTop: true, // True to have the clear/close at the top,
+ // false to have them at the bottom
+ hideIfNoPrevNext: false, // True to hide next/previous month links
+ // if not applicable, false to just disable them
+ changeMonth: true, // True if month can be selected directly, false if only prev/next
+ changeYear: true, // True if year can be selected directly, false if only prev/next
+ yearRange: '-10:+10', // Range of years to display in drop-down,
+ // either relative to current year (-nn:+nn) or absolute (nnnn:nnnn)
+ firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
+ changeFirstDay: true, // True to click on day name to change, false to remain as set
+ showOtherMonths: false, // True to show dates in other months, false to leave blank
+ minDate: null, // The earliest selectable date, or null for no limit
+ maxDate: null, // The latest selectable date, or null for no limit
+ speed: 'medium', // Speed of display/closure
+ customDate: null, // Function that takes a date and returns an array with
+ // [0] = true if selectable, false if not,
+ // [1] = custom CSS class name(s) or '', e.g. popUpCal.noWeekends
+ fieldSettings: null, // Function that takes an input field and
+ // returns a set of custom settings for the calendar
+ onSelect: null // Define a callback function when a date is selected
+ };
+ $.extend(this._defaults, this.regional['']);
+ this._calendarDiv = $('<div id="calendar_div"></div>');
+ $(document.body).append(this._calendarDiv);
+ $(document.body).mousedown(this._checkExternalClick);
+}
+
+$.extend(PopUpCal.prototype, {
+ /* Register a new calendar instance - with custom settings. */
+ _register: function(inst) {
+ var id = this._nextId++;
+ this._inst[id] = inst;
+ return id;
+ },
+
+ /* Retrieve a particular calendar instance based on its ID. */
+ _getInst: function(id) {
+ return this._inst[id] || id;
+ },
+
+ /* Override the default settings for all instances of the calendar.
+ @param settings object - the new settings to use as defaults (anonymous object)
+ @return void */
+ setDefaults: function(settings) {
+ $.extend(this._defaults, settings || {});
+ },
+
+ /* Handle keystrokes. */
+ _doKeyDown: function(e) {
+ var inst = popUpCal._getInst(this._calId);
+ if (popUpCal._popUpShowing) {
+ switch (e.keyCode) {
+ case 9: popUpCal.hideCalendar(inst, '');
+ break; // hide on tab out
+ case 13: popUpCal._selectDate(inst);
+ break; // select the value on enter
+ case 27: popUpCal.hideCalendar(inst, inst._get('speed'));
+ break; // hide on escape
+ case 33: popUpCal._adjustDate(inst, -1, (e.ctrlKey ? 'Y' : 'M'));
+ break; // previous month/year on page up/+ ctrl
+ case 34: popUpCal._adjustDate(inst, +1, (e.ctrlKey ? 'Y' : 'M'));
+ break; // next month/year on page down/+ ctrl
+ case 35: if (e.ctrlKey) popUpCal._clearDate(inst);
+ break; // clear on ctrl+end
+ case 36: if (e.ctrlKey) popUpCal._gotoToday(inst);
+ break; // current on ctrl+home
+ case 37: if (e.ctrlKey) popUpCal._adjustDate(inst, -1, 'D');
+ break; // -1 day on ctrl+left
+ case 38: if (e.ctrlKey) popUpCal._adjustDate(inst, -7, 'D');
+ break; // -1 week on ctrl+up
+ case 39: if (e.ctrlKey) popUpCal._adjustDate(inst, +1, 'D');
+ break; // +1 day on ctrl+right
+ case 40: if (e.ctrlKey) popUpCal._adjustDate(inst, +7, 'D');
+ break; // +1 week on ctrl+down
+ }
+ }
+ else if (e.keyCode == 36 && e.ctrlKey) { // display the calendar on ctrl+home
+ popUpCal.showFor(this);
+ }
+ },
+
+ /* Filter entered characters. */
+ _doKeyPress: function(e) {
+ var inst = popUpCal._getInst(this._calId);
+ var chr = String.fromCharCode(e.charCode == undefined ? e.keyCode : e.charCode);
+ return (chr < ' ' || chr == inst._get('dateFormat').charAt(3) ||
+ (chr >= '0' && chr <= '9')); // only allow numbers and separator
+ },
+
+ /* Attach the calendar to an input field. */
+ _connectCalendar: function(target, inst) {
+ var $input = $(target);
+ var appendText = inst._get('appendText');
+ if (appendText) {
+ $input.after('<span class="calendar_append">' + appendText + '</span>');
+ }
+ var autoPopUp = inst._get('autoPopUp');
+ if (autoPopUp == 'focus' || autoPopUp == 'both') { // pop-up calendar when in the marked field
+ $input.focus(this.showFor);
+ }
+ if (autoPopUp == 'button' || autoPopUp == 'both') { // pop-up calendar when button clicked
+ var buttonText = inst._get('buttonText');
+ var buttonImage = inst._get('buttonImage');
+ var buttonImageOnly = inst._get('buttonImageOnly');
+ var trigger = $(buttonImageOnly ? '<img class="calendar_trigger" src="' +
+ buttonImage + '" alt="' + buttonText + '" title="' + buttonText + '"/>' :
+ '<button type="button" class="calendar_trigger">' + (buttonImage != '' ?
+ '<img src="' + buttonImage + '" alt="' + buttonText + '" title="' + buttonText + '"/>' :
+ buttonText) + '</button>');
+ $input.wrap('<span class="calendar_wrap"></span>').after(trigger);
+ trigger.click(this.showFor);
+ }
+ $input.keydown(this._doKeyDown).keypress(this._doKeyPress);
+ $input[0]._calId = inst._id;
+ },
+
+ /* Attach an inline calendar to a div. */
+ _inlineCalendar: function(target, inst, defaultDate) {
+ $(target).append(inst._calendarDiv);
+ target._calId = inst._id;
+ var date = defaultDate;
+ inst._selectedDay = date.getDate();
+ inst._selectedMonth = date.getMonth();
+ inst._selectedYear = date.getFullYear();
+ popUpCal._adjustDate(inst);
+ },
+
+ /* Pop-up the calendar in a "dialog" box.
+ @param dateText string - the initial date to display (in the current format)
+ @param onSelect function - the function(dateText) to call when a date is selected
+ @param settings object - update the dialog calendar instance's settings (anonymous object)
+ @param pos int[2] - coordinates for the dialog's position within the screen
+ leave empty for default (screen centre)
+ @return void */
+ dialogCalendar: function(dateText, onSelect, settings, pos) {
+ var inst = this._dialogInst; // internal instance
+ if (!inst) {
+ inst = this._dialogInst = new PopUpCalInstance({}, false);
+ this._dialogInput = $('<input type="text" size="1" style="position: absolute; top: -100px;"/>');
+ this._dialogInput.keydown(this._doKeyDown);
+ $('body').append(this._dialogInput);
+ this._dialogInput[0]._calId = inst._id;
+ }
+ $.extend(inst._settings, settings || {});
+ this._dialogInput.val(dateText);
+
+ /* Cross Browser Positioning */
+ if (self.innerHeight) { // all except Explorer
+ windowWidth = self.innerWidth;
+ windowHeight = self.innerHeight;
+ } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
+ windowWidth = document.documentElement.clientWidth;
+ windowHeight = document.documentElement.clientHeight;
+ } else if (document.body) { // other Explorers
+ windowWidth = document.body.clientWidth;
+ windowHeight = document.body.clientHeight;
+ }
+ this._pos = pos || // should use actual width/height below
+ [(windowWidth / 2) - 100, (windowHeight / 2) - 100];
+
+ // move input on screen for focus, but hidden behind dialog
+ this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px');
+ inst._settings.onSelect = onSelect;
+ this._inDialog = true;
+ this._calendarDiv.addClass('calendar_dialog');
+ this.showFor(this._dialogInput[0]);
+ if ($.blockUI) {
+ $.blockUI(this._calendarDiv);
+ }
+ },
+
+ /* Enable the input field(s) for entry.
+ @param inputs element/object - single input field or jQuery collection of input fields
+ @return void */
+ enableFor: function(inputs) {
+ inputs = (inputs.jquery ? inputs : $(inputs));
+ inputs.each(function() {
+ this.disabled = false;
+ $('../button.calendar_trigger', this).each(function() { this.disabled = false; });
+ $('../img.calendar_trigger',
+this).css({opacity:'1.0',cursor:''});
+ var $this = this;
+ popUpCal._disabledInputs = $.map(popUpCal._disabledInputs,
+ function(value) { return (value == $this ? null : value); }); // delete entry
+ });
+ },
+
+ /* Disable the input field(s) from entry.
+ @param inputs element/object - single input field or jQuery collection of input fields
+ @return void */
+ disableFor: function(inputs) {
+ inputs = (inputs.jquery ? inputs : $(inputs));
+ inputs.each(function() {
+ this.disabled = true;
+ $('../button.calendar_trigger', this).each(function() { this.disabled = true; });
+ $('../img.calendar_trigger', this).css({opacity:'0.5',cursor:'default'});
+ var $this = this;
+ popUpCal._disabledInputs = $.map(popUpCal._disabledInputs,
+ function(value) { return (value == $this ? null : value); }); // delete entry
+ popUpCal._disabledInputs[popUpCal._disabledInputs.length] = this;
+ });
+ },
+
+ /* Update the settings for a calendar attached to an input field or division.
+ @param control element - the input field or div/span attached to the calendar
+ @param settings object - the new settings to update
+ @return void */
+ reconfigureFor: function(control, settings) {
+ var inst = this._getInst(control._calId);
+ if (inst) {
+ $.extend(inst._settings, settings || {});
+ this._updateCalendar(inst);
+ }
+ },
+
+ /* Set the date for a calendar attached to an input field or division.
+ @param control element - the input field or div/span attached to the calendar
+ @param date Date - the new date
+ @return void */
+ setDateFor: function(control, date) {
+ var inst = this._getInst(control._calId);
+ if (inst) {
+ inst._setDate(date);
+ }
+ },
+
+ /* Retrieve the date for a calendar attached to an input field or division.
+ @param control element - the input field or div/span attached to the calendar
+ @return Date - the current date */
+ getDateFor: function(control) {
+ var inst = this._getInst(control._calId);
+ return (inst ? inst._getDate() : null);
+ },
+
+ /* Pop-up the calendar for a given input field.
+ @param target element - the input field attached to the calendar
+ @return void */
+ showFor: function(target) {
+ var input = (target.nodeName && target.nodeName.toLowerCase() == 'input' ? target : this);
+ if (input.nodeName.toLowerCase() != 'input') { // find from button/image trigger
+ input = $('input', input.parentNode)[0];
+ }
+ if (popUpCal._lastInput == input) { // already here
+ return;
+ }
+ for (var i = 0; i < popUpCal._disabledInputs.length; i++) { // check not disabled
+ if (popUpCal._disabledInputs[i] == input) {
+ return;
+ }
+ }
+ var inst = popUpCal._getInst(input._calId);
+ popUpCal.hideCalendar(inst, '');
+ popUpCal._lastInput = input;
+ inst._setDateFromField(input);
+ if (popUpCal._inDialog) { // hide cursor
+ input.value = '';
+ }
+ if (!popUpCal._pos) { // position below input
+ popUpCal._pos = popUpCal._findPos(input);
+ popUpCal._pos[1] += input.offsetHeight;
+ }
+ inst._calendarDiv.css('position', (popUpCal._inDialog && $.blockUI ? 'static' : 'absolute')).
+ css('left', popUpCal._pos[0] + 'px').css('top', popUpCal._pos[1] + 'px');
+ popUpCal._pos = null;
+ var fieldSettings = inst._get('fieldSettings');
+ $.extend(inst._settings, (fieldSettings ? fieldSettings(input) : {}));
+ popUpCal._showCalendar(inst);
+ },
+
+ /* Construct and display the calendar. */
+ _showCalendar: function(id) {
+ var inst = this._getInst(id);
+ popUpCal._updateCalendar(inst);
+ if (!inst._inline) {
+ var speed = inst._get('speed');
+ inst._calendarDiv.show(speed, function() {
+ popUpCal._popUpShowing = true;
+ popUpCal._afterShow(inst);
+ });
+ if (speed == '') {
+ popUpCal._popUpShowing = true;
+ popUpCal._afterShow(inst);
+ }
+ if (inst._input[0].type != 'hidden') {
+ inst._input[0].focus();
+ }
+ this._curInst = inst;
+ }
+ },
+
+ /* Generate the calendar content. */
+ _updateCalendar: function(inst) {
+ inst._calendarDiv.empty().append(inst._generateCalendar());
+ if (inst._input && inst._input != 'hidden') {
+ inst._input[0].focus();
+ }
+ },
+
+ /* Tidy up after displaying the calendar. */
+ _afterShow: function(inst) {
+ if ($.browser.msie) { // fix IE < 7 select problems
+ $('#calendar_cover').css({width: inst._calendarDiv[0].offsetWidth + 4,
+ height: inst._calendarDiv[0].offsetHeight + 4});
+ }
+ /*// re-position on screen if necessary
+ var calDiv = inst._calendarDiv[0];
+ var pos = popUpCal._findPos(inst._input[0]);
+ if ((calDiv.offsetLeft + calDiv.offsetWidth) >
+ (document.body.clientWidth + document.body.scrollLeft)) {
+ inst._calendarDiv.css('left', (pos[0] + inst._input[0].offsetWidth - calDiv.offsetWidth) + 'px');
+ }
+ if ((calDiv.offsetTop + calDiv.offsetHeight) >
+ (document.body.clientHeight + document.body.scrollTop)) {
+ inst._calendarDiv.css('top', (pos[1] - calDiv.offsetHeight) + 'px');
+ }*/
+ },
+
+ /* Hide the calendar from view.
+ @param id string/object - the ID of the current calendar instance,
+ or the instance itself
+ @param speed string - the speed at which to close the calendar
+ @return void */
+ hideCalendar: function(id, speed) {
+ var inst = this._getInst(id);
+ if (popUpCal._popUpShowing) {
+ speed = (speed != null ? speed : inst._get('speed'));
+ inst._calendarDiv.hide(speed, function() {
+ popUpCal._tidyDialog(inst);
+ });
+ if (speed == '') {
+ popUpCal._tidyDialog(inst);
+ }
+ popUpCal._popUpShowing = false;
+ popUpCal._lastInput = null;
+ inst._settings.prompt = null;
+ if (popUpCal._inDialog) {
+ popUpCal._dialogInput.css('position', 'absolute').
+ css('left', '0px').css('top', '-100px');
+ if ($.blockUI) {
+ $.unblockUI();
+ $('body').append(this._calendarDiv);
+ }
+ }
+ popUpCal._inDialog = false;
+ }
+ popUpCal._curInst = null;
+ },
+
+ /* Tidy up after a dialog display. */
+ _tidyDialog: function(inst) {
+ inst._calendarDiv.removeClass('calendar_dialog');
+ $('.calendar_prompt', inst._calendarDiv).remove();
+ },
+
+ /* Close calendar if clicked elsewhere. */
+ _checkExternalClick: function(event) {
+ if (!popUpCal._curInst) {
+ return;
+ }
+ var target = $(event.target);
+ if( (target.parents("#calendar_div").length == 0)
+ && (target.attr('class') != 'calendar_trigger')
+ && popUpCal._popUpShowing
+ && !(popUpCal._inDialog && $.blockUI) )
+ {
+ popUpCal.hideCalendar(popUpCal._curInst, '');
+ }
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustDate: function(id, offset, period) {
+ var inst = this._getInst(id);
+ inst._adjustDate(offset, period);
+ this._updateCalendar(inst);
+ },
+
+ /* Action for current link. */
+ _gotoToday: function(id) {
+ var date = new Date();
+ var inst = this._getInst(id);
+ inst._selectedDay = date.getDate();
+ inst._selectedMonth = date.getMonth();
+ inst._selectedYear = date.getFullYear();
+ this._adjustDate(inst);
+ },
+
+ /* Action for selecting a new month/year. */
+ _selectMonthYear: function(id, select, period) {
+ var inst = this._getInst(id);
+ inst._selectingMonthYear = false;
+ inst[period == 'M' ? '_selectedMonth' : '_selectedYear'] =
+ select.options[select.selectedIndex].value - 0;
+ this._adjustDate(inst);
+ },
+
+ /* Restore input focus after not changing month/year. */
+ _clickMonthYear: function(id) {
+ var inst = this._getInst(id);
+ if (inst._input && inst._selectingMonthYear && !$.browser.msie) {
+ inst._input[0].focus();
+ }
+ inst._selectingMonthYear = !inst._selectingMonthYear;
+ },
+
+ /* Action for changing the first week day. */
+ _changeFirstDay: function(id, a) {
+ var inst = this._getInst(id);
+ var dayNames = inst._get('dayNames');
+ var value = a.firstChild.nodeValue;
+ for (var i = 0; i < 7; i++) {
+ if (dayNames[i] == value) {
+ inst._settings.firstDay = i;
+ break;
+ }
+ }
+ this._updateCalendar(inst);
+ },
+
+ /* Action for selecting a day. */
+ _selectDay: function(id, td) {
+ var inst = this._getInst(id);
+ inst._selectedDay = $("a", td).html();
+ this._selectDate(id);
+ },
+
+ /* Erase the input field and hide the calendar. */
+ _clearDate: function(id) {
+ this._selectDate(id, '');
+ },
+
+ /* Update the input field with the selected date. */
+ _selectDate: function(id, dateStr) {
+ var inst = this._getInst(id);
+ dateStr = (dateStr != null ? dateStr : inst._formatDate());
+ if (inst._input) {
+ inst._input.val(dateStr);
+ }
+ var onSelect = inst._get('onSelect');
+ if (onSelect) {
+ onSelect(dateStr); // trigger custom callback
+ }
+ else {
+ inst._input.trigger('change'); // fire the change event
+ }
+ if (inst._inline) {
+ this._updateCalendar(inst);
+ }
+ else {
+ this.hideCalendar(inst, inst._get('speed'));
+ }
+ },
+
+ /* Set as customDate function to prevent selection of weekends.
+ @param date Date - the date to customise
+ @return [boolean, string] - is this date selectable?, what is its CSS class? */
+ noWeekends: function(date) {
+ var day = date.getDay();
+ return [(day > 0 && day < 6), ''];
+ },
+
+ /* Find an object's position on the screen. */
+ _findPos: function(obj) {
+ if (obj.type == 'hidden') {
+ obj = obj.nextSibling;
+ }
+ var curleft = curtop = 0;
+ if (obj.offsetParent) {
+ curleft = obj.offsetLeft;
+ curtop = obj.offsetTop;
+ while (obj = obj.offsetParent) {
+ var origcurleft = curleft;
+ curleft += obj.offsetLeft;
+ if (curleft < 0) {
+ curleft = origcurleft;
+ }
+ curtop += obj.offsetTop;
+ }
+ }
+ return [curleft,curtop];
+ }
+});
+
+/* Individualised settings for calendars applied to one or more related inputs.
+ Instances are managed and manipulated through the PopUpCal manager. */
+function PopUpCalInstance(settings, inline, defaultDate) {
+ this._id = popUpCal._register(this);
+ this._selectedDay = 0;
+ this._selectedMonth = 0; // 0-11
+ this._selectedYear = 0; // 4-digit year
+ this._input = null; // The attached input field
+ this._inline = inline; // True if showing inline, false if used in a popup
+ this._calendarDiv = (!inline ? popUpCal._calendarDiv :
+ $('<div id="calendar_div_' + this._id + '" class="calendar_inline"></div>'));
+ if (inline) {
+ var date = defaultDate;
+ this._currentDate = defaultDate;
+ this._currentDay = date.getDate();
+ this._currentMonth = date.getMonth();
+ this._currentYear = date.getFullYear();
+ }
+ // customise the calendar object - uses manager defaults if not overridden
+ this._settings = $.extend({}, settings || {}); // clone
+}
+
+$.extend(PopUpCalInstance.prototype, {
+ /* Get a setting value, defaulting if necessary. */
+ _get: function(name) {
+ return (this._settings[name] != null ? this._settings[name] : popUpCal._defaults[name]);
+ },
+
+ /* Parse existing date and initialise calendar. */
+ _setDateFromField: function(input) {
+ this._input = $(input);
+ var dateFormat = this._get('dateFormat');
+ var currentDate = this._input.val().split(dateFormat.charAt(3));
+ if (currentDate.length == 3) {
+ this._currentDay = parseInt(currentDate[dateFormat.indexOf('D')], 10);
+ this._currentMonth = parseInt(currentDate[dateFormat.indexOf('M')], 10) - 1;
+ this._currentYear = parseInt(currentDate[dateFormat.indexOf('Y')], 10);
+ }
+ else {
+ var date = new Date();
+ this._currentDay = date.getDate();
+ this._currentMonth = date.getMonth();
+ this._currentYear = date.getFullYear();
+ }
+ this._selectedDay = this._currentDay;
+ this._selectedMonth = this._currentMonth;
+ this._selectedYear = this._currentYear;
+ this._adjustDate();
+ },
+
+ /* Set the date directly. */
+ _setDate: function(date) {
+ this._selectedDay = this._currentDay = date.getDate();
+ this._selectedMonth = this._currentMonth = date.getMonth();
+ this._selectedYear = this._currentYear = date.getFullYear();
+ this._adjustDate();
+ },
+
+ /* Retrieve the date directly. */
+ _getDate: function() {
+ return new Date(this._currentYear, this._currentMonth, this._currentDay);
+ },
+
+ /* Generate the HTML for the current state of the calendar. */
+ _generateCalendar: function() {
+ var today = this._currentDate;
+ today = new Date(today.getFullYear(), today.getMonth(), today.getDate()); // clear time
+ // build the calendar HTML
+ var controls = '<div class="calendar_control">' +
+ '<a class="calendar_clear" onclick="popUpCal._clearDate(' + this._id + ');">' +
+ this._get('clearText') + '</a>' +
+ '<a class="calendar_close" onclick="popUpCal.hideCalendar(' + this._id + ');">' +
+ this._get('closeText') + '</a></div>';
+ var prompt = this._get('prompt');
+ var closeAtTop = this._get('closeAtTop');
+ var hideIfNoPrevNext = this._get('hideIfNoPrevNext');
+ // controls and links
+ var html = (prompt ? '<div class="calendar_prompt">' + prompt + '</div>' : '') +
+ (closeAtTop && !this._inline ? controls : '') + '<div class="calendar_links">' +
+ (this._canAdjustMonth(-1) ? '<a class="calendar_prev" ' +
+ 'onclick="popUpCal._adjustDate(' + this._id + ', -1, \'M\');">' + this._get('prevText') + '</a>' :
+ (hideIfNoPrevNext ? '' : '<label class="calendar_prev">' + this._get('prevText') + '</label>')) +
+ (this._isInRange(today) ? '<a class="calendar_current" ' +
+ 'onclick="popUpCal._gotoToday(' + this._id + ');">' + this._get('currentText') + '</a>' : '') +
+ (this._canAdjustMonth(+1) ? '<a class="calendar_next" ' +
+ 'onclick="popUpCal._adjustDate(' + this._id + ', +1, \'M\');">' + this._get('nextText') + '</a>' :
+ (hideIfNoPrevNext ? '' : '<label class="calendar_next">' + this._get('nextText') + '</label>')) +
+ '</div><div class="calendar_header">';
+ var minDate = this._get('minDate');
+ var maxDate = this._get('maxDate');
+ // month selection
+ var monthNames = this._get('monthNames');
+ if (!this._get('changeMonth')) {
+ html += monthNames[this._selectedMonth] + '&nbsp;';
+ }
+ else {
+ var inMinYear = (minDate && minDate.getFullYear() == this._selectedYear);
+ var inMaxYear = (maxDate && maxDate.getFullYear() == this._selectedYear);
+ html += '<select class="calendar_newMonth" ' +
+ 'onchange="popUpCal._selectMonthYear(' + this._id + ', this, \'M\');" ' +
+ 'onclick="popUpCal._clickMonthYear(' + this._id + ');">';
+ for (var month = 0; month < 12; month++) {
+ if ((!inMinYear || month >= minDate.getMonth()) &&
+ (!inMaxYear || month <= maxDate.getMonth())) {
+ html += '<option value="' + month + '"' +
+ (month == this._selectedMonth ? ' selected="selected"' : '') +
+ '>' + monthNames[month] + '</option>';
+ }
+ }
+ html += '</select>';
+ }
+ // year selection
+ if (!this._get('changeYear')) {
+ html += this._selectedYear;
+ }
+ else {
+ // determine range of years to display
+ var years = this._get('yearRange').split(':');
+ var year = 0;
+ var endYear = 0;
+ if (years.length != 2) {
+ year = this._selectedYear - 10;
+ endYear = this._selectedYear + 10;
+ }
+ else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') {
+ year = this._selectedYear + parseInt(years[0], 10);
+ endYear = this._selectedYear + parseInt(years[1], 10);
+ }
+ else {
+ year = parseInt(years[0], 10);
+ endYear = parseInt(years[1], 10);
+ }
+ year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
+ endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
+ html += '<select class="calendar_newYear" onchange="popUpCal._selectMonthYear(' +
+ this._id + ', this, \'Y\');" ' + 'onclick="popUpCal._clickMonthYear(' +
+ this._id + ');">';
+ for (; year <= endYear; year++) {
+ html += '<option value="' + year + '"' +
+ (year == this._selectedYear ? ' selected="selected"' : '') +
+ '>' + year + '</option>';
+ }
+ html += '</select>';
+ }
+ html += '</div><table class="calendar" cellpadding="0" cellspacing="0"><thead>' +
+ '<tr class="calendar_titleRow">';
+ var firstDay = this._get('firstDay');
+ var changeFirstDay = this._get('changeFirstDay');
+ var dayNames = this._get('dayNames');
+ for (var dow = 0; dow < 7; dow++) { // days of the week
+ html += '<td>' + (!changeFirstDay ? '' : '<a onclick="popUpCal._changeFirstDay(' +
+ this._id + ', this);">') + dayNames[(dow + firstDay) % 7] +
+ (changeFirstDay ? '</a>' : '') + '</td>';
+ }
+ html += '</tr></thead><tbody>';
+ var daysInMonth = this._getDaysInMonth(this._selectedYear, this._selectedMonth);
+ this._selectedDay = Math.min(this._selectedDay, daysInMonth);
+ var leadDays = (this._getFirstDayOfMonth(this._selectedYear, this._selectedMonth) - firstDay + 7) % 7;
+ var currentDate = new Date(this._currentYear, this._currentMonth, this._currentDay);
+ var selectedDate = new Date(this._selectedYear, this._selectedMonth, this._selectedDay);
+ var printDate = new Date(this._selectedYear, this._selectedMonth, 1 - leadDays);
+ var numRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
+ var customDate = this._get('customDate');
+ var showOtherMonths = this._get('showOtherMonths');
+ for (var row = 0; row < numRows; row++) { // create calendar rows
+ html += '<tr class="calendar_daysRow">';
+ for (var dow = 0; dow < 7; dow++) { // create calendar days
+ var customSettings = (customDate ? customDate(printDate) : [true, '']);
+ var otherMonth = (printDate.getMonth() != this._selectedMonth);
+ var unselectable = otherMonth || !customSettings[0] ||
+ (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
+ html += '<td class="calendar_daysCell' +
+ ((dow + firstDay + 6) % 7 >= 5 ? ' calendar_weekEndCell' : '') + // highlight weekends
+ (otherMonth ? ' calendar_otherMonth' : '') + // highlight days from other months
+ //(printDate.getTime() == selectedDate.getTime() ? ' calendar_daysCellOver' : '') + // highlight selected day
+ (unselectable ? ' calendar_unselectable' : '') + // highlight unselectable days
+ (!otherMonth || showOtherMonths ? ' ' + customSettings[1] : '') + // highlight custom dates
+ (printDate.getTime() == currentDate.getTime() ? ' calendar_currentDay' : // highlight current day
+ (printDate.getTime() == today.getTime() ? ' calendar_today' : '')) + '"' + // highlight today (if different)
+ (unselectable ? '' : ' onmouseover="$(this).addClass(\'calendar_daysCellOver\');"' +
+ ' onmouseout="$(this).removeClass(\'calendar_daysCellOver\');"' +
+ ' onclick="popUpCal._selectDay(' + this._id + ', this);"') + '>' + // actions
+ (otherMonth ? (showOtherMonths ? printDate.getDate() : '&nbsp;') : // display for other months
+ (unselectable ? printDate.getDate() : '<a>' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
+ printDate.setDate(printDate.getDate() + 1);
+ }
+ html += '</tr>';
+ }
+ html += '</tbody></table>' + (!closeAtTop && !this._inline ? controls : '') +
+ '<div style="clear: both;"></div>' + (!$.browser.msie ? '' :
+ '<!--[if lte IE 6.5]><iframe src="javascript:false;" class="calendar_cover"></iframe><![endif]-->');
+ return html;
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustDate: function(offset, period) {
+ var date = new Date(this._selectedYear + (period == 'Y' ? offset : 0),
+ this._selectedMonth + (period == 'M' ? offset : 0),
+ this._selectedDay + (period == 'D' ? offset : 0));
+ // ensure it is within the bounds set
+ var minDate = this._get('minDate');
+ var maxDate = this._get('maxDate');
+ date = (minDate && date < minDate ? minDate : date);
+ date = (maxDate && date > maxDate ? maxDate : date);
+ this._selectedDay = date.getDate();
+ this._selectedMonth = date.getMonth();
+ this._selectedYear = date.getFullYear();
+ },
+
+ /* Find the number of days in a given month. */
+ _getDaysInMonth: function(year, month) {
+ return 32 - new Date(year, month, 32).getDate();
+ },
+
+ /* Find the day of the week of the first of a month. */
+ _getFirstDayOfMonth: function(year, month) {
+ return new Date(year, month, 1).getDay();
+ },
+
+ /* Determines if we should allow a "next/prev" month display change. */
+ _canAdjustMonth: function(offset) {
+ var date = new Date(this._selectedYear, this._selectedMonth + offset, 1);
+ if (offset < 0) {
+ date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
+ }
+ return this._isInRange(date);
+ },
+
+ /* Is the given date in the accepted range? */
+ _isInRange: function(date) {
+ var minDate = this._get('minDate');
+ var maxDate = this._get('maxDate');
+ return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate));
+ },
+
+ /* Format the given date for display. */
+ _formatDate: function() {
+ var day = this._currentDay = this._selectedDay;
+ var month = this._currentMonth = this._selectedMonth;
+ var year = this._currentYear = this._selectedYear;
+ month++; // adjust javascript month
+ var dateFormat = this._get('dateFormat');
+ var dateString = '';
+ for (var i = 0; i < 3; i++) {
+ dateString += dateFormat.charAt(3) +
+ (dateFormat.charAt(i) == 'D' ? (day < 10 ? '0' : '') + day :
+ (dateFormat.charAt(i) == 'M' ? (month < 10 ? '0' : '') + month :
+ (dateFormat.charAt(i) == 'Y' ? year : '?')));
+ }
+ return dateString.substring(dateFormat.charAt(3) ? 1 : 0);
+ }
+});
+
+/* Attach the calendar to a jQuery selection.
+ @param settings object - the new settings to use for this calendar instance (anonymous)
+ @return jQuery object - for chaining further calls */
+$.fn.calendar = function(settings, defaultDate) {
+ return this.each(function() {
+ // check for settings on the control itself - in namespace 'cal:'
+ var inlineSettings = null;
+ for (attrName in popUpCal._defaults) {
+ var attrValue = this.getAttribute('cal:' + attrName);
+ if (attrValue) {
+ inlineSettings = inlineSettings || {};
+ try {
+ inlineSettings[attrName] = eval(attrValue);
+ }
+ catch (err) {
+ inlineSettings[attrName] = attrValue;
+ }
+ }
+ }
+ var nodeName = this.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ var instSettings = (inlineSettings ? $.extend($.extend({}, settings || {}),
+ inlineSettings || {}) : settings); // clone and customise
+ var inst = (inst && !inlineSettings ? inst :
+ new PopUpCalInstance(instSettings, false, defaultDate));
+ popUpCal._connectCalendar(this, inst);
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var instSettings = $.extend($.extend({}, settings || {}),
+ inlineSettings || {}); // clone and customise
+ var inst = new PopUpCalInstance(instSettings, true, defaultDate);
+ popUpCal._inlineCalendar(this, inst, defaultDate);
+ }
+ });
+};
+
+/* Initialise the calendar. */
+$(document).ready(function() {
+ popUpCal = new PopUpCal(); // singleton instance
+});
diff --git a/libs/jquery/original lib/jquery.blockUI.js b/libs/jquery/original lib/jquery.blockUI.js
new file mode 100644
index 0000000000..2b0a360805
--- /dev/null
+++ b/libs/jquery/original lib/jquery.blockUI.js
@@ -0,0 +1,361 @@
+/*
+ * jQuery blockUI plugin
+ * Version 1.33 (09/14/2007)
+ * @requires jQuery v1.1.1
+ *
+ * $Id$
+ *
+ * Examples at: http://malsup.com/jquery/block/
+ * Copyright (c) 2007 M. Alsup
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+ (function($) {
+/**
+ * blockUI provides a mechanism for blocking user interaction with a page (or parts of a page).
+ * This can be an effective way to simulate synchronous behavior during ajax operations without
+ * locking the browser. It will prevent user operations for the current page while it is
+ * active ane will return the page to normal when it is deactivate. blockUI accepts the following
+ * two optional arguments:
+ *
+ * message (String|Element|jQuery): The message to be displayed while the UI is blocked. The message
+ * argument can be a plain text string like "Processing...", an HTML string like
+ * "<h1><img src="busy.gif" /> Please wait...</h1>", a DOM element, or a jQuery object.
+ * The default message is "<h1>Please wait...</h1>"
+ *
+ * css (Object): Object which contains css property/values to override the default styles of
+ * the message. Use this argument if you wish to override the default
+ * styles. The css Object should be in a format suitable for the jQuery.css
+ * function. For example:
+ * $.blockUI({
+ * backgroundColor: '#ff8',
+ * border: '5px solid #f00,
+ * fontWeight: 'bold'
+ * });
+ *
+ * The default blocking message used when blocking the entire page is "<h1>Please wait...</h1>"
+ * but this can be overridden by assigning a value to $.blockUI.defaults.pageMessage in your
+ * own code. For example:
+ *
+ * $.blockUI.defaults.pageMessage = "<h1>Bitte Wartezeit</h1>";
+ *
+ * The default message styling can also be overridden. For example:
+ *
+ * $.extend($.blockUI.defaults.pageMessageCSS, { color: '#00a', backgroundColor: '#0f0' });
+ *
+ * The default styles work well for simple messages like "Please wait", but for longer messages
+ * style overrides may be necessary.
+ *
+ * @example $.blockUI();
+ * @desc prevent user interaction with the page (and show the default message of 'Please wait...')
+ *
+ * @example $.blockUI( { backgroundColor: '#f00', color: '#fff'} );
+ * @desc prevent user interaction and override the default styles of the message to use a white on red color scheme
+ *
+ * @example $.blockUI('Processing...');
+ * @desc prevent user interaction and display the message "Processing..." instead of the default message
+ *
+ * @name blockUI
+ * @param String|jQuery|Element message Message to display while the UI is blocked
+ * @param Object css Style object to control look of the message
+ * @cat Plugins/blockUI
+ */
+$.blockUI = function(msg, css, opts) {
+ $.blockUI.impl.install(window, msg, css, opts);
+};
+
+// expose version number so other plugins can interogate
+$.blockUI.version = 1.33;
+
+/**
+ * unblockUI removes the UI block that was put in place by blockUI
+ *
+ * @example $.unblockUI();
+ * @desc unblocks the page
+ *
+ * @name unblockUI
+ * @cat Plugins/blockUI
+ */
+$.unblockUI = function(opts) {
+ $.blockUI.impl.remove(window, opts);
+};
+
+/**
+ * Blocks user interaction with the selected elements. (Hat tip: Much of
+ * this logic comes from Brandon Aaron's bgiframe plugin. Thanks, Brandon!)
+ * By default, no message is displayed when blocking elements.
+ *
+ * @example $('div.special').block();
+ * @desc prevent user interaction with all div elements with the 'special' class.
+ *
+ * @example $('div.special').block('Please wait');
+ * @desc prevent user interaction with all div elements with the 'special' class
+ * and show a message over the blocked content.
+ *
+ * @name block
+ * @type jQuery
+ * @param String|jQuery|Element message Message to display while the element is blocked
+ * @param Object css Style object to control look of the message
+ * @cat Plugins/blockUI
+ */
+$.fn.block = function(msg, css, opts) {
+ return this.each(function() {
+ if (!this.$pos_checked) {
+ if ($.css(this,"position") == 'static')
+ this.style.position = 'relative';
+ if ($.browser.msie) this.style.zoom = 1; // force 'hasLayout' in IE
+ this.$pos_checked = 1;
+ }
+ $.blockUI.impl.install(this, msg, css, opts);
+ });
+};
+
+/**
+ * Unblocks content that was blocked by "block()"
+ *
+ * @example $('div.special').unblock();
+ * @desc unblocks all div elements with the 'special' class.
+ *
+ * @name unblock
+ * @type jQuery
+ * @cat Plugins/blockUI
+ */
+$.fn.unblock = function(opts) {
+ return this.each(function() {
+ $.blockUI.impl.remove(this, opts);
+ });
+};
+
+/**
+ * displays the first matched element in a "display box" above a page overlay.
+ *
+ * @example $('#myImage').displayBox();
+ * @desc displays "myImage" element in a box
+ *
+ * @name displayBox
+ * @type jQuery
+ * @cat Plugins/blockUI
+ */
+$.fn.displayBox = function(css, fn, isFlash) {
+ var msg = this[0];
+ if (!msg) return;
+ var $msg = $(msg);
+ css = css || {};
+
+ var w = $msg.width() || $msg.attr('width') || css.width || $.blockUI.defaults.displayBoxCSS.width;
+ var h = $msg.height() || $msg.attr('height') || css.height || $.blockUI.defaults.displayBoxCSS.height ;
+ if (w[w.length-1] == '%') {
+ var ww = document.documentElement.clientWidth || document.body.clientWidth;
+ w = parseInt(w) || 100;
+ w = (w * ww) / 100;
+ }
+ if (h[h.length-1] == '%') {
+ var hh = document.documentElement.clientHeight || document.body.clientHeight;
+ h = parseInt(h) || 100;
+ h = (h * hh) / 100;
+ }
+
+ var ml = '-' + parseInt(w)/2 + 'px';
+ var mt = '-' + parseInt(h)/2 + 'px';
+
+ // supress opacity on overlay if displaying flash content on mac/ff platform
+ var ua = navigator.userAgent.toLowerCase();
+ var opts = {
+ displayMode: fn || 1,
+ noalpha: isFlash && /mac/.test(ua) && /firefox/.test(ua)
+ };
+
+ $.blockUI.impl.install(window, msg, { width: w, height: h, marginTop: mt, marginLeft: ml }, opts);
+};
+
+
+// override these in your code to change the default messages and styles
+$.blockUI.defaults = {
+ // the message displayed when blocking the entire page
+ pageMessage: '<h1>Please wait...</h1>',
+ // the message displayed when blocking an element
+ elementMessage: '', // none
+ // styles for the overlay iframe
+ overlayCSS: { backgroundColor: '#fff', opacity: '0.5' },
+ // styles for the message when blocking the entire page
+ pageMessageCSS: { width:'250px', margin:'-50px 0 0 -125px', top:'50%', left:'50%', textAlign:'center', color:'#000', backgroundColor:'#fff', border:'3px solid #aaa' },
+ // styles for the message when blocking an element
+ elementMessageCSS: { width:'250px', padding:'10px', textAlign:'center', backgroundColor:'#fff'},
+ // styles for the displayBox
+ displayBoxCSS: { width: '400px', height: '400px', top:'50%', left:'50%' },
+ // allow body element to be stetched in ie6
+ ie6Stretch: 1,
+ // supress tab nav from leaving blocking content?
+ allowTabToLeave: 0,
+ // Title attribute for overlay when using displayBox
+ closeMessage: 'Click to close',
+ // use fadeOut effect when unblocking (can be overridden on unblock call)
+ fadeOut: 1,
+ // fadeOut transition time in millis
+ fadeTime: 400
+};
+
+// the gory details
+$.blockUI.impl = {
+ box: null,
+ boxCallback: null,
+ pageBlock: null,
+ pageBlockEls: [],
+ op8: window.opera && window.opera.version() < 9,
+ ie6: $.browser.msie && /MSIE 6.0/.test(navigator.userAgent),
+ install: function(el, msg, css, opts) {
+ opts = opts || {};
+ this.boxCallback = typeof opts.displayMode == 'function' ? opts.displayMode : null;
+ this.box = opts.displayMode ? msg : null;
+ var full = (el == window);
+
+ // use logical settings for opacity support based on browser but allow overrides via opts arg
+ var noalpha = this.op8 || $.browser.mozilla && /Linux/.test(navigator.platform);
+ if (typeof opts.alphaOverride != 'undefined')
+ noalpha = opts.alphaOverride == 0 ? 1 : 0;
+
+ if (full && this.pageBlock) this.remove(window, {fadeOut:0});
+ // check to see if we were only passed the css object (a literal)
+ if (msg && typeof msg == 'object' && !msg.jquery && !msg.nodeType) {
+ css = msg;
+ msg = null;
+ }
+ msg = msg ? (msg.nodeType ? $(msg) : msg) : full ? $.blockUI.defaults.pageMessage : $.blockUI.defaults.elementMessage;
+ if (opts.displayMode)
+ var basecss = jQuery.extend({}, $.blockUI.defaults.displayBoxCSS);
+ else
+ var basecss = jQuery.extend({}, full ? $.blockUI.defaults.pageMessageCSS : $.blockUI.defaults.elementMessageCSS);
+ css = jQuery.extend(basecss, css || {});
+ var f = ($.browser.msie) ? $('<iframe class="blockUI" style="z-index:1000;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="javascript:false;"></iframe>')
+ : $('<div class="blockUI" style="display:none"></div>');
+ var w = $('<div class="blockUI" style="z-index:1001;cursor:wait;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
+ var m = full ? $('<div class="blockUI blockMsg" style="z-index:1002;cursor:wait;padding:0;position:fixed"></div>')
+ : $('<div class="blockUI" style="display:none;z-index:1002;cursor:wait;position:absolute"></div>');
+ w.css('position', full ? 'fixed' : 'absolute');
+ if (msg) m.css(css);
+ if (!noalpha) w.css($.blockUI.defaults.overlayCSS);
+ if (this.op8) w.css({ width:''+el.clientWidth,height:''+el.clientHeight }); // lame
+ if ($.browser.msie) f.css('opacity','0.0');
+
+ $([f[0],w[0],m[0]]).appendTo(full ? 'body' : el);
+
+ // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
+ var expr = $.browser.msie && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
+ if (this.ie6 || expr) {
+ // stretch content area if it's short
+ if (full && $.blockUI.defaults.ie6Stretch && $.boxModel)
+ $('html,body').css('height','100%');
+
+ // fix ie6 problem when blocked element has a border width
+ if ((this.ie6 || !$.boxModel) && !full) {
+ var t = this.sz(el,'borderTopWidth'), l = this.sz(el,'borderLeftWidth');
+ var fixT = t ? '(0 - '+t+')' : 0;
+ var fixL = l ? '(0 - '+l+')' : 0;
+ }
+
+ // simulate fixed position
+ $.each([f,w,m], function(i,o) {
+ var s = o[0].style;
+ s.position = 'absolute';
+ if (i < 2) {
+ full ? s.setExpression('height','document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + "px"')
+ : s.setExpression('height','this.parentNode.offsetHeight + "px"');
+ full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
+ : s.setExpression('width','this.parentNode.offsetWidth + "px"');
+ if (fixL) s.setExpression('left', fixL);
+ if (fixT) s.setExpression('top', fixT);
+ }
+ else {
+ if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
+ s.marginTop = 0;
+ }
+ });
+ }
+ if (opts.displayMode) {
+ w.css('cursor','default').attr('title', $.blockUI.defaults.closeMessage);
+ m.css('cursor','default');
+ $([f[0],w[0],m[0]]).removeClass('blockUI').addClass('displayBox');
+ $().click($.blockUI.impl.boxHandler).bind('keypress', $.blockUI.impl.boxHandler);
+ }
+ else
+ this.bind(1, el);
+ m.append(msg).show();
+ if (msg.jquery) msg.show();
+ if (opts.displayMode) return;
+ if (full) {
+ this.pageBlock = m[0];
+ this.pageBlockEls = $(':input:enabled:visible',this.pageBlock);
+ setTimeout(this.focus, 20);
+ }
+ else this.center(m[0]);
+ },
+ remove: function(el, opts) {
+ var o = $.extend({}, $.blockUI.defaults, opts);
+ this.bind(0, el);
+ var full = el == window;
+ var els = full ? $('body').children().filter('.blockUI') : $('.blockUI', el);
+ if (full) this.pageBlock = this.pageBlockEls = null;
+
+ if (o.fadeOut) {
+ els.fadeOut(o.fadeTime, function() {
+ if (this.parentNode) this.parentNode.removeChild(this);
+ });
+ }
+ else els.remove();
+ },
+ boxRemove: function(el) {
+ $().unbind('click',$.blockUI.impl.boxHandler).unbind('keypress', $.blockUI.impl.boxHandler);
+ if (this.boxCallback)
+ this.boxCallback(this.box);
+ $('body .displayBox').hide().remove();
+ },
+ // event handler to suppress keyboard/mouse events when blocking
+ handler: function(e) {
+ if (e.keyCode && e.keyCode == 9) {
+ if ($.blockUI.impl.pageBlock && !$.blockUI.defaults.allowTabToLeave) {
+ var els = $.blockUI.impl.pageBlockEls;
+ var fwd = !e.shiftKey && e.target == els[els.length-1];
+ var back = e.shiftKey && e.target == els[0];
+ if (fwd || back) {
+ setTimeout(function(){$.blockUI.impl.focus(back)},10);
+ return false;
+ }
+ }
+ }
+ if ($(e.target).parents('div.blockMsg').length > 0)
+ return true;
+ return $(e.target).parents().children().filter('div.blockUI').length == 0;
+ },
+ boxHandler: function(e) {
+ if ((e.keyCode && e.keyCode == 27) || (e.type == 'click' && $(e.target).parents('div.blockMsg').length == 0))
+ $.blockUI.impl.boxRemove();
+ return true;
+ },
+ // bind/unbind the handler
+ bind: function(b, el) {
+ var full = el == window;
+ // don't bother unbinding if there is nothing to unbind
+ if (!b && (full && !this.pageBlock || !full && !el.$blocked)) return;
+ if (!full) el.$blocked = b;
+ var $e = $(el).find('a,:input');
+ $.each(['mousedown','mouseup','keydown','keypress','click'], function(i,o) {
+ $e[b?'bind':'unbind'](o, $.blockUI.impl.handler);
+ });
+ },
+ focus: function(back) {
+ if (!$.blockUI.impl.pageBlockEls) return;
+ var e = $.blockUI.impl.pageBlockEls[back===true ? $.blockUI.impl.pageBlockEls.length-1 : 0];
+ if (e) e.focus();
+ },
+ center: function(el) {
+ var p = el.parentNode, s = el.style;
+ var l = ((p.offsetWidth - el.offsetWidth)/2) - this.sz(p,'borderLeftWidth');
+ var t = ((p.offsetHeight - el.offsetHeight)/2) - this.sz(p,'borderTopWidth');
+ s.left = l > 0 ? (l+'px') : '0';
+ s.top = t > 0 ? (t+'px') : '0';
+ },
+ sz: function(el, p) { return parseInt($.css(el,p))||0; }
+};
+
+})(jQuery);
diff --git a/libs/jquery/original lib/jquery.dimensions.js b/libs/jquery/original lib/jquery.dimensions.js
new file mode 100644
index 0000000000..620e182342
--- /dev/null
+++ b/libs/jquery/original lib/jquery.dimensions.js
@@ -0,0 +1,655 @@
+/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+ *
+ * $LastChangedDate$
+ * $Rev$
+ *
+ * Version: 1.1.2
+ *
+ * Requires: jQuery 1.1.3+
+ */
+
+(function($){
+
+// store a copy of the core height and width methods
+var height = $.fn.height,
+ width = $.fn.width;
+
+$.fn.extend({
+ /**
+ * If used on document, returns the document's height (innerHeight).
+ * If used on window, returns the viewport's (window) height.
+ * See core docs on height() to see what happens when used on an element.
+ *
+ * @example $("#testdiv").height()
+ * @result 200
+ *
+ * @example $(document).height()
+ * @result 800
+ *
+ * @example $(window).height()
+ * @result 400
+ *
+ * @name height
+ * @type Number
+ * @cat Plugins/Dimensions
+ */
+ height: function() {
+ if ( !this[0] ) error();
+ if ( this[0] == window )
+ if ( $.browser.opera || ($.browser.safari && parseInt($.browser.version) > 520) )
+ return self.innerHeight - (($(document).height() > self.innerHeight) ? getScrollbarWidth() : 0);
+ else if ( $.browser.safari )
+ return self.innerHeight;
+ else
+ return $.boxModel && document.documentElement.clientHeight || document.body.clientHeight;
+
+ if ( this[0] == document )
+ return Math.max( ($.boxModel && document.documentElement.scrollHeight || document.body.scrollHeight), document.body.offsetHeight );
+
+ return height.apply(this, arguments);
+ },
+
+ /**
+ * If used on document, returns the document's width (innerWidth).
+ * If used on window, returns the viewport's (window) width.
+ * See core docs on width() to see what happens when used on an element.
+ *
+ * @example $("#testdiv").width()
+ * @result 200
+ *
+ * @example $(document).width()
+ * @result 800
+ *
+ * @example $(window).width()
+ * @result 400
+ *
+ * @name width
+ * @type Number
+ * @cat Plugins/Dimensions
+ */
+ width: function() {
+ if (!this[0]) error();
+ if ( this[0] == window )
+ if ( $.browser.opera || ($.browser.safari && parseInt($.browser.version) > 520) )
+ return self.innerWidth - (($(document).width() > self.innerWidth) ? getScrollbarWidth() : 0);
+ else if ( $.browser.safari )
+ return self.innerWidth;
+ else
+ return $.boxModel && document.documentElement.clientWidth || document.body.clientWidth;
+
+ if ( this[0] == document )
+ if ($.browser.mozilla) {
+ // mozilla reports scrollWidth and offsetWidth as the same
+ var scrollLeft = self.pageXOffset;
+ self.scrollTo(99999999, self.pageYOffset);
+ var scrollWidth = self.pageXOffset;
+ self.scrollTo(scrollLeft, self.pageYOffset);
+ return document.body.offsetWidth + scrollWidth;
+ }
+ else
+ return Math.max( (($.boxModel && !$.browser.safari) && document.documentElement.scrollWidth || document.body.scrollWidth), document.body.offsetWidth );
+
+ return width.apply(this, arguments);
+ },
+
+ /**
+ * Gets the inner height (excludes the border and includes the padding) for the first matched element.
+ * If used on document, returns the document's height (innerHeight).
+ * If used on window, returns the viewport's (window) height.
+ *
+ * @example $("#testdiv").innerHeight()
+ * @result 210
+ *
+ * @name innerHeight
+ * @type Number
+ * @cat Plugins/Dimensions
+ */
+ innerHeight: function() {
+ if (!this[0]) error();
+ return this[0] == window || this[0] == document ?
+ this.height() :
+ this.is(':visible') ?
+ this[0].offsetHeight - num(this, 'borderTopWidth') - num(this, 'borderBottomWidth') :
+ this.height() + num(this, 'paddingTop') + num(this, 'paddingBottom');
+ },
+
+ /**
+ * Gets the inner width (excludes the border and includes the padding) for the first matched element.
+ * If used on document, returns the document's width (innerWidth).
+ * If used on window, returns the viewport's (window) width.
+ *
+ * @example $("#testdiv").innerWidth()
+ * @result 210
+ *
+ * @name innerWidth
+ * @type Number
+ * @cat Plugins/Dimensions
+ */
+ innerWidth: function() {
+ if (!this[0]) error();
+ return this[0] == window || this[0] == document ?
+ this.width() :
+ this.is(':visible') ?
+ this[0].offsetWidth - num(this, 'borderLeftWidth') - num(this, 'borderRightWidth') :
+ this.width() + num(this, 'paddingLeft') + num(this, 'paddingRight');
+ },
+
+ /**
+ * Gets the outer height (includes the border and padding) for the first matched element.
+ * If used on document, returns the document's height (innerHeight).
+ * If used on window, returns the viewport's (window) height.
+ *
+ * The margin can be included in the calculation by passing an options map with margin
+ * set to true.
+ *
+ * @example $("#testdiv").outerHeight()
+ * @result 220
+ *
+ * @example $("#testdiv").outerHeight({ margin: true })
+ * @result 240
+ *
+ * @name outerHeight
+ * @type Number
+ * @param Map options Optional settings to configure the way the outer height is calculated.
+ * @cat Plugins/Dimensions
+ */
+ outerHeight: function(options) {
+ if (!this[0]) error();
+ options = $.extend({ margin: false }, options || {});
+ return this[0] == window || this[0] == document ?
+ this.height() :
+ this.is(':visible') ?
+ this[0].offsetHeight + (options.margin ? (num(this, 'marginTop') + num(this, 'marginBottom')) : 0) :
+ this.height()
+ + num(this,'borderTopWidth') + num(this, 'borderBottomWidth')
+ + num(this, 'paddingTop') + num(this, 'paddingBottom')
+ + (options.margin ? (num(this, 'marginTop') + num(this, 'marginBottom')) : 0);
+ },
+
+ /**
+ * Gets the outer width (including the border and padding) for the first matched element.
+ * If used on document, returns the document's width (innerWidth).
+ * If used on window, returns the viewport's (window) width.
+ *
+ * The margin can be included in the calculation by passing an options map with margin
+ * set to true.
+ *
+ * @example $("#testdiv").outerWidth()
+ * @result 1000
+ *
+ * @example $("#testdiv").outerWidth({ margin: true })
+ * @result 1020
+ *
+ * @name outerHeight
+ * @type Number
+ * @param Map options Optional settings to configure the way the outer width is calculated.
+ * @cat Plugins/Dimensions
+ */
+ outerWidth: function(options) {
+ if (!this[0]) error();
+ options = $.extend({ margin: false }, options || {});
+ return this[0] == window || this[0] == document ?
+ this.width() :
+ this.is(':visible') ?
+ this[0].offsetWidth + (options.margin ? (num(this, 'marginLeft') + num(this, 'marginRight')) : 0) :
+ this.width()
+ + num(this, 'borderLeftWidth') + num(this, 'borderRightWidth')
+ + num(this, 'paddingLeft') + num(this, 'paddingRight')
+ + (options.margin ? (num(this, 'marginLeft') + num(this, 'marginRight')) : 0);
+ },
+
+ /**
+ * Gets how many pixels the user has scrolled to the right (scrollLeft).
+ * Works on containers with overflow: auto and window/document.
+ *
+ * @example $(window).scrollLeft()
+ * @result 100
+ *
+ * @example $(document).scrollLeft()
+ * @result 100
+ *
+ * @example $("#testdiv").scrollLeft()
+ * @result 100
+ *
+ * @name scrollLeft
+ * @type Number
+ * @cat Plugins/Dimensions
+ */
+ /**
+ * Sets the scrollLeft property for each element and continues the chain.
+ * Works on containers with overflow: auto and window/document.
+ *
+ * @example $(window).scrollLeft(100).scrollLeft()
+ * @result 100
+ *
+ * @example $(document).scrollLeft(100).scrollLeft()
+ * @result 100
+ *
+ * @example $("#testdiv").scrollLeft(100).scrollLeft()
+ * @result 100
+ *
+ * @name scrollLeft
+ * @param Number value A positive number representing the desired scrollLeft.
+ * @type jQuery
+ * @cat Plugins/Dimensions
+ */
+ scrollLeft: function(val) {
+ if (!this[0]) error();
+ if ( val != undefined )
+ // set the scroll left
+ return this.each(function() {
+ if (this == window || this == document)
+ window.scrollTo( val, $(window).scrollTop() );
+ else
+ this.scrollLeft = val;
+ });
+
+ // return the scroll left offest in pixels
+ if ( this[0] == window || this[0] == document )
+ return self.pageXOffset ||
+ $.boxModel && document.documentElement.scrollLeft ||
+ document.body.scrollLeft;
+
+ return this[0].scrollLeft;
+ },
+
+ /**
+ * Gets how many pixels the user has scrolled to the bottom (scrollTop).
+ * Works on containers with overflow: auto and window/document.
+ *
+ * @example $(window).scrollTop()
+ * @result 100
+ *
+ * @example $(document).scrollTop()
+ * @result 100
+ *
+ * @example $("#testdiv").scrollTop()
+ * @result 100
+ *
+ * @name scrollTop
+ * @type Number
+ * @cat Plugins/Dimensions
+ */
+ /**
+ * Sets the scrollTop property for each element and continues the chain.
+ * Works on containers with overflow: auto and window/document.
+ *
+ * @example $(window).scrollTop(100).scrollTop()
+ * @result 100
+ *
+ * @example $(document).scrollTop(100).scrollTop()
+ * @result 100
+ *
+ * @example $("#testdiv").scrollTop(100).scrollTop()
+ * @result 100
+ *
+ * @name scrollTop
+ * @param Number value A positive number representing the desired scrollTop.
+ * @type jQuery
+ * @cat Plugins/Dimensions
+ */
+ scrollTop: function(val) {
+ if (!this[0]) error();
+ if ( val != undefined )
+ // set the scroll top
+ return this.each(function() {
+ if (this == window || this == document)
+ window.scrollTo( $(window).scrollLeft(), val );
+ else
+ this.scrollTop = val;
+ });
+
+ // return the scroll top offset in pixels
+ if ( this[0] == window || this[0] == document )
+ return self.pageYOffset ||
+ $.boxModel && document.documentElement.scrollTop ||
+ document.body.scrollTop;
+
+ return this[0].scrollTop;
+ },
+
+ /**
+ * Gets the top and left positioned offset in pixels.
+ * The positioned offset is the offset between a positioned
+ * parent and the element itself.
+ *
+ * For accurate calculations make sure to use pixel values for margins, borders and padding.
+ *
+ * @example $("#testdiv").position()
+ * @result { top: 100, left: 100 }
+ *
+ * @example var position = {};
+ * $("#testdiv").position(position)
+ * @result position = { top: 100, left: 100 }
+ *
+ * @name position
+ * @param Object returnObject Optional An object to store the return value in, so as not to break the chain. If passed in the
+ * chain will not be broken and the result will be assigned to this object.
+ * @type Object
+ * @cat Plugins/Dimensions
+ */
+ position: function(returnObject) {
+ return this.offset({ margin: false, scroll: false, relativeTo: this.offsetParent() }, returnObject);
+ },
+
+ /**
+ * Gets the location of the element in pixels from the top left corner of the viewport.
+ * The offset method takes an optional map of key value pairs to configure the way
+ * the offset is calculated. Here are the different options.
+ *
+ * (Boolean) margin - Should the margin of the element be included in the calculations? True by default.
+ * (Boolean) border - Should the border of the element be included in the calculations? False by default.
+ * (Boolean) padding - Should the padding of the element be included in the calculations? False by default.
+ * (Boolean) scroll - Should the scroll offsets of the parent elements be included in the calculations? True by default.
+ * When true it adds the total scroll offsets of all parents to the total offset and also adds two
+ * properties to the returned object, scrollTop and scrollLeft.
+ * (Boolean) lite - When true it will use the offsetLite method instead of the full-blown, slower offset method. False by default.
+ * Only use this when margins, borders and padding calculations don't matter.
+ * (HTML Element) relativeTo - This should be a parent of the element and should have position (like absolute or relative).
+ * It will retreive the offset relative to this parent element. By default it is the body element.
+ *
+ * Also an object can be passed as the second paramater to
+ * catch the value of the return and continue the chain.
+ *
+ * For accurate calculations make sure to use pixel values for margins, borders and padding.
+ *
+ * Known issues:
+ * - Issue: A div positioned relative or static without any content before it and its parent will report an offsetTop of 0 in Safari
+ * Workaround: Place content before the relative div ... and set height and width to 0 and overflow to hidden
+ *
+ * @example $("#testdiv").offset()
+ * @result { top: 100, left: 100, scrollTop: 10, scrollLeft: 10 }
+ *
+ * @example $("#testdiv").offset({ scroll: false })
+ * @result { top: 90, left: 90 }
+ *
+ * @example var offset = {}
+ * $("#testdiv").offset({ scroll: false }, offset)
+ * @result offset = { top: 90, left: 90 }
+ *
+ * @name offset
+ * @param Map options Optional settings to configure the way the offset is calculated.
+ * @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the
+ * chain will not be broken and the result will be assigned to this object.
+ * @type Object
+ * @cat Plugins/Dimensions
+ */
+ offset: function(options, returnObject) {
+ if (!this[0]) error();
+ var x = 0, y = 0, sl = 0, st = 0,
+ elem = this[0], parent = this[0], op, parPos, elemPos = $.css(elem, 'position'),
+ mo = $.browser.mozilla, ie = $.browser.msie, oa = $.browser.opera,
+ sf = $.browser.safari, sf3 = $.browser.safari && parseInt($.browser.version) > 520,
+ absparent = false, relparent = false,
+ options = $.extend({ margin: true, border: false, padding: false, scroll: true, lite: false, relativeTo: document.body }, options || {});
+
+ // Use offsetLite if lite option is true
+ if (options.lite) return this.offsetLite(options, returnObject);
+ // Get the HTMLElement if relativeTo is a jquery collection
+ if (options.relativeTo.jquery) options.relativeTo = options.relativeTo[0];
+
+ if (elem.tagName == 'BODY') {
+ // Safari 2 is the only one to get offsetLeft and offsetTop properties of the body "correct"
+ // Except they all mess up when the body is positioned absolute or relative
+ x = elem.offsetLeft;
+ y = elem.offsetTop;
+ // Mozilla ignores margin and subtracts border from body element
+ if (mo) {
+ x += num(elem, 'marginLeft') + (num(elem, 'borderLeftWidth')*2);
+ y += num(elem, 'marginTop') + (num(elem, 'borderTopWidth') *2);
+ } else
+ // Opera ignores margin
+ if (oa) {
+ x += num(elem, 'marginLeft');
+ y += num(elem, 'marginTop');
+ } else
+ // IE does not add the border in Standards Mode
+ if ((ie && jQuery.boxModel)) {
+ x += num(elem, 'borderLeftWidth');
+ y += num(elem, 'borderTopWidth');
+ } else
+ // Safari 3 doesn't not include border or margin
+ if (sf3) {
+ x += num(elem, 'marginLeft') + num(elem, 'borderLeftWidth');
+ y += num(elem, 'marginTop') + num(elem, 'borderTopWidth');
+ }
+ } else {
+ do {
+ parPos = $.css(parent, 'position');
+
+ x += parent.offsetLeft;
+ y += parent.offsetTop;
+
+ // Mozilla and IE do not add the border
+ // Mozilla adds the border for table cells
+ if ((mo && !parent.tagName.match(/^t[d|h]$/i)) || ie || sf3) {
+ // add borders to offset
+ x += num(parent, 'borderLeftWidth');
+ y += num(parent, 'borderTopWidth');
+
+ // Mozilla does not include the border on body if an element isn't positioned absolute and is without an absolute parent
+ if (mo && parPos == 'absolute') absparent = true;
+ // IE does not include the border on the body if an element is position static and without an absolute or relative parent
+ if (ie && parPos == 'relative') relparent = true;
+ }
+
+ op = parent.offsetParent || document.body;
+ if (options.scroll || mo) {
+ do {
+ if (options.scroll) {
+ // get scroll offsets
+ sl += parent.scrollLeft;
+ st += parent.scrollTop;
+ }
+
+ // Opera sometimes incorrectly reports scroll offset for elements with display set to table-row or inline
+ if (oa && ($.css(parent, 'display') || '').match(/table-row|inline/)) {
+ sl = sl - ((parent.scrollLeft == parent.offsetLeft) ? parent.scrollLeft : 0);
+ st = st - ((parent.scrollTop == parent.offsetTop) ? parent.scrollTop : 0);
+ }
+
+ // Mozilla does not add the border for a parent that has overflow set to anything but visible
+ if (mo && parent != elem && $.css(parent, 'overflow') != 'visible') {
+ x += num(parent, 'borderLeftWidth');
+ y += num(parent, 'borderTopWidth');
+ }
+
+ parent = parent.parentNode;
+ } while (parent != op);
+ }
+ parent = op;
+
+ // exit the loop if we are at the relativeTo option but not if it is the body or html tag
+ if (parent == options.relativeTo && !(parent.tagName == 'BODY' || parent.tagName == 'HTML')) {
+ // Mozilla does not add the border for a parent that has overflow set to anything but visible
+ if (mo && parent != elem && $.css(parent, 'overflow') != 'visible') {
+ x += num(parent, 'borderLeftWidth');
+ y += num(parent, 'borderTopWidth');
+ }
+ // Safari 2 and opera includes border on positioned parents
+ if ( ((sf && !sf3) || oa) && parPos != 'static' ) {
+ x -= num(op, 'borderLeftWidth');
+ y -= num(op, 'borderTopWidth');
+ }
+ break;
+ }
+ if (parent.tagName == 'BODY' || parent.tagName == 'HTML') {
+ // Safari 2 and IE Standards Mode doesn't add the body margin for elments positioned with static or relative
+ if (((sf && !sf3) || (ie && $.boxModel)) && elemPos != 'absolute' && elemPos != 'fixed') {
+ x += num(parent, 'marginLeft');
+ y += num(parent, 'marginTop');
+ }
+ // Safari 3 does not include the border on body
+ // Mozilla does not include the border on body if an element isn't positioned absolute and is without an absolute parent
+ // IE does not include the border on the body if an element is positioned static and without an absolute or relative parent
+ if ( sf3 || (mo && !absparent && elemPos != 'fixed') ||
+ (ie && elemPos == 'static' && !relparent) ) {
+ x += num(parent, 'borderLeftWidth');
+ y += num(parent, 'borderTopWidth');
+ }
+ break; // Exit the loop
+ }
+ } while (parent);
+ }
+
+ var returnValue = handleOffsetReturn(elem, options, x, y, sl, st);
+
+ if (returnObject) { $.extend(returnObject, returnValue); return this; }
+ else { return returnValue; }
+ },
+
+ /**
+ * Gets the location of the element in pixels from the top left corner of the viewport.
+ * This method is much faster than offset but not as accurate when borders and margins are
+ * on the element and/or its parents. This method can be invoked
+ * by setting the lite option to true in the offset method.
+ * The offsetLite method takes an optional map of key value pairs to configure the way
+ * the offset is calculated. Here are the different options.
+ *
+ * (Boolean) margin - Should the margin of the element be included in the calculations? True by default.
+ * (Boolean) border - Should the border of the element be included in the calculations? False by default.
+ * (Boolean) padding - Should the padding of the element be included in the calcuations? False by default.
+ * (Boolean) scroll - Sould the scroll offsets of the parent elements be included int he calculations? True by default.
+ * When true it adds the total scroll offsets of all parents to the total offset and also adds two
+ * properties to the returned object, scrollTop and scrollLeft.
+ * (HTML Element) relativeTo - This should be a parent of the element and should have position (like absolute or relative).
+ * It will retreive the offset relative to this parent element. By default it is the body element.
+ *
+ * @name offsetLite
+ * @param Map options Optional settings to configure the way the offset is calculated.
+ * @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the
+ * chain will not be broken and the result will be assigned to this object.
+ * @type Object
+ * @cat Plugins/Dimensions
+ */
+ offsetLite: function(options, returnObject) {
+ if (!this[0]) error();
+ var x = 0, y = 0, sl = 0, st = 0, parent = this[0], offsetParent,
+ options = $.extend({ margin: true, border: false, padding: false, scroll: true, relativeTo: document.body }, options || {});
+
+ // Get the HTMLElement if relativeTo is a jquery collection
+ if (options.relativeTo.jquery) options.relativeTo = options.relativeTo[0];
+
+ do {
+ x += parent.offsetLeft;
+ y += parent.offsetTop;
+
+ offsetParent = parent.offsetParent || document.body;
+ if (options.scroll) {
+ // get scroll offsets
+ do {
+ sl += parent.scrollLeft;
+ st += parent.scrollTop;
+ parent = parent.parentNode;
+ } while(parent != offsetParent);
+ }
+ parent = offsetParent;
+ } while (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML' && parent != options.relativeTo);
+
+ var returnValue = handleOffsetReturn(this[0], options, x, y, sl, st);
+
+ if (returnObject) { $.extend(returnObject, returnValue); return this; }
+ else { return returnValue; }
+ },
+
+ /**
+ * Returns a jQuery collection with the positioned parent of
+ * the first matched element. This is the first parent of
+ * the element that has position (as in relative or absolute).
+ *
+ * @name offsetParent
+ * @type jQuery
+ * @cat Plugins/Dimensions
+ */
+ offsetParent: function() {
+ if (!this[0]) error();
+ var offsetParent = this[0].offsetParent;
+ while ( offsetParent && (offsetParent.tagName != 'BODY' && $.css(offsetParent, 'position') == 'static') )
+ offsetParent = offsetParent.offsetParent;
+ return $(offsetParent);
+ }
+});
+
+/**
+ * Throws an error message when no elements are in the jQuery collection
+ * @private
+ */
+var error = function() {
+ throw "Dimensions: jQuery collection is empty";
+};
+
+/**
+ * Handles converting a CSS Style into an Integer.
+ * @private
+ */
+var num = function(el, prop) {
+ return parseInt($.css(el.jquery?el[0]:el,prop))||0;
+};
+
+/**
+ * Handles the return value of the offset and offsetLite methods.
+ * @private
+ */
+var handleOffsetReturn = function(elem, options, x, y, sl, st) {
+ if ( !options.margin ) {
+ x -= num(elem, 'marginLeft');
+ y -= num(elem, 'marginTop');
+ }
+
+ // Safari and Opera do not add the border for the element
+ if ( options.border && (($.browser.safari && parseInt($.browser.version) < 520) || $.browser.opera) ) {
+ x += num(elem, 'borderLeftWidth');
+ y += num(elem, 'borderTopWidth');
+ } else if ( !options.border && !(($.browser.safari && parseInt($.browser.version) < 520) || $.browser.opera) ) {
+ x -= num(elem, 'borderLeftWidth');
+ y -= num(elem, 'borderTopWidth');
+ }
+
+ if ( options.padding ) {
+ x += num(elem, 'paddingLeft');
+ y += num(elem, 'paddingTop');
+ }
+
+ // do not include scroll offset on the element ... opera sometimes reports scroll offset as actual offset
+ if ( options.scroll && (!$.browser.opera || elem.offsetLeft != elem.scrollLeft && elem.offsetTop != elem.scrollLeft) ) {
+ sl -= elem.scrollLeft;
+ st -= elem.scrollTop;
+ }
+
+ return options.scroll ? { top: y - st, left: x - sl, scrollTop: st, scrollLeft: sl }
+ : { top: y, left: x };
+};
+
+/**
+ * Gets the width of the OS scrollbar
+ * @private
+ */
+var scrollbarWidth = 0;
+var getScrollbarWidth = function() {
+ if (!scrollbarWidth) {
+ var testEl = $('<div>')
+ .css({
+ width: 100,
+ height: 100,
+ overflow: 'auto',
+ position: 'absolute',
+ top: -1000,
+ left: -1000
+ })
+ .appendTo('body');
+ scrollbarWidth = 100 - testEl
+ .append('<div>')
+ .find('div')
+ .css({
+ width: '100%',
+ height: 200
+ })
+ .width();
+ testEl.remove();
+ }
+ return scrollbarWidth;
+};
+
+})(jQuery); \ No newline at end of file
diff --git a/libs/jquery/original lib/jquery.js b/libs/jquery/original lib/jquery.js
new file mode 100644
index 0000000000..fbe23126e0
--- /dev/null
+++ b/libs/jquery/original lib/jquery.js
@@ -0,0 +1,31 @@
+/*
+ * jQuery 1.2.2 - New Wave Javascript
+ *
+ * Copyright (c) 2007 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2008-01-14 17:56:07 -0500 (Mon, 14 Jan 2008) $
+ * $Rev: 4454 $
+ */
+(function(){if(window.jQuery)var _jQuery=window.jQuery;var jQuery=window.jQuery=function(selector,context){return new jQuery.prototype.init(selector,context);};if(window.$)var _$=window.$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;var isSimple=/^.[^:#\[\.]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}else if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem)if(elem.id!=match[3])return jQuery().find(selector);else{this[0]=elem;this.length=1;return this;}else
+selector=[];}}else
+return new jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.2",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;this.each(function(i){if(this==elem)ret=i;});return ret;},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],name)||undefined;else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div"),container2=document.createElement("div");container.appendChild(clone);container2.innerHTML=container.innerHTML;return container2.firstChild;}else
+return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
+selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return!selector?this:this.pushStack(jQuery.merge(this.get(),selector.constructor==String?jQuery(selector).get():selector.length!=undefined&&(!selector.nodeName||jQuery.nodeName(selector,"form"))?selector:[selector]));},is:function(selector){return selector?jQuery.multiFilter(selector,this).length>0:false;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
+return(this[0].value||"").replace(/\r/g,"");}return undefined;}return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=value.constructor==Array?value:[value];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
+this.value=value;});},html:function(value){return value==undefined?(this.length?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem);}else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.prototype.init.prototype=jQuery.prototype;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
+jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==1){target=this;i=0;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){if(target===options[name])continue;if(deep&&options[name]&&typeof options[name]=="object"&&target[name]&&!options[name].nodeType)target[name]=jQuery.extend(target[name],options[name]);else if(options[name]!=undefined)target[name]=options[name];}return target;};var expando="jQuery"+(new Date()).getTime(),uuid=0,windowData={};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
+script.appendChild(document.createTextNode(data));head.appendChild(script);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!=undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){if(args){if(object.length==undefined){for(var name in object)if(callback.apply(object[name],args)===false)break;}else
+for(var i=0,length=object.length;i<length;i++)if(callback.apply(object[i],args)===false)break;}else{if(object.length==undefined){for(var name in object)if(callback.call(object[name],name,object[name])===false)break;}else
+for(var i=0,length=object.length,value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
+jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret;function color(elem){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=elem.style.display;elem.style.display="block";elem.style.display=save;}if(name.match(/float/i))name=styleFloat;if(!force&&elem.style&&elem.style[name])ret=elem.style[name];else if(document.defaultView&&document.defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var getComputedStyle=document.defaultView.getComputedStyle(elem,null);if(getComputedStyle&&!color(elem))ret=getComputedStyle.getPropertyValue(name);else{var swap=[],stack=[];for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(var i=0;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(getComputedStyle&&getComputedStyle.getPropertyValue(name))||"";for(var i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left,runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem=elem.toString();if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
+ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,""+value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(typeof array!="array")for(var i=0,length=array.length;i<length;i++)ret.push(array[i]);else
+ret=array.slice(0);return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]==elem)return i;return-1;},merge:function(first,second){if(jQuery.browser.msie){for(var i=0;second[i];i++)if(second[i].nodeType!=8)first.push(second[i]);}else
+for(var i=0;second[i];i++)first.push(second[i]);return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){if(typeof callback=="string")callback=eval("false||function(a,i){return "+callback+"}");var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv&&callback(elems[i],i)||inv&&!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!==null&&value!=undefined){if(value.constructor!=Array)value=[value];ret=ret.concat(value);}}return ret;}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength",selectedIndex:"selectedIndex",defaultValue:"defaultValue",tagName:"tagName",nodeName:"nodeName"}});jQuery.each({parent:"elem.parentNode",parents:"jQuery.dir(elem,'parentNode')",next:"jQuery.nth(elem,2,'nextSibling')",prev:"jQuery.nth(elem,2,'previousSibling')",nextAll:"jQuery.dir(elem,'nextSibling')",prevAll:"jQuery.dir(elem,'previousSibling')",siblings:"jQuery.sibling(elem.parentNode.firstChild,elem)",children:"jQuery.sibling(elem.firstChild)",contents:"jQuery.nodeName(elem,'iframe')?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)"},function(name,fn){fn=eval("false||function(elem){return "+fn+"}");jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","first-child":"a.parentNode.getElementsByTagName('*')[0]==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",parent:"a.firstChild",empty:"!a.firstChild",contains:"(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"'text'==a.type",radio:"'radio'==a.type",checkbox:"'checkbox'==a.type",file:"'file'==a.type",password:"'password'==a.type",submit:"'submit'==a.type",image:"'image'==a.type",reset:"'reset'==a.type",button:'"button"==a.type||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)",has:"jQuery.find(m[3],a).length",header:"/h\\d/i.test(a.nodeName)",animated:"jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var f=jQuery.expr[m[1]];if(typeof f!="string")f=jQuery.expr[m[1]][m[2]];f=eval("false||function(a,i){return "+f+"}");r=jQuery.grep(r,f,not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval!=undefined)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)return val;val=jQuery.event.handle.apply(arguments.callee.elem,arguments);return val;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined)for(var type in events)this.remove(elem,type);else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
+for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data||[]);if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event)data.unshift(this.fix({type:type,target:elem}));data[0].type=type;if(jQuery.isFunction(jQuery.data(elem,"handle")))val=jQuery.data(elem,"handle").apply(elem,data);if(!fn&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var handlers=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in handlers){var handler=handlers[j];args[0].handler=handler;args[0].data=handler.data;if(!parts[1]||handler.type==parts[1]){var ret=handler.apply(this,args);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=originalEvent.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;arguments[0].type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;arguments[0].type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0])return jQuery.event.trigger(type,data,this[0],false,fn);return undefined;},toggle:function(){var args=arguments;return this.click(function(event){this.lastToggle=0==this.lastToggle?1:0;event.preventDefault();return args[this.lastToggle].apply(this,arguments)||false;});},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
+jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url))return this.bind("load",url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){var jsonp,jsre=/=\?(&|$)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get"){var ts=(new Date()).getTime();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if((!s.url.indexOf("http")||!s.url.indexOf("//"))&&(s.dataType=="script"||s.dataType=="json")&&s.type.toLowerCase()=="get"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async,s.username,s.password);try{if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");xml.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
+jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xml;},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||r.status==1223||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
+for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
+s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
+e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(!elem)return undefined;type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].apply(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=(new Date()).getTime();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522,fixed=jQuery.css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&jQuery.css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||jQuery.css(offsetChild,"position")=="absolute"))||(mozilla&&jQuery.css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}return results;};})(); \ No newline at end of file
diff --git a/libs/jquery/original lib/jquery.scrollTo.js b/libs/jquery/original lib/jquery.scrollTo.js
new file mode 100644
index 0000000000..e0fb42870e
--- /dev/null
+++ b/libs/jquery/original lib/jquery.scrollTo.js
@@ -0,0 +1,142 @@
+/**
+ * jQuery.ScrollTo
+ * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com
+ * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).
+ * Date: 1/2/2008
+ *
+ * @projectDescription Easy element scrolling using jQuery.
+ * Tested with jQuery 1.2.1. On FF 2.0.0.11, IE 6, Opera 9.22 and Safari 3 beta. on Windows.
+ *
+ * @author Ariel Flesler
+ * @version 1.3
+ *
+ * @id jQuery.scrollTo
+ * @id jQuery.fn.scrollTo
+ * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements.
+ * The different options for target are:
+ * - A number position (will be applied to all axes).
+ * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes
+ * - A jQuery/DOM element ( logically, child of the element to scroll )
+ * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc )
+ * - A hash { top:x, left:y }, x and y can be any kind of number/string like above.
+ * @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead.
+ * @param {Object} settings Hash of settings, optional.
+ * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'.
+ * @option {Number} duration The OVERALL length of the animation.
+ * @option {String} easing The easing method for the animation.
+ * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position.
+ * @option {Object, Number} offset Add/deduct from the end position. One number for both axis or { top:x, left:y }
+ * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends.
+ * @option {Function} onAfter Function to be called after the scrolling ends.
+ * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends.
+ * @return {jQuery} Returns the same jQuery object, for chaining.
+ *
+ * @example $('div').scrollTo( 340 );
+ *
+ * @example $('div').scrollTo( '+=340px', { axis:'y' } );
+ *
+ * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } );
+ *
+ * @example var second_child = document.getElementById('container').firstChild.nextSibling;
+ * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){
+ * alert('scrolled!!');
+ * }});
+ *
+ * @example $('div').scrollTo( { top: 300, left:'+=200' }, { offset:-20 } );
+ *
+ * Notes:
+ * - jQuery.scrollTo will make the whole window scroll, it accepts the same parameters as jQuery.fn.scrollTo.
+ * - The plugin no longer requires Dimensions.
+ * - If you are interested in animated anchor navigation, check http://jquery.com/plugins/project/LocalScroll.
+ * - The option 'margin' won't be valid, if the target is not a jQuery object or a DOM element.
+ * - The option 'queue' won't be taken into account, if only 1 axis is given.
+ */
+;(function( $ ){
+
+ $.scrollTo = function( target, duration, settings ){
+ $( $.browser.safari ? 'body' : 'html' ).scrollTo( target, duration, settings );
+ };
+
+ $.scrollTo.defaults = {
+ axis:'y',
+ duration:1
+ };
+
+ $.fn.scrollTo = function( target, duration, settings ){
+ if( typeof duration == 'object' ){
+ settings = duration;
+ duration = 0;
+ }
+ settings = $.extend( {}, $.scrollTo.defaults, settings );
+ if( !duration )
+ duration = settings.speed || settings.duration;//backward compatibility fix
+ settings.queue = settings.queue && settings.axis.length == 2;//make sure the settings are given right
+ if( settings.queue )
+ duration = Math.ceil( duration / 2 );//let's keep the overall speed, the same.
+ if( typeof settings.offset == 'number' )
+ settings.offset = { left: settings.offset, top: settings.offset };
+
+ return this.each(function(){
+ var elem = this, $elem = $(elem),
+ t = target, toff, attr = {},
+ win = $elem.is('html,body');
+ switch( typeof t ){
+ case 'number'://will pass the regex
+ case 'string':
+ if( /^([+-]=)?\d+(px)?$/.test(t) ){
+ t = { top:t, left:t };
+ break;//we are done
+ }
+ t = $(t,this);// relative selector, no break!
+ case 'object':
+ if( t.is || t.style )//DOM/jQuery
+ toff = (t = $(t)).offset();//get the real position of the target
+ }
+ $.each( settings.axis.split(''), parse );
+ animate( settings.onAfter );
+
+ function parse( i, axis ){
+ var Pos = axis == 'x' ? 'Left' : 'Top',
+ pos = Pos.toLowerCase(),
+ key = 'scroll' + Pos,
+ act = elem[key];
+
+ if( toff ){//jQuery/DOM
+ attr[key] = toff[pos] + ( win ? 0 : act - $elem.offset()[pos] );
+
+ if( settings.margin ){//if it's a dom element, reduce the margin
+ attr[key] -= parseInt(t.css('margin'+Pos)) || 0;
+ attr[key] -= parseInt(t.css('border'+Pos+'Width')) || 0;
+ }
+
+ if( settings.offset && settings.offset[pos] )
+ attr[key] += settings.offset[pos];
+ }else{
+ attr[key] = t[pos];
+ }
+
+ if( /^\d+$/.test(attr[key]) )
+ attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max(axis) );//check the limits
+
+ if( !i && settings.queue ){//queueing each axis is required
+ if( act != attr[key] )//don't waste time animating, if there's no need.
+ animate( settings.onAfterFirst );//intermediate animation
+ delete attr[key];//don't animate this axis again in the next iteration.
+ }
+ };
+
+ function animate( callback ){
+ $elem.animate( attr, duration, settings.easing, function(){
+ if( callback )
+ callback.call(this, $elem, attr, t );
+ });
+ };
+ function max( axis ){
+ var el = win ? $.browser.opera ? document.body : document.documentElement : elem,
+ Dim = axis == 'x' ? 'Width' : 'Height';
+ return el['scroll'+Dim] - el['client'+Dim];
+ };
+ });
+ };
+
+})( jQuery ); \ No newline at end of file
diff --git a/libs/jquery/original lib/thickbox.js b/libs/jquery/original lib/thickbox.js
new file mode 100644
index 0000000000..588a4da9ee
--- /dev/null
+++ b/libs/jquery/original lib/thickbox.js
@@ -0,0 +1,10 @@
+/*
+ * Thickbox 3 - One Box To Rule Them All.
+ * By Cody Lindley (http://www.codylindley.com)
+ * Copyright (c) 2007 cody lindley
+ * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
+*/
+
+var tb_pathToImage = "libs/jquery/loadingAnimation.gif";
+
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(o).2S(9(){1u(\'a.18, 3n.18, 3i.18\');1w=1p 1t();1w.L=2H});9 1u(b){$(b).s(9(){6 t=X.Q||X.1v||M;6 a=X.u||X.23;6 g=X.1N||P;19(t,a,g);X.2E();H P})}9 19(d,f,g){3m{3(2t o.v.J.2i==="2g"){$("v","11").r({A:"28%",z:"28%"});$("11").r("22","2Z");3(o.1Y("1F")===M){$("v").q("<U 5=\'1F\'></U><4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}n{3(o.1Y("B")===M){$("v").q("<4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}3(1K()){$("#B").1J("2B")}n{$("#B").1J("2z")}3(d===M){d=""}$("v").q("<4 5=\'K\'><1I L=\'"+1w.L+"\' /></4>");$(\'#K\').2y();6 h;3(f.O("?")!==-1){h=f.3l(0,f.O("?"))}n{h=f}6 i=/\\.2s$|\\.2q$|\\.2m$|\\.2l$|\\.2k$/;6 j=h.1C().2h(i);3(j==\'.2s\'||j==\'.2q\'||j==\'.2m\'||j==\'.2l\'||j==\'.2k\'){1D="";1G="";14="";1z="";1x="";R="";1n="";1r=P;3(g){E=$("a[@1N="+g+"]").36();25(D=0;((D<E.1c)&&(R===""));D++){6 k=E[D].u.1C().2h(i);3(!(E[D].u==f)){3(1r){1z=E[D].Q;1x=E[D].u;R="<1e 5=\'1X\'>&1d;&1d;<a u=\'#\'>2T &2R;</a></1e>"}n{1D=E[D].Q;1G=E[D].u;14="<1e 5=\'1U\'>&1d;&1d;<a u=\'#\'>&2O; 2N</a></1e>"}}n{1r=1b;1n="1t "+(D+1)+" 2L "+(E.1c)}}}S=1p 1t();S.1g=9(){S.1g=M;6 a=2x();6 x=a[0]-1M;6 y=a[1]-1M;6 b=S.z;6 c=S.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}13=b+30;1a=c+2G;$("#8").q("<a u=\'\' 5=\'1L\' Q=\'1o\'><1I 5=\'2F\' L=\'"+f+"\' z=\'"+b+"\' A=\'"+c+"\' 23=\'"+d+"\'/></a>"+"<4 5=\'2D\'>"+d+"<4 5=\'2C\'>"+1n+14+R+"</4></4><4 5=\'2A\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4>");$("#Z").s(G);3(!(14==="")){9 12(){3($(o).N("s",12)){$(o).N("s",12)}$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1D,1G,g);H P}$("#1U").s(12)}3(!(R==="")){9 1i(){$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1z,1x,g);H P}$("#1X").s(1i)}o.1h=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}n 3(I==3k){3(!(R=="")){o.1h="";1i()}}n 3(I==3j){3(!(14=="")){o.1h="";12()}}};16();$("#K").C();$("#1L").s(G);$("#8").r({Y:"T"})};S.L=f}n{6 l=f.2r(/^[^\\?]+\\??/,\'\');6 m=2p(l);13=(m[\'z\']*1)+30||3h;1a=(m[\'A\']*1)+3g||3f;W=13-30;V=1a-3e;3(f.O(\'2j\')!=-1){1E=f.1B(\'3d\');$("#15").C();3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4></4><U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\' > </U>")}n{$("#B").N();$("#8").q("<U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\'> </U>")}}n{3($("#8").r("Y")!="T"){3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\'>1l</a> 1k 1j 1s</4></4><4 5=\'F\' J=\'z:"+W+"p;A:"+V+"p\'></4>")}n{$("#B").N();$("#8").q("<4 5=\'F\' 3c=\'3b\' J=\'z:"+W+"p;A:"+V+"p;\'></4>")}}n{$("#F")[0].J.z=W+"p";$("#F")[0].J.A=V+"p";$("#F")[0].3a=0;$("#1H").11(d)}}$("#Z").s(G);3(f.O(\'37\')!=-1){$("#F").q($(\'#\'+m[\'26\']).1T());$("#8").24(9(){$(\'#\'+m[\'26\']).q($("#F").1T())});16();$("#K").C();$("#8").r({Y:"T"})}n 3(f.O(\'2j\')!=-1){16();3($.1q.35){$("#K").C();$("#8").r({Y:"T"})}}n{$("#F").34(f+="&1y="+(1p 33().32()),9(){16();$("#K").C();1u("#F a.18");$("#8").r({Y:"T"})})}}3(!m[\'1A\']){o.21=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}}}}31(e){}}9 1m(){$("#K").C();$("#8").r({Y:"T"})}9 G(){$("#2Y").N("s");$("#Z").N("s");$("#8").2X("2W",9(){$(\'#8,#B,#1F\').2V("24").N().C()});$("#K").C();3(2t o.v.J.2i=="2g"){$("v","11").r({A:"1Z",z:"1Z"});$("11").r("22","")}o.1h="";o.21="";H P}9 16(){$("#8").r({2U:\'-\'+20((13/2),10)+\'p\',z:13+\'p\'});3(!(1V.1q.2Q&&1V.1q.2P<7)){$("#8").r({38:\'-\'+20((1a/2),10)+\'p\'})}}9 2p(a){6 b={};3(!a){H b}6 c=a.1B(/[;&]/);25(6 i=0;i<c.1c;i++){6 d=c[i].1B(\'=\');3(!d||d.1c!=2){39}6 e=2a(d[0]);6 f=2a(d[1]);f=f.2r(/\\+/g,\' \');b[e]=f}H b}9 2x(){6 a=o.2M;6 w=1S.2o||1R.2o||(a&&a.1Q)||o.v.1Q;6 h=1S.1P||1R.1P||(a&&a.2n)||o.v.2n;1O=[w,h];H 1O}9 1K(){6 a=2K.2J.1C();3(a.O(\'2I\')!=-1&&a.O(\'3o\')!=-1){H 1b}}',62,211,'|||if|div|id|var||TB_window|function||||||||||||||else|document|px|append|css|click||href|body||||width|height|TB_overlay|remove|TB_Counter|TB_TempArray|TB_ajaxContent|tb_remove|return|keycode|style|TB_load|src|null|unbind|indexOf|false|title|TB_NextHTML|imgPreloader|block|iframe|ajaxContentH|ajaxContentW|this|display|TB_closeWindowButton||html|goPrev|TB_WIDTH|TB_PrevHTML|TB_iframeContent|tb_position||thickbox|tb_show|TB_HEIGHT|true|length|nbsp|span|Math|onload|onkeydown|goNext|Esc|or|close|tb_showIframe|TB_imageCount|Close|new|browser|TB_FoundURL|Key|Image|tb_init|name|imgLoader|TB_NextURL|random|TB_NextCaption|modal|split|toLowerCase|TB_PrevCaption|urlNoQuery|TB_HideSelect|TB_PrevURL|TB_ajaxWindowTitle|img|addClass|tb_detectMacXFF|TB_ImageOff|150|rel|arrayPageSize|innerHeight|clientWidth|self|window|children|TB_prev|jQuery|frameborder|TB_next|getElementById|auto|parseInt|onkeyup|overflow|alt|unload|for|inlineId||100||unescape|1000|round|hspace|TB_closeAjaxWindow|TB_title|undefined|match|maxHeight|TB_iframe|bmp|gif|png|clientHeight|innerWidth|tb_parseQuery|jpeg|replace|jpg|typeof|which|keyCode|event|tb_getPageSize|show|TB_overlayBG|TB_closeWindow|TB_overlayMacFFBGHack|TB_secondLine|TB_caption|blur|TB_Image|60|tb_pathToImage|mac|userAgent|navigator|of|documentElement|Prev|lt|version|msie|gt|ready|Next|marginLeft|trigger|fast|fadeOut|TB_imageOff|hidden||catch|getTime|Date|load|safari|get|TB_inline|marginTop|continue|scrollTop|TB_modal|class|TB_|45|440|40|630|input|188|190|substr|try|area|firefox'.split('|'),0,{})) \ No newline at end of file
diff --git a/libs/jquery/original lib/ui.mouse.js b/libs/jquery/original lib/ui.mouse.js
new file mode 100644
index 0000000000..3525fe43b2
--- /dev/null
+++ b/libs/jquery/original lib/ui.mouse.js
@@ -0,0 +1,253 @@
+(function($) {
+
+ //If the UI scope is not availalable, add it
+ $.ui = $.ui || {};
+
+ //Add methods that are vital for all mouse interaction stuff (plugin registering)
+ $.extend($.ui, {
+ plugin: {
+ add: function(w, c, o, p) {
+ var a = $.ui[w].prototype; if(!a.plugins[c]) a.plugins[c] = [];
+ a.plugins[c].push([o,p]);
+ },
+ call: function(instance, name, arguments) {
+ var c = instance.plugins[name]; if(!c) return;
+ var o = instance.interaction ? instance.interaction.options : instance.options;
+ var e = instance.interaction ? instance.interaction.element : instance.element;
+
+ for (var i = 0; i < c.length; i++) {
+ if (o[c[i][0]]) c[i][1].apply(e, arguments);
+ }
+ }
+ }
+ });
+
+ $.fn.mouseInteractionDestroy = function() {
+ this.each(function() {
+ if($.data(this, "ui-mouse")) $.data(this, "ui-mouse").destroy();
+ });
+ }
+
+ $.ui.mouseInteraction = function(el,o) {
+
+ if(!o) var o = {};
+ this.element = el;
+ $.data(this.element, "ui-mouse", this);
+
+ this.options = {};
+ $.extend(this.options, o);
+ $.extend(this.options, {
+ handle : o.handle ? ($(o.handle, el)[0] ? $(o.handle, el) : $(el)) : $(el),
+ helper: o.helper || 'original',
+ preventionDistance: o.preventionDistance || 0,
+ dragPrevention: o.dragPrevention ? o.dragPrevention.toLowerCase().split(',') : ['input','textarea','button','select','option'],
+ cursorAt: { top: ((o.cursorAt && o.cursorAt.top) ? o.cursorAt.top : 0), left: ((o.cursorAt && o.cursorAt.left) ? o.cursorAt.left : 0), bottom: ((o.cursorAt && o.cursorAt.bottom) ? o.cursorAt.bottom : 0), right: ((o.cursorAt && o.cursorAt.right) ? o.cursorAt.right : 0) },
+ cursorAtIgnore: (!o.cursorAt) ? true : false, //Internal property
+ appendTo: o.appendTo || 'parent'
+ })
+ o = this.options; //Just Lazyness
+
+ if(!this.options.nonDestructive && (o.helper == 'clone' || o.helper == 'original')) {
+
+ // Let's save the margins for better reference
+ o.margins = {
+ top: parseInt($(el).css('marginTop')) || 0,
+ left: parseInt($(el).css('marginLeft')) || 0,
+ bottom: parseInt($(el).css('marginBottom')) || 0,
+ right: parseInt($(el).css('marginRight')) || 0
+ };
+
+ // We have to add margins to our cursorAt
+ if(o.cursorAt.top != 0) o.cursorAt.top = o.margins.top;
+ if(o.cursorAt.left != 0) o.cursorAt.left += o.margins.left;
+ if(o.cursorAt.bottom != 0) o.cursorAt.bottom += o.margins.bottom;
+ if(o.cursorAt.right != 0) o.cursorAt.right += o.margins.right;
+
+
+ if(o.helper == 'original')
+ o.wasPositioned = $(el).css('position');
+
+ } else {
+ o.margins = { top: 0, left: 0, right: 0, bottom: 0 };
+ }
+
+ var self = this;
+ this.mousedownfunc = function(e) { // Bind the mousedown event
+ return self.click.apply(self, [e]);
+ }
+ o.handle.bind('mousedown', this.mousedownfunc);
+
+ //Prevent selection of text when starting the drag in IE
+ if($.browser.msie) $(this.element).attr('unselectable', 'on');
+
+ }
+
+ $.extend($.ui.mouseInteraction.prototype, {
+ plugins: {},
+ currentTarget: null,
+ lastTarget: null,
+ timer: null,
+ slowMode: false,
+ init: false,
+ destroy: function() {
+ this.options.handle.unbind('mousedown', this.mousedownfunc);
+ },
+ trigger: function(e) {
+ return this.click.apply(this, arguments);
+ },
+ click: function(e) {
+
+ var o = this.options;
+
+ window.focus();
+ if(e.which != 1) return true; //only left click starts dragging
+
+ // Prevent execution on defined elements
+ var targetName = (e.target) ? e.target.nodeName.toLowerCase() : e.srcElement.nodeName.toLowerCase();
+ for(var i=0;i<o.dragPrevention.length;i++) {
+ if(targetName == o.dragPrevention[i]) return true;
+ }
+
+ //Prevent execution on condition
+ if(o.startCondition && !o.startCondition.apply(this, [e])) return true;
+
+ var self = this;
+ this.mouseup = function(e) { return self.stop.apply(self, [e]); }
+ this.mousemove = function(e) { return self.drag.apply(self, [e]); }
+
+ var initFunc = function() { //This function get's called at bottom or after timeout
+ $(document).bind('mouseup', self.mouseup);
+ $(document).bind('mousemove', self.mousemove);
+ self.opos = [e.pageX,e.pageY]; // Get the original mouse position
+ }
+
+ if(o.preventionTimeout) { //use prevention timeout
+ if(this.timer) clearInterval(this.timer);
+ this.timer = setTimeout(function() { initFunc(); }, o.preventionTimeout);
+ return false;
+ }
+
+ initFunc();
+ return false;
+
+ },
+ start: function(e) {
+
+ var o = this.options; var a = this.element;
+ o.co = $(a).offset(); //get the current offset
+
+ this.helper = typeof o.helper == 'function' ? $(o.helper.apply(a, [e,this]))[0] : (o.helper == 'clone' ? $(a).clone()[0] : a);
+
+ if(o.appendTo == 'parent') { // Let's see if we have a positioned parent
+ var cp = a.parentNode;
+ while (cp) {
+ if(cp.style && ($(cp).css('position') == 'relative' || $(cp).css('position') == 'absolute')) {
+ o.pp = cp;
+ o.po = $(cp).offset();
+ o.ppOverflow = !!($(o.pp).css('overflow') == 'auto' || $(o.pp).css('overflow') == 'scroll'); //TODO!
+ break;
+ }
+ cp = cp.parentNode ? cp.parentNode : null;
+ };
+
+ if(!o.pp) o.po = { top: 0, left: 0 };
+ }
+
+ this.pos = [this.opos[0],this.opos[1]]; //Use the relative position
+ this.rpos = [this.pos[0],this.pos[1]]; //Save the absolute position
+
+ if(o.cursorAtIgnore) { // If we want to pick the element where we clicked, we borrow cursorAt and add margins
+ o.cursorAt.left = this.pos[0] - o.co.left + o.margins.left;
+ o.cursorAt.top = this.pos[1] - o.co.top + o.margins.top;
+ }
+
+
+
+ if(o.pp) { // If we have a positioned parent, we pick the draggable relative to it
+ this.pos[0] -= o.po.left;
+ this.pos[1] -= o.po.top;
+ }
+
+ this.slowMode = (o.cursorAt && (o.cursorAt.top-o.margins.top > 0 || o.cursorAt.bottom-o.margins.bottom > 0) && (o.cursorAt.left-o.margins.left > 0 || o.cursorAt.right-o.margins.right > 0)) ? true : false; //If cursorAt is within the helper, set slowMode to true
+
+ if(!o.nonDestructive) $(this.helper).css('position', 'absolute');
+ if(o.helper != 'original') $(this.helper).appendTo((o.appendTo == 'parent' ? a.parentNode : o.appendTo)).show();
+
+ // Remap right/bottom properties for cursorAt to left/top
+ if(o.cursorAt.right && !o.cursorAt.left) o.cursorAt.left = this.helper.offsetWidth+o.margins.right+o.margins.left - o.cursorAt.right;
+ if(o.cursorAt.bottom && !o.cursorAt.top) o.cursorAt.top = this.helper.offsetHeight+o.margins.top+o.margins.bottom - o.cursorAt.bottom;
+
+ this.init = true;
+
+ if(o._start) o._start.apply(a, [this.helper, this.pos, o.cursorAt, this, e]); // Trigger the start callback
+ this.helperSize = { width: outerWidth(this.helper), height: outerHeight(this.helper) }; //Set helper size property
+ return false;
+
+ },
+ stop: function(e) {
+
+ var o = this.options; var a = this.element; var self = this;
+
+ $(document).unbind('mouseup', self.mouseup);
+ $(document).unbind('mousemove', self.mousemove);
+
+ if(this.init == false) return this.opos = this.pos = null;
+ if(o._beforeStop) o._beforeStop.apply(a, [this.helper, this.pos, o.cursorAt, this, e]);
+
+ if(this.helper != a && !o.beQuietAtEnd) { // Remove helper, if it's not the original node
+ $(this.helper).remove(); this.helper = null;
+ }
+
+ if(!o.beQuietAtEnd) {
+ //if(o.wasPositioned) $(a).css('position', o.wasPositioned);
+ if(o._stop) o._stop.apply(a, [this.helper, this.pos, o.cursorAt, this, e]);
+ }
+
+ this.init = false;
+ this.opos = this.pos = null;
+ return false;
+
+ },
+ drag: function(e) {
+
+ if (!this.opos || ($.browser.msie && !e.button)) return this.stop.apply(this, [e]); // check for IE mouseup when moving into the document again
+ var o = this.options;
+
+ this.pos = [e.pageX,e.pageY]; //relative mouse position
+ if(this.rpos && this.rpos[0] == this.pos[0] && this.rpos[1] == this.pos[1]) return false;
+ this.rpos = [this.pos[0],this.pos[1]]; //absolute mouse position
+
+ if(o.pp) { //If we have a positioned parent, use a relative position
+ this.pos[0] -= o.po.left;
+ this.pos[1] -= o.po.top;
+ }
+
+ if( (Math.abs(this.rpos[0]-this.opos[0]) > o.preventionDistance || Math.abs(this.rpos[1]-this.opos[1]) > o.preventionDistance) && this.init == false) //If position is more than x pixels from original position, start dragging
+ this.start.apply(this,[e]);
+ else {
+ if(this.init == false) return false;
+ }
+
+ if(o._drag) o._drag.apply(this.element, [this.helper, this.pos, o.cursorAt, this, e]);
+ return false;
+
+ }
+ });
+
+ var num = function(el, prop) {
+ return parseInt($.css(el.jquery?el[0]:el,prop))||0;
+ };
+ function outerWidth(el) {
+ var $el = $(el), ow = $el.width();
+ for (var i = 0, props = ['borderLeftWidth', 'paddingLeft', 'paddingRight', 'borderRightWidth']; i < props.length; i++)
+ ow += num($el, props[i]);
+ return ow;
+ }
+ function outerHeight(el) {
+ var $el = $(el), oh = $el.width();
+ for (var i = 0, props = ['borderTopWidth', 'paddingTop', 'paddingBottom', 'borderBottomWidth']; i < props.length; i++)
+ oh += num($el, props[i]);
+ return oh;
+ }
+
+ })($);
diff --git a/libs/jquery/ui.sortable_modif.js b/libs/jquery/ui.sortable_modif.js
index 6126217977..c5348f9d96 100644
--- a/libs/jquery/ui.sortable_modif.js
+++ b/libs/jquery/ui.sortable_modif.js
@@ -1,11 +1,12 @@
-if (window.Node && Node.prototype && !Node.prototype.contains) {
- Node.prototype.contains = function (arg) {
- return !!(this.compareDocumentPosition(arg) & 16)
- }
-}
(function($) {
+ if (window.Node && Node.prototype && !Node.prototype.contains) {
+ Node.prototype.contains = function (arg) {
+ return !!(this.compareDocumentPosition(arg) & 16)
+ }
+ }
+
//Make nodes selectable by expression
$.extend($.expr[':'], { sortable: "(' '+a.className+' ').indexOf(' ui-sortable ')" });
@@ -266,3 +267,4 @@ if (window.Node && Node.prototype && !Node.prototype.contains) {
});
})(jQuery);
+