#1 JavaScript::Eval (size: 96114) - SHA256: b8cb0d6386651dc37fbe62b0219901e80860185c609bdd64878aab7fc50649cd
jQuery.fn.extend({
translatorDropDown: function(b) {
return this.each(function() {
var a = new jQuery.TranslatorDropDown(this, b);
jQuery.translatorDropDown.translators[a.getId()] = a
})
}
});
jQuery.TranslatorDropDown = function(m, n) {
var o;
this._options = null;
this._container = null;
this._current_language = null;
this._current_language_container = null;
this._last_selected = null;
this._links = null;
this._languages_list = null;
this._scroll = 0;
this._scroll_bar = null;
this._loading = false;
this._supports_touch = false;
this._touch_flag = false;
this._touch_delta = {};
this._allow_select = true;
this._sheet_responsive = {};
this._token_requests_count = 0;
var p = {};
this._initialize = function(a, b) {
this._initialize_options(b);
this._on_before_initialize();
this._initialize_elements(a);
this._initialize_styles();
if (this._is_compatible()) {
this._clear_stored_translations();
this._on_initialize();
this._initialize_events(this)
} else {
try {
var c = [];
if (this._options.languages[0] == "") c.push("No languages selected.");
c.push("Disabling translator...");
console.log(c.join(" "))
} catch (e) {};
this.disable()
}
};
this.setScroll = function(a) {
if (this._showing_languages_list) this._scroll = a
};
this.setScrollBar = function(a) {
if (this._scroll_bar) return;
this._scroll_bar = a
};
this.getId = function() {
return this._options.id
};
this.disable = function() {
this._container.hide()
};
this._is_compatible = function() {
return this._options.languages[0] != "" && !this._options._cache_resource_not_writable
};
this._on_initialize = function() {
if (typeof this._options.onInitialize == "function" || typeof this._options.onInitialize == "object")
if (this._options.onInitialize.call) this._options.onInitialize(this, this._options)
};
this._on_before_initialize = function() {
if (typeof this._options.onBeforeInitialize == "function" || typeof this._options.onBeforeInitialize == "object")
if (this._options.onBeforeInitialize.call) this._options.onBeforeInitialize(this, this._options)
};
this._initialize_options = function(h) {
this._options = jQuery.extend({}, h);
if (this._options.languages == o) this._options.languages = ["en", "es", "fr", "de", "da", "ja", "it", "pt"];
if (!(this._options.languages instanceof Array)) this._options.languages = [this._options.languages];
if (this._options.floatingLeft == o || !this._is_bool(this._options.floatingLeft)) this._options.floatingLeft = true;
if (this._options.placeholder == o || !this._is_bool(this._options.placeholder)) this._options.placeholder = true;
if (this._options.flags == o || !this._is_bool(this._options.flags)) this._options.flags = true;
if (this._options.names == o || !this._is_bool(this._options.names)) this._options.names = true;
if (this._options.shortNames == o || !this._is_bool(this._options.shortNames)) this._options.shortNames = false;
if (this._options.targetSelector == o) this._options.targetSelector = "body";
if (this._options.excludeSelector == o) this._options.excludeSelector = "code, #wpadminbar, input:hidden, .do-not-translate-me, .dont-translate";
if (this._options.cookie == o || !this._is_bool(this._options.cookie)) this._options.cookie = true;
if (this._options.cookiePersistency == o || !this._is_bool(this._options.cookiePersistency)) this._options.cookiePersistency = true;
if (this._options.requests == o || !Number(this._options.requests)) this._options.requests = 5;
else {
this._options.requests = Number(this._options.requests);
if (this._options.requests > 10) this._options.requests = 5
}
if (this._options.id == o) this._options.id = "translator-dropdown-jquery";
else this._options.id.replace(/\s+/g, "-");
if (this._options.from == o || this._options.from == "") this._options.from = "en";
if (this._options.autoSelect == o || !this._is_bool(this._options.autoSelect)) this._options.autoSelect = true;
if (this._options.hideLanguage == o || (this._options.hideLanguage != "name" && this._options.hideLanguage != "flag")) this._options.hideLanguage = false;
if (this._options.lowResolution == o || !Number(this._options.lowResolution)) this._options.lowResolution = 640;
else this._options.lowResolution = Number(this._options.lowResolution);
if (this._options.onInitialize == o) this._options.onInitialize = function(a, b) {};
if (this._options.onBeforeInitialize == o) this._options.onBeforeInitialize = function(a, b) {};
if (this._options.onStart == o) this._options.onStart = function(a, b, c, d, e) {};
if (this._options.onComplete == o) this._options.onComplete = function(a, b, c, d, e, f, g) {};
if (this._options.linksContainerTemplate == o) {
this._options.linksContainerTemplate = '<div class="{{ sub_container_class }}"><div class="{{ body_class }}"><p class="{{ current_language_container_class }}"></p>';
if (this._check_html_closure()) this._options.linksContainerTemplate += '<em class="{{ current_language_container_arrow_class }}" />';
else this._options.linksContainerTemplate += '<em class="{{ current_language_container_arrow_class }}"></em>';
this._options.linksContainerTemplate += '<div class="{{ languages_list_class }}">{{ content }}</div></div></div>'
}
if (this._options.linkTemplate == o) this._options.linkTemplate = '<p><a href="javascript:;" title="{{ name }}" class="{{ language_selector_class }}">{{ content }}</a></p>';
if (this._options.flagTemplate == o) this._options.flagTemplate = '<img src="{{ src }}" alt="{{ name }}" {{ class }}/>';
if (this._options.nameTemplate == o) this._options.nameTemplate = '<span {{ class }}>{{ name }}</span>';
if (this._options.loading == o || !this._is_bool(this._options.loading)) this._options.loading = true;
if (this._options.complete == o || !this._is_bool(this._options.complete)) this._options.complete = true;
if (this._options.scroll == o || !this._is_bool(this._options.scroll)) this._options.scroll = true;
if (this._options.scroll) {
if (this._options.scrollBarLanguages == o || !Number(this._options.scrollBarLanguages)) this._options.scrollBarLanguages = 5;
else this._options.scrollBarLanguages = Number(this._options.scrollBarLanguages);
if (this._options.scrollBarWidth == o || !Number(this._options.scrollBarWidth)) this._options.scrollBarWidth = 5;
else this._options.scrollBarWidth = Number(this._options.scrollBarWidth);
if (this._options.scrollBarOpacity == o || !Number(this._options.scrollBarOpacity)) this._options.scrollBarOpacity = 4 / 10;
else this._options.scrollBarOpacity = Number(this._options.scrollBarOpacity) / 100;
if (this._options.scrollBarWheelStep == o || !Number(this._options.scrollBarWheelStep)) this._options.scrollBarWheelStep = 10;
else this._options.scrollBarWheelStep = Number(this._options.scrollBarWheelStep);
if (this._options.languages.length <= this._options.scrollBarLanguages) this._options.scroll = false
}
if (this._options.flagsFolder == o) this._options.flagsFolder = "images/";
if (this._options.languageSelectorClass == o) this._options.languageSelectorClass = "translator-dropdown-language-";
if (this._options.customLanguageSelectorClass == o) this._options.customLanguageSelectorClass = "translator-dropdown-custom-language-";
if (this._options.floatingLeftClass == o) this._options.floatingLeftClass = "translator-dropdown-floating-left";
if (this._options.floatingRightClass == o) this._options.floatingRightClass = "translator-dropdown-floating-right";
if (this._options.flagsClass == o) this._options.flagsClass = "translator-dropdown-flags";
if (this._options.namesClass == o) this._options.namesClass = "translator-dropdown-names";
if (this._options.shortNamesClass == o) this._options.shortNamesClass = "translator-dropdown-short-names";
if (this._options.flagsAndNamesClass == o) this._options.flagsAndNamesClass = "translator-dropdown-flags-and-names";
if (this._options.flagsAndShortNamesClass == o) this._options.flagsAndShortNamesClass = "translator-dropdown-flags-and-short-names";
if (this._options.scrollClass == o) this._options.scrollClass = "translator-dropdown-scroll-enabled";
if (this._options.hoverEnabledClass == o) this._options.hoverEnabledClass = "translator-dropdown-hover";
if (this._options.loadingClass == o) this._options.loadingClass = "translator-dropdown-loading";
if (this._options.completedClass == o) this._options.completedClass = "translator-dropdown-completed";
if (this._options.containerClass == o) this._options.containerClass = "translator-dropdown-container";
if (this._options.containerCustomClass == o) this._options.containerCustomClass = "translator-dropdown-container-custom";
if (this._options.bodyClass == o) this._options.bodyClass = "translator-dropdown-body";
if (this._options.subContainerClass == o) this._options.subContainerClass = "translator-dropdown-sub-container";
if (this._options.currentLanguageContainerClass == o) this._options.currentLanguageContainerClass = "translator-dropdown-current-language";
if (this._options.currentLanguageContainerArrowClass == o) this._options.currentLanguageContainerArrowClass = "translator-dropdown-current-language-arrow";
if (this._options.languagesListClass == o) this._options.languagesListClass = "translator-dropdown-languages-list";
if (this._options.languagesListScrollClass == o) this._options.languagesListScrollClass = "translator-dropdown-languages-list-scroll";
if (this._options.languagesListScrollBarClass == o) this._options.languagesListScrollBarClass = "translator-dropdown-languages-list-scroll-bar";
if (this._options.languagesListOpenedClass == o) this._options.languagesListOpenedClass = "translator-dropdown-languages-list-opened";
if (this._options.hiddenClass == o) this._options.hiddenClass = "translator-dropdown-hidden";
if (this._options.lowResolutionClass == o) this._options.lowResolutionClass = "translator-dropdown-low-res";
if (this._options.flagClass == o) this._options.flagClass = "translator-dropdown-hide-flag";
if (this._options.nameClass == o) this._options.nameClass = "translator-dropdown-hide-name";
if (typeof this._options.customLanguagesNames != "object") this._options.customLanguagesNames = {};
if (typeof this._options.nativeLanguagesNames != "object") this._options.nativeLanguagesNames = {};
for (var l in this._options.customLanguagesNames) this._options.nativeLanguagesNames[l] = this._options.customLanguagesNames[l];
this._options.customLanguagesNames = this._options.nativeLanguagesNames;
if (typeof h.override == "object") this._options = jQuery.extend(this._options, h.override);
this._options._languages = jQuery.extend({}, jQuery.translate().getLanguages());
this._options.actionsUrl = window.location.href;
this._initialize_custom_languages();
this._options._owner = this;
this._supports_touch = "ontouchstart" in window;
this._sanitize_id();
this._preload_images()
};
this._clear_stored_translations = function() {
if (typeof localStorage == "undefined") return;
if (!this._options.localStorage) {
this._remove_stored_translations();
return
}
var a = this._options.id + "_cleared_on";
if (this._options.clearLocalStorage && !localStorage.getItem(a)) {
var b = new Date();
this._remove_stored_translations();
localStorage.setItem(a, b.toString())
} else if (!this._options.clearLocalStorage) localStorage.removeItem(a)
};
this._check_html_closure = function() {
var a = jQuery("<div></div>");
a["html"]("<em /><div></div>");
return a.children().length == 2
};
this._remove_stored_translations = function() {
var a = this._options.translator_id + "_cleared_on";
for (var i in localStorage) {
if (i == a && this._options.local_storage_clear) continue;
if (i.indexOf(this._options.translator_id) === 0) localStorage.removeItem(i)
}
};
this._initialize_custom_languages = function() {
if (typeof this._options.customLanguages != "object") return;
this._options._languages = jQuery.extend(this._options._languages, this._options.customLanguages)
};
this._preload_images = function() {
var a = document.createElement("div");
var b;
if (this._options.loading) {
b = document.createElement("div");
b.className = this._options.loadingClass;
a.appendChild(b)
}
if (this._options.complete) {
b = document.createElement("div");
b.className = this._options.completedClass;
a.appendChild(b)
}
a.style.position = "absolute";
a.style.left = "-5000px";
a.style.top = "-5000px";
document.body.appendChild(a)
};
this._sanitize_id = function() {
for (var i = 0; i < jQuery.translatorDropDown.ids.length; i++)
if (this._options.id == jQuery.translatorDropDown.ids[i]) this._options.id += "-" + jQuery.translatorDropDown.ids.length;
jQuery.translatorDropDown.ids.push(this._options.id)
};
this._initialize_elements = function(a) {
this._container = jQuery(a);
if (this._options.languages[0] == "") return;
this._update_content();
this._current_language_container = this._container.find("." + this._options.currentLanguageContainerClass);
this._sub_container = this._container.find("." + this._options.subContainerClass);
this._sub_container[0]._owner = this;
this._set_current_language(this._options.from);
this._container.addClass(this._options.floatingLeft ? this._options.floatingLeftClass : this._options.floatingRightClass);
if (this._options.flags) {
if (this._options.names) {
if (this._options.shortNames) this._container.addClass(this._options.flagsAndShortNamesClass);
else this._container.addClass(this._options.flagsAndNamesClass)
} else this._container.addClass(this._options.flagsClass)
} else if (this._options.names) {
if (this._options.shortNames) this._container.addClass(this._options.shortNamesClass);
else this._container.addClass(this._options.namesClass)
}
if (this._options.scroll) this._container.addClass(this._options.scrollClass);
if (!this._supports_touch) this._container.addClass(this._options.hoverEnabledClass);
if (this._options.hideLanguage === false) this._container.addClass(this._options.lowResolutionClass);
this._options._container = this._container;
this._links = this._container.find("[class*=" + this._options.languageSelectorClass + "]");
for (var i = 0; i < this._links.length; i++) this._links[i]._owner = this;
this._languages_list = this._container.find("." + this._options.languagesListClass)
};
this._initialize_styles = function() {
if (this._options.hideLanguage !== false) {
var a = this._options.hideLanguage == "flag" ? this._options.flagClass : this._options.nameClass;
this._add_css_responsive("(max-width: " + this._options.lowResolution + "px)", "." + a, "display", "none")
}
};
this._add_css_responsive = function(a, b, c, d) {
var f;
if (document.all) f = "rules";
else if (document.getElementById) f = "cssRules";
else return;
var g = "." + this.getId() + " " + b;
if (!this._sheet_responsive[a]) {
var h = document.head || document.body;
var i = document.createElement("style");
i.setAttribute("type", "text/css");
if (this._is_ie) {
i.innerHTML = "@media screen and " + a + " { " + g + " { " + c + ": " + d + " !important; }}";
h.appendChild(i);
return
}
i.setAttribute("media", a);
i.appendChild(document.createTextNode(""));
h.appendChild(i);
this._sheet_responsive[a] = i.sheet
}
if (!this._sheet_responsive[a]) return;
try {
this._sheet_responsive[a].insertRule(g + " { " + c + ": " + d + " !important; }", this._sheet_responsive[f].length)
} catch (e) {
try {
this._sheet_responsive[a].addRule(g, c + ": " + d + " !important;")
} catch (e) {
console.log("Unable to create CSS rule.")
}
}
};
this._set_current_language = function(a) {
var b = "";
if (this._options.flags) b += this._gen_flag(a);
if (this._options.names) b += this._gen_name(a);
this._current_language_container[0].innerHTML = b;
this._current_language = a
};
this._update_content = function() {
var a = this._container.find("[class*=" + this._options.languageSelectorClass + "]");
var b = true;
var c = new RegExp("\\b" + this._options.languageSelectorClass + "([a-zA-Z\-]{2,6})\\b");
for (var i = 0; i < a.length; i++)
if (c.exec(a[i].className)) b = false;
if (a.length == 0 || (a.length > 0 && b)) {
this._container.html(this._gen_content());
this._container.addClass(this._options.containerClass);
if (this._options.location != "undefined") this._container.addClass(this._options.containerCustomClass);
this._container.addClass(this._options.id)
}
};
this._initialize_events = function(b) {
if (this._supports_touch) {
if (this._options.scroll) {
this._sub_container.bind("touchstart", function(a) {
if (!b._touch_flag && !b._showing_languages_list) {
b._touch_flag = true;
setTimeout(function() {
b._touch_flag = false
}, 500);
if (!b.isLoading()) b._show_languages_list(true)
}
a.preventDefault()
});
this._sub_container.bind("touchend", function(a) {
if (b._touch_flag) return;
b._show_languages_list(false);
a.preventDefault()
});
this._links.bind("touchstart", function(a) {
if (jQuery.translatorDropDown.lastT._is_translating()) return;
if (b._options.scroll) {
b._touch_flag = true;
setTimeout(function() {
b._touch_flag = false
}, 500)
}
a.preventDefault()
})
} else {
this._sub_container.bind("touchstart", function(a) {
if (!b.isLoading() && !b._showing_languages_list) {
b._show_languages_list(true);
a.preventDefault()
}
})
}
this._sub_container.hover(function() {
if (!this._owner.isLoading()) this._owner._show_languages_list(true)
}, function() {
this._owner._show_languages_list(false)
})
} else if (window.navigator.msPointerEnabled) {
this._sub_container.hover(function() {
if (!b._touch_flag && !b._showing_languages_list) {
b._touch_flag = true;
setTimeout(function() {
b._touch_flag = false
}, 500);
if (!this._owner.isLoading()) this._owner._show_languages_list(true)
}
}, function() {
if (b._touch_flag) return;
this._owner._show_languages_list(false)
})
} else {
this._sub_container.hover(function() {
if (!this._owner.isLoading()) this._owner._show_languages_list(true)
}, function() {
this._owner._show_languages_list(false)
})
}
this._links.bind("click", function() {
if (jQuery.translatorDropDown.lastT._is_translating() || !this._owner._allow_select) return;
jQuery(this).blur();
this._owner._do_click(this)
});
if (this._options.scroll) {
this._languages_list.translatorScroll({
size: this._options.scrollBarWidth + "px",
height: (Math.round(this._get_scroll_bar_languages()) * 23) + "px",
wheelStep: this._options.scrollBarWheelStep,
opacity: this._options.scrollBarOpacity,
listScrollClass: this._options.languagesListScrollClass,
listScrollBarClass: this._options.languagesListScrollBarClass
}, this)
};
var c = true;
if (this._options.cookie) {
var d = jQuery.cookie("translator-dropdown-" + this._options.id + "-to");
if (d != o) {
d = d.toLowerCase();
var e = this._container.find("." + this._options.customLanguageSelectorClass + d);
if (e.length > 0) {
this._translate(e.get(0));
c = false
} else {
e = this._container.find("." + this._options.languageSelectorClass + d);
var f = new RegExp("\\b" + this._options.customLanguageSelectorClass + ".*\\b");
for (var i = 0; i < e.length; i++) {
var g = f.exec(e.get(i).className);
if (!g) {
this._translate(e.get(i));
c = false;
break
}
}
}
}
}
if (c && this._options.autoSelect && this._options.complete) {
var e = this._container.find("." + this._options.languageSelectorClass + this._options.from);
if (e.length > 0) {
this._last_selected = jQuery(e.get(0));
this._last_selected.parent().addClass(this._options.completedClass)
}
}
};
this._do_click = function(a) {
var b = this._get_parent_link(a);
if (!b) return;
if (this._last_selected && this._last_selected.get(0) == b) {
this._do_restore();
return
}
this._translate(b)
};
this._get_parent_link = function(a) {
var b = a;
var c = new RegExp("\\b" + this._options.languageSelectorClass + "([a-zA-Z\-]{2,6})\\b");
while (b) {
if (c.exec(b.className)) return b;
b = b.parentNode
}
};
this._get_scroll_bar_languages = function() {
return Math.min(this._options.languages.length, this._options.scrollBarLanguages)
};
this._show_languages_list = function(a) {
if (a) {
this._container.addClass(this._options.languagesListOpenedClass);
this._languages_list.scrollTop(this._scroll)
} else {
if (this._options.scroll) {
this._scroll_bar.stop(true, true);
this._scroll_bar.hide()
}
this._container.removeClass(this._options.languagesListOpenedClass)
}
this._showing_languages_list = a
}, this._clear_cookie = function() {
if (this._options.cookie) jQuery.cookie("translator-dropdown-" + this._options.id + "-to", null, {
path: "/"
})
};
this._do_restore = function() {
this._clear_cookie();
var a = this._options.from;
var b = this._container.find("." + this._options.languageSelectorClass + a);
this._last_selected = jQuery(b.get(0));
this._show_languages_list(false);
this._set_current_language(a);
this._do_translate(a, this._options, true)
};
this._should_translate = function(a) {
var b = this._extract_language(a);
if (this._last_selected) {
if (this._extract_language(this._last_selected.get(0)) == b) return false
} else if (b == this._options.from) return false;
return true
};
this.reTranslate = function(a) {
var b = this._current_language;
if (b == this._options.from) return;
if (typeof a == "undefined") a = document.body;
this._show_loading(true);
this._show_languages_list(false);
this._on_start(this._options.from, b, this._options);
if (!this._has_token(b)) this._get_token(this, b);
else this._do_translate(b, this._options, false, a)
};
this._translate = function(a) {
var b = this._extract_language(a);
if (b == this._options.from) {
this._do_restore();
return
}
this._select(a);
this._show_languages_list(false);
this._set_current_language(b);
if (this._options.cookie) {
if (this._options.cookiePersistency) jQuery.cookie("translator-dropdown-" + this._options.id + "-to", this._get_language_for_cookie(a), {
expires: 365,
path: "/"
});
else jQuery.cookie("translator-dropdown-" + this._options.id + "-to", this._get_language_for_cookie(a), {
path: "/"
})
}
this._on_start(this._options.from, b, this._options);
if (!this._has_token(b)) this._get_token(this, b);
else this._do_translate(b, this._options, false)
};
this._inc_token_count = function() {
this._token_requests_count++
}, this._reset_token_count = function() {
this._token_requests_count = 0
}, this._enough_token_count = function() {
return this._token_requests_count >= 3
}, this._has_token = function(a) {
var b = this._options.from + "_" + a;
var c = p[b];
if (!c) return false;
if (c.error) return false;
if (c.expires) return c.expires > new Date();
else return true
};
this._get_token = function(d, f) {
var g = new jQuery.translatorDropDown.Ajax();
g.onSuccess = function(a) {
var b = d._options.from + "_" + f;
try {
p[b] = jQuery.translatorDropDown.JSON.build(a)
} catch (e) {
p[b] = {
error: "Invalid JSON response"
}
}
if (p[b].error) {
if (p[b].error === "Token failed") {
if (!d._enough_token_count()) {
d._display_errors(p[b].error);
d._get_token(d, f);
return
}
}
d._display_errors(p[b].error);
d._clear_select(d._options);
d._do_restore();
return
} else d._reset_token_count();
if (p[b].expires) {
var c = new Date();
p[b].expires = c.setSeconds(c.getSeconds() + p[b].expires)
}
d._do_translate(f, d._options, false)
};
g.onFailure = function(a) {
var b = [];
if (typeof this.http.status != "undefined") b.push(this.http.status);
if (typeof this.http.statusText != "undefined") b.push(this.http.statusText);
if (typeof a != "undefined") b.push(a);
d._display_errors(b.join(" - "));
d._clear_select(d._options);
d._do_restore()
};
g.AddParam("action", "surstudio_plugin_translator_revolution_dropdown_get_token");
g.AddParam("f", this._options.from);
g.AddParam("t", f);
this._inc_token_count();
g.Request(this._options.actionsUrl)
};
this._display_errors = function(a) {
try {
if (a instanceof Array)
for (var i = 0; i < a.length; ++i)
for (var b in a[i]) console.log(a[i][b]);
else console.log(a)
} catch (e) {}
};
this._do_translate = function(g, h, i, j) {
var k = typeof j == "undefined" ? h.targetSelector : j;
var l = typeof h.location == "undefined" ? h.containerClass : h.containerCustomClass;
jQuery(k).translate({
translator_id: this._options.id,
translator: this,
auth: p,
url: this._options.actionsUrl,
from: h.from,
to: g,
placeholder: h.placeholder,
local_storage: h.localStorage,
local_storage_expires: h.localStorageExpires,
local_storage_clear: h.clearLocalStorage,
toggle: true,
data: true,
not: jQuery.merge(jQuery(h.excludeSelector), jQuery("." + l)),
requests: this._options.requests,
stripWhitespace: false,
trim: false,
start: function(a, b, c, d, e) {
h._owner._on_start(c, d, e)
},
complete: function(a, b, c, d, e, f) {
h._owner._on_complete(i, a, b, c, d, e, f)
},
error: function() {
h._owner._on_complete(i)
}
})
};
this._get_language_for_cookie = function(a) {
var b = new RegExp("\\b" + this._options.customLanguageSelectorClass + ".*\\b");
var c = b.exec(a.className);
if (!c) return this._extract_language(a);
c = c[0].split(" ")[0];
var d = c.replace(this._options.customLanguageSelectorClass, "");
d = d.replace(/^\s*|\s*$/g, "");
d = d.toLowerCase();
return d
};
this._extract_language = function(a) {
var b = new RegExp("\\b" + this._options.languageSelectorClass + ".*\\b");
var c = b.exec(a.className);
if (!c) return;
c = c[0].split(" ")[0];
var d = c.replace(this._options.languageSelectorClass, "");
d = d.replace(/^\s*|\s*$/g, "");
d = d.toLowerCase();
if (d == "zh-cn") d = "zh-CN";
else if (d == "zh-tw") d = "zh-TW";
return d
};
this._on_start = function(a, b, c) {
if (typeof this._options.onStart == "function" || typeof this._options.onStart == "object")
if (this._options.onStart.call) this._options.onStart(a, b, c)
};
this._on_complete = function(a, b, c, d, e, f, g) {
this._clear_select(this._options);
if (!a) {
if (this._options.complete) this._last_selected.parent().addClass(this._options.completedClass)
} else if (this._options.complete && this._options.autoSelect) this._last_selected.parent().addClass(this._options.completedClass);
if (typeof this._options.onComplete == "function" || typeof this._options.onComplete == "object")
if (this._options.onComplete.call) this._options.onComplete(b, c, d, e, f, g, a)
};
this._select = function(a) {
this._last_selected = jQuery(a);
this._clear_select(this._options);
this._show_loading(true)
};
this.isLoading = function() {
return this._loading
};
this._show_loading = function(a) {
if (this._options.loading) {
if (a) this._current_language_container.addClass(this._options.loadingClass);
else this._current_language_container.removeClass(this._options.loadingClass)
}
this._loading = a
};
this._clear_select = function(a) {
this._show_loading(false);
this._links.parent().removeClass(a.completedClass)
};
this._gen_content = function() {
var a = [];
var b;
var c;
var d;
for (var i = 0; i < this._options.languages.length; i++) {
c = "";
d = "";
if (this._options.flags) c = this._gen_flag(this._options.languages[i]);
if (this._options.names) d = this._gen_name(this._options.languages[i]);
b = this._gen_link(this._options.languages[i], c, d);
a.push(b)
}
return this._gen_content_container(a)
};
this._gen_content_container = function(a) {
var b = this._options.linksContainerTemplate;
b = b.replace("{{ languages_list_class }}", this._options.languagesListClass);
b = b.replace("{{ sub_container_class }}", this._options.subContainerClass);
b = b.replace("{{ body_class }}", this._options.bodyClass);
b = b.replace("{{ current_language_container_class }}", this._options.currentLanguageContainerClass);
b = b.replace("{{ current_language_container_arrow_class }}", this._options.currentLanguageContainerArrowClass);
b = b.replace("{{ content }}", a.join(""));
return b
};
this._gen_link = function(a, b, c) {
var d = this._options.linkTemplate;
var e = this._gen_language_name(a);
var f;
d = d.replace(/\{\{ name \}\}/gi, e);
f = this._options.languageSelectorClass + this._gen_language_short_name(a, true);
if (a.split("_").length > 1) f += " " + this._options.customLanguageSelectorClass + a;
d = d.replace(/\{\{ language_selector_class \}\}/gi, f);
d = d.replace("{{ content }}", b + c);
return d
};
this._gen_name = function(a) {
var b = this._options.nameTemplate;
var c = this._options.shortNames ? this._gen_language_short_name(a, false) : this._gen_language_name(a);
b = b.replace(/\{\{ name \}\}/gi, c);
var d = this._options.hideLanguage === "name" ? "class=\"" + this._options.nameClass + "\" " : "";
b = b.replace(/\{\{ class \}\}/gi, d);
return b
};
this._gen_flag = function(a) {
var b = this._options.flagTemplate;
var c = this._gen_language_name(a, true).replace(" ", "_");
b = b.replace(/\{\{ src \}\}/gi, this._options.flagsFolder + c + ".gif");
b = b.replace(/\{\{ name \}\}/gi, c);
var d = this._options.hideLanguage === "flag" ? "class=\"" + this._options.flagClass + "\" " : "";
b = b.replace(/\{\{ class \}\}/gi, d);
return b
};
this._gen_language_short_name = function(a, b) {
var c = a.split("_");
var d;
if (b) d = c[0];
else d = c.length > 1 ? c[1] : c[0];
return b ? d.toLowerCase() : d.toUpperCase()
};
this._gen_language_name = function(a, b) {
var c = "";
if (!b && a in this._options.customLanguagesNames) c = this._options.customLanguagesNames[a];
else {
for (var i in this._options._languages)
if (this._options._languages[i].toLowerCase() == a.toLowerCase()) c = i;
c = this._capitalize(c.replace("_", " "))
}
return c
};
this._is_bool = function(a) {
return a === false || a === true
};
this._capitalize = function(d) {
var e = d.toLowerCase();
return e.replace(/(^|\s)([a-z])/g, function(a, b, c) {
return b ? b + c.toUpperCase() : c.toUpperCase()
})
};
this._initialize(m, n)
};
(function($) {
function Nct() {}
Nct.prototype = {
init: function(a, o) {
this.textArray = [];
this.elements = [];
this.options = o;
this.jquery = a;
this.n = -1;
if (o.async === true) o.async = 2;
return this.initializeElements()
},
isTextNode: function(a) {
return a.nodeType === 3 && a.nodeValue.match(/\S/) !== null && a.nodeName.toLowerCase() != "textarea"
},
isInputNode: function(a) {
return a.nodeType === 1 && a.nodeName.toLowerCase() == "input" && a.type.toLowerCase() != "button" && a.type.toLowerCase() != "submit"
},
isInputButtonNode: function(a) {
return a.nodeType === 1 && a.nodeName.toLowerCase() == "input" && (a.type.toLowerCase() == "button" || a.type.toLowerCase() == "submit")
},
isTextAreaNode: function(a) {
return a.nodeType === 1 && a.nodeName.toLowerCase() == "textarea"
},
isNodeWithAttributes: function(a) {
if (!a.getAttribute) return false;
if (this.options.placeholder && !this.isEmpty(a.getAttribute("placeholder")) && this.trim(a.getAttribute("placeholder")) != ".") return true;
return false
},
isEmpty: function(a) {
var b = arguments[1] || null;
if (!b) return a == null || a.length == 0;
else return a == b
},
trim: function(a) {
return this != window ? a.replace(/^\s*|\s*$/g, "") : null
},
_exclude_node: function(a) {
return this.options.not.index(a) !== -1
},
getTextNodes: function(a) {
var b = arguments[1] || [];
for (var i = 0; i < a.length; i++) {
if (({
SCRIPT: 1,
NOSCRIPT: 1,
STYLE: 1,
OBJECT: 1,
IFRAME: 1
})[a[i].nodeName]) continue;
if (this._exclude_node(a[i])) continue;
if (a[i].hasChildNodes() && !this.isTextAreaNode(a[i])) this.getTextNodes(a[i].childNodes, b);
if (this.isTextNode(a[i])) {
if (!this.isEmpty(this.trim(a[i].nodeValue)) && this.trim(a[i].nodeValue) != ".") b.push(a[i])
} else if (this.isInputNode(a[i]) || this.isInputButtonNode(a[i]) || this.isTextAreaNode(a[i])) {
if (!this.isEmpty(this.trim(a[i].value)) && this.trim(a[i].value) != ".") b.push(a[i]);
else if (this.options.placeholder) b.push(a[i])
} else if (this.isNodeWithAttributes(a[i])) b.push(a[i])
}
return b
},
_get_node_value_and_attributes: function(a) {
var b = {
"value": null,
"placeholder": null
};
b["value"] = this._clean_value(this._get_node_value(a));
if (!a.getAttribute) return b;
if (this.options.placeholder) b["placeholder"] = this._clean_value(a.getAttribute("placeholder"));
return b
},
_clean_value: function(a) {
if (this.isEmpty(a)) return null;
var b = a;
b = b.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi, "");
b = b.replace(/<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)>/g, "");
return b
},
_get_node_value: function(a) {
var b;
switch (a.nodeType) {
case 3:
{
b = a.nodeValue;
break
}
case 1:
{
b = a.value;
break
}
default:
{
b = null;
break
}
}
return b
},
initializeElements: function() {
var a;
var b = [];
var c;
var d;
var e;
for (var i = 0; i < this.jquery.length; i++) {
if (this.isInputNode(this.jquery[i]) || this.isTextAreaNode(this.jquery[i]) || this.isInputButtonNode(this.jquery[i]) || this.isNodeWithAttributes(this.jquery[i])) d = this.getTextNodes([this.jquery[i]]);
else d = this.getTextNodes(this.jquery[i].childNodes);
b = b.concat(d)
}
for (var i = 0; i < b.length; i++) {
e = this._get_node_value_and_attributes(b[i]);
this.elements.push(b[i]);
this.textArray.push(e)
}
a = this.jquery.pushStack(this.elements, "nodesContainingText");
this.options.complete.call(a, a, this.textArray);
return a
},
_get_text_node_parent: function(a) {
var b = a;
switch (b.nodeType) {
case 3:
{
while (b) {
if (b.parentNode) return b.parentNode;
b = b.previousSibling
}
break
}
case 1:
{
return b;
break
}
default:
{
break
}
}
}
};
var f = {
not: "",
async: false,
each: function() {},
complete: function() {},
comments: false,
returnAll: true,
walk: true,
altAndVal: false,
subject: true,
stripScripts: true
};
$.fn.nodesContainingText = function(o) {
o = $.extend({}, f, $.fn.nodesContainingText.defaults, o);
return new Nct().init(this, o)
};
$.fn.nodesContainingText.defaults = f
})(jQuery);
(function($) {
function $function() {}
var n = true,
False = false,
undefined, replace = "".replace,
Str = String,
Fn = Function,
Obj = Object,
GL, GLL, toLangCode, inverseLanguages = {},
loading, readyList = [],
ms_u = "http://translate.surstudio.net/",
defaults = {
api_key: "",
from: "",
to: "",
start: $function,
error: $function,
each: $function,
complete: $function,
onTimeout: $function,
timeout: 0,
stripComments: n,
stripWhitespace: n,
stripScripts: n,
limit: 1750,
walk: n,
returnAll: False,
replace: n,
rebind: n,
data: n,
setLangAttr: False,
subject: n,
not: "",
altAndVal: n,
async: False,
toggle: False,
fromOriginal: n,
trim: true,
alwaysReplace: false
};
function loaded() {
$.translate.GLL = GLL = {
AFRIKAANS: 'af',
ALBANIAN: 'sq',
ARABIC: 'ar',
ARMENIAN: 'hy',
AZERBAIJANI: 'az',
BASQUE: 'eu',
BELARUSIAN: 'be',
BENGALI: 'bn',
BOSNIAN: 'bs',
BULGARIAN: 'bg',
CATALAN: 'ca',
CEBUANO: 'ceb',
CHICHEWA: 'ny',
CHINESE_SIMPLIFIED: 'zh-CN',
CHINESE_TRADITIONAL: 'zh-TW',
CROATIAN: 'hr',
CZECH: 'cs',
DANISH: 'da',
DUTCH: 'nl',
ENGLISH: 'en',
ESPERANTO: 'eo',
ESTONIAN: 'et',
FILIPINO: 'tl',
FINNISH: 'fi',
FRENCH: 'fr',
GALICIAN: 'gl',
GEORGIAN: 'ka',
GERMAN: 'de',
GREEK: 'el',
GUJARATI: 'gu',
HAITIAN_CREOLE: 'ht',
HAUSA: 'ha',
HEBREW: 'iw',
HINDI: 'hi',
HMONG: 'hmn',
HUNGARIAN: 'hu',
ICELANDIC: 'is',
IGBO: 'ig',
INDONESIAN: 'id',
IRISH: 'ga',
ITALIAN: 'it',
JAPANESE: 'ja',
JAVANESE: 'jw',
KANNADA: 'kn',
KAZAKH: 'kk',
KHMER: 'km',
KOREAN: 'ko',
LAO: 'lo',
LATIN: 'la',
LATVIAN: 'lv',
LITHUANIAN: 'lt',
MACEDONIAN: 'mk',
MALAGASY: 'mg',
MALAY: 'ms',
MALAYALAM: 'ml',
MALTESE: 'mt',
MAORI: 'mi',
MARATHI: 'mr',
MONGOLIAN: 'mn',
BURMESE: 'my',
NEPALI: 'ne',
NORWEGIAN: 'no',
PERSIAN: 'fa',
POLISH: 'pl',
PORTUGUESE: 'pt',
PUNJABI: 'pa',
ROMANIAN: 'ro',
RUSSIAN: 'ru',
SERBIAN: 'sr',
SESOTHO: 'st',
SINHALA: 'si',
SLOVAK: 'sk',
SLOVENIAN: 'sl',
SOMALI: 'so',
SPANISH: 'es',
SUNDANESE: 'su',
SWAHILI: 'sw',
SWEDISH: 'sv',
TAJIK: 'tg',
TAMIL: 'ta',
TELUGU: 'te',
THAI: 'th',
TURKISH: 'tr',
UKRAINIAN: 'uk',
URDU: 'ur',
UZBEK: 'uz',
VIETNAMESE: 'vi',
WELSH: 'cy',
YIDDISH: 'yi',
YORUBA: 'yo',
ZULU: 'zu',
AMHARIC: 'am',
CORSICAN: 'co',
FRISIAN: 'fy',
HAWAIIAN: 'haw',
KURDISH: 'ku',
KYRGYZ: 'ky',
LUXEMBOURGISH: 'lb',
PASHTO: 'ps',
SAMOAN: 'sm',
SCOTS_GAELIC: 'gd',
SHONA: 'sn',
SINDHI: 'sd',
XHOSA: 'xh'
};
toLangCode = $.translate.toLanguageCode;
$.each(GLL, function(l, a) {
inverseLanguages[a.toUpperCase()] = l
});
$.translate.isReady = n;
while ((fn = readyList.shift())) fn()
}
function filter(c, d) {
var e = {};
$.each(c, function(a, b) {
if (d(b, a) === n) e[a] = b
});
return e
}
function bind(a, b, c) {
return function() {
return a.apply(b === n ? arguments[0] : b, c || arguments)
}
}
function isSet(e) {
return e !== undefined
}
function validate(d, f, g) {
var h, obj = {},
args = $.grep(d, isSet);
$.each(f, function(_, b) {
var c = $.grep(b[0], function(e, i) {
return isSet(args[i]) && args[i].constructor === e
}).length;
if (c === args.length && c === b[0].length && (h = n)) {
$.each(b[1], function(i, a) {
obj[a] = args[i]
});
return False
}
});
if (!h) throw g;
return obj
}
function getOpt(a, b) {
var c = validate(a, $.translate.overload, "jQuery.translate: Invalid arguments"),
o = c.options || {};
delete c.options;
o = $.extend({}, defaults, b, $.extend(o, c));
if (o.fromOriginal) o.toggle = n;
if (o.toggle) o.data = n;
if (o.async === n) o.async = 2;
return o
}
function T() {
this.extend($.translate);
delete this.defaults;
delete this.fn
}
T.prototype = {
version: "1.4.7",
_init: function(t, o) {
var a = this.isString = typeof t === "string",
lastpos = 0,
substr;
this.options = o;
this.from = o.from || "";
this.to = o.to || "";
this.source = t;
this.rawTranslation = "";
this.translation = [];
this.i = 0;
this.stopped = False;
this.elements = o.nodes;
this._texts_to_translate = null;
this._initialize_elements(o, t);
this._i = -1;
this._toggle()
},
_initialize_elements: function(a, b) {
var c = a.nodes;
var d = ["value"];
var e;
this._elements = [];
if (a.placeholder) d.push("placeholder");
for (var i = 0; i < c.length; i++) {
for (var j = 0; j < d.length; j++) {
e = b[i][d[j]];
if (e == "" || this._is_pointless(e)) continue;
this._elements.push({
object: c[i],
original: b[i][d[j]],
translated: false,
translated_text: [],
type: d[j],
to_translate: this._get_truncated_text(a, b[i][d[j]])
})
}
}
},
_is_pointless: function(a, b) {
if (a == null || a == b || a.length == 0) return true;
if (this._is_numeric(a)) return true;
if (a.length > 1) return false;
var c = [".", "!", "?", ";", ":"];
for (var i = 0; i < c.length; i++)
if (a == c[i]) return true;
return false
},
_is_numeric: function(a) {
return a.match(/^.?[\d\.\,\-\+]*$/) ? true : false
},
_get_truncated_text: function(a, b) {
if (a.from == a.to) return [b];
var c = a.from + "_" + a.to;
var d = encodeURIComponent(b);
var e = "<break>";
var f = this._word_wrap(d, a.auth[c].limit, e, 0).split(e);
var g;
var h = 0;
var j;
var k = [];
var l = 0;
if (f.length > 1) {
j = f[0];
while (h < d.length) {
if (!this._ends_with(j, d.substr(h, d.length))) j = this._get_better_chunk(j);
k.push(j);
h += j.length;
j = this._word_wrap(d.substr(h, d.length), a.auth[c].limit, e, 0).split(e)[0];
l++
}
} else k = f;
for (var i = 0; i < k.length; i++) k[i] = decodeURIComponent(k[i]);
return k
},
_get_better_chunk: function(a) {
var b = decodeURIComponent(a);
var c = [".", "!", "?", ";", ":"];
if (this._is_language_x()) c = c.concat(["", "", ""]);
var d = false;
var e;
for (var i = 0; i < c.length; i++) {
e = b.lastIndexOf(c[i]);
if (e == -1) continue;
if (d === false) d = e + c[i].length;
if (e > d) d = e + c[i].length
}
return d === false ? a : encodeURIComponent(b.substr(0, d))
},
_is_language_x: function() {
if (this.options.from == "zh-CN" || this.options.from == "zh-TW") return true;
return false
},
_ends_with: function(a, b) {
if (this == window) return null;
return a.length >= b.length && a.substring(a.length - b.length) == b
},
_trim: function(a) {
var b;
b = a.replace(/[\n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]+/gi, " ");
b = b.replace(/^\s+|\s+$/gi, "");
return b
},
_process: function() {
if (this.stopped) return;
var o = this.options,
i = this.rawTranslation.length,
lastpos, subst, divst, divcl;
var a = this;
if (this._elements.length - 1 == this._i) this._complete();
else this._translate_begin()
},
_translate_begin: function() {
var a = this.options.requests || 5;
for (var i = 0; i < a; i++) this._translate()
},
_is_translating: function() {
return this._translating
},
_get_texts_to_translate: function() {
if (!this._texts_to_translate) {
this._texts_to_translate = [];
for (var i = 0; i < this._elements.length; i++) {
for (var j = 0; j < this._elements[i].to_translate.length; j++) this._texts_to_translate.push({
"text": this._elements[i].to_translate[j],
"parent": this._elements[i],
"ix": j
})
}
}
return this._texts_to_translate
},
_remove_stored_translations: function() {
var a = this.options.translator_id + "_cleared_on";
for (var i in localStorage) {
if (i == a && this.options.local_storage_clear) continue;
if (i.indexOf(this.options.translator_id) === 0) localStorage.removeItem(i)
}
},
_set_stored_translation: function(a, b, c, d) {
if (!this.options.local_storage || typeof localStorage == "undefined") return false;
var e = this.options.translator_id + "_expires";
var f = localStorage.getItem(e);
var g = new Date();
if (!f || new Date(f) < g) {
this._remove_stored_translations();
g.setDate(g.getDate() + this.options.local_storage_expires);
localStorage.setItem(e, g)
}
var h = this.options.translator_id + "_" + c + "_" + d + "_" + jQuery.md5(a);
localStorage.setItem(h, b)
},
_get_stored_translation: function(a, b, c) {
if (!this.options.local_storage || typeof localStorage == "undefined") return false;
var d = this.options.translator_id + "_expires";
var e = localStorage.getItem(d);
if (!e || new Date(e) < new Date()) return false;
var f = this.options.translator_id + "_" + b + "_" + c + "_" + jQuery.md5(a);
var g = localStorage.getItem(f);
return g != null ? g : false
},
_translate: function() {
this._i++;
var a = this._get_texts_to_translate();
if (this._i >= a.length) return;
this._translating = true;
var b = [];
var c = [];
var d;
var e;
var f = 0;
var g = this._i;
var h = this.from + "_" + this.to;
for (var i = g; i < a.length; i++) {
if (d = this._get_stored_translation(a[i].text, this.from, this.to)) {
c.push({
ix: i,
translation: d
});
continue
}
if (this.from != this.to) {
if (b.length >= this.options.auth[h].tr_limit) break;
if (f + a[i].text.length > this.options.auth[h].limit) break
}
b.push(a[i].text);
f += a[i].text.length
}
e = b.length + c.length;
if (e == 0) return;
this._i = i - 1;
this._do_ms(b, this, g, c, e)
},
_do_ms: function(c, d, f, g, h) {
if (this.from == this.to || g.length == h) {
d._process_translated(c, f, g, h);
d._translate();
return
}
var j = new jQuery.translatorDropDown.Ajax();
j.setUnique(false);
j.onSuccess = function(a) {
var b;
try {
b = jQuery.translatorDropDown.JSON.build(a)
} catch (e) {
b = {
error: "Invalid JSON response"
}
}
if (b.error === "Token expired" || b.error === "Token failed") {
if (!d.options.translator._enough_token_count()) {
d._display_errors(b.error);
d.options.translator._get_token(d.options.translator, d.to);
return
}
d._display_errors(b.error);
d.options.translator._clear_select(d.options.translator._options);
d.options.translator._do_restore();
return
} else if (b.error) {
d._display_errors(b.error);
d.options.translator._clear_select(d.options.translator._options);
d.options.translator._do_restore();
return
}
d._process_translated(b, f, g, h);
d._translate()
};
j.onFailure = function(a) {
var b = [];
if (typeof this.http.status != "undefined") b.push(this.http.status);
if (typeof this.http.statusText != "undefined") b.push(this.http.statusText);
if (typeof a != "undefined") b.push(a);
d._display_errors(b.join(" - "));
d.options.translator._clear_select(d.options.translator._options);
d.options.translator._do_restore()
};
var k = [];
for (var i = 0; i < c.length; i++) k.push(encodeURIComponent(c[i]));
var l = this.from + "_" + this.to;
j.AddParam("tx", k);
j.AddParam("action", this.options.auth[l].action);
j.AddParam("f", this.from);
j.AddParam("ct", this._ct());
j.AddParam("t", this.to);
j.AddParam("tk", encodeURIComponent(this.options.auth[l].token));
j.AddParam("cr", this.options.auth[l].crc);
j.AddParam("nd", this.options.auth[l].nd);
j.Request(d.options.url)
},
_is_completed: function() {
for (var i = 0; i < this._elements.length; i++) {
if (this._elements[i].to_translate.length > this._elements[i].translated_text.length) return false;
for (var j = 0; j < this._elements[i].to_translate.length; j++)
if (typeof this._elements[i].translated_text[j] == "undefined" || this._elements[i].translated_text[j] == "") return false
}
this._translating = false;
return true
},
_process_translated: function(a, b, c, d) {
var e = a.error;
var f;
var g;
if (e) {
this._display_errors(e);
f = false
} else f = a;
this._write_translated_texts(f, b, c, d);
if (this._is_completed()) this._complete()
},
_set_translated_text: function(a, b) {
var c = this._texts_to_translate[b];
c.parent.translated_text[c.ix] = a !== false ? a : c.text;
return c.parent
},
_write_translated_texts: function(a, b, c, d) {
var e;
var f;
var g;
var h;
var j = 0;
for (var i = 0; i < d; i++) {
f = i + b;
if (g = this._find_stored_translation(f, c)) h = g;
else {
h = a !== false ? a[j] : false;
j++
}
e = this._set_translated_text(h, f);
this._set_stored_translation(this._texts_to_translate[f].text, h, this.from, this.to);
this._write_translated(e)
}
},
_write_translated: function(a) {
if (a.to_translate.length > a.translated_text.length) return;
for (var i = 0; i < a.to_translate.length; i++)
if (typeof a.translated_text[i] == "undefined") return;
for (var i = 0; i < a.to_translate.length; i++)
if (a.translated_text[i] == "") a.translated_text[i] = a.to_translate[i];
var b = a.translated_text.join("");
if (a.type == "value") this._set_node_value(a.object, b);
else this._set_node_attribute_value(a.type, a.object, b);
a.translated = true;
this.setData(a.object, a.type, this.to, b, this.from, a.original, this.options);
this.setLangAttr(a.object, this.to, this.options)
},
_find_stored_translation: function(a, b) {
for (var i = 0; i < b.length; i++)
if (b[i].ix == a) return b[i].translation;
return false
},
_ct: function() {
if (!this._ct_counter) this._ct_counter = 0;
this._ct_counter++;
return String(this._ct_counter)
},
_display_errors: function(a) {
try {
if (a instanceof Array)
for (var i = 0; i < a.length; ++i)
for (var b in a[i]) console.log(a[i][b]);
else console.log(a)
} catch (e) {}
},
_complete: function() {
this.options.complete.call(this, this.translation, this.source, !this.from && this.detectedSourceLanguage || this.from, this.to, this.options)
},
stop: function() {
if (this.stopped) return this;
this.stopped = n;
this.options.error.call(this, {
message: "stopped"
});
return this
}
};
$.translate = function(t, a) {
if (t == undefined) return jQuery.translatorDropDown.lastT = new T();
if ($.isFunction(t)) return $.translate.ready(t, a);
var b = new T();
jQuery.translatorDropDown.lastT = b;
var c = [].slice.call(arguments, 0);
c.shift();
return $.translate.ready(bind(b._init, b, [t, getOpt(c, $.translate.defaults)]), False, b)
};
$.translate.fn = $.translate.prototype = T.prototype;
$.translate.fn.extend = $.translate.extend = $.extend;
$.translate.extend({
_bind: bind,
_filter: filter,
_validate: validate,
_getOpt: getOpt,
_defaults: defaults,
defaults: $.extend({}, defaults),
capitalize: function(t) {
return t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()
},
truncate: function(a, b) {
var c = "<break>";
var d = this._word_wrap(a, b, c, 0).split(c);
var e = []
},
_word_wrap: function(a, m, b, c) {
var i, j, l, s, r;
var v = a.replace(/%20/gi, " ");
if (m < 1) return a;
for (i = -1, l = (r = v.split("\n")).length; ++i < l; r[i] += s)
for (s = r[i], r[i] = ""; s.length > m; r[i] += s.slice(0, j) + ((s = s.slice(j)).length ? b : "")) j = c == 2 || (j = s.slice(0, m + 1).match(/\S*(\s)?$/))[1] ? m : j.input.length - j[0].length || c == 1 && m || j.input.length + (j = s.slice(m).match(/^\S*/)).input.length;
return r.join("\n").replace(/\s/gi, "%20")
},
getLanguages: function(a, b) {
if (a == undefined || (b == undefined && !a)) return GLL;
var c = {},
typeof_a = typeof a,
languages = b ? $.translate.getLanguages(a) : GLL,
filterArg = (typeof_a === "object" || typeof_a === "function") ? a : b;
if (filterArg)
if (filterArg.call) c = filter(languages, filterArg);
else
for (var i = 0, length = filterArg.length, lang; i < length; i++) {
lang = $.translate.toLanguage(filterArg[i]);
if (languages[lang] != undefined) c[lang] = languages[lang]
} else c = filter(GLL, GL.isTranslatable);
return c
},
toLanguage: function(a, b) {
var u = a.toUpperCase();
var l = inverseLanguages[u] || (GLL[u] ? u : undefined) || inverseLanguages[($.translate.languageCodeMap[a.toLowerCase()] || "").toUpperCase()];
return l == undefined ? undefined : b === "lowercase" ? l.toLowerCase() : b === "capitalize" ? $.translate.capitalize(l) : l
},
toLanguageCode: function(a) {
return GLL[a] || GLL[$.translate.toLanguage(a)] || $.translate.languageCodeMap[a.toLowerCase()]
},
isTranslatable: function(l) {
return GL.isTranslatable(toLangCode(l))
},
languageCodeMap: {
"pt": "pt-PT",
"pt-br": "pt-PT",
"he": "iw",
"zlm": "ms",
"zh-hans": "zh-CN",
"zh-hant": "zh-TW"
},
load: function() {
loading = n;
loaded();
return $.translate
},
ready: function(a, b, c) {
readyList.push(a);
$.translate.load();
return c || $.translate
},
isReady: False,
overload: [
[
[],
[]
],
[
[Str, Str, Obj],
["from", "to", "options"]
],
[
[Str, Obj],
["to", "options"]
],
[
[Obj],
["options"]
],
[
[Str, Str],
["from", "to"]
],
[
[Str],
["to"]
],
[
[Str, Str, Fn],
["from", "to", "complete"]
],
[
[Str, Fn],
["to", "complete"]
]
],
stripScripts: bind(replace, n, [/<script[^>]*>([\s\S]*?)<\/script>/gi, ""]),
stripWhitespace: bind(replace, n, [/\s\s+/g, " "]),
stripComments: bind(replace, n, [/<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)>/g, ""])
})
})(jQuery);
(function($) {
var g = true;
var h = {
text: g,
button: g,
submit: g
};
function getType(a, o) {
var b = a.nodeName.toUpperCase();
var c;
if (b === 'INPUT' && typeof $.attr(a, 'type') == "undefined") c = "text";
else c = b === 'INPUT' && $.attr(a, 'type').toLowerCase();
o = o || {
altAndVal: g,
subject: g
};
return typeof o.subject === "string" ? o.subject : o.altAndVal && (b === 'IMG' || c === "image") ? "alt" : o.altAndVal && h[c] ? "$val" : b === "TEXTAREA" ? "$val" : "$html"
}
$.translate.fn._toggle = function() {
var o = this.options,
to = o.to,
stop;
var e = [];
for (var i = 0; i < this._elements.length; i++) e.push(this._elements[i].object);
jQuery(e).each($.translate._bind(function(i, a) {
var b;
this.i = i;
var c = $.translate.getData(a, "value", to);
var d = o.placeholder ? $.translate.getData(a, "placeholder", to) : b;
if (!c && !d) return !(stop = g);
this.translation.push(c);
o.each.call(this, i, a, {
"value": c,
"placeholder": d
}, this.source[i], this.from, to, o)
}, this));
!stop ? this._complete() : this._process()
};
$.translate.extend({
_getType: getType,
each: function(i, a, t, s, b, c, o) {
if (!a) return;
if (typeof t["value"] != "undefined") $.translate.replace(a, t["value"], c, o);
if (typeof t["placeholder"] != "undefined") $.translate._set_node_attribute_value("placeholder", a, t["placeholder"]);
$.translate.setLangAttr(a, c, o)
},
replace: function(e, t, a, o) {
this._set_node_value(e, t)
},
getData: function(a, b, c) {
var d = a[0] || a;
var e = jQuery.translatorDropDown.data(d, b, "translation");
if (typeof e == "undefined") return;
return e[c]
},
setData: function(e, a, b, t, c, s, o) {
if (o && !o.data) return;
var d = e[0] || e;
var f = {};
f[c] = s;
f[b] = t;
jQuery.translatorDropDown.data(d, a, "translation", f)
},
_set_node_attribute_value: function(a, b, c) {
b.setAttribute(a, c)
},
_set_node_value: function(a, b) {
switch (a.nodeType) {
case 3:
{
a.nodeValue = b;
break
}
case 1:
{
a.value = b;
break
}
default:
{
break
}
}
},
setLangAttr: function(e, a, o) {
if (!o || o.setLangAttr) e.attr((!o || o.setLangAttr === g) ? "lang" : o.setLangAttr, a)
}
});
$.fn.translate = function(a, b, c) {
var o = $.translate._getOpt(arguments, $.fn.translate.defaults),
ncto = $.extend({}, $.translate._defaults, $.fn.translate.defaults, o, {
complete: function(e, t) {
$.translate(function() {
var d = $.translate.toLanguageCode(o.from);
e.each(function(i, a) {
var b = $.translate.getData(a, "value", d);
var c = $.translate.getData(a, "placeholder", d);
if (!b && !c) return true;
t[i]["value"] = b;
t[i]["placeholder"] = c
});
var f = o.each;
function unshiftArgs(a) {
return function() {
[].unshift.call(arguments, this.elements);
a.apply(this, arguments)
}
}
o.nodes = e;
o.start = unshiftArgs(o.start);
o.onTimeout = unshiftArgs(o.onTimeout);
o.complete = unshiftArgs(o.complete);
o.each = function(i) {
var a = arguments;
if (arguments.length !== 7) {
[].splice.call(a, 1, 0, this.elements[i])
}
this.each.apply(this, a);
f.apply(this, a)
};
$.translate(t, o)
})
},
each: function() {}
});
if (this.nodesContainingText) {
return this.nodesContainingText(ncto)
}
o.nodes = this;
$.translate($.map(this, function(e) {
return $(e).html() || $(e).val()
}), o);
return this
};
$.fn.translate.defaults = $.extend({}, $.translate._defaults)
})(jQuery);
jQuery.cookie = function(a, b, c) {
if (typeof b != 'undefined') {
c = c || {};
if (b === null) {
b = '';
c.expires = -1
}
var d = '';
if (c.expires && (typeof c.expires == 'number' || c.expires.toUTCString)) {
var e;
if (typeof c.expires == 'number') {
e = new Date();
e.setTime(e.getTime() + (c.expires * 24 * 60 * 60 * 1000))
} else {
e = c.expires
}
d = '; expires=' + e.toUTCString()
}
var f = c.path ? '; path=' + (c.path) : '';
var g = c.domain ? '; domain=' + (c.domain) : '';
var h = c.secure ? '; secure' : '';
document.cookie = [a, '=', encodeURIComponent(b), d, f, g, h].join('')
} else {
var j = null;
if (document.cookie && document.cookie != '') {
var k = document.cookie.split(';');
for (var i = 0; i < k.length; i++) {
var l = jQuery.trim(k[i]);
if (l.substring(0, a.length + 1) == (a + '=')) {
j = decodeURIComponent(l.substring(a.length + 1));
break
}
}
}
return j
}
};
(function($) {
jQuery.fn.extend({
translatorScroll: function(o, s) {
var t = o;
this.each(function() {
var f, isOverBar, isDragg, queueHide, barHeight, divS = "<div></div>",
minBarHeight = 30,
o = t || {},
wheelStep = o.wheelStep || 3,
cheight = o.height || "250px",
size = o.size || "7px",
position = o.position || "right",
opacity = o.opacity || .4,
alwaysVisible = o.alwaysVisible === true;
var g = $(this);
var h = $(divS).css({
position: 'relative',
overflow: 'hidden',
height: cheight
}).attr({
'class': o.listScrollClass
});
g.css({
overflow: 'hidden',
height: cheight
});
var i = $(divS).css({
width: '15px',
height: '100%',
position: 'absolute',
top: 0
});
i.addClass(o.listScrollBarClass + "-rail");
var j = $(divS).attr({
'class': o.listScrollBarClass,
style: 'border-radius: ' + size
}).css({
width: size,
position: 'absolute',
top: 0,
opacity: opacity,
display: alwaysVisible ? 'block' : 'none',
BorderRadius: size,
MozBorderRadius: size,
WebkitBorderRadius: size
});
s.setScrollBar(j);
i.css({
right: '0'
});
j.css({
right: '2px'
});
g.wrap(h);
g.parent().append(j);
g.parent().append(i);
j.draggable({
axis: 'y',
containment: 'parent',
start: function() {
isDragg = true
},
stop: function() {
isDragg = false;
r()
},
drag: function(e) {
l(0, j.position().top, false)
}
});
i.hover(function() {
q()
}, function() {
r()
});
j.hover(function() {
isOverBar = true
}, function() {
isOverBar = false
});
g.hover(function() {
f = true;
q();
r()
}, function() {
f = false;
r()
});
var k = function(e) {
if (!f) {
return
}
var e = e || window.event;
var a = 0;
if (e.wheelDelta) {
a = -e.wheelDelta / 120
}
if (e.detail) {
a = e.detail / 3
}
l(0, a, true);
if (e.preventDefault) {
e.preventDefault()
}
e.returnValue = false
};
var l = function(x, y, a, b) {
var c = y;
if (a || b) {
j.show();
c = a ? j.position().top + y * wheelStep : j.position().top + y;
c = Math.max(c, 0);
var d = g.height() - j.height();
c = Math.min(c, d);
j.css({
top: c + 'px'
})
}
percentScroll = parseInt(j.position().top) / (g.height() - j.height());
c = percentScroll * (g[0].scrollHeight - g.height());
g.scrollTop(c);
s.setScroll(c);
q()
};
var m = function() {
if (window.addEventListener) {
this.addEventListener("DOMMouseScroll", k, {
passive: false
});
this.addEventListener("mousewheel", k, {
passive: false
})
} else document.attachEvent("onmousewheel", k)
};
var n = function() {
g.bind("touchstart", function(a) {
var b = a.originalEvent.touches[0] || a.originalEvent.changedTouches[0];
s._touch_delta.last = s._touch_delta.enter = b.pageY;
s._allow_select = false
});
g.bind("touchmove", function(a) {
a.preventDefault();
s._touch_flag = true;
var b = a.originalEvent.touches[0] || a.originalEvent.changedTouches[0];
var y = s._touch_delta.last - b.pageY;
l(0, y, false, true);
s._touch_delta.last = b.pageY
});
g.bind("touchend", function(a) {
var b = a.originalEvent.touches[0] || a.originalEvent.changedTouches[0];
if (Math.abs(b.pageY - s._touch_delta.enter) < 10) {
s._allow_select = true;
var c = a.srcElement || a.target;
s._do_click(c)
}
s._touch_flag = true;
setTimeout(function() {
s._touch_flag = false;
s._allow_select = true
}, 500)
})
};
m();
n();
var p = function() {
barHeight = Math.max((g.outerHeight() / g[0].scrollHeight) * g.outerHeight(), minBarHeight);
j.css({
height: barHeight + 'px'
})
};
p();
var q = function() {
p();
clearTimeout(queueHide);
if (barHeight >= g.outerHeight()) return;
j.fadeIn('fast')
};
var r = function() {
if (!alwaysVisible) {
queueHide = setTimeout(function() {
if (!isOverBar && !isDragg) {
j.fadeOut('fast')
}
}, 1000)
}
}
});
return this
}
});
jQuery.fn.extend({
translatorScroll: jQuery.fn.translatorScroll
})
})(jQuery);
(function($, g) {
var h = 0,
runiqueId = /^ui-id-\d+$/;
$.ui = $.ui || {};
if ($.ui.version) {
return
}
$.extend($.ui, {
version: "1.9.2",
keyCode: {
BACKSPACE: 8,
COMMA: 188,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
LEFT: 37,
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
NUMPAD_ENTER: 108,
NUMPAD_MULTIPLY: 106,
NUMPAD_SUBTRACT: 109,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
}
});
$.fn.extend({
_focus: $.fn.focus,
focus: function(b, c) {
return typeof b === "number" ? this.each(function() {
var a = this;
setTimeout(function() {
$(a).focus();
if (c) {
c.call(a)
}
}, b)
}) : this._focus.apply(this, arguments)
},
scrollParent: function() {
var a;
if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
a = this.parents().filter(function() {
return (/(relative|absolute|fixed)/).test($.css(this, 'position')) && (/(auto|scroll)/).test($.css(this, 'overflow') + $.css(this, 'overflow-y') + $.css(this, 'overflow-x'))
}).eq(0)
} else {
a = this.parents().filter(function() {
return (/(auto|scroll)/).test($.css(this, 'overflow') + $.css(this, 'overflow-y') + $.css(this, 'overflow-x'))
}).eq(0)
}
return (/fixed/).test(this.css('position')) || !a.length ? $(document) : a
},
zIndex: function(a) {
if (a !== g) {
return this.css("zIndex", a)
}
if (this.length) {
var b = $(this[0]),
position, value;
while (b.length && b[0] !== document) {
position = b.css("position");
if (position === "absolute" || position === "relative" || position === "fixed") {
value = parseInt(b.css("zIndex"), 10);
if (!isNaN(value) && value !== 0) {
return value
}
}
b = b.parent()
}
}
return 0
},
uniqueId: function() {
return this.each(function() {
if (!this.id) {
this.id = "ui-id-" + (++h)
}
})
},
removeUniqueId: function() {
return this.each(function() {
if (runiqueId.test(this.id)) {
$(this).removeAttr("id")
}
})
}
});
function focusable(a, b) {
var c, mapName, img, nodeName = a.nodeName.toLowerCase();
if ("area" === nodeName) {
c = a.parentNode;
mapName = c.name;
if (!a.href || !mapName || c.nodeName.toLowerCase() !== "map") {
return false
}
img = $("img[usemap=#" + mapName + "]")[0];
return !!img && visible(img)
}
return (/input|select|textarea|button|object/.test(nodeName) ? !a.disabled : "a" === nodeName ? a.href || b : b) && visible(a)
}
function visible(a) {
return $.expr.filters.visible(a) && !$(a).parents().andSelf().filter(function() {
return $.css(this, "visibility") === "hidden"
}).length
}
$.extend($.expr[":"], {
data: $.expr.createPseudo ? $.expr.createPseudo(function(b) {
return function(a) {
return !!$.data(a, b)
}
}) : function(a, i, b) {
return !!$.data(a, b[3])
},
focusable: function(a) {
return focusable(a, !isNaN($.attr(a, "tabindex")))
},
tabbable: function(a) {
var b = $.attr(a, "tabindex"),
isTabIndexNaN = isNaN(b);
return (isTabIndexNaN || b >= 0) && focusable(a, !isTabIndexNaN)
}
});
$(function() {
var a = document.body,
div = a.appendChild(div = document.createElement("div"));
div.offsetHeight;
$.extend(div.style, {
minHeight: "100px",
height: "auto",
padding: 0,
borderWidth: 0
});
$.support.minHeight = div.offsetHeight === 100;
$.support.selectstart = "onselectstart" in div;
a.removeChild(div).style.display = "none"
});
if (!$("<a>").outerWidth(1).jquery) {
$.each(["Width", "Height"], function(i, e) {
var f = e === "Width" ? ["Left", "Right"] : ["Top", "Bottom"],
type = e.toLowerCase(),
orig = {
innerWidth: $.fn.innerWidth,
innerHeight: $.fn.innerHeight,
outerWidth: $.fn.outerWidth,
outerHeight: $.fn.outerHeight
};
function reduce(a, b, c, d) {
$.each(f, function() {
b -= parseFloat($.css(a, "padding" + this)) || 0;
if (c) {
b -= parseFloat($.css(a, "border" + this + "Width")) || 0
}
if (d) {
b -= parseFloat($.css(a, "margin" + this)) || 0
}
});
return b
}
})
}
if ($("<a>").data("a-b", "a").removeData("a-b").data("a-b")) {
$.fn.removeData = (function(b) {
return function(a) {
if (arguments.length) {
return b.call(this, $.camelCase(a))
} else {
return b.call(this)
}
}
})($.fn.removeData)
}(function() {
var a = /msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase()) || [];
$.ui.ie = a.length ? true : false;
$.ui.ie6 = parseFloat(a[1], 10) === 6
})();
$.fn.extend({
disableSelection: function() {
return this.bind(($.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function(a) {
a.preventDefault()
})
},
enableSelection: function() {
return this.unbind(".ui-disableSelection")
}
});
$.extend($.ui, {
plugin: {
add: function(a, b, c) {
var i, proto = $.ui[a].prototype;
for (i in c) {
proto.plugins[i] = proto.plugins[i] || [];
proto.plugins[i].push([b, c[i]])
}
},
call: function(a, b, c) {
var i, set = a.plugins[b];
if (!set || !a.element[0].parentNode || a.element[0].parentNode.nodeType === 11) {
return
}
for (i = 0; i < set.length; i++) {
if (a.options[set[i][0]]) {
set[i][1].apply(a.element, c)
}
}
}
},
contains: $.contains,
hasScroll: function(b, a) {
if ($(b).css("overflow") === "hidden") {
return false
}
var c = (a && a === "left") ? "scrollLeft" : "scrollTop",
has = false;
if (b[c] > 0) {
return true
}
b[c] = 1;
has = (b[c] > 0);
b[c] = 0;
return has
},
isOverAxis: function(x, a, b) {
return (x > a) && (x < (a + b))
},
isOver: function(y, x, a, b, c, d) {
return $.ui.isOverAxis(y, a, c) && $.ui.isOverAxis(x, b, d)
}
})
})(jQuery);
(function($, j) {
var k = 0,
slice = Array.prototype.slice,
_cleanData = $.cleanData;
$.cleanData = function(a) {
for (var i = 0, elem;
(elem = a[i]) != null; i++) {
try {
$(elem).triggerHandler("remove")
} catch (e) {}
}
_cleanData(a)
};
$.widget = function(e, f, g) {
var h, existingConstructor, constructor, basePrototype, namespace = e.split(".")[0];
e = e.split(".")[1];
h = namespace + "-" + e;
if (!g) {
g = f;
f = $.Widget
}
$.expr[":"][h.toLowerCase()] = function(a) {
return !!$.data(a, h)
};
$[namespace] = $[namespace] || {};
existingConstructor = $[namespace][e];
constructor = $[namespace][e] = function(a, b) {
if (!this._createWidget) {
return new constructor(a, b)
}
if (arguments.length) {
this._createWidget(a, b)
}
};
$.extend(constructor, existingConstructor, {
version: g.version,
_proto: $.extend({}, g),
_childConstructors: []
});
basePrototype = new f();
basePrototype.options = $.widget.extend({}, basePrototype.options);
$.each(g, function(c, d) {
if ($.isFunction(d)) {
g[c] = (function() {
var b = function() {
return f.prototype[c].apply(this, arguments)
},
_superApply = function(a) {
return f.prototype[c].apply(this, a)
};
return function() {
var a = this._super,
__superApply = this._superApply,
returnValue;
this._super = b;
this._superApply = _superApply;
returnValue = d.apply(this, arguments);
this._super = a;
this._superApply = __superApply;
return returnValue
}
})()
}
});
constructor.prototype = $.widget.extend(basePrototype, {
widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : e
}, g, {
constructor: constructor,
namespace: namespace,
widgetName: e,
widgetBaseClass: h,
widgetFullName: h
});
if (existingConstructor) {
$.each(existingConstructor._childConstructors, function(i, a) {
var b = a.prototype;
$.widget(b.namespace + "." + b.widgetName, constructor, a._proto)
});
delete existingConstructor._childConstructors
} else {
f._childConstructors.push(constructor)
}
$.widget.bridge(e, constructor)
};
$.widget.extend = function(a) {
var b = slice.call(arguments, 1),
inputIndex = 0,
inputLength = b.length,
key, value;
for (; inputIndex < inputLength; inputIndex++) {
for (key in b[inputIndex]) {
value = b[inputIndex][key];
if (b[inputIndex].hasOwnProperty(key) && value !== j) {
if ($.isPlainObject(value)) {
a[key] = $.isPlainObject(a[key]) ? $.widget.extend({}, a[key], value) : $.widget.extend({}, value)
} else {
a[key] = value
}
}
}
}
return a
};
$.widget.bridge = function(d, e) {
var f = e.prototype.widgetFullName || d;
$.fn[d] = function(b) {
var c = typeof b === "string",
args = slice.call(arguments, 1),
returnValue = this;
b = !c && args.length ? $.widget.extend.apply(null, [b].concat(args)) : b;
if (c) {
this.each(function() {
var a, instance = $.data(this, f);
if (!instance) {
return $.error("cannot call methods on " + d + " prior to initialization; " + "attempted to call method '" + b + "'")
}
if (!$.isFunction(instance[b]) || b.charAt(0) === "_") {
return $.error("no such method '" + b + "' for " + d + " widget instance")
}
a = instance[b].apply(instance, args);
if (a !== instance && a !== j) {
returnValue = a && a.jquery ? returnValue.pushStack(a.get()) : a;
return false
}
})
} else {
this.each(function() {
var a = $.data(this, f);
if (a) {
a.option(b || {})._init()
} else {
$.data(this, f, new e(b, this))
}
})
}
return returnValue
}
};
$.Widget = function() {};
$.Widget._childConstructors = [];
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "<div>",
options: {
disabled: false,
create: null
},
_createWidget: function(b, c) {
c = $(c || this.defaultElement || this)[0];
this.element = $(c);
this.uuid = k++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.options = $.widget.extend({}, this.options, this._getCreateOptions(), b);
this.bindings = $();
this.hoverable = $();
this.focusable = $();
if (c !== this) {
$.data(c, this.widgetName, this);
$.data(c, this.widgetFullName, this);
this._on(true, this.element, {
remove: function(a) {
if (a.target === c) {
this.destroy()
}
}
});
this.document = $(c.style ? c.ownerDocument : c.document || c);
this.window = $(this.document[0].defaultView || this.document[0].parentWindow)
}
this._create();
this._trigger("create", null, this._getCreateEventData());
this._init()
},
_getCreateOptions: $.noop,
_getCreateEventData: $.noop,
_create: $.noop,
_init: $.noop,
destroy: function() {
this._destroy();
this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData($.camelCase(this.widgetFullName));
this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled");
this.bindings.unbind(this.eventNamespace);
this.hoverable.removeClass("ui-state-hover");
this.focusable.removeClass("ui-state-focus")
},
_destroy: $.noop,
widget: function() {
return this.element
},
option: function(a, b) {
var c = a,
parts, curOption, i;
if (arguments.length === 0) {
return $.widget.extend({}, this.options)
}
if (typeof a === "string") {
c = {};
parts = a.split(".");
a = parts.shift();
if (parts.length) {
curOption = c[a] = $.widget.extend({}, this.options[a]);
for (i = 0; i < parts.length - 1; i++) {
curOption[parts[i]] = curOption[parts[i]] || {};
curOption = curOption[parts[i]]
}
a = parts.pop();
if (b === j) {
return curOption[a] === j ? null : curOption[a]
}
curOption[a] = b
} else {
if (b === j) {
return this.options[a] === j ? null : this.options[a]
}
c[a] = b
}
}
this._setOptions(c);
return this
},
_setOptions: function(a) {
var b;
for (b in a) {
this._setOption(b, a[b])
}
return this
},
_setOption: function(a, b) {
this.options[a] = b;
if (a === "disabled") {
this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!b).attr("aria-disabled", b);
this.hoverable.removeClass("ui-state-hover");
this.focusable.removeClass("ui-state-focus")
}
return this
},
enable: function() {
return this._setOption("disabled", false)
},
disable: function() {
return this._setOption("disabled", true)
},
_on: function(d, e, f) {
var g, instance = this;
if (typeof d !== "boolean") {
f = e;
e = d;
d = false
}
if (!f) {
f = e;
e = this.element;
g = this.widget()
} else {
e = g = $(e);
this.bindings = this.bindings.add(e)
}
$.each(f, function(a, b) {
function handlerProxy() {
if (!d && (instance.options.disabled === true || $(this).hasClass("ui-state-disabled"))) {
return
}
return (typeof b === "string" ? instance[b] : b).apply(instance, arguments)
}
if (typeof b !== "string") {
handlerProxy.guid = b.guid = b.guid || handlerProxy.guid || $.guid++
}
var c = a.match(/^(\w+)\s*(.*)$/),
eventName = c[1] + instance.eventNamespace,
selector = c[2];
if (selector) {
g.delegate(selector, eventName, handlerProxy)
} else {
e.bind(eventName, handlerProxy)
}
})
},
_off: function(a, b) {
b = (b || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace;
a.unbind(b).undelegate(b)
},
_delay: function(a, b) {
function handlerProxy() {
return (typeof a === "string" ? c[a] : a).apply(c, arguments)
}
var c = this;
return setTimeout(handlerProxy, b || 0)
},
_hoverable: function(b) {
this.hoverable = this.hoverable.add(b);
this._on(b, {
mouseenter: function(a) {
$(a.currentTarget).addClass("ui-state-hover")
},
mouseleave: function(a) {
$(a.currentTarget).removeClass("ui-state-hover")
}
})
},
_focusable: function(b) {
this.focusable = this.focusable.add(b);
this._on(b, {
focusin: function(a) {
$(a.currentTarget).addClass("ui-state-focus")
},
focusout: function(a) {
$(a.currentTarget).removeClass("ui-state-focus")
}
})
},
_trigger: function(a, b, c) {
var d, orig, callback = this.options[a];
c = c || {};
b = $.Event(b);
b.type = (a === this.widgetEventPrefix ? a : this.widgetEventPrefix + a).toLowerCase();
b.target = this.element[0];
orig = b.originalEvent;
if (orig) {
for (d in orig) {
if (!(d in b)) {
b[d] = orig[d]
}
}
}
this.element.trigger(b, c);
return !($.isFunction(callback) && callback.apply(this.element[0], [b].concat(c)) === false || b.isDefaultPrevented())
}
};
$.each({
show: "fadeIn",
hide: "fadeOut"
}, function(f, g) {
$.Widget.prototype["_" + f] = function(b, c, d) {
if (typeof c === "string") {
c = {
effect: c
}
}
var e, effectName = !c ? f : c === true || typeof c === "number" ? g : c.effect || g;
c = c || {};
if (typeof c === "number") {
c = {
duration: c
}
}
e = !$.isEmptyObject(c);
c.complete = d;
if (c.delay) {
b.delay(c.delay)
}
if (e && $.effects && ($.effects.effect[effectName] || $.uiBackCompat !== false && $.effects[effectName])) {
b[f](c)
} else if (effectName !== f && b[effectName]) {
b[effectName](c.duration, c.easing, d)
} else {
b.queue(function(a) {
$(this)[f]();
if (d) {
d.call(b[0])
}
a()
})
}
}
});
if ($.uiBackCompat !== false) {
$.Widget.prototype._getCreateOptions = function() {
return $.metadata && $.metadata.get(this.element[0])[this.widgetName]
}
}
})(jQuery);
(function($, d) {
var f = false;
$(document).mouseup(function(e) {
f = false
});
$.widget("ui.mouse", {
version: "1.9.2",
options: {
cancel: 'input,textarea,button,select,option',
distance: 1,
delay: 0
},
_mouseInit: function() {
var b = this;
this.element.bind('mousedown.' + this.widgetName, function(a) {
return b._mouseDown(a)
}).bind('click.' + this.widgetName, function(a) {
if (true === $.data(a.target, b.widgetName + '.preventClickEvent')) {
$.removeData(a.target, b.widgetName + '.preventClickEvent');
a.stopImmediatePropagation();
return false
}
});
this.started = false
},
_mouseDestroy: function() {
this.element.unbind('.' + this.widgetName);
if (this._mouseMoveDelegate) {
$(document).unbind('mousemove.' + this.widgetName, this._mouseMoveDelegate).unbind('mouseup.' + this.widgetName, this._mouseUpDelegate)
}
},
_mouseDown: function(b) {
if (f) {
return
}(this._mouseStarted && this._mouseUp(b));
this._mouseDownEvent = b;
var c = this,
btnIsLeft = (b.which === 1),
elIsCancel = (typeof this.options.cancel === "string" && b.target.nodeName ? $(b.target).closest(this.options.cancel).length : false);
if (!btnIsLeft || elIsCancel || !this._mouseCapture(b)) {
return true
}
this.mouseDelayMet = !this.options.delay;
if (!this.mouseDelayMet) {
this._mouseDelayTimer = setTimeout(function() {
c.mouseDelayMet = true
}, this.options.delay)
}
if (this._mouseDistanceMet(b) && this._mouseDelayMet(b)) {
this._mouseStarted = (this._mouseStart(b) !== false);
if (!this._mouseStarted) {
b.preventDefault();
return true
}
}
if (true === $.data(b.target, this.widgetName + '.preventClickEvent')) {
$.removeData(b.target, this.widgetName + '.preventClickEvent')
}
this._mouseMoveDelegate = function(a) {
return c._mouseMove(a)
};
this._mouseUpDelegate = function(a) {
return c._mouseUp(a)
};
$(document).bind('mousemove.' + this.widgetName, this._mouseMoveDelegate).bind('mouseup.' + this.widgetName, this._mouseUpDelegate);
b.preventDefault();
f = true;
return true
},
_mouseMove: function(a) {
if ($.ui.ie && !(document.documentMode >= 9) && !a.button) {
return this._mouseUp(a)
}
if (this._mouseStarted) {
this._mouseDrag(a);
return a.preventDefault()
}
if (this._mouseDistanceMet(a) && this._mouseDelayMet(a)) {
this._mouseStarted = (this._mouseStart(this._mouseDownEvent, a) !== false);
(this._mouseStarted ? this._mouseDrag(a) : this._mouseUp(a))
}
return !this._mouseStarted
},
_mouseUp: function(a) {
$(document).unbind('mousemove.' + this.widgetName, this._mouseMoveDelegate).unbind('mouseup.' + this.widgetName, this._mouseUpDelegate);
if (this._mouseStarted) {
this._mouseStarted = false;
if (a.target === this._mouseDownEvent.target) {
$.data(a.target, this.widgetName + '.preventClickEvent', true)
}
this._mouseStop(a)
}
return false
},
_mouseDistanceMet: function(a) {
return (Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance)
},
_mouseDelayMet: function(a) {
return this.mouseDelayMet
},
_mouseStart: function(a) {},
_mouseDrag: function(a) {},
_mouseStop: function(a) {},
_mouseCapture: function(a) {
return true
}
})
})(jQuery);
(function($, n) {
$.widget("ui.draggable", $.ui.mouse, {
version: "1.9.2",
widgetEventPrefix: "drag",
options: {
addClasses: true,
appendTo: "parent",
axis: false,
connectToSortable: false,
containment: false,
cursor: "auto",
cursorAt: false,
grid: false,
handle: false,
helper: "original",
iframeFix: false,
opacity: false,
refreshPositions: false,
revert: false,
revertDuration: 500,
scope: "default",
scroll: true,
scrollSensitivity: 20,
scrollSpeed: 20,
snap: false,
snapMode: "both",
snapTolerance: 20,
stack: false,
zIndex: false
},
_create: function() {
if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position"))) this.element[0].style.position = 'relative';
(this.options.addClasses && this.element.addClass("ui-draggable"));
(this.options.disabled && this.element.addClass("ui-draggable-disabled"));
this._mouseInit()
},
_destroy: function() {
this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");
this._mouseDestroy()
},
_mouseCapture: function(a) {
var o = this.options;
if (this.helper || o.disabled || $(a.target).is('.ui-resizable-handle')) return false;
this.handle = this._getHandle(a);
if (!this.handle) return false;
$(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({
width: this.offsetWidth + "px",
height: this.offsetHeight + "px",
position: "absolute",
opacity: "0.001",
zIndex: 1000
}).css($(this).offset()).appendTo("body")
});
return true
},
_mouseStart: function(a) {
var o = this.options;
this.helper = this._createHelper(a);
this.helper.addClass("ui-draggable-dragging");
this._cacheHelperProportions();
if ($.ui.ddmanager) $.ui.ddmanager.current = this;
this._cacheMargins();
this.cssPosition = this.helper.css("position");
this.scrollParent = this.helper.scrollParent();
this.offset = this.positionAbs = this.element.offset();
this.offset = {
top: this.offset.top - this.margins.top,
left: this.offset.left - this.margins.left
};
$.extend(this.offset, {
click: {
left: a.pageX - this.offset.left,
top: a.pageY - this.offset.top
},
parent: this._getParentOffset(),
relative: this._getRelativeOffset()
});
this.originalPosition = this.position = this._generatePosition(a);
this.originalPageX = a.pageX;
this.originalPageY = a.pageY;
(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
if (o.containment) this._setContainment();
if (this._trigger("start", a) === false) {
this._clear();
return false
}
this._cacheHelperProportions();
if ($.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(this, a);
this._mouseDrag(a, true);
if ($.ui.ddmanager) $.ui.ddmanager.dragStart(this, a);
return true
},
_mouseDrag: function(a, b) {
this.position = this._generatePosition(a);
this.positionAbs = this._convertPositionTo("absolute");
if (!b) {
var c = this._uiHash();
if (this._trigger('drag', a, c) === false) {
this._mouseUp({});
return false
}
this.position = c.position
}
if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + 'px';
if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + 'px';
if ($.ui.ddmanager) $.ui.ddmanager.drag(this, a);
return false
},
_mouseStop: function(a) {
var b = false;
if ($.ui.ddmanager && !this.options.dropBehaviour) b = $.ui.ddmanager.drop(this, a);
if (this.dropped) {
b = this.dropped;
this.dropped = false
}
var c = this.element[0],
elementInDom = false;
while (c && (c = c.parentNode)) {
if (c == document) {
elementInDom = true
}
}
if (!elementInDom && this.options.helper === "original") return false;
if ((this.options.revert == "invalid" && !b) || (this.options.revert == "valid" && b) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, b))) {
var d = this;
$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
if (d._trigger("stop", a) !== false) {
d._clear()
}
})
} else {
if (this._trigger("stop", a) !== false) {
this._clear()
}
}
return false
},
_mouseUp: function(a) {
$("div.ui-draggable-iframeFix").each(function() {
this.parentNode.removeChild(this)
});
if ($.ui.ddmanager) $.ui.ddmanager.dragStop(this, a);
return $.ui.mouse.prototype._mouseUp.call(this, a)
},
cancel: function() {
if (this.helper.is(".ui-draggable-dragging")) {
this._mouseUp({})
} else {
this._clear()
}
return this
},
_getHandle: function(a) {
var b = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
$(this.options.handle, this.element).find("*").andSelf().each(function() {
if (this == a.target) b = true
});
return b
},
_createHelper: function(a) {
var o = this.options;
var b = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [a])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element);
if (!b.parents('body').length) b.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
if (b[0] != this.element[0] && !(/(fixed|absolute)/).test(b.css("position"))) b.css("position", "absolute");
return b
},
_adjustOffsetFromHelper: function(a) {
if (typeof a == 'string') {
a = a.split(' ')
}
if ($.isArray(a)) {
a = {
left: +a[0],
top: +a[1] || 0
}
}
if ('left' in a) {
this.offset.click.left = a.left + this.margins.left
}
if ('right' in a) {
this.offset.click.left = this.helperProportions.width - a.right + this.margins.left
}
if ('top' in a) {
this.offset.click.top = a.top + this.margins.top
}
if ('bottom' in a) {
this.offset.click.top = this.helperProportions.height - a.bottom + this.margins.top
}
},
_getParentOffset: function() {
this.offsetParent = this.helper.offsetParent();
var a = this.offsetParent.offset();
if (this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
a.left += this.scrollParent.scrollLeft();
a.top += this.scrollParent.scrollTop()
}
if ((this.offsetParent[0] == document.body) || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) a = {
top: 0,
left: 0
};
return {
top: a.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
left: a.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
}
},
_getRelativeOffset: function() {
if (this.cssPosition == "relative") {
var p = this.element.position();
return {
top: p.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
left: p.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
}
} else {
return {
top: 0,
left: 0
}
}
},
_cacheMargins: function() {
this.margins = {
left: (parseInt(this.element.css("marginLeft"), 10) || 0),
top: (parseInt(this.element.css("marginTop"), 10) || 0),
right: (parseInt(this.element.css("marginRight"), 10) || 0),
bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
}
},
_cacheHelperProportions: function() {
this.helperProportions = {
width: this.helper.outerWidth(),
height: this.helper.outerHeight()
}
},
_setContainment: function() {
var o = this.options;
if (o.containment == 'parent') o.containment = this.helper[0].parentNode;
if (o.containment == 'document' || o.containment == 'window') this.containment = [o.containment == 'document' ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, o.containment == 'document' ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left, (o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top];
if (!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
var c = $(o.containment);
var a = c[0];
if (!a) return;
var b = c.offset();
var d = ($(a).css("overflow") != 'hidden');
this.containment = [(parseInt($(a).css("borderLeftWidth"), 10) || 0) + (parseInt($(a).css("paddingLeft"), 10) || 0), (parseInt($(a).css("borderTopWidth"), 10) || 0) + (parseInt($(a).css("paddingTop"), 10) || 0), (d ? Math.max(a.scrollWidth, a.offsetWidth) : a.offsetWidth) - (parseInt($(a).css("borderLeftWidth"), 10) || 0) - (parseInt($(a).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (d ? Math.max(a.scrollHeight, a.offsetHeight) : a.offsetHeight) - (parseInt($(a).css("borderTopWidth"), 10) || 0) - (parseInt($(a).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom];
this.relative_container = c
} else if (o.containment.constructor == Array) {
this.containment = o.containment
}
},
_convertPositionTo: function(d, a) {
if (!a) a = this.position;
var b = d == "absolute" ? 1 : -1;
var o = this.options,
scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
return {
top: (a.top + this.offset.relative.top * b + this.offset.parent.top * b - ((this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : (scrollIsRootNode ? 0 : scroll.scrollTop())) * b)),
left: (a.left + this.offset.relative.left * b + this.offset.parent.left * b - ((this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft()) * b))
}
},
_generatePosition: function(a) {
var o = this.options,
scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
var b = a.pageX;
var c = a.pageY;
if (this.originalPosition) {
var d;
if (this.containment) {
if (this.relative_container) {
var e = this.relative_container.offset();
d = [this.containment[0] + e.left, this.containment[1] + e.top, this.containment[2] + e.left, this.containment[3] + e.top]
} else {
d = this.containment
}
if (a.pageX - this.offset.click.left < d[0]) b = d[0] + this.offset.click.left;
if (a.pageY - this.offset.click.top < d[1]) c = d[1] + this.offset.click.top;
if (a.pageX - this.offset.click.left > d[2]) b = d[2] + this.offset.click.left;
if (a.pageY - this.offset.click.top > d[3]) c = d[3] + this.offset.click.top
}
if (o.grid) {
var f = o.grid[1] ? this.originalPageY + Math.round((c - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
c = d ? (!(f - this.offset.click.top < d[1] || f - this.offset.click.top > d[3]) ? f : (!(f - this.offset.click.top < d[1]) ? f - o.grid[1] : f + o.grid[1])) : f;
var g = o.grid[0] ? this.originalPageX + Math.round((b - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
b = d ? (!(g - this.offset.click.left < d[0] || g - this.offset.click.left > d[2]) ? g : (!(g - this.offset.click.left < d[0]) ? g - o.grid[0] : g + o.grid[0])) : g
}
}
return {
top: (c - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ((this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : (scrollIsRootNode ? 0 : scroll.scrollTop())))),
left: (b - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ((this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft())))
}
},
_clear: function() {
this.helper.removeClass("ui-draggable-dragging");
if (this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
this.helper = null;
this.cancelHelperRemoval = false
},
_trigger: function(a, b, c) {
c = c || this._uiHash();
$.ui.plugin.call(this, a, [b, c]);
if (a == "drag") this.positionAbs = this._convertPositionTo("absolute");
return $.Widget.prototype._trigger.call(this, a, b, c)
},
plugins: {},
_uiHash: function(a) {
return {
helper: this.helper,
position: this.position,
originalPosition: this.originalPosition,
offset: this.positionAbs
}
}
});
$.ui.plugin.add("draggable", "connectToSortable", {
start: function(b, c) {
var d = $(this).data("draggable"),
o = d.options,
uiSortable = $.extend({}, c, {
item: d.element
});
d.sortables = [];
$(o.connectToSortable).each(function() {
var a = $.data(this, 'sortable');
if (a && !a.options.disabled) {
d.sortables.push({
instance: a,
shouldRevert: a.options.revert
});
a.refreshPositions();
a._trigger("activate", b, uiSortable)
}
})
},
stop: function(a, b) {
var c = $(this).data("draggable"),
uiSortable = $.extend({}, b, {
item: c.element
});
$.each(c.sortables, function() {
if (this.instance.isOver) {
this.instance.isOver = 0;
c.cancelHelperRemoval = true;
this.instance.cancelHelperRemoval = false;
if (this.shouldRevert) this.instance.options.revert = true;
this.instance._mouseStop(a);
this.instance.options.helper = this.instance.options._helper;
if (c.options.helper == 'original') this.instance.currentItem.css({
top: 'auto',
left: 'auto'
})
} else {
this.instance.cancelHelperRemoval = false;
this.instance._trigger("deactivate", a, uiSortable)
}
})
},
drag: function(e, f) {
var g = $(this).data("draggable"),
that = this;
var h = function(o) {
var a = this.offset.click.top,
dxClick = this.offset.click.left;
var b = this.positionAbs.top,
helperLeft = this.positionAbs.left;
var c = o.height,
itemWidth = o.width;
var d = o.top,
itemLeft = o.left;
return $.ui.isOver(b + a, helperLeft + dxClick, d, itemLeft, c, itemWidth)
};
$.each(g.sortables, function(i) {
var a = false;
var b = this;
this.instance.positionAbs = g.positionAbs;
this.instance.helperProportions = g.helperProportions;
this.instance.offset.click = g.offset.click;
if (this.instance._intersectsWith(this.instance.containerCache)) {
a = true;
$.each(g.sortables, function() {
this.instance.positionAbs = g.positionAbs;
this.instance.helperProportions = g.helperProportions;
this.instance.offset.click = g.offset.click;
if (this != b && this.instance._intersectsWith(this.instance.containerCache) && $.ui.contains(b.instance.element[0], this.instance.element[0])) a = false;
return a
})
}
if (a) {
if (!this.instance.isOver) {
this.instance.isOver = 1;
this.instance.currentItem = $(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true);
this.instance.options._helper = this.instance.options.helper;
this.instance.options.helper = function() {
return f.helper[0]
};
e.target = this.instance.currentItem[0];
this.instance._mouseCapture(e, true);
this.instance._mouseStart(e, true, true);
this.instance.offset.click.top = g.offset.click.top;
this.instance.offset.click.left = g.offset.click.left;
this.instance.offset.parent.left -= g.offset.parent.left - this.instance.offset.parent.left;
this.instance.offset.parent.top -= g.offset.parent.top - this.instance.offset.parent.top;
g._trigger("toSortable", e);
g.dropped = this.instance.element;
g.currentItem = g.element;
this.instance.fromOutside = g
}
if (this.instance.currentItem) this.instance._mouseDrag(e)
} else {
if (this.instance.isOver) {
this.instance.isOver = 0;
this.instance.cancelHelperRemoval = true;
this.instance.options.revert = false;
this.instance._trigger('out', e, this.instance._uiHash(this.instance));
this.instance._mouseStop(e, true);
this.instance.options.helper = this.instance.options._helper;
this.instance.currentItem.remove();
if (this.instance.placeholder) this.instance.placeholder.remove();
g._trigger("fromSortable", e);
g.dropped = false
}
}
})
}
});
$.ui.plugin.add("draggable", "cursor", {
start: function(a, b) {
var t = $('body'),
o = $(this).data('draggable').options;
if (t.css("cursor")) o._cursor = t.css("cursor");
t.css("cursor", o.cursor)
},
stop: function(a, b) {
var o = $(this).data('draggable').options;
if (o._cursor) $('body').css("cursor", o._cursor)
}
});
$.ui.plugin.add("draggable", "opacity", {
start: function(a, b) {
var t = $(b.helper),
o = $(this).data('draggable').options;
if (t.css("opacity")) o._opacity = t.css("opacity");
t.css('opacity', o.opacity)
},
stop: function(a, b) {
var o = $(this).data('draggable').options;
if (o._opacity) $(b.helper).css('opacity', o._opacity)
}
});
$.ui.plugin.add("draggable", "scroll", {
start: function(a, b) {
var i = $(this).data("draggable");
if (i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset()
},
drag: function(a, b) {
var i = $(this).data("draggable"),
o = i.options,
scrolled = false;
if (i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
if (!o.axis || o.axis != 'x') {
if ((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - a.pageY < o.scrollSensitivity) i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
else if (a.pageY - i.overflowOffset.top < o.scrollSensitivity) i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed
}
if (!o.axis || o.axis != 'y') {
if ((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - a.pageX < o.scrollSensitivity) i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
else if (a.pageX - i.overflowOffset.left < o.scrollSensitivity) i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed
}
} else {
if (!o.axis || o.axis != 'x') {
if (a.pageY - $(document).scrollTop() < o.scrollSensitivity) scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
else if ($(window).height() - (a.pageY - $(document).scrollTop()) < o.scrollSensitivity) scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed)
}
if (!o.axis || o.axis != 'y') {
if (a.pageX - $(document).scrollLeft() < o.scrollSensitivity) scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
else if ($(window).width() - (a.pageX - $(document).scrollLeft()) < o.scrollSensitivity) scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed)
}
}
if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(i, a)
}
});
$.ui.plugin.add("draggable", "snap", {
start: function(c, d) {
var i = $(this).data("draggable"),
o = i.options;
i.snapElements = [];
$(o.snap.constructor != String ? (o.snap.items || ':data(draggable)') : o.snap).each(function() {
var a = $(this);
var b = a.offset();
if (this != i.element[0]) i.snapElements.push({
item: this,
width: a.outerWidth(),
height: a.outerHeight(),
top: b.top,
left: b.left
})
})
},
drag: function(a, c) {
var e = $(this).data("draggable"),
o = e.options;
var d = o.snapTolerance;
var f = c.offset.left,
x2 = f + e.helperProportions.width,
y1 = c.offset.top,
y2 = y1 + e.helperProportions.height;
for (var i = e.snapElements.length - 1; i >= 0; i--) {
var l = e.snapElements[i].left,
r = l + e.snapElements[i].width,
t = e.snapElements[i].top,
b = t + e.snapElements[i].height;
if (!((l - d < f && f < r + d && t - d < y1 && y1 < b + d) || (l - d < f && f < r + d && t - d < y2 && y2 < b + d) || (l - d < x2 && x2 < r + d && t - d < y1 && y1 < b + d) || (l - d < x2 && x2 < r + d && t - d < y2 && y2 < b + d))) {
if (e.snapElements[i].snapping)(e.options.snap.release && e.options.snap.release.call(e.element, a, $.extend(e._uiHash(), {
snapItem: e.snapElements[i].item
})));
e.snapElements[i].snapping = false;
continue
}
if (o.snapMode != 'inner') {
var g = Math.abs(t - y2) <= d;
var h = Math.abs(b - y1) <= d;
var j = Math.abs(l - x2) <= d;
var k = Math.abs(r - f) <= d;
if (g) c.position.top = e._convertPositionTo("relative", {
top: t - e.helperProportions.height,
left: 0
}).top - e.margins.top;
if (h) c.position.top = e._convertPositionTo("relative", {
top: b,
left: 0
}).top - e.margins.top;
if (j) c.position.left = e._convertPositionTo("relative", {
top: 0,
left: l - e.helperProportions.width
}).left - e.margins.left;
if (k) c.position.left = e._convertPositionTo("relative", {
top: 0,
left: r
}).left - e.margins.left
}
var m = (g || h || j || k);
if (o.snapMode != 'outer') {
var g = Math.abs(t - y1) <= d;
var h = Math.abs(b - y2) <= d;
var j = Math.abs(l - f) <= d;
var k = Math.abs(r - x2) <= d;
if (g) c.position.top = e._convertPositionTo("relative", {
top: t,
left: 0
}).top - e.margins.top;
if (h) c.position.top = e._convertPositionTo("relative", {
top: b - e.helperProportions.height,
left: 0
}).top - e.margins.top;
if (j) c.position.left = e._convertPositionTo("relative", {
top: 0,
left: l
}).left - e.margins.left;
if (k) c.position.left = e._convertPositionTo("relative", {
top: 0,
left: r - e.helperProportions.width
}).left - e.margins.left
}
if (!e.snapElements[i].snapping && (g || h || j || k || m))(e.options.snap.snap && e.options.snap.snap.call(e.element, a, $.extend(e._uiHash(), {
snapItem: e.snapElements[i].item
})));
e.snapElements[i].snapping = (g || h || j || k || m)
}
}
});
$.ui.plugin.add("draggable", "stack", {
start: function(c, d) {
var o = $(this).data("draggable").options;
var e = $.makeArray($(o.stack)).sort(function(a, b) {
return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0)
});
if (!e.length) {
return
}
var f = parseInt(e[0].style.zIndex) || 0;
$(e).each(function(i) {
this.style.zIndex = f + i
});
this[0].style.zIndex = f + e.length
}
});
$.ui.plugin.add("draggable", "zIndex", {
start: function(a, b) {
var t = $(b.helper),
o = $(this).data("draggable").options;
if (t.css("zIndex")) o._zIndex = t.css("zIndex");
t.css('zIndex', o.zIndex)
},
stop: function(a, b) {
var o = $(this).data("draggable").options;
if (o._zIndex) $(b.helper).css('zIndex', o._zIndex)
}
})
})(jQuery);
jQuery.translatorDropDown = {};
jQuery.translatorDropDown._data = {
nodes: [],
data: {}
};
jQuery.translatorDropDown.findNode = function(a) {
for (var i = 0; i < jQuery.translatorDropDown._data.nodes.length; i++)
if (a == jQuery.translatorDropDown._data.nodes[i]) return i;
return false
};
jQuery.translatorDropDown.isTextNode = function(a) {
return a.nodeType === 3 && a.nodeValue.match(/\S/) !== null && a.nodeName.toLowerCase() != "textarea"
};
jQuery.translatorDropDown._get_data = function(a, b, c, d) {
if (!jQuery.translatorDropDown._data.data[a]) return d;
if (!jQuery.translatorDropDown._data.data[a][b]) return d;
return jQuery.translatorDropDown._data.data[a][b]
};
jQuery.translatorDropDown._set_data = function(a, b, c, d) {
if (!jQuery.translatorDropDown._data.data[a]) jQuery.translatorDropDown._data.data[a] = {};
jQuery.translatorDropDown._data.data[a][b] = d
};
jQuery.translatorDropDown.data = function(a, b, c, d, e) {
if (typeof d != "undefined") {
var f = jQuery.translatorDropDown.findNode(a);
if (f === false) {
jQuery.translatorDropDown._data.nodes.push(a);
f = jQuery.translatorDropDown.findNode(a)
}
jQuery.translatorDropDown._set_data(f, b, c, d);
return d
} else {
var f = jQuery.translatorDropDown.findNode(a);
if (f === false) return e;
return jQuery.translatorDropDown._get_data(f, b, c)
}
};
jQuery.translatorDropDown.ids = [];
jQuery.translatorDropDown.translators = {};
jQuery.translatorDropDown.reTranslate = function(a) {
var b;
for (var i in jQuery.translatorDropDown.translators) b = jQuery.translatorDropDown.translators[i];
b.reTranslate(a)
};
jQuery.translatorDropDown.get = function(a) {
return jQuery.translatorDropDown.translators[a]
};
jQuery.translatorDropDown.ready = jQuery.translate.ready;
jQuery.translatorDropDown.runner = {
applyCustomParentStyles: function(a) {
var b = "translator-dropdown-custom-parent-";
var c = a.find("*");
a.addClass(b + a.get(0).tagName.toLowerCase());
for (var i = 0; i < c.length; i++) c.eq(i).addClass(b + c.eq(i).get(0).tagName.toLowerCase());
return a
},
genCustomParent: function(a) {
var b;
var c = "";
var d = a.split("-");
for (var i = 0; i < d.length; i++) c += "<" + d[i] + ">";
c += "<div><\/div>";
for (var j = 0; j < d.length; j++) c += "<\/" + d[d.length - j - 1] + ">";
var e = jQuery(c);
this.applyCustomParentStyles(e);
return {
parent: e,
element: e.find("div")
}
},
go: function(a) {
var b;
var c;
var d;
if (a.locationWidget === false) {
if (!a.location) {
console.log("No custom location specified, disabling translator...");
return
}
var b = jQuery(a.location).eq(0);
if (b.length < 1) {
console.log("Custom location \"" + a.location + "\" does not exist, disabling translator...");
return
}
if (!jQuery.inArray(a.customLocationAppendMode, ["append", "prepend", "before", "after"]) || !a.customLocationAppendMode) a.customLocationAppendMode = "append";
if (a.customParent && a.customParent != "") {
var e = this.genCustomParent(a.customParent);
c = e.parent;
d = e.element
} else c = d = jQuery("<div><\/div>");
switch (a.customLocationAppendMode) {
case "append":
{
b.append(c);
break
}
case "prepend":
{
b.prepend(c);
break
}
case "before":
{
b.before(c);
break
}
case "after":
{
b.after(c);
break
}
}
d.translatorDropDown(a)
} else {
b = jQuery("#" + a.dropdownContainerId);
if (a.customParent && a.customParent != "") {
c = this.genCustomParent(a.customParent);
b.append(c.parent);
c.element.translatorDropDown(a)
} else b.translatorDropDown(a)
}
}
};
jQuery.translatorDropDown.Ajax = function() {
this.http = false;
this.onSuccess;
this.onFailure;
this.onProcess;
this.onComplete;
this.error = false;
this.errorMessage = "";
this.method = "POST";
this.params = "";
this.unique = true;
this.url;
this.messageContainer;
this.message;
this._processing = false;
this.debug = true;
this.initialize()
};
jQuery.translatorDropDown.Ajax.prototype.getHTTPObject = function() {
var a = false;
if (typeof ActiveXObject != 'undefined') {
try {
a = new ActiveXObject("Msxml2.XMLHTTP")
} catch (e) {
try {
a = new ActiveXObject("Microsoft.XMLHTTP")
} catch (E) {
a = false
}
}
} else if (XMLHttpRequest) {
try {
a = new XMLHttpRequest()
} catch (e) {
a = false
}
}
return a
};
jQuery.translatorDropDown.Ajax.prototype.setProcessing = function(a) {
this._processing = a
};
jQuery.translatorDropDown.Ajax.prototype.isProcessing = function() {
return this._processing
};
jQuery.translatorDropDown.Ajax.prototype.setUnique = function(a) {
this.unique = a
};
jQuery.translatorDropDown.Ajax.prototype.Request = function(c, d, e, f, g) {
if (!this.http || !c) return;
this.url = c;
this._processing = true;
if (d) this.onSuccess = d;
if (e) this.onFailure = e;
if (f) this.onProcess = f;
if (g) this.onComplete = g;
var h = this;
if (this.unique) this.AddParam("u", String(new Date().getTime()));
switch (this.method.toUpperCase()) {
case "POST":
this.http.open("POST", c, true);
break;
case "GET":
c += "&" + this.params;
this.http.open("GET", c, true);
break;
default:
return
}
if (this.onProcess) this.onProcess();
this.http.onreadystatechange = function() {
if (!h) return;
var a = h.http;
if (a.readyState == 4) {
h._processing = false;
if (a.status == 200) {
var b = "";
if (a.responseText) b = a.responseText;
if (h.onSuccess) h.onSuccess(b)
} else {
h.error = true;
h.errorMessage = a.responseText;
if (h.onFailure) h.onFailure(h.errorMessage)
}
if (h.onComplete) h.onComplete()
}
};
switch (this.method.toUpperCase()) {
case "POST":
this.http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
this.http.send(this.params);
break;
case "GET":
this.http.send(null);
break;
default:
return
}
};
jQuery.translatorDropDown.Ajax.prototype.ClearParams = function() {
this.params = ""
};
jQuery.translatorDropDown.Ajax.prototype.AddParam = function(a, b) {
this.params += this.params != "" ? "&" : "";
if (typeof b == "string") this.params += a + "=" + b;
else if (b instanceof Array) {
var c = 0;
for (var i = 0; i < b.length; i++) {
if (typeof b[i] != "string") continue;
if (c > 0) this.params += "&";
this.params += a + "[]" + "=" + b[i];
c++
}
}
};
jQuery.translatorDropDown.Ajax.prototype.initialize = function() {
this.http = this.getHTTPObject()
};
jQuery.translatorDropDown.JSON = {
build: function(a) {
var b = eval("((" + a + "))");
return b
}
};
(function($) {
var l = function(a, b) {
return (a << b) | (a >>> (32 - b))
};
var m = function(a, b) {
var c, lY4, lX8, lY8, lResult;
lX8 = (a & 0x80000000);
lY8 = (b & 0x80000000);
c = (a & 0x40000000);
lY4 = (b & 0x40000000);
lResult = (a & 0x3FFFFFFF) + (b & 0x3FFFFFFF);
if (c & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
if (c | lY4) {
if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
else return (lResult ^ 0x40000000 ^ lX8 ^ lY8)
} else {
return (lResult ^ lX8 ^ lY8)
}
};
var F = function(x, y, z) {
return (x & y) | ((~x) & z)
};
var G = function(x, y, z) {
return (x & z) | (y & (~z))
};
var H = function(x, y, z) {
return (x ^ y ^ z)
};
var I = function(x, y, z) {
return (y ^ (x | (~z)))
};
var o = function(a, b, c, d, x, s, e) {
a = m(a, m(m(F(b, c, d), x), e));
return m(l(a, s), b)
};
var p = function(a, b, c, d, x, s, e) {
a = m(a, m(m(G(b, c, d), x), e));
return m(l(a, s), b)
};
var q = function(a, b, c, d, x, s, e) {
a = m(a, m(m(H(b, c, d), x), e));
return m(l(a, s), b)
};
var r = function(a, b, c, d, x, s, e) {
a = m(a, m(m(I(b, c, d), x), e));
return m(l(a, s), b)
};
var t = function(a) {
var b;
var c = a.length;
var d = c + 8;
var e = (d - (d % 64)) / 64;
var f = (e + 1) * 16;
var g = Array(f - 1);
var h = 0;
var i = 0;
while (i < c) {
b = (i - (i % 4)) / 4;
h = (i % 4) * 8;
g[b] = (g[b] | (a.charCodeAt(i) << h));
i++
}
b = (i - (i % 4)) / 4;
h = (i % 4) * 8;
g[b] = g[b] | (0x80 << h);
g[f - 2] = c << 3;
g[f - 1] = c >>> 29;
return g
};
var u = function(a) {
var b = "",
WordToHexValueTemp = "",
lByte, lCount;
for (lCount = 0; lCount <= 3; lCount++) {
lByte = (a >>> (lCount * 8)) & 255;
WordToHexValueTemp = "0" + lByte.toString(16);
b = b + WordToHexValueTemp.substr(WordToHexValueTemp.length - 2, 2)
}
return b
};
var v = function(a) {
a = a.replace(/\x0d\x0a/g, "\x0a");
var b = "";
for (var n = 0; n < a.length; n++) {
var c = a.charCodeAt(n);
if (c < 128) {
b += String.fromCharCode(c)
} else if ((c > 127) && (c < 2048)) {
b += String.fromCharCode((c >> 6) | 192);
b += String.fromCharCode((c & 63) | 128)
} else {
b += String.fromCharCode((c >> 12) | 224);
b += String.fromCharCode(((c >> 6) & 63) | 128);
b += String.fromCharCode((c & 63) | 128)
}
}
return b
};
$.extend({
md5: function(e) {
var x = Array();
var k, AA, BB, CC, DD, a, b, c, d;
var f = 7,
S12 = 12,
S13 = 17,
S14 = 22;
var g = 5,
S22 = 9,
S23 = 14,
S24 = 20;
var h = 4,
S32 = 11,
S33 = 16,
S34 = 23;
var i = 6,
S42 = 10,
S43 = 15,
S44 = 21;
e = v(e);
x = t(e);
a = 0x67452301;
b = 0xEFCDAB89;
c = 0x98BADCFE;
d = 0x10325476;
for (k = 0; k < x.length; k += 16) {
AA = a;
BB = b;
CC = c;
DD = d;
a = o(a, b, c, d, x[k + 0], f, 0xD76AA478);
d = o(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
c = o(c, d, a, b, x[k + 2], S13, 0x242070DB);
b = o(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
a = o(a, b, c, d, x[k + 4], f, 0xF57C0FAF);
d = o(d, a, b, c, x[k + 5], S12, 0x4787C62A);
c = o(c, d, a, b, x[k + 6], S13, 0xA8304613);
b = o(b, c, d, a, x[k + 7], S14, 0xFD469501);
a = o(a, b, c, d, x[k + 8], f, 0x698098D8);
d = o(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
c = o(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
b = o(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
a = o(a, b, c, d, x[k + 12], f, 0x6B901122);
d = o(d, a, b, c, x[k + 13], S12, 0xFD987193);
c = o(c, d, a, b, x[k + 14], S13, 0xA679438E);
b = o(b, c, d, a, x[k + 15], S14, 0x49B40821);
a = p(a, b, c, d, x[k + 1], g, 0xF61E2562);
d = p(d, a, b, c, x[k + 6], S22, 0xC040B340);
c = p(c, d, a, b, x[k + 11], S23, 0x265E5A51);
b = p(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
a = p(a, b, c, d, x[k + 5], g, 0xD62F105D);
d = p(d, a, b, c, x[k + 10], S22, 0x2441453);
c = p(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
b = p(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
a = p(a, b, c, d, x[k + 9], g, 0x21E1CDE6);
d = p(d, a, b, c, x[k + 14], S22, 0xC33707D6);
c = p(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
b = p(b, c, d, a, x[k + 8], S24, 0x455A14ED);
a = p(a, b, c, d, x[k + 13], g, 0xA9E3E905);
d = p(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
c = p(c, d, a, b, x[k + 7], S23, 0x676F02D9);
b = p(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
a = q(a, b, c, d, x[k + 5], h, 0xFFFA3942);
d = q(d, a, b, c, x[k + 8], S32, 0x8771F681);
c = q(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
b = q(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
a = q(a, b, c, d, x[k + 1], h, 0xA4BEEA44);
d = q(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
c = q(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
b = q(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
a = q(a, b, c, d, x[k + 13], h, 0x289B7EC6);
d = q(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
c = q(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
b = q(b, c, d, a, x[k + 6], S34, 0x4881D05);
a = q(a, b, c, d, x[k + 9], h, 0xD9D4D039);
d = q(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
c = q(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
b = q(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
a = r(a, b, c, d, x[k + 0], i, 0xF4292244);
d = r(d, a, b, c, x[k + 7], S42, 0x432AFF97);
c = r(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
b = r(b, c, d, a, x[k + 5], S44, 0xFC93A039);
a = r(a, b, c, d, x[k + 12], i, 0x655B59C3);
d = r(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
c = r(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
b = r(b, c, d, a, x[k + 1], S44, 0x85845DD1);
a = r(a, b, c, d, x[k + 8], i, 0x6FA87E4F);
d = r(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
c = r(c, d, a, b, x[k + 6], S43, 0xA3014314);
b = r(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
a = r(a, b, c, d, x[k + 4], i, 0xF7537E82);
d = r(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
c = r(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
b = r(b, c, d, a, x[k + 9], S44, 0xEB86D391);
a = m(a, AA);
b = m(b, BB);
c = m(c, CC);
d = m(d, DD)
}
var j = u(a) + u(b) + u(c) + u(d);
return j.toLowerCase()
}
})
})(jQuery);
jQuery.translatorDropDown.load = function() {
if (typeof _translator_revolution_dropdown != "object") setTimeout(jQuery.translatorDropDown.load, 200);
else jQuery.translatorDropDown.ready(function() {
jQuery.translatorDropDown.runner.go(_translator_revolution_dropdown)
})
};
jQuery.translatorDropDown.load();