" && !rtbody.test(elem)? tmp: 0;
j = elem && _AN_Read_length("length", elem.childNodes);
while (j-- ){
if (jQuery.nodeName((tbody = elem.childNodes[j]), "tbody") && !_AN_Read_length("length", tbody.childNodes)) {
elem.removeChild(tbody);
}
}
}
jQuery.merge(nodes, tmp.childNodes);
tmp.textContent = "";
while (tmp.firstChild){
tmp.removeChild(tmp.firstChild);
}
tmp = safe.lastChild;
}
}
}
if (tmp) {
safe.removeChild(tmp);
}
if (!jQuery.support.appendChecked) {
jQuery.grep(getAll(nodes, "input"), fixDefaultChecked);
}
i = 0;
while ((elem = nodes[i++ ])){
if (selection && jQuery.inArray(elem, selection) !== -1) {
continue ;
}
contains = jQuery.contains(elem.ownerDocument, elem);
tmp = getAll(_AN_Call_appendchild("appendChild", safe, elem), "script");
if (contains) {
setGlobalEval(tmp);
}
if (scripts) {
j = 0;
while ((elem = tmp[j++ ])){
if (rscriptType.test(elem.type || "")) {
scripts.push(elem);
}
}
}
}
tmp = null ;
return safe;
}
,
cleanData: function (elems, acceptData){
var elem, type, id, data, i = 0, internalKey = jQuery.expando, cache = jQuery.cache, deleteExpando = jQuery.support.deleteExpando, special = jQuery.event.special;
for (; (elem = elems[i]) != null ; i++ ){
if (acceptData || jQuery.acceptData(elem)) {
id = elem[internalKey];
data = id && cache[id];
if (data) {
if (data.events) {
for (type in data.events){
if (special[type]) {
jQuery.event.remove(elem, type);
}
else {
jQuery.removeEvent(elem, type, data.handle);
}
}
}
if (cache[id]) {
delete cache[id];
if (deleteExpando) {
delete elem[internalKey];
}
else if (typeof elem.removeAttribute !== core_strundefined) {
elem.removeAttribute(internalKey);
}
else {
elem[internalKey] = null ;
}
core_deletedIds.push(id);
}
}
}
}
}
}
);
var iframe, getStyles, curCSS, ralpha = /alpha\([^)]*\)/i, ropacity = /opacity\s*=\s*([^)]*)/, rposition = /^(top|right|bottom|left)$/, rdisplayswap = /^(none|table(?!-c[ea]).+)/, rmargin = /^margin/, rnumsplit = new RegExp("^(" + core_pnum + ")(.*)$", "i"), rnumnonpx = new RegExp("^(" + core_pnum + ")(?!px)[a-z%]+$", "i"), rrelNum = new RegExp("^([+-])=(" + core_pnum + ")", "i"), elemdisplay = {
BODY: "block"}
, cssShow = {
position: "absolute",
visibility: "hidden",
display: "block"}
, cssNormalTransform = {
letterSpacing: 0,
fontWeight: 400}
, cssExpand = ["Top", "Right", "Bottom", "Left"] , cssPrefixes = ["Webkit", "O", "Moz", "ms"] ;
function vendorPropName(style, name){
if (name in style) {
return name;
}
var capName = name.charAt(0).toUpperCase() + name.slice(1), origName = name, i = _AN_Read_length("length", cssPrefixes);
while (i-- ){
name = cssPrefixes[i] + capName;
if (name in style) {
return name;
}
}
return origName;
}
function isHidden(elem, el){
elem = el || elem;
return jQuery.css(elem, "display") === "none" || !jQuery.contains(elem.ownerDocument, elem);
}
function showHide(elements, show){
var display, elem, hidden, values = [] , index = 0, length = _AN_Read_length("length", elements);
for (; index < length; index++ ){
elem = elements[index];
if (!elem.style) {
continue ;
}
values[index] = jQuery._data(elem, "olddisplay");
display = elem.style.display;
if (show) {
if (!values[index] && display === "none") {
elem.style.display = "";
}
if (elem.style.display === "" && isHidden(elem)) {
values[index] = jQuery._data(elem, "olddisplay", css_defaultDisplay(elem.nodeName));
}
}
else {
if (!values[index]) {
hidden = isHidden(elem);
if (display && display !== "none" || !hidden) {
jQuery._data(elem, "olddisplay", hidden? display: jQuery.css(elem, "display"));
}
}
}
}
for (index = 0; index < length; index++ ){
elem = elements[index];
if (!elem.style) {
continue ;
}
if (!show || elem.style.display === "none" || elem.style.display === "") {
elem.style.display = show? values[index] || "": "none";
}
}
return elements;
}
jQuery.fn.extend({
css: function (name, value){
return jQuery.access(this, function (elem, name, value){
var len, styles, map = {
}
, i = 0;
if (jQuery.isArray(name)) {
styles = getStyles(elem);
len = _AN_Read_length("length", name);
for (; i < len; i++ ){
map[name[i]] = jQuery.css(elem, name[i], false , styles);
}
return map;
}
return value !== undefined? jQuery.style(elem, name, value): jQuery.css(elem, name);
}
, name, value, _AN_Read_length("length", arguments) > 1);
}
,
show: function (){
return showHide(this, true );
}
,
hide: function (){
return showHide(this);
}
,
toggle: function (state){
var bool = typeof state === "boolean";
return this.each(function (){
if (bool? state: isHidden(this)) {
_AN_Call_show("show", jQuery(this));
}
else {
jQuery(this).hide();
}
}
);
}
}
);
jQuery.extend({
cssHooks: {
opacity: {
get: function (elem, computed){
if (computed) {
var ret = curCSS(elem, "opacity");
return ret === ""? "1": ret;
}
}
}
}
,
cssNumber: {
"columnCount": true ,
"fillOpacity": true ,
"fontWeight": true ,
"lineHeight": true ,
"opacity": true ,
"orphans": true ,
"widows": true ,
"zIndex": true ,
"zoom": true }
,
cssProps: {
"float": jQuery.support.cssFloat? "cssFloat": "styleFloat"}
,
style: function (elem, name, value, extra){
if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
return ;
}
var ret, type, hooks, origName = jQuery.camelCase(name), style = elem.style;
name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(style, origName));
hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
if (value !== undefined) {
type = typeof value;
if (type === "string" && (ret = rrelNum.exec(value))) {
value = (ret[1] + 1) * ret[2] + parseFloat(jQuery.css(elem, name));
type = "number";
}
if (value == null || type === "number" && isNaN(value)) {
return ;
}
if (type === "number" && !jQuery.cssNumber[origName]) {
value += "px";
}
if (!jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
style[name] = "inherit";
}
if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) {
try {
style[name] = value;
}
catch (e) {
}
}
}
else {
if (hooks && "get" in hooks && (ret = hooks.get(elem, false , extra)) !== undefined) {
return ret;
}
return style[name];
}
}
,
css: function (elem, name, extra, styles){
var num, val, hooks, origName = jQuery.camelCase(name);
name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(elem.style, origName));
hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
if (hooks && "get" in hooks) {
val = hooks.get(elem, true , extra);
}
if (val === undefined) {
val = curCSS(elem, name, styles);
}
if (val === "normal" && name in cssNormalTransform) {
val = cssNormalTransform[name];
}
if (extra === "" || extra) {
num = parseFloat(val);
return extra === true || jQuery.isNumeric(num)? num || 0: val;
}
return val;
}
,
swap: function (elem, options, callback, args){
var ret, name, old = {
}
;
for (name in options){
old[name] = elem.style[name];
elem.style[name] = options[name];
}
ret = callback.apply(elem, args || [] );
for (name in options){
elem.style[name] = old[name];
}
return ret;
}
}
);
if (window.getComputedStyle) {
getStyles = function (elem){
return window.getComputedStyle(elem, null );
}
;
curCSS = function (elem, name, _computed){
var width, minWidth, maxWidth, computed = _computed || getStyles(elem), ret = computed? computed.getPropertyValue(name) || computed[name]: undefined, style = elem.style;
if (computed) {
if (ret === "" && !jQuery.contains(elem.ownerDocument, elem)) {
ret = jQuery.style(elem, name);
}
if (rnumnonpx.test(ret) && rmargin.test(name)) {
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
style.minWidth = style.maxWidth = style.width = ret;
ret = computed.width;
style.width = width;
style.minWidth = minWidth;
style.maxWidth = maxWidth;
}
}
return ret;
}
;
}
else if (document.documentElement.currentStyle) {
getStyles = function (elem){
return elem.currentStyle;
}
;
curCSS = function (elem, name, _computed){
var left, rs, rsLeft, computed = _computed || getStyles(elem), ret = computed? computed[name]: undefined, style = elem.style;
if (ret == null && style && style[name]) {
ret = style[name];
}
if (rnumnonpx.test(ret) && !rposition.test(name)) {
left = style.left;
rs = elem.runtimeStyle;
rsLeft = rs && rs.left;
if (rsLeft) {
rs.left = elem.currentStyle.left;
}
style.left = name === "fontSize"? "1em": ret;
ret = style.pixelLeft + "px";
style.left = left;
if (rsLeft) {
rs.left = rsLeft;
}
}
return ret === ""? "auto": ret;
}
;
}
function setPositiveNumber(elem, value, subtract){
var matches = rnumsplit.exec(value);
return matches? Math.max(0, matches[1] - (subtract || 0)) + (matches[2] || "px"): value;
}
function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles){
var i = extra === (isBorderBox? "border": "content")? 4: name === "width"? 1: 0, val = 0;
for (; i < 4; i += 2){
if (extra === "margin") {
val += jQuery.css(elem, extra + cssExpand[i], true , styles);
}
if (isBorderBox) {
if (extra === "content") {
val -= jQuery.css(elem, "padding" + cssExpand[i], true , styles);
}
if (extra !== "margin") {
val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true , styles);
}
}
else {
val += jQuery.css(elem, "padding" + cssExpand[i], true , styles);
if (extra !== "padding") {
val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true , styles);
}
}
}
return val;
}
function getWidthOrHeight(elem, name, extra){
var valueIsBorderBox = true , val = name === "width"? elem.offsetWidth: elem.offsetHeight, styles = getStyles(elem), isBorderBox = jQuery.support.boxSizing && jQuery.css(elem, "boxSizing", false , styles) === "border-box";
if (val <= 0 || val == null ) {
val = curCSS(elem, name, styles);
if (val < 0 || val == null ) {
val = elem.style[name];
}
if (rnumnonpx.test(val)) {
return val;
}
valueIsBorderBox = isBorderBox && (jQuery.support.boxSizingReliable || val === elem.style[name]);
val = parseFloat(val) || 0;
}
return (val + augmentWidthOrHeight(elem, name, extra || (isBorderBox? "border": "content"), valueIsBorderBox, styles)) + "px";
}
function css_defaultDisplay(nodeName){
var doc = document, display = elemdisplay[nodeName];
if (!display) {
display = actualDisplay(nodeName, doc);
if (display === "none" || !display) {
iframe = (iframe || jQuery("").css("cssText", "display:block !important")).appendTo(doc.documentElement);
doc = (iframe[0].contentWindow || iframe[0].contentDocument).document;
_AN_Call_write("write", doc, "");
doc.close();
display = actualDisplay(nodeName, doc);
iframe.detach();
}
elemdisplay[nodeName] = display;
}
return display;
}
function actualDisplay(name, doc){
var elem = jQuery(_AN_Call_createelement("createElement", doc, name)).appendTo(doc.body), display = jQuery.css(elem[0], "display");
elem.remove();
return display;
}
jQuery.each(["height", "width"] , function (i, name){
jQuery.cssHooks[name] = {
get: function (elem, computed, extra){
if (computed) {
return elem.offsetWidth === 0 && rdisplayswap.test(jQuery.css(elem, "display"))? jQuery.swap(elem, cssShow, function (){
return getWidthOrHeight(elem, name, extra);
}
): getWidthOrHeight(elem, name, extra);
}
}
,
set: function (elem, value, extra){
var styles = extra && getStyles(elem);
return setPositiveNumber(elem, value, extra? augmentWidthOrHeight(elem, name, extra, jQuery.support.boxSizing && jQuery.css(elem, "boxSizing", false , styles) === "border-box", styles): 0);
}
}
;
}
);
if (!jQuery.support.opacity) {
jQuery.cssHooks.opacity = {
get: function (elem, computed){
return ropacity.test((computed && elem.currentStyle? elem.currentStyle.filter: elem.style.filter) || "")? (0.01 * parseFloat(RegExp.$1)) + "": computed? "1": "";
}
,
set: function (elem, value){
var style = elem.style, currentStyle = elem.currentStyle, opacity = jQuery.isNumeric(value)? "alpha(opacity=" + value * 100 + ")": "", filter = currentStyle && currentStyle.filter || style.filter || "";
style.zoom = 1;
if ((value >= 1 || value === "") && jQuery.trim(_AN_Call_replace("replace", filter, ralpha, "")) === "" && style.removeAttribute) {
style.removeAttribute("filter");
if (value === "" || currentStyle && !currentStyle.filter) {
return ;
}
}
_AN_Write_filter("filter", style, false , ralpha.test(filter)? _AN_Call_replace("replace", filter, ralpha, opacity): filter + " " + opacity);
}
}
;
}
jQuery(function (){
if (!jQuery.support.reliableMarginRight) {
jQuery.cssHooks.marginRight = {
get: function (elem, computed){
if (computed) {
return jQuery.swap(elem, {
"display": "inline-block"}
, curCSS, [elem, "marginRight"] );
}
}
}
;
}
if (!jQuery.support.pixelPosition && jQuery.fn.position) {
jQuery.each(["top", "left"] , function (i, prop){
jQuery.cssHooks[prop] = {
get: function (elem, computed){
if (computed) {
computed = curCSS(elem, prop);
return rnumnonpx.test(computed)? jQuery(elem).position()[prop] + "px": computed;
}
}
}
;
}
);
}
}
);
if (jQuery.expr && jQuery.expr.filters) {
jQuery.expr.filters.hidden = function (elem){
return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css(elem, "display")) === "none");
}
;
jQuery.expr.filters.visible = function (elem){
return !jQuery.expr.filters.hidden(elem);
}
;
}
jQuery.each({
margin: "",
padding: "",
border: "Width"}
, function (prefix, suffix){
jQuery.cssHooks[prefix + suffix] = {
expand: function (value){
var i = 0, expanded = {
}
, parts = typeof value === "string"? value.split(" "): [value] ;
for (; i < 4; i++ ){
expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0];
}
return expanded;
}
}
;
if (!rmargin.test(prefix)) {
jQuery.cssHooks[prefix + suffix].set = setPositiveNumber;
}
}
);
var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i;
jQuery.fn.extend({
serialize: function (){
return jQuery.param(this.serializeArray());
}
,
serializeArray: function (){
return this.map(function (){
var elements = jQuery.prop(this, "elements");
return elements? jQuery.makeArray(elements): this;
}
).filter(function (){
var type = this.type;
return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !manipulation_rcheckableType.test(type));
}
).map(function (i, elem){
var val = jQuery(this).val();
return val == null ? null : jQuery.isArray(val)? jQuery.map(val, function (val){
return {
name: elem.name,
value: _AN_Call_replace("replace", val, rCRLF, "\r\n")}
;
}
): {
name: elem.name,
value: _AN_Call_replace("replace", val, rCRLF, "\r\n")}
;
}
).get();
}
}
);
jQuery.param = function (a, traditional){
var prefix, s = [] , add = function (key, value){
value = jQuery.isFunction(value)? value(): (value == null ? "": value);
s[_AN_Read_length("length", s)] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
}
;
if (traditional === undefined) {
traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
}
if (jQuery.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) {
jQuery.each(a, function (){
add(this.name, this.value);
}
);
}
else {
for (prefix in a){
buildParams(prefix, a[prefix], traditional, add);
}
}
return _AN_Call_replace("replace", s.join("&"), r20, "+");
}
;
function buildParams(prefix, obj, traditional, add){
var name;
if (jQuery.isArray(obj)) {
jQuery.each(obj, function (i, v){
if (traditional || rbracket.test(prefix)) {
add(prefix, v);
}
else {
buildParams(prefix + "[" + (typeof v === "object"? i: "") + "]", v, traditional, add);
}
}
);
}
else if (!traditional && jQuery.type(obj) === "object") {
for (name in obj){
buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
}
}
else {
add(prefix, obj);
}
}
jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "), function (i, name){
jQuery.fn[name] = function (data, fn){
return _AN_Read_length("length", arguments) > 0? this.on(name, null , data, fn): this.trigger(name);
}
;
}
);
jQuery.fn.hover = function (fnOver, fnOut){
return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
}
;
var ajaxLocParts, ajaxLocation, ajax_nonce = jQuery.now(), ajax_rquery = /\?/, rhash = /#.*$/, rts = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, _load = jQuery.fn.load, prefilters = {
}
, transports = {
}
, allTypes = "*/".concat("*");
try {
ajaxLocation = _AN_Read_href("href", _AN_Read_location("location", window));
}
catch (e) {
ajaxLocation = _AN_Call_createelement("createElement", document, "a");
_AN_Write_href("href", ajaxLocation, false , "");
ajaxLocation = _AN_Read_href("href", ajaxLocation);
}
ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [] ;
function addToPrefiltersOrTransports(structure){
return function (dataTypeExpression, func){
if (typeof dataTypeExpression !== "string") {
func = dataTypeExpression;
dataTypeExpression = "*";
}
var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match(core_rnotwhite) || [] ;
if (jQuery.isFunction(func)) {
while ((dataType = dataTypes[i++ ])){
if (dataType[0] === "+") {
dataType = dataType.slice(1) || "*";
(structure[dataType] = structure[dataType] || [] ).unshift(func);
}
else {
(structure[dataType] = structure[dataType] || [] ).push(func);
}
}
}
}
;
}
function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR){
var inspected = {
}
, seekingTransport = (structure === transports);
function inspect(dataType){
var selected;
inspected[dataType] = true ;
jQuery.each(structure[dataType] || [] , function (_, prefilterOrFactory){
var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
options.dataTypes.unshift(dataTypeOrTransport);
inspect(dataTypeOrTransport);
return false ;
}
else if (seekingTransport) {
return !(selected = dataTypeOrTransport);
}
}
);
return selected;
}
return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
}
function ajaxExtend(target, src){
var deep, key, flatOptions = jQuery.ajaxSettings.flatOptions || {
}
;
for (key in src){
if (src[key] !== undefined) {
(flatOptions[key]? target: (deep || (deep = {
}
)))[key] = src[key];
}
}
if (deep) {
jQuery.extend(true , target, deep);
}
return target;
}
jQuery.fn.load = function (url, params, callback){
if (typeof url !== "string" && _load) {
return _load.apply(this, arguments);
}
var selector, response, type, self = this, off = url.indexOf(" ");
if (off >= 0) {
selector = url.slice(off, _AN_Read_length("length", url));
url = url.slice(0, off);
}
if (jQuery.isFunction(params)) {
callback = params;
params = undefined;
}
else if (params && typeof params === "object") {
type = "POST";
}
if (_AN_Read_length("length", self) > 0) {
jQuery.ajax({
url: url,
type: type,
dataType: "html",
data: params}
).done(function (responseText){
response = arguments;
self.html(selector? jQuery("").append(jQuery.parseHTML(responseText)).find(selector): responseText);
}
).complete(callback && function (jqXHR, status){
self.each(callback, response || [jqXHR.responseText, status, jqXHR] );
}
);
}
return this;
}
;
jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"] , function (i, type){
jQuery.fn[type] = function (fn){
return this.on(type, fn);
}
;
}
);
jQuery.each(["get", "post"] , function (i, method){
jQuery[method] = function (url, data, callback, type){
if (jQuery.isFunction(data)) {
type = type || callback;
callback = data;
data = undefined;
}
return jQuery.ajax({
url: url,
type: method,
dataType: type,
data: data,
success: callback}
);
}
;
}
);
jQuery.extend({
active: 0,
lastModified: {
}
,
etag: {
}
,
ajaxSettings: {
url: ajaxLocation,
type: "GET",
isLocal: rlocalProtocol.test(ajaxLocParts[1]),
global: true ,
processData: true ,
async: true ,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": allTypes,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"}
,
contents: {
xml: /xml/,
html: /html/,
json: /json/}
,
responseFields: {
xml: "responseXML",
text: "responseText"}
,
converters: {
"* text": window.String,
"text html": true ,
"text json": jQuery.parseJSON,
"text xml": jQuery.parseXML}
,
flatOptions: {
url: true ,
context: true }
}
,
ajaxSetup: function (target, settings){
return settings? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings): ajaxExtend(jQuery.ajaxSettings, target);
}
,
ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
ajaxTransport: addToPrefiltersOrTransports(transports),
ajax: function (url, options){
if (typeof url === "object") {
options = url;
url = undefined;
}
options = options || {
}
;
var parts, i, cacheURL, responseHeadersString, timeoutTimer, fireGlobals, transport, responseHeaders, s = jQuery.ajaxSetup({
}
, options), callbackContext = s.context || s, globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery)? jQuery(callbackContext): jQuery.event, deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks("once memory"), statusCode = s.statusCode || {
}
, requestHeaders = {
}
, requestHeadersNames = {
}
, state = 0, strAbort = "canceled", jqXHR = {
readyState: 0,
getResponseHeader: function (key){
var match;
if (state === 2) {
if (!responseHeaders) {
responseHeaders = {
}
;
while ((match = rheaders.exec(responseHeadersString))){
responseHeaders[match[1].toLowerCase()] = match[2];
}
}
match = responseHeaders[key.toLowerCase()];
}
return match == null ? null : match;
}
,
getAllResponseHeaders: function (){
return state === 2? responseHeadersString: null ;
}
,
setRequestHeader: function (name, value){
var lname = name.toLowerCase();
if (!state) {
name = requestHeadersNames[lname] = requestHeadersNames[lname] || name;
requestHeaders[name] = value;
}
return this;
}
,
overrideMimeType: function (type){
if (!state) {
s.mimeType = type;
}
return this;
}
,
statusCode: function (map){
var code;
if (map) {
if (state < 2) {
for (code in map){
statusCode[code] = [statusCode[code], map[code]] ;
}
}
else {
jqXHR.always(map[jqXHR.status]);
}
}
return this;
}
,
abort: function (statusText){
var finalText = statusText || strAbort;
if (transport) {
transport.abort(finalText);
}
done(0, finalText);
return this;
}
}
;
deferred.promise(jqXHR).complete = completeDeferred.add;
jqXHR.success = jqXHR.done;
jqXHR.error = jqXHR.fail;
_AN_Write_url("url", s, false , _AN_Call_replace("replace", _AN_Call_replace("replace", ((url || _AN_Read_url("url", s) || ajaxLocation) + ""), rhash, ""), rprotocol, ajaxLocParts[1] + "//"));
s.type = options.method || options.type || s.method || s.type;
s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().match(core_rnotwhite) || [""] ;
if (s.crossDomain == null ) {
parts = rurl.exec(_AN_Read_url("url", s).toLowerCase());
s.crossDomain = !!(parts && (parts[1] !== ajaxLocParts[1] || parts[2] !== ajaxLocParts[2] || (parts[3] || (parts[1] === "http:"? 80: 443)) != (ajaxLocParts[3] || (ajaxLocParts[1] === "http:"? 80: 443))));
}
if (s.data && s.processData && typeof s.data !== "string") {
s.data = jQuery.param(s.data, s.traditional);
}
inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
if (state === 2) {
return jqXHR;
}
fireGlobals = s.global;
if (fireGlobals && jQuery.active++ === 0) {
jQuery.event.trigger("ajaxStart");
}
s.type = s.type.toUpperCase();
s.hasContent = !rnoContent.test(s.type);
cacheURL = _AN_Read_url("url", s);
if (!s.hasContent) {
if (s.data) {
cacheURL = (_AN_Write_url("url", s, true , (ajax_rquery.test(cacheURL)? "&": "?") + s.data));
delete s.data;
}
if (s.cache === false ) {
_AN_Write_url("url", s, false , rts.test(cacheURL)? _AN_Call_replace("replace", cacheURL, rts, "$1_=" + ajax_nonce++ ): cacheURL + (ajax_rquery.test(cacheURL)? "&": "?") + "_=" + ajax_nonce++ );
}
}
if (s.ifModified) {
if (jQuery.lastModified[cacheURL]) {
jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
}
if (jQuery.etag[cacheURL]) {
jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
}
}
if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
jqXHR.setRequestHeader("Content-Type", s.contentType);
}
jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]]? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*"? ", " + allTypes + "; q=0.01": ""): s.accepts["*"] );
for (i in s.headers){
jqXHR.setRequestHeader(i, s.headers[i]);
}
if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) {
return jqXHR.abort();
}
strAbort = "abort";
for (i in {
success: 1,
error: 1,
complete: 1}
){
jqXHR[i](s[i]);
}
transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
if (!transport) {
done(-1, "No Transport");
}
else {
jqXHR.readyState = 1;
if (fireGlobals) {
globalEventContext.trigger("ajaxSend", [jqXHR, s] );
}
if (s.async && s.timeout > 0) {
timeoutTimer = _AN_Call_settimeout("setTimeout", window, function (){
jqXHR.abort("timeout");
}
, s.timeout);
}
try {
state = 1;
_AN_Call_send("send", transport, requestHeaders, done);
}
catch (e) {
if (state < 2) {
done(-1, e);
}
else {
throw e
}
}
}
function done(status, nativeStatusText, responses, headers){
var isSuccess, success, error, response, modified, statusText = nativeStatusText;
if (state === 2) {
return ;
}
state = 2;
if (timeoutTimer) {
clearTimeout(timeoutTimer);
}
transport = undefined;
responseHeadersString = headers || "";
jqXHR.readyState = status > 0? 4: 0;
if (responses) {
response = ajaxHandleResponses(s, jqXHR, responses);
}
if (status >= 200 && status < 300 || status === 304) {
if (s.ifModified) {
modified = jqXHR.getResponseHeader("Last-Modified");
if (modified) {
jQuery.lastModified[cacheURL] = modified;
}
modified = jqXHR.getResponseHeader("etag");
if (modified) {
jQuery.etag[cacheURL] = modified;
}
}
if (status === 204) {
isSuccess = true ;
statusText = "nocontent";
}
else if (status === 304) {
isSuccess = true ;
statusText = "notmodified";
}
else {
isSuccess = ajaxConvert(s, response);
statusText = isSuccess.state;
success = isSuccess.data;
error = isSuccess.error;
isSuccess = !error;
}
}
else {
error = statusText;
if (status || !statusText) {
statusText = "error";
if (status < 0) {
status = 0;
}
}
}
jqXHR.status = status;
jqXHR.statusText = (nativeStatusText || statusText) + "";
if (isSuccess) {
deferred.resolveWith(callbackContext, [success, statusText, jqXHR] );
}
else {
deferred.rejectWith(callbackContext, [jqXHR, statusText, error] );
}
jqXHR.statusCode(statusCode);
statusCode = undefined;
if (fireGlobals) {
globalEventContext.trigger(isSuccess? "ajaxSuccess": "ajaxError", [jqXHR, s, isSuccess? success: error] );
}
completeDeferred.fireWith(callbackContext, [jqXHR, statusText] );
if (fireGlobals) {
globalEventContext.trigger("ajaxComplete", [jqXHR, s] );
if (!(--jQuery.active)) {
jQuery.event.trigger("ajaxStop");
}
}
}
return jqXHR;
}
,
getScript: function (url, callback){
return jQuery.get(url, undefined, callback, "script");
}
,
getJSON: function (url, data, callback){
return jQuery.get(url, data, callback, "json");
}
}
);
function ajaxHandleResponses(s, jqXHR, responses){
var firstDataType, ct, finalDataType, type, contents = s.contents, dataTypes = s.dataTypes, responseFields = s.responseFields;
for (type in responseFields){
if (type in responses) {
jqXHR[responseFields[type]] = responses[type];
}
}
while (dataTypes[0] === "*"){
dataTypes.shift();
if (ct === undefined) {
ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
}
}
if (ct) {
for (type in contents){
if (contents[type] && contents[type].test(ct)) {
dataTypes.unshift(type);
break ;
}
}
}
if (dataTypes[0] in responses) {
finalDataType = dataTypes[0];
}
else {
for (type in responses){
if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
finalDataType = type;
break ;
}
if (!firstDataType) {
firstDataType = type;
}
}
finalDataType = finalDataType || firstDataType;
}
if (finalDataType) {
if (finalDataType !== dataTypes[0]) {
dataTypes.unshift(finalDataType);
}
return responses[finalDataType];
}
}
function ajaxConvert(s, response){
var conv2, current, conv, tmp, converters = {
}
, i = 0, dataTypes = s.dataTypes.slice(), prev = dataTypes[0];
if (s.dataFilter) {
response = s.dataFilter(response, s.dataType);
}
if (dataTypes[1]) {
for (conv in s.converters){
converters[conv.toLowerCase()] = s.converters[conv];
}
}
for (; (current = dataTypes[++i]); ){
if (current !== "*") {
if (prev !== "*" && prev !== current) {
conv = converters[prev + " " + current] || converters["* " + current];
if (!conv) {
for (conv2 in converters){
tmp = conv2.split(" ");
if (tmp[1] === current) {
conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
if (conv) {
if (conv === true ) {
conv = converters[conv2];
}
else if (converters[conv2] !== true ) {
current = tmp[0];
dataTypes.splice(i-- , 0, current);
}
break ;
}
}
}
}
if (conv !== true ) {
if (conv && s["throws"] ) {
response = conv(response);
}
else {
try {
response = conv(response);
}
catch (e) {
return {
state: "parsererror",
error: conv? e: "No conversion from " + prev + " to " + current}
;
}
}
}
}
prev = current;
}
}
return {
state: "success",
data: response}
;
}
jQuery.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}
,
contents: {
script: /(?:java|ecma)script/}
,
converters: {
"text script": function (text){
jQuery.globalEval(text);
return text;
}
}
}
);
jQuery.ajaxPrefilter("script", function (s){
if (s.cache === undefined) {
s.cache = false ;
}
if (s.crossDomain) {
s.type = "GET";
s.global = false ;
}
}
);
jQuery.ajaxTransport("script", function (s){
if (s.crossDomain) {
var script, head = document.head || jQuery("head")[0] || document.documentElement;
return {
send: function (_, callback){
script = _AN_Call_createelement("createElement", document, "script");
script.async = true ;
if (s.scriptCharset) {
script.charset = s.scriptCharset;
}
_AN_Write_src("src", script, false , _AN_Read_url("url", s));
script.onload = script.onreadystatechange = function (_, isAbort){
if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) {
script.onload = script.onreadystatechange = null ;
if (script.parentNode) {
script.parentNode.removeChild(script);
}
script = null ;
if (!isAbort) {
callback(200, "success");
}
}
}
;
head.insertBefore(script, head.firstChild);
}
,
abort: function (){
if (script) {
script.onload(undefined, true );
}
}
}
;
}
}
);
var oldCallbacks = [] , rjsonp = /(=)\?(?=&|$)|\?\?/;
jQuery.ajaxSetup({
jsonp: "callback",
jsonpCallback: function (){
var callback = oldCallbacks.pop() || (jQuery.expando + "_" + (ajax_nonce++ ));
this[callback] = true ;
return callback;
}
}
);
jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR){
var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && (rjsonp.test(_AN_Read_url("url", s))? "url": typeof s.data === "string" && !(s.contentType || "").indexOf("application/x-www-form-urlencoded") && rjsonp.test(s.data) && "data");
if (jsonProp || s.dataTypes[0] === "jsonp") {
callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback)? s.jsonpCallback(): s.jsonpCallback;
if (jsonProp) {
s[jsonProp] = _AN_Call_replace("replace", s[jsonProp], rjsonp, "$1" + callbackName);
}
else if (s.jsonp !== false ) {
_AN_Write_url("url", s, true , (ajax_rquery.test(_AN_Read_url("url", s))? "&": "?") + s.jsonp + "=" + callbackName);
}
s.converters["script json"] = function (){
if (!responseContainer) {
jQuery.error(callbackName + " was not called");
}
return responseContainer[0];
}
;
s.dataTypes[0] = "json";
overwritten = window[callbackName];
window[callbackName] = function (){
responseContainer = arguments;
}
;
jqXHR.always(function (){
window[callbackName] = overwritten;
if (s[callbackName]) {
s.jsonpCallback = originalSettings.jsonpCallback;
oldCallbacks.push(callbackName);
}
if (responseContainer && jQuery.isFunction(overwritten)) {
overwritten(responseContainer[0]);
}
responseContainer = overwritten = undefined;
}
);
return "script";
}
}
);
var xhrCallbacks, xhrSupported, xhrId = 0, xhrOnUnloadAbort = window.ActiveXObject && function (){
var key;
for (key in xhrCallbacks){
xhrCallbacks[key](undefined, true );
}
}
;
function createStandardXHR(){
try {
return new window.XMLHttpRequest();
}
catch (e) {
}
}
function createActiveXHR(){
try {
return new window.ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
}
}
jQuery.ajaxSettings.xhr = window.ActiveXObject? function (){
return !this.isLocal && createStandardXHR() || createActiveXHR();
}
: createStandardXHR;
xhrSupported = jQuery.ajaxSettings.xhr();
jQuery.support.cors = !!xhrSupported && ("withCredentials" in xhrSupported);
xhrSupported = jQuery.support.ajax = !!xhrSupported;
if (xhrSupported) {
jQuery.ajaxTransport(function (s){
if (!s.crossDomain || jQuery.support.cors) {
var callback;
return {
send: function (headers, complete){
var handle, i, xhr = s.xhr();
if (s.username) {
_AN_Call_open("open", xhr, s.type, _AN_Read_url("url", s), s.async, s.username, s.password);
}
else {
_AN_Call_open("open", xhr, s.type, _AN_Read_url("url", s), s.async);
}
if (s.xhrFields) {
for (i in s.xhrFields){
xhr[i] = s.xhrFields[i];
}
}
if (s.mimeType && xhr.overrideMimeType) {
xhr.overrideMimeType(s.mimeType);
}
if (!s.crossDomain && !headers["X-Requested-With"] ) {
headers["X-Requested-With"] = "XMLHttpRequest";
}
try {
for (i in headers){
xhr.setRequestHeader(i, headers[i]);
}
}
catch (err) {
}
_AN_Call_send("send", xhr, (s.hasContent && s.data) || null );
callback = function (_, isAbort){
var status, responseHeaders, statusText, responses;
try {
if (callback && (isAbort || xhr.readyState === 4)) {
callback = undefined;
if (handle) {
xhr.onreadystatechange = jQuery.noop;
if (xhrOnUnloadAbort) {
delete xhrCallbacks[handle];
}
}
if (isAbort) {
if (xhr.readyState !== 4) {
xhr.abort();
}
}
else {
responses = {
}
;
status = xhr.status;
responseHeaders = xhr.getAllResponseHeaders();
if (typeof xhr.responseText === "string") {
_AN_Write_text("text", responses, false , xhr.responseText);
}
try {
statusText = xhr.statusText;
}
catch (e) {
statusText = "";
}
if (!status && s.isLocal && !s.crossDomain) {
status = responses.text? 200: 404;
}
else if (status === 1223) {
status = 204;
}
}
}
}
catch (firefoxAccessException) {
if (!isAbort) {
complete(-1, firefoxAccessException);
}
}
if (responses) {
complete(status, statusText, responses, responseHeaders);
}
}
;
if (!s.async) {
callback();
}
else if (xhr.readyState === 4) {
_AN_Call_settimeout("setTimeout", window, callback);
}
else {
handle = ++xhrId;
if (xhrOnUnloadAbort) {
if (!xhrCallbacks) {
xhrCallbacks = {
}
;
jQuery(window).unload(xhrOnUnloadAbort);
}
xhrCallbacks[handle] = callback;
}
xhr.onreadystatechange = callback;
}
}
,
abort: function (){
if (callback) {
callback(undefined, true );
}
}
}
;
}
}
);
}
var fxNow, timerId, rfxtypes = /^(?:toggle|show|hide)$/, rfxnum = new RegExp("^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i"), rrun = /queueHooks$/, animationPrefilters = [defaultPrefilter] , tweeners = {
"*": [function (prop, value){
var end, unit, tween = this.createTween(prop, value), parts = rfxnum.exec(value), target = tween.cur(), start = + target || 0, scale = 1, maxIterations = 20;
if (parts) {
end = + parts[2];
unit = parts[3] || (jQuery.cssNumber[prop]? "": "px");
if (unit !== "px" && start) {
start = jQuery.css(tween.elem, prop, true ) || end || 1;
do {
scale = scale || ".5";
start = start / scale;
jQuery.style(tween.elem, prop, start + unit);
}
while(scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations)}
tween.unit = unit;
tween.start = start;
tween.end = parts[1]? start + (parts[1] + 1) * end: end;
}
return tween;
}
] }
;
function createFxNow(){
_AN_Call_settimeout("setTimeout", window, function (){
fxNow = undefined;
}
);
return (fxNow = jQuery.now());
}
function createTweens(animation, props){
jQuery.each(props, function (prop, value){
var collection = (tweeners[prop] || [] ).concat(tweeners["*"] ), index = 0, length = _AN_Read_length("length", collection);
for (; index < length; index++ ){
if (collection[index].call(animation, prop, value)) {
return ;
}
}
}
);
}
function Animation(elem, properties, options){
var result, stopped, index = 0, length = _AN_Read_length("length", animationPrefilters), deferred = jQuery.Deferred().always(function (){
delete tick.elem;
}
), tick = function (){
if (stopped) {
return false ;
}
var currentTime = fxNow || createFxNow(), remaining = Math.max(0, animation.startTime + animation.duration - currentTime), temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, length = _AN_Read_length("length", animation.tweens);
for (; index < length; index++ ){
animation.tweens[index].run(percent);
}
deferred.notifyWith(elem, [animation, percent, remaining] );
if (percent < 1 && length) {
return remaining;
}
else {
deferred.resolveWith(elem, [animation] );
return false ;
}
}
, animation = deferred.promise({
elem: elem,
props: jQuery.extend({
}
, properties),
opts: jQuery.extend(true , {
specialEasing: {
}
}
, options),
originalProperties: properties,
originalOptions: options,
startTime: fxNow || createFxNow(),
duration: options.duration,
tweens: [] ,
createTween: function (prop, end){
var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing);
animation.tweens.push(tween);
return tween;
}
,
stop: function (gotoEnd){
var index = 0, length = gotoEnd? _AN_Read_length("length", animation.tweens): 0;
if (stopped) {
return this;
}
stopped = true ;
for (; index < length; index++ ){
animation.tweens[index].run(1);
}
if (gotoEnd) {
deferred.resolveWith(elem, [animation, gotoEnd] );
}
else {
deferred.rejectWith(elem, [animation, gotoEnd] );
}
return this;
}
}
), props = animation.props;
propFilter(props, animation.opts.specialEasing);
for (; index < length; index++ ){
result = animationPrefilters[index].call(animation, elem, props, animation.opts);
if (result) {
return result;
}
}
createTweens(animation, props);
if (jQuery.isFunction(animation.opts.start)) {
animation.opts.start.call(elem, animation);
}
jQuery.fx.timer(jQuery.extend(tick, {
elem: elem,
anim: animation,
queue: animation.opts.queue}
));
return animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
}
function propFilter(props, specialEasing){
var value, name, index, easing, hooks;
for (index in props){
name = jQuery.camelCase(index);
easing = specialEasing[name];
value = props[index];
if (jQuery.isArray(value)) {
easing = value[1];
value = props[index] = value[0];
}
if (index !== name) {
props[name] = value;
delete props[index];
}
hooks = jQuery.cssHooks[name];
if (hooks && "expand" in hooks) {
value = hooks.expand(value);
delete props[name];
for (index in value){
if (!(index in props)) {
props[index] = value[index];
specialEasing[index] = easing;
}
}
}
else {
specialEasing[name] = easing;
}
}
}
jQuery.Animation = jQuery.extend(Animation, {
tweener: function (props, callback){
if (jQuery.isFunction(props)) {
callback = props;
props = ["*"] ;
}
else {
props = props.split(" ");
}
var prop, index = 0, length = _AN_Read_length("length", props);
for (; index < length; index++ ){
prop = props[index];
tweeners[prop] = tweeners[prop] || [] ;
tweeners[prop].unshift(callback);
}
}
,
prefilter: function (callback, prepend){
if (prepend) {
animationPrefilters.unshift(callback);
}
else {
animationPrefilters.push(callback);
}
}
}
);
function defaultPrefilter(elem, props, opts){
var prop, index, length, value, dataShow, toggle, tween, hooks, oldfire, anim = this, style = elem.style, orig = {
}
, handled = [] , hidden = elem.nodeType && isHidden(elem);
if (!opts.queue) {
hooks = jQuery._queueHooks(elem, "fx");
if (hooks.unqueued == null ) {
hooks.unqueued = 0;
oldfire = hooks.empty.fire;
hooks.empty.fire = function (){
if (!hooks.unqueued) {
oldfire();
}
}
;
}
hooks.unqueued++ ;
anim.always(function (){
anim.always(function (){
hooks.unqueued-- ;
if (!_AN_Read_length("length", jQuery.queue(elem, "fx"))) {
hooks.empty.fire();
}
}
);
}
);
}
if (elem.nodeType === 1 && ("height" in props || "width" in props)) {
opts.overflow = [style.overflow, style.overflowX, style.overflowY] ;
if (jQuery.css(elem, "display") === "inline" && jQuery.css(elem, "float") === "none") {
if (!jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay(elem.nodeName) === "inline") {
style.display = "inline-block";
}
else {
style.zoom = 1;
}
}
}
if (opts.overflow) {
style.overflow = "hidden";
if (!jQuery.support.shrinkWrapBlocks) {
anim.always(function (){
style.overflow = opts.overflow[0];
style.overflowX = opts.overflow[1];
style.overflowY = opts.overflow[2];
}
);
}
}
for (index in props){
value = props[index];
if (rfxtypes.exec(value)) {
delete props[index];
toggle = toggle || value === "toggle";
if (value === (hidden? "hide": "show")) {
continue ;
}
handled.push(index);
}
}
length = _AN_Read_length("length", handled);
if (length) {
dataShow = jQuery._data(elem, "fxshow") || jQuery._data(elem, "fxshow", {
}
);
if ("hidden" in dataShow) {
hidden = dataShow.hidden;
}
if (toggle) {
dataShow.hidden = !hidden;
}
if (hidden) {
_AN_Call_show("show", jQuery(elem));
}
else {
anim.done(function (){
jQuery(elem).hide();
}
);
}
anim.done(function (){
var prop;
jQuery._removeData(elem, "fxshow");
for (prop in orig){
jQuery.style(elem, prop, orig[prop]);
}
}
);
for (index = 0; index < length; index++ ){
prop = handled[index];
tween = anim.createTween(prop, hidden? dataShow[prop]: 0);
orig[prop] = dataShow[prop] || jQuery.style(elem, prop);
if (!(prop in dataShow)) {
dataShow[prop] = tween.start;
if (hidden) {
tween.end = tween.start;
tween.start = prop === "width" || prop === "height"? 1: 0;
}
}
}
}
}
function Tween(elem, options, prop, end, easing){
return new Tween.prototype.init(elem, options, prop, end, easing);
}
jQuery.Tween = Tween;
Tween.prototype = {
constructor: Tween,
init: function (elem, options, prop, end, easing, unit){
this.elem = elem;
this.prop = prop;
this.easing = easing || "swing";
this.options = options;
this.start = this.now = this.cur();
this.end = end;
this.unit = unit || (jQuery.cssNumber[prop]? "": "px");
}
,
cur: function (){
var hooks = Tween.propHooks[this.prop];
return hooks && hooks.get? hooks.get(this): Tween.propHooks._default.get(this);
}
,
run: function (percent){
var eased, hooks = Tween.propHooks[this.prop];
if (this.options.duration) {
this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration);
}
else {
this.pos = eased = percent;
}
this.now = (this.end - this.start) * eased + this.start;
if (this.options.step) {
this.options.step.call(this.elem, this.now, this);
}
if (hooks && hooks.set) {
hooks.set(this);
}
else {
Tween.propHooks._default.set(this);
}
return this;
}
}
;
Tween.prototype.init.prototype = Tween.prototype;
Tween.propHooks = {
_default: {
get: function (tween){
var result;
if (tween.elem[tween.prop] != null && (!tween.elem.style || tween.elem.style[tween.prop] == null )) {
return tween.elem[tween.prop];
}
result = jQuery.css(tween.elem, tween.prop, "");
return !result || result === "auto"? 0: result;
}
,
set: function (tween){
if (jQuery.fx.step[tween.prop]) {
jQuery.fx.step[tween.prop](tween);
}
else if (tween.elem.style && (tween.elem.style[jQuery.cssProps[tween.prop]] != null || jQuery.cssHooks[tween.prop])) {
jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
}
else {
tween.elem[tween.prop] = tween.now;
}
}
}
}
;
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function (tween){
if (tween.elem.nodeType && tween.elem.parentNode) {
tween.elem[tween.prop] = tween.now;
}
}
}
;
jQuery.each(["toggle", "show", "hide"] , function (i, name){
var cssFn = jQuery.fn[name];
jQuery.fn[name] = function (speed, easing, callback){
return speed == null || typeof speed === "boolean"? cssFn.apply(this, arguments): this.animate(genFx(name, true ), speed, easing, callback);
}
;
}
);
jQuery.fn.extend({
fadeTo: function (speed, to, easing, callback){
return _AN_Call_show("show", this.filter(isHidden).css("opacity", 0)).end().animate({
opacity: to}
, speed, easing, callback);
}
,
animate: function (prop, speed, easing, callback){
var empty = jQuery.isEmptyObject(prop), optall = jQuery.speed(speed, easing, callback), doAnimation = function (){
var anim = Animation(this, jQuery.extend({
}
, prop), optall);
doAnimation.finish = function (){
anim.stop(true );
}
;
if (empty || jQuery._data(this, "finish")) {
anim.stop(true );
}
}
;
doAnimation.finish = doAnimation;
return empty || optall.queue === false ? this.each(doAnimation): this.queue(optall.queue, doAnimation);
}
,
stop: function (type, clearQueue, gotoEnd){
var stopQueue = function (hooks){
var stop = hooks.stop;
delete hooks.stop;
stop(gotoEnd);
}
;
if (typeof type !== "string") {
gotoEnd = clearQueue;
clearQueue = type;
type = undefined;
}
if (clearQueue && type !== false ) {
this.queue(type || "fx", [] );
}
return this.each(function (){
var dequeue = true , index = type != null && type + "queueHooks", timers = jQuery.timers, data = jQuery._data(this);
if (index) {
if (data[index] && data[index].stop) {
stopQueue(data[index]);
}
}
else {
for (index in data){
if (data[index] && data[index].stop && rrun.test(index)) {
stopQueue(data[index]);
}
}
}
for (index = _AN_Read_length("length", timers); index-- ; ){
if (timers[index].elem === this && (type == null || timers[index].queue === type)) {
timers[index].anim.stop(gotoEnd);
dequeue = false ;
timers.splice(index, 1);
}
}
if (dequeue || !gotoEnd) {
jQuery.dequeue(this, type);
}
}
);
}
,
finish: function (type){
if (type !== false ) {
type = type || "fx";
}
return this.each(function (){
var index, data = jQuery._data(this), queue = data[type + "queue"], hooks = data[type + "queueHooks"], timers = jQuery.timers, length = queue? _AN_Read_length("length", queue): 0;
data.finish = true ;
jQuery.queue(this, type, [] );
if (hooks && hooks.cur && hooks.cur.finish) {
hooks.cur.finish.call(this);
}
for (index = _AN_Read_length("length", timers); index-- ; ){
if (timers[index].elem === this && timers[index].queue === type) {
timers[index].anim.stop(true );
timers.splice(index, 1);
}
}
for (index = 0; index < length; index++ ){
if (queue[index] && queue[index].finish) {
queue[index].finish.call(this);
}
}
delete data.finish;
}
);
}
}
);
function genFx(type, includeWidth){
var which, attrs = {
height: type}
, i = 0;
includeWidth = includeWidth? 1: 0;
for (; i < 4; i += 2 - includeWidth){
which = cssExpand[i];
attrs["margin" + which] = attrs["padding" + which] = type;
}
if (includeWidth) {
attrs.opacity = attrs.width = type;
}
return attrs;
}
jQuery.each({
slideDown: genFx("show"),
slideUp: genFx("hide"),
slideToggle: genFx("toggle"),
fadeIn: {
opacity: "show"}
,
fadeOut: {
opacity: "hide"}
,
fadeToggle: {
opacity: "toggle"}
}
, function (name, props){
jQuery.fn[name] = function (speed, easing, callback){
return this.animate(props, speed, easing, callback);
}
;
}
);
jQuery.speed = function (speed, easing, fn){
var opt = speed && typeof speed === "object"? jQuery.extend({
}
, speed): {
complete: fn || !fn && easing || jQuery.isFunction(speed) && speed,
duration: speed,
easing: fn && easing || easing && !jQuery.isFunction(easing) && easing}
;
opt.duration = jQuery.fx.off? 0: typeof opt.duration === "number"? opt.duration: opt.duration in jQuery.fx.speeds? jQuery.fx.speeds[opt.duration]: jQuery.fx.speeds._default;
if (opt.queue == null || opt.queue === true ) {
opt.queue = "fx";
}
opt.old = opt.complete;
opt.complete = function (){
if (jQuery.isFunction(opt.old)) {
opt.old.call(this);
}
if (opt.queue) {
jQuery.dequeue(this, opt.queue);
}
}
;
return opt;
}
;
jQuery.easing = {
linear: function (p){
return p;
}
,
swing: function (p){
return 0.5 - Math.cos(p * Math.PI) / 2;
}
}
;
jQuery.timers = [] ;
jQuery.fx = Tween.prototype.init;
jQuery.fx.tick = function (){
var timer, timers = jQuery.timers, i = 0;
fxNow = jQuery.now();
for (; i < _AN_Read_length("length", timers); i++ ){
timer = timers[i];
if (!timer() && timers[i] === timer) {
timers.splice(i-- , 1);
}
}
if (!_AN_Read_length("length", timers)) {
jQuery.fx.stop();
}
fxNow = undefined;
}
;
jQuery.fx.timer = function (timer){
if (timer() && jQuery.timers.push(timer)) {
jQuery.fx.start();
}
}
;
jQuery.fx.interval = 13;
jQuery.fx.start = function (){
if (!timerId) {
timerId = _AN_Call_setinterval("setInterval", window, jQuery.fx.tick, jQuery.fx.interval);
}
}
;
jQuery.fx.stop = function (){
clearInterval(timerId);
timerId = null ;
}
;
jQuery.fx.speeds = {
slow: 600,
fast: 200,
_default: 400}
;
jQuery.fx.step = {
}
;
if (jQuery.expr && jQuery.expr.filters) {
jQuery.expr.filters.animated = function (elem){
return _AN_Read_length("length", jQuery.grep(jQuery.timers, function (fn){
return elem === fn.elem;
}
));
}
;
}
jQuery.fn.offset = function (options){
if (arguments.length) {
return options === undefined? this: this.each(function (i){
jQuery.offset.setOffset(this, options, i);
}
);
}
var docElem, win, box = {
top: 0,
left: 0}
, elem = this[0], doc = elem && elem.ownerDocument;
if (!doc) {
return ;
}
docElem = doc.documentElement;
if (!jQuery.contains(docElem, elem)) {
return box;
}
if (typeof elem.getBoundingClientRect !== core_strundefined) {
box = elem.getBoundingClientRect();
}
win = getWindow(doc);
return {
top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),
left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0)}
;
}
;
jQuery.offset = {
setOffset: function (elem, options, i){
var position = jQuery.css(elem, "position");
if (position === "static") {
elem.style.position = "relative";
}
var curElem = jQuery(elem), curOffset = curElem.offset(), curCSSTop = jQuery.css(elem, "top"), curCSSLeft = jQuery.css(elem, "left"), calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft] ) > -1, props = {
}
, curPosition = {
}
, curTop, curLeft;
if (calculatePosition) {
curPosition = curElem.position();
curTop = curPosition.top;
curLeft = curPosition.left;
}
else {
curTop = parseFloat(curCSSTop) || 0;
curLeft = parseFloat(curCSSLeft) || 0;
}
if (jQuery.isFunction(options)) {
options = options.call(elem, i, curOffset);
}
if (options.top != null ) {
props.top = (options.top - curOffset.top) + curTop;
}
if (options.left != null ) {
props.left = (options.left - curOffset.left) + curLeft;
}
if ("using" in options) {
options.using.call(elem, props);
}
else {
curElem.css(props);
}
}
}
;
jQuery.fn.extend({
position: function (){
if (!this[0]) {
return ;
}
var offsetParent, offset, parentOffset = {
top: 0,
left: 0}
, elem = this[0];
if (jQuery.css(elem, "position") === "fixed") {
offset = elem.getBoundingClientRect();
}
else {
offsetParent = this.offsetParent();
offset = this.offset();
if (!jQuery.nodeName(offsetParent[0], "html")) {
parentOffset = offsetParent.offset();
}
parentOffset.top += jQuery.css(offsetParent[0], "borderTopWidth", true );
parentOffset.left += jQuery.css(offsetParent[0], "borderLeftWidth", true );
}
return {
top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true ),
left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true )}
;
}
,
offsetParent: function (){
return this.map(function (){
var offsetParent = this.offsetParent || document.documentElement;
while (offsetParent && (!jQuery.nodeName(offsetParent, "html") && jQuery.css(offsetParent, "position") === "static")){
offsetParent = offsetParent.offsetParent;
}
return offsetParent || document.documentElement;
}
);
}
}
);
jQuery.each({
scrollLeft: "pageXOffset",
scrollTop: "pageYOffset"}
, function (method, prop){
var top = /Y/.test(prop);
jQuery.fn[method] = function (val){
return jQuery.access(this, function (elem, method, val){
var win = getWindow(elem);
if (val === undefined) {
return win? (prop in win)? win[prop]: win.document.documentElement[method]: elem[method];
}
if (win) {
win.scrollTo(!top? val: jQuery(win).scrollLeft(), top? val: jQuery(win).scrollTop());
}
else {
elem[method] = val;
}
}
, method, val, _AN_Read_length("length", arguments), null );
}
;
}
);
function getWindow(elem){
return jQuery.isWindow(elem)? elem: elem.nodeType === 9? elem.defaultView || elem.parentWindow: false ;
}
jQuery.each({
Height: "height",
Width: "width"}
, function (name, type){
jQuery.each({
padding: "inner" + name,
content: type,
"": "outer" + name}
, function (defaultExtra, funcName){
jQuery.fn[funcName] = function (margin, value){
var chainable = _AN_Read_length("length", arguments) && (defaultExtra || typeof margin !== "boolean"), extra = defaultExtra || (margin === true || value === true ? "margin": "border");
return jQuery.access(this, function (elem, type, value){
var doc;
if (jQuery.isWindow(elem)) {
return elem.document.documentElement["client" + name];
}
if (elem.nodeType === 9) {
doc = elem.documentElement;
return Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name]);
}
return value === undefined? jQuery.css(elem, type, extra): jQuery.style(elem, type, value, extra);
}
, type, chainable? margin: undefined, chainable, null );
}
;
}
);
}
);
window.jQuery = window.$ = jQuery;
if (typeof define === "function" && define.amd && define.amd.jQuery) {
define("jquery", [] , function (){
return jQuery;
}
);
}
}
)(window);