var number_format_dec = '.';
var number_format_th = '';
var number_format_point = '2';
var store_language = 'en';
var xcart_web_dir = "";
var images_dir = "/skin/common_files/images";
var lbl_no_items_have_been_selected = 'No items have been selected';
var current_area = 'C';
var currency_format = "AUD x";
var lbl_product_minquantity_error = "Sorry, the minimum order quantity for this product is {{min}}.";
var lbl_product_maxquantity_error = "Sorry, the maximum order quantity for this product is {{max}}.";
var lbl_product_quantity_type_error = "You can specify a number from {{min}} to {{max}}.";
var is_limit = true;
var lbl_required_field_is_empty = "The required field \'~~field~~\' is empty!";
var lbl_field_required = "Field is required";
var lbl_field_format_is_invalid = "The format of the \'~~field~~\' field is invalid.";
var txt_required_fields_not_completed = "The following required fields have not been completed: {{fields}} Do you wish to submit the form with these fields empty?";
var lbl_blockui_default_message = "Please wait...";
var lbl_error = 'Error';
var lbl_warning = 'Warning';
var lbl_ok = 'OK';
var lbl_yes = 'Yes';
var lbl_no = 'No';
var txt_minicart_total_note = 'Order subtotal does not cover discounts and extra costs like shipping charges, etc. The final cost of the order will be calculated at the checkout page.';
var txt_ajax_error_note = 'An error occurred while processing a request. Please refresh the page. If the problem still persists after refreshing the page please contact us<\/a> on the matter.';
var txt_email_invalid = "Email address is invalid! Please correct";
var email_validation_regexp = new RegExp("^[a-z0-9!#$%&\'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]*[a-z0-9])?$", "gi");
var is_admin_editor = false;
/* vim: set ts=2 sw=2 sts=2 et: */
/**
* Common JavaScript variables and functions
*
* @category X-Cart
* @package X-Cart
* @subpackage ____sub_package____
* @author Ruslan R. Fazlyev
* @copyright Copyright (c) 2001-2011 Ruslan R. Fazlyev
* @license http://www.x-cart.com/license.php X-Cart license agreement
* @version $Id: common.js,v 1.13.2.3 2011/01/10 13:12:10 ferz Exp $
* @link http://www.x-cart.com/
* @see ____file_see____
*/
/**
* Enviroment identificator
*/
var localIsDOM = document.getElementById ? true: false;
var localIsJava = navigator.javaEnabled();
var localIsStrict = document.compatMode == 'CSS1Compat';
var localPlatform = navigator.platform;
var localVersion = "0";
var localBrowser = "";
var localBFamily = "";
var isHttps = false;
if (window.opera && localIsDOM) {
localBFamily = localBrowser = "Opera";
if (navigator.userAgent.search(/^.*Opera.([\d.]+).*$/) != - 1) localVersion = navigator.userAgent.replace(/^.*Opera.([\d.]+).*$/, "$1");
else if (window.print) localVersion = "6";
else localVersion = "5";
} else {
if (document.all && document.all.item)
localBFamily = localBrowser = 'MSIE';
}
if (navigator.appName == "Netscape") {
localBFamily = "NC";
if (!localIsDOM) {
localBrowser = 'Netscape';
localVersion = navigator.userAgent.replace(/^.*Mozilla.([\d.]+).*$/, "$1");
if (localVersion != '') localVersion = "4";
}
else if (navigator.userAgent.indexOf("Chrome") >= 0) localBrowser = 'Chrome';
else if (navigator.userAgent.indexOf("Safari") >= 0) localBrowser = 'Safari';
else if (navigator.userAgent.indexOf("Netscape") >= 0) localBrowser = 'Netscape';
else if (navigator.userAgent.indexOf("Firefox") >= 0) localBrowser = 'Firefox';
else localBrowser = 'Mozilla';
}
if (navigator.userAgent.indexOf("MSMSGS") >= 0)
localBrowser = "WMessenger";
else if (navigator.userAgent.indexOf("e2dk") >= 0)
localBrowser = "Edonkey";
else if (navigator.userAgent.indexOf("Gnutella") + navigator.userAgent.indexOf("Gnucleus") >= 0)
localBrowser = "Gnutella";
else if (navigator.userAgent.indexOf("KazaaClient") >= 0)
localBrowser = "Kazaa";
if (localVersion == '0' && localBrowser != '') {
var rg = new RegExp("^.*" + localBrowser + ".([\\d.]+).*$");
localVersion = navigator.userAgent.replace(rg, "$1");
}
var localIsCookie = ((localBrowser == 'Netscape' && localVersion == '4')
? (document.cookie != '')
: navigator.cookieEnabled);
var isHttps = document.location.protocol == "https:";
function change_antibot_image(id) {
var image = document.getElementById(id);
if (image) {
var src = xcart_web_dir + "/antibot_image.php?tmp=" + Math.random() + "§ion=" + id + "®enerate=Y";
setTimeout(
function() {
image.src = src;
},
200);
}
$('#antibot_input_str', $(image).parents('form')[0]).val('');
}
/**
* Get real inner width (jsel- JQuery selector)
*/
function getRealWidth(jsel) {
var sw = $(jsel).attr('scrollWidth');
if ($.browser.opera)
return sw;
var pl = parseInt($(jsel).css('padding-left'));
if (!isNaN(pl)) sw -= pl;
var pr = parseInt($(jsel).css('padding-right'));
if (!isNaN(pr))
sw -= pr;
return sw;
}
/**
* Show note next to element
*/
function showNote(id, next_to) {
if ( typeof showNote.isReadyToShow == 'undefined' ) {
showNote.isReadyToShow = true;
}
if (
showNote.isReadyToShow
&& $('#' + id).css('display') == 'none'
) {
showNote.isReadyToShow = false;
var div = $('#' + id).get();
$('#' + id).remove();
$('body').append(div);
$('#' + id).show();
var sw = getRealWidth('#' + id);
$('#' + id).css('left', $(next_to).offset().left + $(next_to).width() + 'px');
$('#' + id).css('top', $(next_to).offset().top + 'px');
if (sw > $('#' + id).width()) {
$('#' + id).css('width', sw + 'px');
}
showNote.isReadyToShow = true;
}
}
/**
* Find element by classname
*/
function getElementsByClassName(clsName) {
var elem, cls;
var arr = [];
var elems = document.getElementsByTagName("*");
for (var i = 0; (elem = elems[i]); i++) {
if (elem.className == clsName) {
arr[arr.length] = elem;
}
}
return arr;
}
function getProperDimensions(old_x, old_y, new_x, new_y, crop) {
if (old_x <= 0 || old_y <= 0 || (new_x <= 0 && new_y <= 0) || (crop && old_x <= new_x && old_y <= new_y))
return [old_x, old_y];
var k = 1;
if (new_x <= 0) {
k = (crop && old_y <= new_y) ? 1: new_y / old_y;
} else if (new_y <= 0) {
k = (crop && old_x <= new_x) ? 1: new_x / old_x;
} else {
var _kx = new_x / old_x;
var _ky = new_y / old_y;
k = crop ? Math.min(_kx, _ky, 1) : Math.min(_kx, _ky);
}
return [round(k * old_x), round(k * old_y)];
}
/**
* Opener/Closer HTML block
*/
function visibleBox(id, skipOpenClose) {
elm1 = document.getElementById("open" + id);
elm2 = document.getElementById("close" + id);
elm3 = document.getElementById("box" + id);
if (!elm3) return false;
if (skipOpenClose) {
elm3.style.display = (elm3.style.display == "") ? "none": "";
} else if (elm1) {
if (elm1.style.display == "") {
elm1.style.display = "none";
if (elm2) elm2.style.display = "";
elm3.style.display = "none";
var class_objs = getElementsByClassName('DialogBox');
for (var i = 0; i < class_objs.length; i++) {
class_objs[i].style.height = "1%";
}
} else {
elm1.style.display = "";
if (elm2) elm2.style.display = "none";
elm3.style.display = "";
}
}
return true;
}
function switchVisibleBox(id) {
var box = document.getElementById(id);
var plus = document.getElementById(id + '_plus');
var minus = document.getElementById(id + '_minus');
if (!box || ! plus || ! minus) return false;
if (box.style.display == 'none') {
box.style.display = '';
plus.style.display = 'none';
minus.style.display = '';
} else {
box.style.display = 'none';
minus.style.display = 'none';
plus.style.display = '';
}
return true;
}
/**
* URL encode
*/
function urlEncode(url) {
return url.replace(/\s/g, "+").replace(/&/, "&").replace(/"/, """)
}
/**
* Math.round() wrapper
*/
function round(n, p) {
if (isNaN(n)) n = parseFloat(n);
if (!p || isNaN(p)) return Math.round(n);
p = Math.pow(10, p);
return Math.round(n * p) / p;
}
/**
* Price format
*/
function price_format(price, thousand_delim, decimal_delim, precision, currency) {
thousand_delim = (arguments.length > 1 && thousand_delim !== false)
? thousand_delim
: number_format_th;
decimal_delim = (arguments.length > 2 && decimal_delim !== false)
? decimal_delim
: number_format_dec;
precision = (arguments.length > 3 && precision !== false)
? precision
: number_format_point;
currency = (arguments.length > 4 && currency !== false)
? currency_format
: "x";
if (precision > 0) {
precision = Math.pow(10, precision);
price = Math.round(price * precision) / precision;
var top = Math.floor(price);
var bottom = Math.round((price - top) * precision) + precision;
} else {
var top = Math.round(price);
var bottom = 0;
}
top = top + "";
bottom = bottom + "";
var cnt = 0;
for (var x = top.length; x >= 0; x--) {
if (cnt % 3 == 0 && cnt > 0 && x > 0) top = top.substr(0, x) + thousand_delim + top.substr(x, top.length);
cnt++;
}
return currency.replace("x", (bottom > 0) ? (top + decimal_delim + bottom.substr(1, bottom.length)) : top);
}
/**
* Substitute
*/
function substitute(lbl) {
var rg;
for (var x = 1; x < arguments.length; x += 2) {
if (arguments[x] && arguments[x + 1]) {
lbl = lbl.replace(new RegExp("\\{\\{" + arguments[x] + "\\}\\}", "gi"), arguments[x + 1])
.replace(new RegExp('~~' + arguments[x] + '~~', "gi"), arguments[x + 1]);
}
}
return lbl;
}
function getWindowOutWidth(w) {
if (!w)
w = window;
return localBFamily == "MSIE" ? w.document.body.clientWidth: w.outerWidth;
}
function getWindowOutHeight(w) {
if (!w)
w = window;
return localBFamily == "MSIE" ? w.document.body.clientHeight: w.outerHeight;
}
function getWindowWidth(w) {
if (!w)
w = window;
return localBFamily == "MSIE" ? w.document.body.clientWidth: w.innerWidth;
}
function getWindowHeight(w) {
if (!w)
w = window;
return localBFamily == "MSIE" ? w.document.body.clientHeight: w.innerHeight;
}
function getDocumentHeight(w) {
if (!w)
w = window;
return Math.max(w.document.documentElement.scrollHeight, w.document.body.scrollHeight);
}
function getDocumentWidth(w) {
if (!w)
w = window;
return Math.max(w.document.documentElement.scrollWidth, w.document.body.scrollWidth);
}
/**
* Check list of checkboxes
*/
function checkMarks(form, reg, lbl) {
var is_exist = false;
if (!form || form.elements.length == 0)
return true;
for (var x = 0; x < form.elements.length; x++) {
if (form.elements[x].name.search(reg) == 0 && form.elements[x].type == 'checkbox' && ! form.elements[x].disabled) {
is_exist = true;
if (form.elements[x].checked)
return true;
}
}
if (!is_exist)
return true;
if (lbl) {
alert(lbl);
} else if (lbl_no_items_have_been_selected) {
alert(lbl_no_items_have_been_selected);
}
return false;
}
/**
* Submit form with specified value of 'mode' parmaeters
*/
function submitForm(formObj, formMode, e) {
if (!e && typeof(window.event) != 'undefined') e = event;
if (e) {
if (e.stopPropagation) e.stopPropagation();
else e.cancelBubble = true;
}
if (!formObj)
return false;
if (formObj.tagName != "FORM") {
if (!formObj.form)
return false;
formObj = formObj.form;
}
if (formObj.mode) formObj.mode.value = formMode;
if (typeof(window.$) != 'undefined') {
var r = $(formObj).triggerHandler('submit');
if (r === false)
return false;
}
return formObj.submit();
}
/**
* Convert number from current format
* (according to 'Input and display format for floating comma numbers' option)
* to float number
*/
function convert_number(num) {
var regDec = new RegExp(reg_quote(number_format_dec), "gi");
var regTh = new RegExp(reg_quote(number_format_th), "gi");
var pow = Math.pow(10, parseInt(number_format_point));
num = parseFloat(num.replace(" ", "").replace(regTh, "").replace(regDec, "."));
return Math.round(num * pow) / pow;
}
/**
* Check string as number
* (according to 'Input and display format for floating comma numbers' option)
*/
function check_is_number(num) {
var regDec = new RegExp(reg_quote(number_format_dec), "gi");
var regTh = new RegExp(reg_quote(number_format_th), "gi");
num = num.replace(" ", "").replace(regTh, "").replace(regDec, ".");
return (num.search(/^[+-]?[0-9]+(\.[0-9]+)?$/) != - 1);
}
/**
* Qutation for RegExp class
*/
function reg_quote(s) {
return s.replace(/\./g, "\\.").replace(/\//g, "\\/").replace(/\*/g, "\\*").replace(/\+/g, "\\+").replace(/\[/g, "\\[").replace(/\]/g, "\\]");
}
function setCookie(name, value, path, expires, domain) {
if (typeof(expires) == 'object') {
try {
var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
if (days[expires.getDay()] && months[expires.getMonth()]) expires = days[expires.getDay()] + " " + expires.getDate() + "-" + months[expires.getMonth()] + "-" + expires.getFullYear() + " " + expires.getHours() + ":" + expires.getMinutes() + ":" + expires.getSeconds() + " GMT";
} catch(e) {}
}
if (typeof(expires) != 'string') expires = false;
if (typeof(domain) != 'string') domain = false;
document.cookie = name + "=" + escape(value) + (expires ? "; expires=" + expires: "") + (path ? "; path=" + path: "") + (domain ? "; domain=" + domain: "");
}
function getCookie(name) {
if (document.cookie.length > 0) {
start = document.cookie.indexOf(name + "=");
if (start != - 1) {
start = start + name.length + 1;
end = document.cookie.indexOf(";", start);
if (end == - 1) end = document.cookie.length;
return unescape(document.cookie.substring(start, end));
}
}
return false;
}
function deleteCookie(name) {
document.cookie = name + "=0; expires=Fri, 31 Dec 1999 23:59:59 GMT;";
}
/**
* Clone object
*/
function cloneObject(orig) {
var r = {};
for (var i in orig) {
if (hasOwnProperty(orig, i)) r[i] = orig[i];
}
return r;
}
/**
* getElementById() wrapper
*/
function _getById(id) {
if (typeof(id) != 'string' || ! id) return false;
var obj = document.getElementById(id);
if (obj && obj.id != id) {
obj = false;
for (var i = 0; i < document.all.length && obj === false; i++) {
if (document.all[i].id == id) obj = document.all[i];
}
}
return obj;
}
// undefined or not
function isset(obj) {
return typeof(obj) != 'undefined' && obj !== null;
}
// Check - variable is function or not
function isFunction(f) {
return (typeof(f) == 'function' || (typeof(f) == 'object' && (f + "").search(/\s*function /) === 0));
}
// Get text length without \r
function getPureLength(text) {
return (text && text.replace) ? text.replace(new RegExp("\r", "g"), '').length: - 1;
}
// Ge text area selection limits
function getTASelection(t) {
if (document.selection) {
t.focus();
var sel1 = document.selection.createRange();
var sel2 = sel1.duplicate();
sel2.moveToElementText(t);
var selText = sel1.text;
var c = String.fromCharCode(1);
sel1.text = c;
var index = sel2.text.indexOf(c);
t.selectionStart = getPureLength((index == - 1) ? sel2.text: sel2.text.substring(0, index));
t.selectionEnd = getPureLength(selText) + t.selectionStart;
sel1.moveStart('character', - 1);
sel1.text = selText;
}
return [t.selectionStart, t.selectionEnd];
}
// Insert string to text area to current position
function insert2TA(t, str) {
if (!t) return false;
var pos = getTASelection(t);
var p;
if (!isNaN(pos[0])) {
t.value = t.value.substr(0, pos[0]) + str + t.value.substr(pos[0]);
p = pos[0];
} else {
p = getPureLength(t.value);
t.value += str;
}
setTACursorPos(t, p);
return p;
}
// Set cursor pointer to specified postion for text area
function setTACursorPos(t, begin, end) {
if (!t || ! t.tagName || t.tagName.toUpperCase() != 'TEXTAREA')
return false;
if (isNaN(begin)) {
begin = 0;
} else if (getPureLength(t.value) < begin) {
begin = getPureLength(t.value);
end = begin;
}
if (isNaN(end)) end = begin;
if (document.selection) {
var sel = t.createTextRange();
sel.collapse(true);
sel.moveStart('character', begin);
sel.moveEnd('character', end - begin);
sel.select();
} else if (!isNaN(t.selectionStart)) {
t.selectionStart = begin;
t.selectionEnd = end;
}
if (t.focus) t.focus();
return true;
}
/**
* Position functions
*/
function posGetPageOffset(o) {
var l = 0;
var t = 0;
do {
l += o.offsetLeft;
t += o.offsetTop;
} while ((o = o.offsetParent));
return {
left: l,
top: t
};
}
function getMethod(method, obj) {
var args = [];
for (var i = 2; i < arguments.length; i++)
args[args.length] = arguments[i];
if (!obj) obj = window;
return function() {
if (!isFunction(method)) method = obj[method];
return method.apply ? method.apply(obj, args) : method();
}
}
function lockForm(form) {
if (form.locked)
return false;
form.locked = true;
setTimeout(
function() {
form.locked = false;
},
1000);
return true;
}
function getPopupControl(elm) {
var e = elm;
while (e && e.tagName && ! e._popupControl)
e = e.parentNode;
return (e && e._popupControl) ? e._popupControl: false;
}
function parse_url(url) {
if (!url || url.constructor != String)
return false;
var m = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/);
if (!m)
return false;
var res = {
scheme: m[2],
host: m[4],
path: m[5],
query: m[7],
fragment: m[9]
};
if (res.host) {
m = res.host.match(/^(?:([^:]+):)?([^@]+)@(.+)$/);
if (m) {
res.host = m[3];
res.user = m[1] ? m[1] : m[2];
res.password = m[1] ? m[2] : false;
}
}
return res;
}
var xxx = 0;
function pngFix(elm) {
if (!elm || ! elm.tagName || ! $.browser.msie || parseFloat($.browser.version) >= 7 || elm.tagName.toUpperCase() != 'IMG')
return false;
var src = elm.src.replace(/\(/g, '%28').replace(/\)/g, '%29');
elm.src = images_dir + '/spacer.gif';
elm.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + src.replace(/"/, '\"') + '",sizingMethod="scale")';
return true;
}
function getImgSrc(elm) {
if (!elm || ! elm.tagName || elm.tagName.toUpperCase() != 'IMG' || ! elm.src)
return false;
if ($.browser.msie && elm.src.search(/\/spacer\.gif$/) != - 1 && elm.filters['DXImageTransform.Microsoft.AlphaImageLoader'])
return elm.filters['DXImageTransform.Microsoft.AlphaImageLoader'].src;
return elm.src;
}
function isPngFix(elm) {
return $.browser.msie && elm && elm.tagName && elm.tagName.toUpperCase() == 'IMG' && elm.src && elm.src.search(/\/spacer\.gif$/) != - 1 && elm.filters['DXImageTransform.Microsoft.AlphaImageLoader'];
}
function extend(c, p) {
var f = function() {}
f.prototype = p.prototype;
c.prototype = new f();
c.prototype.constructor = c;
c.superclass = p.prototype;
}
function hasOwnProperty(obj, prop) {
if (typeof(obj) != 'undefined' && Object.prototype.hasOwnProperty)
return obj.hasOwnProperty(prop);
return typeof(obj[prop]) != 'undefined' && obj.constructor.prototype[prop] !== obj[prop];
}
var hint_timer = new Array();
function skipDefaultValue(form) {
$('input.default-value', form).each(function() {
this.value = '';
})
return true;
}
function initResetDefault() {
$('input.default-value').bind('focus', function() {
if (!this.isReseted) {
this.defaultValue = this.value;
this.value = '';
$(this).removeClass('default-value');
this.isReseted = true;
}
return true;
}).bind('change', function() {
this.isContentIsChanged = true;
return true;
}).bind('blur', function() {
if (this.isReseted && ! this.isContentIsChanged && this.defaultValue) {
this.value = this.defaultValue;
$(this).addClass('default-value');
this.isReseted = false;
}
return true;
}).each(
function() {
if (!this.form.isSetReset) {
$(this.form).bind('submit', function() {
$('input.default-value', this).each(
function() {
this.value = '';
});
return true;
});
this.form.isSetReset = true;
}
});
}
if (window.addEventListener)
window.addEventListener('load', initResetDefault, false);
else if (window.attachEvent)
window.attachEvent('onload', initResetDefault);
var popup_html_editor_text;
/*
Debug window (require jQuery)
Usage:
debug().html('example');
debug().html('example', 10);
debug().add('second string')
debug().clean();
debug().hide();
debug().show();
debug().row(0).html('example');
debug().row(0).add('second part');
debug().row(0).remove();
debug().opacity(0.1);
*/
var debug = function() {
var debug_panel = false;
return function() {
if (typeof(window.$) == 'undefined')
return false;
if (!debug_panel) {
debug_panel = $(document.createElement('DIV')).
css({
position: 'absolute',
border: '1px solid black',
backgroundColor: 'white',
display: 'none',
top: '0px',
left: '0px',
width: '200px',
height: '200px',
overflow: 'auto',
padding: '5px',
margin: '0px'
}).get(0);
document.body.appendChild(debug_panel);
debug_panel.defaultOpacity = 0.9;
debug_panel.ttl = 0;
debug_panel._extend_create = false;
debug_panel._ttlTO = false;
debug_panel._rowsLength = 0;
/* Replace window content */
debug_panel.html = function(str, ttl) {
this._getBox().innerHTML = str;
this.show();
this.startTTL(arguments.length > 1 ? ttl: this.ttl);
}
/* Add new string */
debug_panel.add = function(str, ttl) {
this._getBox().innerHTML += str + " \n";
this.show();
this.startTTL(arguments.length > 1 ? ttl: this.ttl);
}
/* Get row (old or new) */
debug_panel.row = function(i) {
var row = $('div:eq(' + i + ')', this._getBox()).get(0);
if (!row) {
for (var x = this._rowsLength; x < i + 1; x++) {
row = this._getBox().appendChild(document.createElement('DIV'));
row.remove = this._removeRow;
row.html = this._htmlRow;
row.add = this._addRow;
row.box = this;
}
this._rowsLength = i + 1;
}
return row;
}
/* Remove row */
debug_panel._removeRow = function() {
if (this.parentNode) {
this.box._rowsLength--;
this.parentNode.removeChild(this);
}
}
/* Replace row content */
debug_panel._htmlRow = function(str, ttl) {
this.innerHTML = str;
this.box.show();
this.box.startTTL(arguments.length > 1 ? ttl: this.parentNode.ttl);
}
/* Add content ot row */
debug_panel._addRow = function(str, ttl) {
this.innerHTML += str;
this.box.show();
this.box.startTTL(arguments.length > 1 ? ttl: this.parentNode.ttl);
}
/* Clean window content */
debug_panel.clean = function() {
this._rowsLength = 0;
this._getBox().innerHTML = '';
}
/* Hide window */
debug_panel.hide = function() {
this.style.display = 'none';
}
/* Show window */
debug_panel.show = function() {
this.style.display = '';
}
/* Set window opacity */
debug_panel.opacity = function(level) {
level = parseFloat(level);
if (isNaN(level) || level < 0 || level > 1) return false;
level = Math.round(level * 100) / 100;
if ($.browser.msie) {
this.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity = ' + (level * 100) + ')';
} else {
this.style.opacity = level;
}
return true;
}
/* Start window auto-hide timer */
debug_panel.startTTL = function(ttl) {
if (this._ttlTO) clearTimeout(this._ttlTO);
if (ttl <= 0) return false;
var o = this;
this._ttlTO = setTimeout(function() {
o.hide();
},
ttl * 1000);
return true;
}
/* Extend debug panel */
debug_panel.extend = function() {
if (this._extend_create) return true;
var scripts = document.getElementsByTagName('SCRIPT');
var m;
var path = false;
for (var i = 0; i < scripts.length && ! path; i++) {
if (scripts[i].src && (m = scripts[i].src.match(/^(.+\/)common.js/))) path = m[1];
}
if (!path) return false;
var s = document.createElement('SCRIPT');
s.src = path + 'debug.js';
document.body.appendChild(s);
this._extend_create = true;
return true;
}
/* Check - debug extended or not */
debug_panel.is_extended = function() {
return this._extend_create && typeof(window._debug_is_extended) != 'undefined' && _debug_is_extended;
}
debug_panel._getBox = function() {
return this;
}
if (debug_panel.defaultOpacity > 0 && debug_panel.defaultOpacity <= 1) {
debug_panel.opacity(debug_panel.defaultOpacity);
}
}
/* Extend debug panel methods */
if (typeof(window.debug_panel_ext_methods) != 'undefined' && debug_panel_ext_methods) {
for (var i = 0; i < debug_panel_ext_methods.length; i++) {
debug_panel[debug_panel_ext_methods[i]] = debug_panel_ext[debug_panel_ext_methods[i]];
}
if (typeof(debug_panel_ext.init) != 'undefined') debug_panel_ext.init.call(debug_panel);
debug_panel_ext_methods = false;
debug_panel_ext = false;
}
return debug_panel;
}
} ();
/**
* Changing button width on the fly (IE bugs)
*/
function change_width_iefix() {
$("td div button").each(function() {
$(this).width("auto").width($(this).width());
});
}
/**
* Popup wrapper
*/
function popup(url, width, height) {
window.open(
url, 'popup', 'width=' + width + ',height=' + height + ',toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no,direction=no');
}
/**
* Dialog tools specific toggle function.
*
* @param string active_panel left or right panel that should be activated
* @param string nonactive_panel left or right panel that should be deactivated
*
* @return void
* @see ____func_see____
* @since 4.4.0
*/
function dialog_tools_activate(active_panel, nonactive_panel) {
$('.dialog-header-' + active_panel).removeClass('dialog-tools-nonactive');
$('.dialog-header-' + nonactive_panel).addClass('dialog-tools-nonactive');
$('.dialog-tools-' + active_panel).removeClass('hidden');
$('.dialog-tools-' + nonactive_panel).addClass('hidden');
}
/**
* Check form fields (CSS class-based)
*
* @return void
* @see ____func_see____
*/
function checkFormFields() {
var errFields = [];
if (!this.tagName || this.tagName.toUpperCase() != 'FORM') {
if (
arguments.length > 0
&& arguments[0]
&& arguments[0].tagName
&& arguments[0].tagName.toUpperCase() == 'FORM'
) {
return checkFormFields.call(arguments[0]);
}
return true;
}
var err = empty = false;
var frm = this;
$('label', frm).each(function() {
if (!this.htmlFor) {
return;
}
var f = $('#' + this.htmlFor, frm).get(0);
if (!f || f.disabled) {
return;
}
if ($(f).parents(':hidden').length > 0) {
return;
}
var errMsg = lbl_required_field_is_empty;
var r = (
$(f).hasClass('input-required')
|| $(this).hasClass('data-required')
|| (
$(this).parent('td').hasClass('data-name')
&& $(this).closest('tr').find('td.data-required').length > 0
)
);
var fType = false;
if (f.className) {
var m = $(f).attr('class').replace(/input-required/, '').match(/input-([a-z]+)/);
if (m) {
fType = m[1];
}
}
if (!fType && !r) {
return;
}
if (r && $.trim($(f).val()) == '') {
err = true;
empty = true;
} else if (fType) {
var val = $(f).val().replace(/^\s+/g, '').replace(/\s+$/g, '');
errMsg = lbl_field_format_is_invalid;
switch (fType) {
case 'email':
if (val.search(email_validation_regexp) == - 1) {
err = true;
errMsg = txt_email_invalid;
}
break;
case 'int':
err = val.search(/^[-+]?\d+$/) == - 1;
break;
case 'uint':
err = val.search(/^\+?\d+$/) == - 1;
break;
case 'intz':
err = val.search(/^[-+]?\d+$/) == - 1 || val == '0';
break;
case 'uintz':
err = val.search(/^\+?\d+$/) == - 1 || val == '0';
break;
case 'double':
err = val.search(/^[-+]?(?:\d+|\.\d+|\d+\.|\d+\.\d+)$/) == - 1;
break;
case 'udouble':
err = val.search(/^\+?(?:\d+|\.\d+|\d+\.|\d+\.\d+)$/) == - 1;
break;
case 'doublez':
err = val.search(/^[-+]?(?:\d+|\.\d+|\d+\.|\d+\.\d+)$/) == - 1 || val.search(/^[-+]?[0\.]+$/) != - 1;
break;
case 'udoublez':
err = val.search(/^\+?(?:\d+|\.\d+|\d+\.|\d+\.\d+)$/) == - 1 || val.search(/^\+?[0\.]+$/) != - 1;
break;
case 'ip':
err = val.search(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/) == - 1;
break;
}
}
if (err) {
if (is_admin_editor) {
errFields[errFields.length] = $(this).html();
}
else {
markErrorField(f, empty ? lbl_field_required: '');
if ($(f).not(':hidden')) {
$(f).focus();
}
xAlert(substitute(errMsg, 'field', $(this).html()), lbl_warning);
return false;
}
}
});
if (err && !is_admin_editor) {
return false;
} else if (errFields.length > 0) {
return confirm(substitute(txt_required_fields_not_completed, 'fields', "\n\t" + errFields.join(",\n\t") + "\n\n"));
}
return true;
}
/**
* Highlight error field (CSS-based)
*
* @param object $f Field object
* @param string $errLabel Error label
*
* @return void
* @see ____func_see____
*/
function markErrorField(f, errLabel) {
if (!f || f == 'undefined') {
return true;
}
var container = $(f).parents('tr, .field-container')[0];
if (container && container != 'undefined' && ! $(container).hasClass('fill-error')) {
$(container).addClass('fill-error');
if (errLabel && errLabel != '') {
$(document.createElement('div')).attr('class', 'error-label').appendTo($(f).parent()).html(lbl_field_required);
}
$(f).bind('keydown', function(event) {
if (event.keyCode == '13') {
event.preventDefault();
}
if ($.trim($(this).val() + String.fromCharCode(event.keyCode)) != '') {
$(container).removeClass('fill-error').find('div.error-label').remove();
$(this).unbind('keydown');
}
});
}
}
/**
* Mark empty required form fields
*
* @param form $form Form object
*
* @return void
* @see ____func_see____
*/
function markEmptyFields(form) {
if (!form) {
return;
}
$(form).find('.data-required').each(function() {
var parentObj = $(this).parents('tr, .field-container')[0];
if (!parentObj || parentObj == 'undefined') {
return;
}
$(parentObj).find('input, textarea, select').each(function() {
if (this.value == '') {
markErrorField(this);
}
});
});
}
/**
* Apply checking of the required fields of the form
* on submit automatically
*
* @param form $form Form DOM object
*
* @return bool
* @see ____func_see____
*/
function applyCheckOnSubmit(form) {
if (!form) {
return true;
}
var defaultAction = false;
if (undefined !== form.onsubmit && form.onsubmit && form.onsubmit.constructor != String) {
var defaultAction = form.onsubmit;
form.onsubmit = null;
}
$(form).submit(function() {
if (checkFormFields(form)) {
if (defaultAction != false) {
return defaultAction.call(form);
}
return true;
}
return false;
});
}
/**
* Custom alert using jQuery UI
*
* @param string $msg Message
* @param string $header Alert header
*
* @return void
* @see ____func_see____
*/
function xAlert(msg, header) {
var buttons = {};
buttons[lbl_ok] = function() {
$(this).dialog('destroy').remove();
}
$(document.createElement('div')).attr('class', 'xalertbox').html(msg).dialog({
modal: $('.ui-widget-overlay').length <= 0,
title: undefined === header ? '': header,
buttons: buttons
});
}
/**
* Custom confirm using jQuery UI
*
* @param string $msg Message
* @param string $callback Callback on confirm
* @param string $header Confirmation header text
*
* @return void
* @see ____func_see____
*/
function xConfirm(msg, callback, header) {
var buttons = {};
buttons[lbl_no] = function() {
$(this).dialog('destroy').remove();
}
buttons[lbl_yes] = function() {
if (undefined !== callback && callback != '') {
eval(callback);
}
$(this).dialog('destroy').remove();
}
$(document.createElement('div')).attr('class', 'xalertbox').html(msg).dialog({
modal: $('.ui-widget-overlay').length <= 0,
title: undefined === header ? '': header,
buttons: buttons
});
}
/* vim: set ts=2 sw=2 sts=2 et: */
/**
* Browser identificator script, sends statistics
*
* @category X-Cart
* @package X-Cart
* @subpackage JS Library
* @author Ruslan R. Fazlyev
* @version $Id: browser_identificator.js,v 1.2 2010/05/27 13:43:06 igoryan Exp $
* @link http://www.x-cart.com/
* @see ____file_see____
*/
var scriptNode = document.createElement("script");
scriptNode.type = "text/javascript";
setTimeout(
function() {
if (!scriptNode)
return;
scriptNode.src = xcart_web_dir + "/adaptive.php?send_browser=" +
(localIsDOM ? "Y" : "N") + (localIsStrict ? "Y" : "N") + (localIsJava ? "Y" : "N") + "|" +
localBrowser + "|" +
localVersion + "|" +
localPlatform + "|" +
(localIsCookie ? "Y" : "N") + "|" +
screen.width + "|" +
screen.height + "|" +
current_area;
document.getElementsByTagName('head')[0].appendChild(scriptNode);
},
3000
);
/* SWFObject v2.2
is released under the MIT License
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad '}}aa.outerHTML='"+af+" ";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;abd)break;a.currentTarget=f.elem;a.data=f.handleObj.data;
a.handleObj=f.handleObj;D=f.handleObj.origHandler.apply(f.elem,arguments);if(D===false||a.isPropagationStopped()){d=f.level;if(D===false)b=false}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(Ha,"`").replace(Ia,"&")}function ka(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Ja.test(b))return c.filter(b,
e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function la(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var k in e[h])c.event.add(this,h,e[h][k],e[h][k].data)}}})}function Ka(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}
function ma(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?La:Ma,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function ca(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Na.test(a)?e(a,h):ca(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?
e(a,""):c.each(b,function(f,h){ca(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(na.concat.apply([],na.slice(0,b)),function(){d[this]=a});return d}function oa(a){if(!da[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";da[a]=d}return da[a]}function ea(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var u=E.document,c=function(){function a(){if(!b.isReady){try{u.documentElement.doScroll("left")}catch(i){setTimeout(a,
1);return}b.ready()}}var b=function(i,r){return new b.fn.init(i,r)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,k=/\S/,l=/^\s+/,n=/\s+$/,s=/\W/,v=/\d/,B=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,D=/^[\],:{}\s]*$/,H=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,G=/(?:^|:|,)(?:\s*\[)+/g,M=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,j=/(msie) ([\w.]+)/,o=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,
q=[],t,x=Object.prototype.toString,C=Object.prototype.hasOwnProperty,P=Array.prototype.push,N=Array.prototype.slice,R=String.prototype.trim,Q=Array.prototype.indexOf,L={};b.fn=b.prototype={init:function(i,r){var y,z,F;if(!i)return this;if(i.nodeType){this.context=this[0]=i;this.length=1;return this}if(i==="body"&&!r&&u.body){this.context=u;this[0]=u.body;this.selector="body";this.length=1;return this}if(typeof i==="string")if((y=h.exec(i))&&(y[1]||!r))if(y[1]){F=r?r.ownerDocument||r:u;if(z=B.exec(i))if(b.isPlainObject(r)){i=
[u.createElement(z[1])];b.fn.attr.call(i,r,true)}else i=[F.createElement(z[1])];else{z=b.buildFragment([y[1]],[F]);i=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,i)}else{if((z=u.getElementById(y[2]))&&z.parentNode){if(z.id!==y[2])return f.find(i);this.length=1;this[0]=z}this.context=u;this.selector=i;return this}else if(!r&&!s.test(i)){this.selector=i;this.context=u;i=u.getElementsByTagName(i);return b.merge(this,i)}else return!r||r.jquery?(r||f).find(i):b(r).find(i);
else if(b.isFunction(i))return f.ready(i);if(i.selector!==A){this.selector=i.selector;this.context=i.context}return b.makeArray(i,this)},selector:"",jquery:"1.4.3",length:0,size:function(){return this.length},toArray:function(){return N.call(this,0)},get:function(i){return i==null?this.toArray():i<0?this.slice(i)[0]:this[i]},pushStack:function(i,r,y){var z=b();b.isArray(i)?P.apply(z,i):b.merge(z,i);z.prevObject=this;z.context=this.context;if(r==="find")z.selector=this.selector+(this.selector?" ":
"")+y;else if(r)z.selector=this.selector+"."+r+"("+y+")";return z},each:function(i,r){return b.each(this,i,r)},ready:function(i){b.bindReady();if(b.isReady)i.call(u,b);else q&&q.push(i);return this},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(i){return this.pushStack(b.map(this,function(r,y){return i.call(r,
y,r)}))},end:function(){return this.prevObject||b(null)},push:P,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var i=arguments[0]||{},r=1,y=arguments.length,z=false,F,I,K,J,fa;if(typeof i==="boolean"){z=i;i=arguments[1]||{};r=2}if(typeof i!=="object"&&!b.isFunction(i))i={};if(y===r){i=this;--r}for(;r0)){if(q){for(var r=0;i=q[r++];)i.call(u,b);q=null}b.fn.triggerHandler&&b(u).triggerHandler("ready")}}},bindReady:function(){if(!p){p=true;if(u.readyState==="complete")return setTimeout(b.ready,
1);if(u.addEventListener){u.addEventListener("DOMContentLoaded",t,false);E.addEventListener("load",b.ready,false)}else if(u.attachEvent){u.attachEvent("onreadystatechange",t);E.attachEvent("onload",b.ready);var i=false;try{i=E.frameElement==null}catch(r){}u.documentElement.doScroll&&i&&a()}}},isFunction:function(i){return b.type(i)==="function"},isArray:Array.isArray||function(i){return b.type(i)==="array"},isWindow:function(i){return i&&typeof i==="object"&&"setInterval"in i},isNaN:function(i){return i==
null||!v.test(i)||isNaN(i)},type:function(i){return i==null?String(i):L[x.call(i)]||"object"},isPlainObject:function(i){if(!i||b.type(i)!=="object"||i.nodeType||b.isWindow(i))return false;if(i.constructor&&!C.call(i,"constructor")&&!C.call(i.constructor.prototype,"isPrototypeOf"))return false;for(var r in i);return r===A||C.call(i,r)},isEmptyObject:function(i){for(var r in i)return false;return true},error:function(i){throw i;},parseJSON:function(i){if(typeof i!=="string"||!i)return null;i=b.trim(i);
if(D.test(i.replace(H,"@").replace(w,"]").replace(G,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(i):(new Function("return "+i))();else b.error("Invalid JSON: "+i)},noop:function(){},globalEval:function(i){if(i&&k.test(i)){var r=u.getElementsByTagName("head")[0]||u.documentElement,y=u.createElement("script");y.type="text/javascript";if(b.support.scriptEval)y.appendChild(u.createTextNode(i));else y.text=i;r.insertBefore(y,r.firstChild);r.removeChild(y)}},nodeName:function(i,r){return i.nodeName&&i.nodeName.toUpperCase()===
r.toUpperCase()},each:function(i,r,y){var z,F=0,I=i.length,K=I===A||b.isFunction(i);if(y)if(K)for(z in i){if(r.apply(i[z],y)===false)break}else for(;Fa ";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],k=u.createElement("select"),l=k.appendChild(u.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),
hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:l.selected,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};k.disabled=true;c.support.optDisabled=!l.disabled;b.type="text/javascript";try{b.appendChild(u.createTextNode("window."+e+"=1;"))}catch(n){}a.insertBefore(b,
a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function s(){c.support.noCloneEvent=false;d.detachEvent("onclick",s)});d.cloneNode(true).fireEvent("onclick")}d=u.createElement("div");d.innerHTML=" ";a=u.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var s=u.createElement("div");
s.style.width=s.style.paddingLeft="1px";u.body.appendChild(s);c.boxModel=c.support.boxModel=s.offsetWidth===2;if("zoom"in s.style){s.style.display="inline";s.style.zoom=1;c.support.inlineBlockNeedsLayout=s.offsetWidth===2;s.style.display="";s.innerHTML="
";c.support.shrinkWrapBlocks=s.offsetWidth!==2}s.innerHTML="";var v=s.getElementsByTagName("td");c.support.reliableHiddenOffsets=v[0].offsetHeight===
0;v[0].style.display="";v[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&v[0].offsetHeight===0;s.innerHTML="";u.body.removeChild(s).style.display="none"});a=function(s){var v=u.createElement("div");s="on"+s;var B=s in v;if(!B){v.setAttribute(s,"return;");B=typeof v[s]==="function"}return B};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",
cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var pa={},Oa=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?pa:a;var e=a.nodeType,f=e?a[c.expando]:null,h=c.cache;if(!(e&&!f&&typeof b==="string"&&d===A)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=
c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==A)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?pa:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);else if(d)delete f[e];else for(var k in a)delete a[k]}},acceptData:function(a){if(a.nodeName){var b=
c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){if(typeof a==="undefined")return this.length?c.data(this[0]):null;else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===A){var e=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(e===A&&this.length){e=c.data(this[0],a);if(e===A&&this[0].nodeType===1){e=this[0].getAttribute("data-"+a);if(typeof e===
"string")try{e=e==="true"?true:e==="false"?false:e==="null"?null:!c.isNaN(e)?parseFloat(e):Oa.test(e)?c.parseJSON(e):e}catch(f){}else e=A}}return e===A&&d[1]?this.data(d[0]):e}else return this.each(function(){var h=c(this),k=[d[0],b];h.triggerHandler("setData"+d[1]+"!",k);c.data(this,a,b);h.triggerHandler("changeData"+d[1]+"!",k)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=c.data(a,b);if(!d)return e||
[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===A)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var qa=/[\n\t]/g,ga=/\s+/,Pa=/\r/g,Qa=/^(?:href|src|style)$/,Ra=/^(?:button|input)$/i,Sa=/^(?:button|input|object|select|textarea)$/i,Ta=/^a(?:rea)?$/i,ra=/^(?:radio|checkbox)$/i;c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,
a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(s){var v=c(this);v.addClass(a.call(this,s,v.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ga),d=0,e=this.length;d-1)return true;return false},
val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected=
c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Sa.test(a.nodeName)||Ta.test(a.nodeName)&&a.href?0:A;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return A;a=!c.support.hrefNormalized&&e&&
h?a.getAttribute(b,2):a.getAttribute(b);return a===null?A:a}}});var X=/\.(.*)$/,ha=/^(?:textarea|input|select)$/i,Ha=/\./g,Ia=/ /g,Ua=/[^\w\s.|`]/g,Va=function(a){return a.replace(Ua,"\\$&")},sa={focusin:0,focusout:0};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var k=a.nodeType?"events":"__events__",l=h[k],n=h.handle;if(typeof l===
"function"){n=l.handle;l=l.events}else if(!l){a.nodeType||(h[k]=h=function(){});h.events=l={}}if(!n)h.handle=n=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(n.elem,arguments):A};n.elem=a;b=b.split(" ");for(var s=0,v;k=b[s++];){h=f?c.extend({},f):{handler:d,data:e};if(k.indexOf(".")>-1){v=k.split(".");k=v.shift();h.namespace=v.slice(0).sort().join(".")}else{v=[];h.namespace=""}h.type=k;if(!h.guid)h.guid=d.guid;var B=l[k],D=c.event.special[k]||{};if(!B){B=l[k]=[];
if(!D.setup||D.setup.call(a,e,v,n)===false)if(a.addEventListener)a.addEventListener(k,n,false);else a.attachEvent&&a.attachEvent("on"+k,n)}if(D.add){D.add.call(a,h);if(!h.handler.guid)h.handler.guid=d.guid}B.push(h);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,k=0,l,n,s,v,B,D,H=a.nodeType?"events":"__events__",w=c.data(a),G=w&&w[H];if(w&&G){if(typeof G==="function"){w=G;G=G.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||
typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in G)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[k++];){v=f;l=f.indexOf(".")<0;n=[];if(!l){n=f.split(".");f=n.shift();s=RegExp("(^|\\.)"+c.map(n.slice(0).sort(),Va).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(B=G[f])if(d){v=c.event.special[f]||{};for(h=e||0;h=0){a.type=
f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return A;a.result=A;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===
false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){e=a.target;var k,l=f.replace(X,""),n=c.nodeName(e,"a")&&l==="click",s=c.event.special[l]||{};if((!s._default||s._default.call(d,a)===false)&&!n&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[l]){if(k=e["on"+l])e["on"+l]=null;c.event.triggered=true;e[l]()}}catch(v){}if(k)e["on"+l]=k;c.event.triggered=false}}},handle:function(a){var b,d,e;
d=[];var f,h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var k=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired=
A;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",va(a))}},setup:function(){if(this.type===
"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ha.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ha.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}u.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){sa[b]++===0&&u.addEventListener(a,d,true)},teardown:function(){--sa[b]===
0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
(function(){function a(g,j,o,m,p,q){p=0;for(var t=m.length;p0){C=x;break}}x=x[g]}m[p]=C}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,k=true;[0,0].sort(function(){k=false;return 0});var l=function(g,j,o,m){o=o||[];var p=j=j||u;if(j.nodeType!==1&&j.nodeType!==9)return[];if(!g||typeof g!=="string")return o;var q=[],t,x,C,P,N=true,R=l.isXML(j),Q=g,L;do{d.exec("");if(t=d.exec(Q)){Q=t[3];q.push(t[1]);if(t[2]){P=t[3];
break}}}while(t);if(q.length>1&&s.exec(g))if(q.length===2&&n.relative[q[0]])x=M(q[0]+q[1],j);else for(x=n.relative[q[0]]?[j]:l(q.shift(),j);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();x=M(g,x)}else{if(!m&&q.length>1&&j.nodeType===9&&!R&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){t=l.find(q.shift(),j,R);j=t.expr?l.filter(t.expr,t.set)[0]:t.set[0]}if(j){t=m?{expr:q.pop(),set:D(m)}:l.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&j.parentNode?j.parentNode:j,R);x=t.expr?l.filter(t.expr,
t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h=
k;g.sort(w);if(h)for(var j=1;j0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p":function(g,j){var o=typeof j==="string",m,p=0,q=g.length;if(o&&!/\W/.test(j))for(j=j.toLowerCase();p=0))o||m.push(t);else if(o)j[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var j=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=j[1]+(j[2]||1)-0;g[3]=j[3]-0}g[0]=e++;return g},ATTR:function(g,j,o,
m,p,q){j=g[1].replace(/\\/g,"");if(!q&&n.attrMap[j])g[1]=n.attrMap[j];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,j,o,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=l(g[3],null,null,j);else{g=l.filter(g[3],j,o,true^p);o||m.push.apply(m,g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,j,o){return!!l(o[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,j){return j===0},last:function(g,j,o,m){return j===m.length-1},even:function(g,j){return j%2===0},odd:function(g,j){return j%2===1},lt:function(g,j,o){return jo[3]-0},nth:function(g,j,o){return o[3]-
0===j},eq:function(g,j,o){return o[3]-0===j}},filter:{PSEUDO:function(g,j,o,m){var p=j[1],q=n.filters[p];if(q)return q(g,o,j,m);else if(p==="contains")return(g.textContent||g.innerText||l.getText([g])||"").indexOf(j[3])>=0;else if(p==="not"){j=j[3];o=0;for(m=j.length;o=0}},ID:function(g,j){return g.nodeType===1&&g.getAttribute("id")===j},TAG:function(g,j){return j==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
j},CLASS:function(g,j){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(j)>-1},ATTR:function(g,j){var o=j[1];o=n.attrHandle[o]?n.attrHandle[o](g):g[o]!=null?g[o]:g.getAttribute(o);var m=o+"",p=j[2],q=j[4];return o==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&o!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,j,o,m){var p=n.setFilters[j[2]];
if(p)return p(g,o,j,m)}}},s=n.match.POS,v=function(g,j){return"\\"+(j-0+1)},B;for(B in n.match){n.match[B]=RegExp(n.match[B].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[B]=RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[B].source.replace(/\\(\d+)/g,v))}var D=function(g,j){g=Array.prototype.slice.call(g,0);if(j){j.push.apply(j,g);return j}return g};try{Array.prototype.slice.call(u.documentElement.childNodes,0)}catch(H){D=function(g,j){var o=j||[],m=0;if(f.call(g)==="[object Array]")Array.prototype.push.apply(o,
g);else if(typeof g.length==="number")for(var p=g.length;m
";var o=u.documentElement;o.insertBefore(g,o.firstChild);if(u.getElementById(j)){n.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:A:[]};n.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}o.removeChild(g);
o=g=null})();(function(){var g=u.createElement("div");g.appendChild(u.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(j,o){var m=o.getElementsByTagName(j[1]);if(j[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML=" ";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(j){return j.getAttribute("href",2)};g=null})();u.querySelectorAll&&
function(){var g=l,j=u.createElement("div");j.innerHTML="
";if(!(j.querySelectorAll&&j.querySelectorAll(".TEST").length===0)){l=function(m,p,q,t){p=p||u;if(!t&&!l.isXML(p))if(p.nodeType===9)try{return D(p.querySelectorAll(m),q)}catch(x){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var C=p.id,P=p.id="__sizzle__";try{return D(p.querySelectorAll("#"+P+" "+m),q)}catch(N){}finally{if(C)p.id=C;else p.removeAttribute("id")}}return g(m,p,q,t)};for(var o in g)l[o]=g[o];
j=null}}();(function(){var g=u.documentElement,j=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,o=false;try{j.call(u.documentElement,":sizzle")}catch(m){o=true}if(j)l.matchesSelector=function(p,q){try{if(o||!n.match.PSEUDO.test(q))return j.call(p,q)}catch(t){}return l(q,null,null,[p]).length>0}})();(function(){var g=u.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===
0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(j,o,m){if(typeof o.getElementsByClassName!=="undefined"&&!m)return o.getElementsByClassName(j[1])};g=null}}})();l.contains=u.documentElement.contains?function(g,j){return g!==j&&(g.contains?g.contains(j):true)}:function(g,j){return!!(g.compareDocumentPosition(j)&16)};l.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var M=function(g,
j){for(var o=[],m="",p,q=j.nodeType?[j]:j;p=n.match.PSEUDO.exec(g);){m+=p[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;p=0;for(var t=q.length;p0)for(var h=d;h0},closest:function(a,
b){var d=[],e,f,h=this[0];if(c.isArray(a)){var k={},l,n=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:n})}h=h.parentNode;n++}}return d}k=$a.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||
!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});
c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",
d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Wa.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||Ya.test(e))&&Xa.test(a))f=f.reverse();return this.pushStack(f,a,Za.call(arguments).join(","))}});
c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===A||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var xa=/ jQuery\d+="(?:\d+|null)"/g,
$=/^\s+/,ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,za=/<([\w:]+)/,ab=/\s]+\/)>/g,O={option:[1,""," "],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],
area:[1,""," "],_default:[0,"",""]};O.optgroup=O.option;O.tbody=O.tfoot=O.colgroup=O.caption=O.thead;O.th=O.td;if(!c.support.htmlSerialize)O._default=[1,"div","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==A)return this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,
d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},
unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=
c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));
c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(xa,"").replace(cb,'="$1">').replace($,
"")],e)[0]}else return this.cloneNode(true)});if(a===true){la(this,b);la(this.find("*"),b.find("*"))}return b},html:function(a){if(a===A)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(xa,""):null;else if(typeof a==="string"&&!Aa.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!O[(za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ya,"<$1>$2>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?l.cloneNode(true):l)}k.length&&c.each(k,Ka)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:u;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===u&&!Aa.test(a[0])&&(c.support.checkClone||
!Ba.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=
d.length;f0?this.clone(true):this).get();c(d[f])[b](k);e=e.concat(k)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||u;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||u;for(var f=[],h=0,k;(k=a[h])!=null;h++){if(typeof k==="number")k+="";if(k){if(typeof k==="string"&&!bb.test(k))k=b.createTextNode(k);else if(typeof k==="string"){k=k.replace(ya,"<$1>$2>");var l=(za.exec(k)||["",""])[1].toLowerCase(),n=O[l]||O._default,
s=n[0],v=b.createElement("div");for(v.innerHTML=n[1]+k+n[2];s--;)v=v.lastChild;if(!c.support.tbody){s=ab.test(k);l=l==="table"&&!s?v.firstChild&&v.firstChild.childNodes:n[1]===""&&!s?v.childNodes:[];for(n=l.length-1;n>=0;--n)c.nodeName(l[n],"tbody")&&!l[n].childNodes.length&&l[n].parentNode.removeChild(l[n])}!c.support.leadingWhitespace&&$.test(k)&&v.insertBefore(b.createTextNode($.exec(k)[0]),v.firstChild);k=v.childNodes}if(k.nodeType)f.push(k);else f=c.merge(f,k)}}if(d)for(h=0;f[h];h++)if(e&&
c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,k=0,l;(l=a[k])!=null;k++)if(!(l.nodeName&&c.noData[l.nodeName.toLowerCase()]))if(d=l[c.expando]){if((b=e[d])&&b.events)for(var n in b.events)f[n]?
c.event.remove(l,n):c.removeEvent(l,n,b.handle);if(h)delete l[c.expando];else l.removeAttribute&&l.removeAttribute(c.expando);delete e[d]}}});var Ca=/alpha\([^)]*\)/i,db=/opacity=([^)]*)/,eb=/-([a-z])/ig,fb=/([A-Z])/g,Da=/^-?\d+(?:px)?$/i,gb=/^-?\d/,hb={position:"absolute",visibility:"hidden",display:"block"},La=["Left","Right"],Ma=["Top","Bottom"],W,ib=u.defaultView&&u.defaultView.getComputedStyle,jb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===A)return this;
return c.access(this,a,b,true,function(d,e,f){return f!==A?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),k=a.style,l=c.cssHooks[h];b=c.cssProps[h]||
h;if(d!==A){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!l||!("set"in l)||(d=l.set(a,d))!==A)try{k[b]=d}catch(n){}}}else{if(l&&"get"in l&&(f=l.get(a,false,e))!==A)return f;return k[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==A)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=
e[f]},camelCase:function(a){return a.replace(eb,jb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=ma(d,b,f);else c.swap(d,hb,function(){h=ma(d,b,f)});return h+"px"}},set:function(d,e){if(Da.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return db.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":
b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=d.filter||"";d.filter=Ca.test(f)?f.replace(Ca,e):d.filter+" "+e}};if(ib)W=function(a,b,d){var e;d=d.replace(fb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return A;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};else if(u.documentElement.currentStyle)W=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],
h=a.style;if(!Da.test(f)&&gb.test(f)){d=h.left;e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f};if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var kb=c.now(),lb=/