| 11 | | |
| 12 | | // Global undefined variable |
| 13 | | window.undefined = window.undefined; |
| 14 | | function jQuery(a,c) { |
| 15 | | |
| 16 | | // Shortcut for document ready (because $(document).each() is silly) |
| 17 | | if ( a && a.constructor == Function && jQuery.fn.ready ) |
| 18 | | return jQuery(document).ready(a); |
| 19 | | |
| 20 | | // Make sure that a selection was provided |
| 21 | | a = a || jQuery.context || document; |
| 22 | | |
| 23 | | // Watch for when a jQuery object is passed as the selector |
| 24 | | if ( a.jquery ) |
| 25 | | return $( jQuery.merge( a, [] ) ); |
| 26 | | |
| 27 | | // Watch for when a jQuery object is passed at the context |
| 28 | | if ( c && c.jquery ) |
| 29 | | return $( c ).find(a); |
| 30 | | |
| 31 | | // If the context is global, return a new object |
| 32 | | if ( window == this ) |
| 33 | | return new jQuery(a,c); |
| 34 | | |
| 35 | | // Handle HTML strings |
| 36 | | var m = /^[^<]*(<.+>)[^>]*$/.exec(a); |
| 37 | | if ( m ) a = jQuery.clean( [ m[1] ] ); |
| 38 | | |
| 39 | | // Watch for when an array is passed in |
| 40 | | this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? |
| 41 | | // Assume that it is an array of DOM Elements |
| 42 | | jQuery.merge( a, [] ) : |
| 43 | | |
| 44 | | // Find the matching elements and save them for later |
| 45 | | jQuery.find( a, c ) ); |
| 46 | | |
| 47 | | // See if an extra function was provided |
| 48 | | var fn = arguments[ arguments.length - 1 ]; |
| 49 | | |
| 50 | | // If so, execute it in context |
| 51 | | if ( fn && fn.constructor == Function ) |
| 52 | | this.each(fn); |
| 53 | | } |
| 54 | | |
| 55 | | // Map over the $ in case of overwrite |
| 56 | | if ( typeof $ != "undefined" ) |
| 57 | | jQuery._$ = $; |
| 58 | | |
| 59 | | // Map the jQuery namespace to the '$' one |
| 60 | | var $ = jQuery; |
| 61 | | |
| 62 | | jQuery.fn = jQuery.prototype = { |
| 63 | | jquery: "$Rev: 249 $", |
| 64 | | |
| 65 | | size: function() { |
| 66 | | return this.length; |
| 67 | | }, |
| 68 | | |
| 69 | | get: function( num ) { |
| 70 | | // Watch for when an array (of elements) is passed in |
| 71 | | if ( num && num.constructor == Array ) { |
| 72 | | |
| 73 | | // Use a tricky hack to make the jQuery object |
| 74 | | // look and feel like an array |
| 75 | | this.length = 0; |
| 76 | | [].push.apply( this, num ); |
| 77 | | |
| 78 | | return this; |
| 79 | | } else |
| 80 | | return num == undefined ? |
| 81 | | |
| 82 | | // Return a 'clean' array |
| 83 | | jQuery.map( this, function(a){ return a } ) : |
| 84 | | |
| 85 | | // Return just the object |
| 86 | | this[num]; |
| 87 | | }, |
| 88 | | each: function( fn, args ) { |
| 89 | | return jQuery.each( this, fn, args ); |
| 90 | | }, |
| 91 | | |
| 92 | | index: function( obj ) { |
| 93 | | var pos = -1; |
| 94 | | this.each(function(i){ |
| 95 | | if ( this == obj ) pos = i; |
| 96 | | }); |
| 97 | | return pos; |
| 98 | | }, |
| 99 | | |
| 100 | | attr: function( key, value, type ) { |
| 101 | | // Check to see if we're setting style values |
| 102 | | return key.constructor != String || value != undefined ? |
| 103 | | this.each(function(){ |
| 104 | | // See if we're setting a hash of styles |
| 105 | | if ( value == undefined ) |
| 106 | | // Set all the styles |
| 107 | | for ( var prop in key ) |
| 108 | | jQuery.attr( |
| 109 | | type ? this.style : this, |
| 110 | | prop, key[prop] |
| 111 | | ); |
| 112 | | |
| 113 | | // See if we're setting a single key/value style |
| 114 | | else |
| 115 | | jQuery.attr( |
| 116 | | type ? this.style : this, |
| 117 | | key, value |
| 118 | | ); |
| 119 | | }) : |
| 120 | | |
| 121 | | // Look for the case where we're accessing a style value |
| 122 | | jQuery[ type || "attr" ]( this[0], key ); |
| 123 | | }, |
| 124 | | |
| 125 | | css: function( key, value ) { |
| 126 | | return this.attr( key, value, "curCSS" ); |
| 127 | | }, |
| 128 | | text: function(e) { |
| 129 | | e = e || this; |
| 130 | | var t = ""; |
| 131 | | for ( var j = 0; j < e.length; j++ ) { |
| 132 | | var r = e[j].childNodes; |
| 133 | | for ( var i = 0; i < r.length; i++ ) |
| 134 | | if ( r[i].nodeType != 8 ) |
| 135 | | t += r[i].nodeType != 1 ? |
| 136 | | r[i].nodeValue : jQuery.fn.text([ r[i] ]); |
| 137 | | } |
| 138 | | return t; |
| 139 | | }, |
| 140 | | wrap: function() { |
| 141 | | // The elements to wrap the target around |
| 142 | | var a = jQuery.clean(arguments); |
| 143 | | |
| 144 | | // Wrap each of the matched elements individually |
| 145 | | return this.each(function(){ |
| 146 | | // Clone the structure that we're using to wrap |
| 147 | | var b = a[0].cloneNode(true); |
| 148 | | |
| 149 | | // Insert it before the element to be wrapped |
| 150 | | this.parentNode.insertBefore( b, this ); |
| 151 | | |
| 152 | | // Find he deepest point in the wrap structure |
| 153 | | while ( b.firstChild ) |
| 154 | | b = b.firstChild; |
| 155 | | |
| 156 | | // Move the matched element to within the wrap structure |
| 157 | | b.appendChild( this ); |
| 158 | | }); |
| 159 | | }, |
| 160 | | append: function() { |
| 161 | | return this.domManip(arguments, true, 1, function(a){ |
| 162 | | this.appendChild( a ); |
| 163 | | }); |
| 164 | | }, |
| 165 | | prepend: function() { |
| 166 | | return this.domManip(arguments, true, -1, function(a){ |
| 167 | | this.insertBefore( a, this.firstChild ); |
| 168 | | }); |
| 169 | | }, |
| 170 | | before: function() { |
| 171 | | return this.domManip(arguments, false, 1, function(a){ |
| 172 | | this.parentNode.insertBefore( a, this ); |
| 173 | | }); |
| 174 | | }, |
| 175 | | after: function() { |
| 176 | | return this.domManip(arguments, false, -1, function(a){ |
| 177 | | this.parentNode.insertBefore( a, this.nextSibling ); |
| 178 | | }); |
| 179 | | }, |
| 180 | | end: function() { |
| 181 | | return this.get( this.stack.pop() ); |
| 182 | | }, |
| 183 | | find: function(t) { |
| 184 | | return this.pushStack( jQuery.map( this, function(a){ |
| 185 | | return jQuery.find(t,a); |
| 186 | | }), arguments ); |
| 187 | | }, |
| 188 | | |
| 189 | | clone: function(deep) { |
| 190 | | return this.pushStack( jQuery.map( this, function(a){ |
| 191 | | return a.cloneNode( deep != undefined ? deep : true ); |
| 192 | | }), arguments ); |
| 193 | | }, |
| 194 | | |
| 195 | | filter: function(t) { |
| 196 | | return this.pushStack( |
| 197 | | t.constructor == Array && |
| 198 | | jQuery.map(this,function(a){ |
| 199 | | for ( var i = 0; i < t.length; i++ ) |
| 200 | | if ( jQuery.filter(t[i],[a]).r.length ) |
| 201 | | return a; |
| 202 | | }) || |
| 203 | | |
| 204 | | t.constructor == Boolean && |
| 205 | | ( t ? this.get() : [] ) || |
| 206 | | |
| 207 | | t.constructor == Function && |
| 208 | | jQuery.grep( this, t ) || |
| 209 | | |
| 210 | | jQuery.filter(t,this).r, arguments ); |
| 211 | | }, |
| 212 | | |
| 213 | | not: function(t) { |
| 214 | | return this.pushStack( t.constructor == String ? |
| 215 | | jQuery.filter(t,this,false).r : |
| 216 | | jQuery.grep(this,function(a){ return a != t; }), arguments ); |
| 217 | | }, |
| 218 | | |
| 219 | | add: function(t) { |
| 220 | | return this.pushStack( jQuery.merge( this, t.constructor == String ? |
| 221 | | jQuery.find(t) : t.constructor == Array ? t : [t] ), arguments ); |
| 222 | | }, |
| 223 | | is: function(expr) { |
| 224 | | return expr ? jQuery.filter(expr,this).r.length > 0 : this.length > 0; |
| 225 | | }, |
| 226 | | domManip: function(args, table, dir, fn){ |
| 227 | | var clone = this.size() > 1; |
| 228 | | var a = jQuery.clean(args); |
| 229 | | |
| 230 | | return this.each(function(){ |
| 231 | | var obj = this; |
| 232 | | |
| 233 | | if ( table && this.nodeName == "TABLE" && a[0].nodeName != "THEAD" ) { |
| 234 | | var tbody = this.getElementsByTagName("tbody"); |
| 235 | | |
| 236 | | if ( !tbody.length ) { |
| 237 | | obj = document.createElement("tbody"); |
| 238 | | this.appendChild( obj ); |
| 239 | | } else |
| 240 | | obj = tbody[0]; |
| 241 | | } |
| 242 | | |
| 243 | | for ( var i = ( dir < 0 ? a.length - 1 : 0 ); |
| 244 | | i != ( dir < 0 ? dir : a.length ); i += dir ) { |
| 245 | | fn.apply( obj, [ clone ? a[i].cloneNode(true) : a[i] ] ); |
| 246 | | } |
| 247 | | }); |
| 248 | | }, |
| 249 | | pushStack: function(a,args) { |
| 250 | | var fn = args && args[args.length-1]; |
| 251 | | |
| 252 | | if ( !fn || fn.constructor != Function ) { |
| 253 | | if ( !this.stack ) this.stack = []; |
| 254 | | this.stack.push( this.get() ); |
| 255 | | this.get( a ); |
| 256 | | } else { |
| 257 | | var old = this.get(); |
| 258 | | this.get( a ); |
| 259 | | if ( fn.constructor == Function ) |
| 260 | | return this.each( fn ); |
| 261 | | this.get( old ); |
| 262 | | } |
| 263 | | |
| 264 | | return this; |
| 265 | | } |
| 266 | | }; |
| 267 | | |
| 268 | | jQuery.extend = jQuery.fn.extend = function(obj,prop) { |
| 269 | | if ( !prop ) { prop = obj; obj = this; } |
| 270 | | for ( var i in prop ) obj[i] = prop[i]; |
| 271 | | return obj; |
| 272 | | }; |
| 273 | | |
| 274 | | jQuery.extend({ |
| 275 | | init: function(){ |
| 276 | | jQuery.initDone = true; |
| 277 | | |
| 278 | | jQuery.each( jQuery.macros.axis, function(i,n){ |
| 279 | | jQuery.fn[ i ] = function(a) { |
| 280 | | var ret = jQuery.map(this,n); |
| 281 | | if ( a && a.constructor == String ) |
| 282 | | ret = jQuery.filter(a,ret).r; |
| 283 | | return this.pushStack( ret, arguments ); |
| 284 | | }; |
| 285 | | }); |
| 286 | | |
| 287 | | jQuery.each( jQuery.macros.to, function(i,n){ |
| 288 | | jQuery.fn[ i ] = function(){ |
| 289 | | var a = arguments; |
| 290 | | return this.each(function(){ |
| 291 | | for ( var j = 0; j < a.length; j++ ) |
| 292 | | $(a[j])[n]( this ); |
| 293 | | }); |
| 294 | | }; |
| 295 | | }); |
| 296 | | |
| 297 | | jQuery.each( jQuery.macros.each, function(i,n){ |
| 298 | | jQuery.fn[ i ] = function() { |
| 299 | | return this.each( n, arguments ); |
| 300 | | }; |
| 301 | | }); |
| 302 | | |
| 303 | | jQuery.each( jQuery.macros.filter, function(i,n){ |
| 304 | | jQuery.fn[ n ] = function(num,fn) { |
| 305 | | return this.filter( ":" + n + "(" + num + ")", fn ); |
| 306 | | }; |
| 307 | | }); |
| 308 | | |
| 309 | | jQuery.each( jQuery.macros.attr, function(i,n){ |
| 310 | | n = n || i; |
| 311 | | jQuery.fn[ i ] = function(h) { |
| 312 | | return h == undefined ? |
| 313 | | this.length ? this[0][n] : null : |
| 314 | | this.attr( n, h ); |
| 315 | | }; |
| 316 | | }); |
| 317 | | |
| 318 | | jQuery.each( jQuery.macros.css, function(i,n){ |
| 319 | | jQuery.fn[ n ] = function(h) { |
| 320 | | return h == undefined ? |
| 321 | | ( this.length ? jQuery.css( this[0], n ) : null ) : |
| 322 | | this.css( n, h ); |
| 323 | | }; |
| 324 | | }); |
| 325 | | |
| 326 | | }, |
| 327 | | each: function( obj, fn, args ) { |
| 328 | | if ( obj.length == undefined ) |
| 329 | | for ( var i in obj ) |
| 330 | | fn.apply( obj[i], args || [i, obj[i]] ); |
| 331 | | else |
| 332 | | for ( var i = 0; i < obj.length; i++ ) |
| 333 | | fn.apply( obj[i], args || [i, obj[i]] ); |
| 334 | | return obj; |
| 335 | | }, |
| 336 | | |
| 337 | | className: { |
| 338 | | add: function(o,c){ |
| 339 | | if (jQuery.className.has(o,c)) return; |
| 340 | | o.className += ( o.className ? " " : "" ) + c; |
| 341 | | }, |
| 342 | | remove: function(o,c){ |
| 343 | | o.className = !c ? "" : |
| 344 | | o.className.replace( |
| 345 | | new RegExp("(^|\\s*\\b[^-])"+c+"($|\\b(?=[^-]))", "g"), ""); |
| 346 | | }, |
| 347 | | has: function(e,a) { |
| 348 | | if ( e.className != undefined ) |
| 349 | | e = e.className; |
| 350 | | return new RegExp("(^|\\s)" + a + "(\\s|$)").test(e); |
| 351 | | } |
| 352 | | }, |
| 353 | | swap: function(e,o,f) { |
| 354 | | for ( var i in o ) { |
| 355 | | e.style["old"+i] = e.style[i]; |
| 356 | | e.style[i] = o[i]; |
| 357 | | } |
| 358 | | f.apply( e, [] ); |
| 359 | | for ( var i in o ) |
| 360 | | e.style[i] = e.style["old"+i]; |
| 361 | | }, |
| 362 | | |
| 363 | | css: function(e,p) { |
| 364 | | if ( p == "height" || p == "width" ) { |
| 365 | | var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"]; |
| 366 | | |
| 367 | | for ( var i in d ) { |
| 368 | | old["padding" + d[i]] = 0; |
| 369 | | old["border" + d[i] + "Width"] = 0; |
| 370 | | } |
| 371 | | |
| 372 | | jQuery.swap( e, old, function() { |
| 373 | | if (jQuery.css(e,"display") != "none") { |
| 374 | | oHeight = e.offsetHeight; |
| 375 | | oWidth = e.offsetWidth; |
| 376 | | } else { |
| 377 | | e = $(e.cloneNode(true)).css({ |
| 378 | | visibility: "hidden", position: "absolute", display: "block" |
| 379 | | }).prependTo("body")[0]; |
| 380 | | |
| 381 | | oHeight = e.clientHeight; |
| 382 | | oWidth = e.clientWidth; |
| 383 | | |
| 384 | | e.parentNode.removeChild(e); |
| 385 | | } |
| 386 | | }); |
| 387 | | |
| 388 | | return p == "height" ? oHeight : oWidth; |
| 389 | | } else if ( p == "opacity" && jQuery.browser.msie ) |
| 390 | | return parseFloat( jQuery.curCSS(e,"filter").replace(/[^0-9.]/,"") ) || 1; |
| 391 | | |
| 392 | | return jQuery.curCSS( e, p ); |
| 393 | | }, |
| 394 | | |
| 395 | | curCSS: function(elem, prop, force) { |
| 396 | | var ret; |
| 397 | | |
| 398 | | if (!force && elem.style[prop]) { |
| 399 | | |
| 400 | | ret = elem.style[prop]; |
| 401 | | |
| 402 | | } else if (elem.currentStyle) { |
| 403 | | |
| 404 | | var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()}); |
| 405 | | ret = elem.currentStyle[prop] || elem.currentStyle[newProp]; |
| 406 | | |
| 407 | | } else if (document.defaultView && document.defaultView.getComputedStyle) { |
| 408 | | |
| 409 | | prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase(); |
| 410 | | var cur = document.defaultView.getComputedStyle(elem, null); |
| 411 | | |
| 412 | | if ( cur ) |
| 413 | | ret = cur.getPropertyValue(prop); |
| 414 | | else if ( prop == 'display' ) |
| 415 | | ret = 'none'; |
| 416 | | else |
| 417 | | jQuery.swap(elem, { display: 'block' }, function() { |
| 418 | | ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop); |
| 419 | | }); |
| 420 | | |
| 421 | | } |
| 422 | | |
| 423 | | return ret; |
| 424 | | }, |
| 425 | | |
| 426 | | clean: function(a) { |
| 427 | | var r = []; |
| 428 | | for ( var i = 0; i < a.length; i++ ) { |
| 429 | | if ( a[i].constructor == String ) { |
| 430 | | |
| 431 | | var table = ""; |
| 432 | | |
| 433 | | if ( !a[i].indexOf("<thead") || !a[i].indexOf("<tbody") ) { |
| 434 | | table = "thead"; |
| 435 | | a[i] = "<table>" + a[i] + "</table>"; |
| 436 | | } else if ( !a[i].indexOf("<tr") ) { |
| 437 | | table = "tr"; |
| 438 | | a[i] = "<table>" + a[i] + "</table>"; |
| 439 | | } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { |
| 440 | | table = "td"; |
| 441 | | a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; |
| 442 | | } |
| 443 | | |
| 444 | | var div = document.createElement("div"); |
| 445 | | div.innerHTML = a[i]; |
| 446 | | |
| 447 | | if ( table ) { |
| 448 | | div = div.firstChild; |
| 449 | | if ( table != "thead" ) div = div.firstChild; |
| 450 | | if ( table == "td" ) div = div.firstChild; |
| 451 | | } |
| 452 | | |
| 453 | | for ( var j = 0; j < div.childNodes.length; j++ ) |
| 454 | | r.push( div.childNodes[j] ); |
| 455 | | } else if ( a[i].jquery || a[i].length && !a[i].nodeType ) |
| 456 | | for ( var k = 0; k < a[i].length; k++ ) |
| 457 | | r.push( a[i][k] ); |
| 458 | | else if ( a[i] !== null ) |
| 459 | | r.push( a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()) ); |
| 460 | | } |
| 461 | | return r; |
| 462 | | }, |
| 463 | | |
| 464 | | expr: { |
| 465 | | "": "m[2]== '*'||a.nodeName.toUpperCase()==m[2].toUpperCase()", |
| 466 | | "#": "a.getAttribute('id')&&a.getAttribute('id')==m[2]", |
| 467 | | ":": { |
| 468 | | // Position Checks |
| 469 | | lt: "i<m[3]-0", |
| 470 | | gt: "i>m[3]-0", |
| 471 | | nth: "m[3]-0==i", |
| 472 | | eq: "m[3]-0==i", |
| 473 | | first: "i==0", |
| 474 | | last: "i==r.length-1", |
| 475 | | even: "i%2==0", |
| 476 | | odd: "i%2", |
| 477 | | |
| 478 | | // Child Checks |
| 479 | | "nth-child": "jQuery.sibling(a,m[3]).cur", |
| 480 | | "first-child": "jQuery.sibling(a,0).cur", |
| 481 | | "last-child": "jQuery.sibling(a,0).last", |
| 482 | | "only-child": "jQuery.sibling(a).length==1", |
| 483 | | |
| 484 | | // Parent Checks |
| 485 | | parent: "a.childNodes.length", |
| 486 | | empty: "!a.childNodes.length", |
| 487 | | |
| 488 | | // Text Check |
| 489 | | contains: "(a.innerText||a.innerHTML).indexOf(m[3])>=0", |
| 490 | | |
| 491 | | // Visibility |
| 492 | | visible: "a.type!='hidden'&&jQuery.css(a,'display')!='none'&&jQuery.css(a,'visibility')!='hidden'", |
| 493 | | hidden: "a.type=='hidden'||jQuery.css(a,'display')=='none'||jQuery.css(a,'visibility')=='hidden'", |
| 494 | | |
| 495 | | // Form elements |
| 496 | | enabled: "!a.disabled", |
| 497 | | disabled: "a.disabled", |
| 498 | | checked: "a.checked", |
| 499 | | selected: "a.selected" |
| 500 | | }, |
| 501 | | ".": "jQuery.className.has(a,m[2])", |
| 502 | | "@": { |
| 503 | | "=": "z==m[4]", |
| 504 | | "!=": "z!=m[4]", |
| 505 | | "^=": "!z.indexOf(m[4])", |
| 506 | | "$=": "z.substr(z.length - m[4].length,m[4].length)==m[4]", |
| 507 | | "*=": "z.indexOf(m[4])>=0", |
| 508 | | "": "z" |
| 509 | | }, |
| 510 | | "[": "jQuery.find(m[2],a).length" |
| 511 | | }, |
| 512 | | |
| 513 | | token: [ |
| 514 | | "\\.\\.|/\\.\\.", "a.parentNode", |
| 515 | | ">|/", "jQuery.sibling(a.firstChild)", |
| 516 | | "\\+", "jQuery.sibling(a).next", |
| 517 | | "~", function(a){ |
| 518 | | var r = []; |
| 519 | | var s = jQuery.sibling(a); |
| 520 | | if ( s.n > 0 ) |
| 521 | | for ( var i = s.n; i < s.length; i++ ) |
| 522 | | r.push( s[i] ); |
| 523 | | return r; |
| 524 | | } |
| 525 | | ], |
| 526 | | find: function( t, context ) { |
| 527 | | // Make sure that the context is a DOM Element |
| 528 | | if ( context && context.nodeType == undefined ) |
| 529 | | context = null; |
| 530 | | |
| 531 | | // Set the correct context (if none is provided) |
| 532 | | context = context || jQuery.context || document; |
| 533 | | |
| 534 | | if ( t.constructor != String ) return [t]; |
| 535 | | |
| 536 | | if ( !t.indexOf("//") ) { |
| 537 | | context = context.documentElement; |
| 538 | | t = t.substr(2,t.length); |
| 539 | | } else if ( !t.indexOf("/") ) { |
| 540 | | context = context.documentElement; |
| 541 | | t = t.substr(1,t.length); |
| 542 | | // FIX Assume the root element is right :( |
| 543 | | if ( t.indexOf("/") >= 1 ) |
| 544 | | t = t.substr(t.indexOf("/"),t.length); |
| 545 | | } |
| 546 | | |
| 547 | | var ret = [context]; |
| 548 | | var done = []; |
| 549 | | var last = null; |
| 550 | | |
| 551 | | while ( t.length > 0 && last != t ) { |
| 552 | | var r = []; |
| 553 | | last = t; |
| 554 | | |
| 555 | | t = jQuery.trim(t).replace( /^\/\//i, "" ); |
| 556 | | |
| 557 | | var foundToken = false; |
| 558 | | |
| 559 | | for ( var i = 0; i < jQuery.token.length; i += 2 ) { |
| 560 | | if ( foundToken ) continue; |
| 561 | | |
| 562 | | var re = new RegExp("^(" + jQuery.token[i] + ")"); |
| 563 | | var m = re.exec(t); |
| 564 | | |
| 565 | | if ( m ) { |
| 566 | | r = ret = jQuery.map( ret, jQuery.token[i+1] ); |
| 567 | | t = jQuery.trim( t.replace( re, "" ) ); |
| 568 | | foundToken = true; |
| 569 | | } |
| 570 | | } |
| 571 | | |
| 572 | | if ( !foundToken ) { |
| 573 | | if ( !t.indexOf(",") || !t.indexOf("|") ) { |
| 574 | | if ( ret[0] == context ) ret.shift(); |
| 575 | | done = jQuery.merge( done, ret ); |
| 576 | | r = ret = [context]; |
| 577 | | t = " " + t.substr(1,t.length); |
| 578 | | } else { |
| 579 | | var re2 = /^([#.]?)([a-z0-9\\*_-]*)/i; |
| 580 | | var m = re2.exec(t); |
| 581 | | |
| 582 | | if ( m[1] == "#" ) { |
| 583 | | // Ummm, should make this work in all XML docs |
| 584 | | var oid = document.getElementById(m[2]); |
| 585 | | r = ret = oid ? [oid] : []; |
| 586 | | t = t.replace( re2, "" ); |
| 587 | | } else { |
| 588 | | if ( !m[2] || m[1] == "." ) m[2] = "*"; |
| 589 | | |
| 590 | | for ( var i = 0; i < ret.length; i++ ) |
| 591 | | r = jQuery.merge( r, |
| 592 | | m[2] == "*" ? |
| 593 | | jQuery.getAll(ret[i]) : |
| 594 | | ret[i].getElementsByTagName(m[2]) |
| 595 | | ); |
| 596 | | } |
| 597 | | } |
| 598 | | |
| 599 | | } |
| 600 | | |
| 601 | | if ( t ) { |
| 602 | | var val = jQuery.filter(t,r); |
| 603 | | ret = r = val.r; |
| 604 | | t = jQuery.trim(val.t); |
| 605 | | } |
| 606 | | } |
| 607 | | |
| 608 | | if ( ret && ret[0] == context ) ret.shift(); |
| 609 | | done = jQuery.merge( done, ret ); |
| 610 | | |
| 611 | | return done; |
| 612 | | }, |
| 613 | | |
| 614 | | getAll: function(o,r) { |
| 615 | | r = r || []; |
| 616 | | var s = o.childNodes; |
| 617 | | for ( var i = 0; i < s.length; i++ ) |
| 618 | | if ( s[i].nodeType == 1 ) { |
| 619 | | r.push( s[i] ); |
| 620 | | jQuery.getAll( s[i], r ); |
| 621 | | } |
| 622 | | return r; |
| 623 | | }, |
| 624 | | |
| 625 | | attr: function(elem, name, value){ |
| 626 | | var fix = { |
| 627 | | "for": "htmlFor", |
| 628 | | "class": "className", |
| 629 | | "float": "cssFloat", |
| 630 | | innerHTML: "innerHTML", |
| 631 | | className: "className", |
| 632 | | value: "value", |
| 633 | | disabled: "disabled" |
| 634 | | }; |
| 635 | | |
| 636 | | if ( fix[name] ) { |
| 637 | | if ( value != undefined ) elem[fix[name]] = value; |
| 638 | | return elem[fix[name]]; |
| 639 | | } else if ( elem.getAttribute ) { |
| 640 | | if ( value != undefined ) elem.setAttribute( name, value ); |
| 641 | | return elem.getAttribute( name, 2 ); |
| 642 | | } else { |
| 643 | | name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();}); |
| 644 | | if ( value != undefined ) elem[name] = value; |
| 645 | | return elem[name]; |
| 646 | | } |
| 647 | | }, |
| 648 | | |
| 649 | | // The regular expressions that power the parsing engine |
| 650 | | parse: [ |
| 651 | | // Match: [@value='test'], [@foo] |
| 652 | | [ "\\[ *(@)S *([!*$^=]*) *Q\\]", 1 ], |
| 653 | | |
| 654 | | // Match: [div], [div p] |
| 655 | | [ "(\\[)Q\\]", 0 ], |
| 656 | | |
| 657 | | // Match: :contains('foo') |
| 658 | | [ "(:)S\\(Q\\)", 0 ], |
| 659 | | |
| 660 | | // Match: :even, :last-chlid |
| 661 | | [ "([:.#]*)S", 0 ] |
| 662 | | ], |
| 663 | | |
| 664 | | filter: function(t,r,not) { |
| 665 | | // Figure out if we're doing regular, or inverse, filtering |
| 666 | | var g = not !== false ? jQuery.grep : |
| 667 | | function(a,f) {return jQuery.grep(a,f,true);}; |
| 668 | | |
| 669 | | while ( t && /^[a-z[({<*:.#]/i.test(t) ) { |
| 670 | | |
| 671 | | var p = jQuery.parse; |
| 672 | | |
| 673 | | for ( var i = 0; i < p.length; i++ ) { |
| 674 | | var re = new RegExp( "^" + p[i][0] |
| 675 | | |
| 676 | | // Look for a string-like sequence |
| 677 | | .replace( 'S', "([a-z*_-][a-z0-9_-]*)" ) |
| 678 | | |
| 679 | | // Look for something (optionally) enclosed with quotes |
| 680 | | .replace( 'Q', " *'?\"?([^'\"]*?)'?\"? *" ), "i" ); |
| 681 | | |
| 682 | | var m = re.exec( t ); |
| 683 | | |
| 684 | | if ( m ) { |
| 685 | | // Re-organize the match |
| 686 | | if ( p[i][1] ) |
| 687 | | m = ["", m[1], m[3], m[2], m[4]]; |
| 688 | | |
| 689 | | // Remove what we just matched |
| 690 | | t = t.replace( re, "" ); |
| 691 | | |
| 692 | | break; |
| 693 | | } |
| 694 | | } |
| 695 | | |
| 696 | | // :not() is a special case that can be optomized by |
| 697 | | // keeping it out of the expression list |
| 698 | | if ( m[1] == ":" && m[2] == "not" ) |
| 699 | | r = jQuery.filter(m[3],r,false).r; |
| 700 | | |
| 701 | | // Otherwise, find the expression to execute |
| 702 | | else { |
| 703 | | var f = jQuery.expr[m[1]]; |
| 704 | | if ( f.constructor != String ) |
| 705 | | f = jQuery.expr[m[1]][m[2]]; |
| 706 | | |
| 707 | | // Build a custom macro to enclose it |
| 708 | | eval("f = function(a,i){" + |
| 709 | | ( m[1] == "@" ? "z=jQuery.attr(a,m[3]);" : "" ) + |
| 710 | | "return " + f + "}"); |
| 711 | | |
| 712 | | // Execute it against the current filter |
| 713 | | r = g( r, f ); |
| 714 | | } |
| 715 | | } |
| 716 | | |
| 717 | | // Return an array of filtered elements (r) |
| 718 | | // and the modified expression string (t) |
| 719 | | return { r: r, t: t }; |
| 720 | | }, |
| 721 | | trim: function(t){ |
| 722 | | return t.replace(/^\s+|\s+$/g, ""); |
| 723 | | }, |
| 724 | | parents: function( elem ){ |
| 725 | | var matched = []; |
| 726 | | var cur = elem.parentNode; |
| 727 | | while ( cur && cur != document ) { |
| 728 | | matched.push( cur ); |
| 729 | | cur = cur.parentNode; |
| 730 | | } |
| 731 | | return matched; |
| 732 | | }, |
| 733 | | sibling: function(elem, pos, not) { |
| 734 | | var elems = []; |
| 735 | | |
| 736 | | var siblings = elem.parentNode.childNodes; |
| 737 | | for ( var i = 0; i < siblings.length; i++ ) { |
| 738 | | if ( not === true && siblings[i] == elem ) continue; |
| 739 | | |
| 740 | | if ( siblings[i].nodeType == 1 ) |
| 741 | | elems.push( siblings[i] ); |
| 742 | | if ( siblings[i] == elem ) |
| 743 | | elems.n = elems.length - 1; |
| 744 | | } |
| 745 | | |
| 746 | | return jQuery.extend( elems, { |
| 747 | | last: elems.n == elems.length - 1, |
| 748 | | cur: pos == "even" && elems.n % 2 == 0 || pos == "odd" && elems.n % 2 || elems[pos] == elem, |
| 749 | | prev: elems[elems.n - 1], |
| 750 | | next: elems[elems.n + 1] |
| 751 | | }); |
| 752 | | }, |
| 753 | | merge: function(first, second) { |
| 754 | | var result = []; |
| 755 | | |
| 756 | | // Move b over to the new array (this helps to avoid |
| 757 | | // StaticNodeList instances) |
| 758 | | for ( var k = 0; k < first.length; k++ ) |
| 759 | | result[k] = first[k]; |
| 760 | | |
| 761 | | // Now check for duplicates between a and b and only |
| 762 | | // add the unique items |
| 763 | | for ( var i = 0; i < second.length; i++ ) { |
| 764 | | var noCollision = true; |
| 765 | | |
| 766 | | // The collision-checking process |
| 767 | | for ( var j = 0; j < first.length; j++ ) |
| 768 | | if ( second[i] == first[j] ) |
| 769 | | noCollision = false; |
| 770 | | |
| 771 | | // If the item is unique, add it |
| 772 | | if ( noCollision ) |
| 773 | | result.push( second[i] ); |
| 774 | | } |
| 775 | | |
| 776 | | return result; |
| 777 | | }, |
| 778 | | grep: function(elems, fn, inv) { |
| 779 | | // If a string is passed in for the function, make a function |
| 780 | | // for it (a handy shortcut) |
| 781 | | if ( fn.constructor == String ) |
| 782 | | fn = new Function("a","i","return " + fn); |
| 783 | | |
| 784 | | var result = []; |
| 785 | | |
| 786 | | // Go through the array, only saving the items |
| 787 | | // that pass the validator function |
| 788 | | for ( var i = 0; i < elems.length; i++ ) |
| 789 | | if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) ) |
| 790 | | result.push( elems[i] ); |
| 791 | | |
| 792 | | return result; |
| 793 | | }, |
| 794 | | map: function(elems, fn) { |
| 795 | | // If a string is passed in for the function, make a function |
| 796 | | // for it (a handy shortcut) |
| 797 | | if ( fn.constructor == String ) |
| 798 | | fn = new Function("a","return " + fn); |
| 799 | | |
| 800 | | var result = []; |
| 801 | | |
| 802 | | // Go through the array, translating each of the items to their |
| 803 | | // new value (or values). |
| 804 | | for ( var i = 0; i < elems.length; i++ ) { |
| 805 | | var val = fn(elems[i],i); |
| 806 | | |
| 807 | | if ( val !== null && val != undefined ) { |
| 808 | | if ( val.constructor != Array ) val = [val]; |
| 809 | | result = jQuery.merge( result, val ); |
| 810 | | } |
| 811 | | } |
| 812 | | |
| 813 | | return result; |
| 814 | | }, |
| 815 | | |
| 816 | | /* |
| 817 | | * A number of helper functions used for managing events. |
| 818 | | * Many of the ideas behind this code orignated from Dean Edwards' addEvent library. |
| 819 | | */ |
| 820 | | event: { |
| 821 | | |
| 822 | | // Bind an event to an element |
| 823 | | // Original by Dean Edwards |
| 824 | | add: function(element, type, handler) { |
| 825 | | // For whatever reason, IE has trouble passing the window object |
| 826 | | // around, causing it to be cloned in the process |
| 827 | | if ( jQuery.browser.msie && element.setInterval != undefined ) |
| 828 | | element = window; |
| 829 | | |
| 830 | | // Make sure that the function being executed has a unique ID |
| 831 | | if ( !handler.guid ) |
| 832 | | handler.guid = this.guid++; |
| 833 | | |
| 834 | | // Init the element's event structure |
| 835 | | if (!element.events) |
| 836 | | element.events = {}; |
| 837 | | |
| 838 | | // Get the current list of functions bound to this event |
| 839 | | var handlers = element.events[type]; |
| 840 | | |
| 841 | | // If it hasn't been initialized yet |
| 842 | | if (!handlers) { |
| 843 | | // Init the event handler queue |
| 844 | | handlers = element.events[type] = {}; |
| 845 | | |
| 846 | | // Remember an existing handler, if it's already there |
| 847 | | if (element["on" + type]) |
| 848 | | handlers[0] = element["on" + type]; |
| 849 | | } |
| 850 | | |
| 851 | | // Add the function to the element's handler list |
| 852 | | handlers[handler.guid] = handler; |
| 853 | | |
| 854 | | // And bind the global event handler to the element |
| 855 | | element["on" + type] = this.handle; |
| 856 | | |
| 857 | | // Remember the function in a global list (for triggering) |
| 858 | | if (!this.global[type]) |
| 859 | | this.global[type] = []; |
| 860 | | this.global[type].push( element ); |
| 861 | | }, |
| 862 | | |
| 863 | | guid: 1, |
| 864 | | global: {}, |
| 865 | | |
| 866 | | // Detach an event or set of events from an element |
| 867 | | remove: function(element, type, handler) { |
| 868 | | if (element.events) |
| 869 | | if (type && element.events[type]) |
| 870 | | if ( handler ) |
| 871 | | delete element.events[type][handler.guid]; |
| 872 | | else |
| 873 | | for ( var i in element.events[type] ) |
| 874 | | delete element.events[type][i]; |
| 875 | | else |
| 876 | | for ( var j in element.events ) |
| 877 | | this.remove( element, j ); |
| 878 | | }, |
| 879 | | |
| 880 | | trigger: function(type,data,element) { |
| 881 | | // Touch up the incoming data |
| 882 | | data = data || []; |
| 883 | | |
| 884 | | // Handle a global trigger |
| 885 | | if ( !element ) { |
| 886 | | var g = this.global[type]; |
| 887 | | if ( g ) |
| 888 | | for ( var i = 0; i < g.length; i++ ) |
| 889 | | this.trigger( type, data, g[i] ); |
| 890 | | |
| 891 | | // Handle triggering a single element |
| 892 | | } else if ( element["on" + type] ) { |
| 893 | | // Pass along a fake event |
| 894 | | data.unshift( this.fix({ type: type, target: element }) ); |
| 895 | | |
| 896 | | // Trigger the event |
| 897 | | element["on" + type].apply( element, data ); |
| 898 | | } |
| 899 | | }, |
| 900 | | |
| 901 | | handle: function(event) { |
| 902 | | if ( typeof jQuery == "undefined" ) return; |
| 903 | | |
| 904 | | event = event || jQuery.event.fix( window.event ); |
| 905 | | |
| 906 | | // If no correct event was found, fail |
| 907 | | if ( !event ) return; |
| 908 | | |
| 909 | | var returnValue = true; |
| 910 | | |
| 911 | | var c = this.events[event.type]; |
| 912 | | |
| 913 | | for ( var j in c ) { |
| 914 | | if ( c[j].apply( this, [event] ) === false ) { |
| 915 | | event.preventDefault(); |
| 916 | | event.stopPropagation(); |
| 917 | | returnValue = false; |
| 918 | | } |
| 919 | | } |
| 920 | | |
| 921 | | return returnValue; |
| 922 | | }, |
| 923 | | |
| 924 | | fix: function(event) { |
| 925 | | if ( event ) { |
| 926 | | event.preventDefault = function() { |
| 927 | | this.returnValue = false; |
| 928 | | }; |
| 929 | | |
| 930 | | event.stopPropagation = function() { |
| 931 | | this.cancelBubble = true; |
| 932 | | }; |
| 933 | | } |
| 934 | | |
| 935 | | return event; |
| 936 | | } |
| 937 | | |
| 938 | | } |
| 939 | | }); |
| 940 | | |
| 941 | | new function() { |
| 942 | | var b = navigator.userAgent.toLowerCase(); |
| 943 | | |
| 944 | | // Figure out what browser is being used |
| 945 | | jQuery.browser = { |
| 946 | | safari: /webkit/.test(b), |
| 947 | | opera: /opera/.test(b), |
| 948 | | msie: /msie/.test(b) && !/opera/.test(b), |
| 949 | | mozilla: /mozilla/.test(b) && !/compatible/.test(b) |
| 950 | | }; |
| 951 | | |
| 952 | | // Check to see if the W3C box model is being used |
| 953 | | jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat"; |
| 954 | | }; |
| 955 | | |
| 956 | | jQuery.macros = { |
| 957 | | to: { |
| 958 | | appendTo: "append", |
| 959 | | prependTo: "prepend", |
| 960 | | insertBefore: "before", |
| 961 | | insertAfter: "after" |
| 962 | | }, |
| 963 | | |
| 964 | | |
| 965 | | css: "width,height,top,left,position,float,overflow,color,background".split(","), |
| 966 | | |
| 967 | | filter: [ "eq", "lt", "gt", "contains" ], |
| 968 | | |
| 969 | | attr: { |
| 970 | | |
| 971 | | val: "value", |
| 972 | | |
| 973 | | html: "innerHTML", |
| 974 | | |
| 975 | | id: null, |
| 976 | | |
| 977 | | title: null, |
| 978 | | |
| 979 | | name: null, |
| 980 | | |
| 981 | | href: null, |
| 982 | | |
| 983 | | src: null, |
| 984 | | |
| 985 | | rel: null |
| 986 | | }, |
| 987 | | |
| 988 | | axis: { |
| 989 | | |
| 990 | | parent: "a.parentNode", |
| 991 | | |
| 992 | | ancestors: jQuery.parents, |
| 993 | | |
| 994 | | parents: jQuery.parents, |
| 995 | | |
| 996 | | next: "jQuery.sibling(a).next", |
| 997 | | |
| 998 | | prev: "jQuery.sibling(a).prev", |
| 999 | | |
| 1000 | | siblings: jQuery.sibling, |
| 1001 | | |
| 1002 | | children: "jQuery.sibling(a.firstChild)" |
| 1003 | | }, |
| 1004 | | |
| 1005 | | each: { |
| 1006 | | |
| 1007 | | removeAttr: function( key ) { |
| 1008 | | this.removeAttribute( key ); |
| 1009 | | }, |
| 1010 | | show: function(){ |
| 1011 | | this.style.display = this.oldblock ? this.oldblock : ""; |
| 1012 | | if ( jQuery.css(this,"display") == "none" ) |
| 1013 | | this.style.display = "block"; |
| 1014 | | }, |
| 1015 | | hide: function(){ |
| 1016 | | this.oldblock = this.oldblock || jQuery.css(this,"display"); |
| 1017 | | if ( this.oldblock == "none" ) |
| 1018 | | this.oldblock = "block"; |
| 1019 | | this.style.display = "none"; |
| 1020 | | }, |
| 1021 | | toggle: function(){ |
| 1022 | | $(this)[ $(this).is(":hidden") ? "show" : "hide" ].apply( $(this), arguments ); |
| 1023 | | }, |
| 1024 | | addClass: function(c){ |
| 1025 | | jQuery.className.add(this,c); |
| 1026 | | }, |
| 1027 | | removeClass: function(c){ |
| 1028 | | jQuery.className.remove(this,c); |
| 1029 | | }, |
| 1030 | | toggleClass: function( c ){ |
| 1031 | | jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this,c); |
| 1032 | | }, |
| 1033 | | |
| 1034 | | remove: function(a){ |
| 1035 | | if ( !a || jQuery.filter( a, [this] ).r ) |
| 1036 | | this.parentNode.removeChild( this ); |
| 1037 | | }, |
| 1038 | | empty: function(){ |
| 1039 | | while ( this.firstChild ) |
| 1040 | | this.removeChild( this.firstChild ); |
| 1041 | | }, |
| 1042 | | bind: function( type, fn ) { |
| 1043 | | if ( fn.constructor == String ) |
| 1044 | | fn = new Function("e", ( !fn.indexOf(".") ? "$(this)" : "return " ) + fn); |
| 1045 | | jQuery.event.add( this, type, fn ); |
| 1046 | | }, |
| 1047 | | |
| 1048 | | unbind: function( type, fn ) { |
| 1049 | | jQuery.event.remove( this, type, fn ); |
| 1050 | | }, |
| 1051 | | trigger: function( type, data ) { |
| 1052 | | jQuery.event.trigger( type, data, this ); |
| 1053 | | } |
| 1054 | | } |
| 1055 | | }; |
| 1056 | | |
| 1057 | | jQuery.init(); |
| 1058 | | jQuery.fn.extend({ |
| 1059 | | |
| 1060 | | // We're overriding the old toggle function, so |
| 1061 | | // remember it for later |
| 1062 | | _toggle: jQuery.fn.toggle, |
| 1063 | | toggle: function(a,b) { |
| 1064 | | // If two functions are passed in, we're |
| 1065 | | // toggling on a click |
| 1066 | | return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ |
| 1067 | | // Figure out which function to execute |
| 1068 | | this.last = this.last == a ? b : a; |
| 1069 | | |
| 1070 | | // Make sure that clicks stop |
| 1071 | | e.preventDefault(); |
| 1072 | | |
| 1073 | | // and execute the function |
| 1074 | | return this.last.apply( this, [e] ) || false; |
| 1075 | | }) : |
| 1076 | | |
| 1077 | | // Otherwise, execute the old toggle function |
| 1078 | | this._toggle.apply( this, arguments ); |
| 1079 | | }, |
| 1080 | | |
| 1081 | | hover: function(f,g) { |
| 1082 | | |
| 1083 | | // A private function for haandling mouse 'hovering' |
| 1084 | | function handleHover(e) { |
| 1085 | | // Check if mouse(over|out) are still within the same parent element |
| 1086 | | var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; |
| 1087 | | |
| 1088 | | // Traverse up the tree |
| 1089 | | while ( p && p != this ) p = p.parentNode; |
| 1090 | | |
| 1091 | | // If we actually just moused on to a sub-element, ignore it |
| 1092 | | if ( p == this ) return false; |
| 1093 | | |
| 1094 | | // Execute the right function |
| 1095 | | return (e.type == "mouseover" ? f : g).apply(this, [e]); |
| 1096 | | } |
| 1097 | | |
| 1098 | | // Bind the function to the two event listeners |
| 1099 | | return this.mouseover(handleHover).mouseout(handleHover); |
| 1100 | | }, |
| 1101 | | ready: function(f) { |
| 1102 | | // If the DOM is already ready |
| 1103 | | if ( jQuery.isReady ) |
| 1104 | | // Execute the function immediately |
| 1105 | | f.apply( document ); |
| 1106 | | |
| 1107 | | // Otherwise, remember the function for later |
| 1108 | | else { |
| 1109 | | // Add the function to the wait list |
| 1110 | | jQuery.readyList.push( f ); |
| 1111 | | } |
| 1112 | | |
| 1113 | | return this; |
| 1114 | | } |
| 1115 | | }); |
| 1116 | | |
| 1117 | | jQuery.extend({ |
| 1118 | | /* |
| 1119 | | * All the code that makes DOM Ready work nicely. |
| 1120 | | */ |
| 1121 | | isReady: false, |
| 1122 | | readyList: [], |
| 1123 | | |
| 1124 | | // Handle when the DOM is ready |
| 1125 | | ready: function() { |
| 1126 | | // Make sure that the DOM is not already loaded |
| 1127 | | if ( !jQuery.isReady ) { |
| 1128 | | // Remember that the DOM is ready |
| 1129 | | jQuery.isReady = true; |
| 1130 | | |
| 1131 | | // If there are functions bound, to execute |
| 1132 | | if ( jQuery.readyList ) { |
| 1133 | | // Execute all of them |
| 1134 | | for ( var i = 0; i < jQuery.readyList.length; i++ ) |
| 1135 | | jQuery.readyList[i].apply( document ); |
| 1136 | | |
| 1137 | | // Reset the list of functions |
| 1138 | | jQuery.readyList = null; |
| 1139 | | } |
| 1140 | | } |
| 1141 | | } |
| 1142 | | }); |
| 1143 | | |
| 1144 | | new function(){ |
| 1145 | | |
| 1146 | | var e = ("blur,focus,load,resize,scroll,unload,click,dblclick," + |
| 1147 | | "mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select," + |
| 1148 | | "submit,keydown,keypress,keyup,error").split(","); |
| 1149 | | |
| 1150 | | // Go through all the event names, but make sure that |
| 1151 | | // it is enclosed properly |
| 1152 | | for ( var i = 0; i < e.length; i++ ) new function(){ |
| 1153 | | |
| 1154 | | var o = e[i]; |
| 1155 | | |
| 1156 | | // Handle event binding |
| 1157 | | jQuery.fn[o] = function(f){ |
| 1158 | | return f ? this.bind(o, f) : this.trigger(o); |
| 1159 | | }; |
| 1160 | | |
| 1161 | | // Handle event unbinding |
| 1162 | | jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; |
| 1163 | | |
| 1164 | | // Finally, handle events that only fire once |
| 1165 | | jQuery.fn["one"+o] = function(f){ |
| 1166 | | // Attach the event listener |
| 1167 | | return this.each(function(){ |
| 1168 | | |
| 1169 | | var count = 0; |
| 1170 | | |
| 1171 | | // Add the event |
| 1172 | | jQuery.event.add( this, o, function(e){ |
| 1173 | | // If this function has already been executed, stop |
| 1174 | | if ( count++ ) return; |
| 1175 | | |
| 1176 | | // And execute the bound function |
| 1177 | | return f.apply(this, [e]); |
| 1178 | | }); |
| 1179 | | }); |
| 1180 | | }; |
| 1181 | | |
| 1182 | | }; |
| 1183 | | |
| 1184 | | // If Mozilla is used |
| 1185 | | if ( jQuery.browser.mozilla || jQuery.browser.opera ) { |
| 1186 | | // Use the handy event callback |
| 1187 | | document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); |
| 1188 | | |
| 1189 | | // If IE is used, use the excellent hack by Matthias Miller |
| 1190 | | // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited |
| 1191 | | } else if ( jQuery.browser.msie ) { |
| 1192 | | |
| 1193 | | // Only works if you document.write() it |
| 1194 | | document.write("<scr" + "ipt id=__ie_init defer=true " + |
| 1195 | | "src=//:><\/script>"); |
| 1196 | | |
| 1197 | | // Use the defer script hack |
| 1198 | | var script = document.getElementById("__ie_init"); |
| 1199 | | script.onreadystatechange = function() { |
| 1200 | | if ( this.readyState != "complete" ) return; |
| 1201 | | this.parentNode.removeChild( this ); |
| 1202 | | jQuery.ready(); |
| 1203 | | }; |
| 1204 | | |
| 1205 | | // Clear from memory |
| 1206 | | script = null; |
| 1207 | | |
| 1208 | | // If Safari is used |
| 1209 | | } else if ( jQuery.browser.safari ) { |
| 1210 | | // Continually check to see if the document.readyState is valid |
| 1211 | | jQuery.safariTimer = setInterval(function(){ |
| 1212 | | // loaded and complete are both valid states |
| 1213 | | if ( document.readyState == "loaded" || |
| 1214 | | document.readyState == "complete" ) { |
| 1215 | | |
| 1216 | | // If either one are found, remove the timer |
| 1217 | | clearInterval( jQuery.safariTimer ); |
| 1218 | | jQuery.safariTimer = null; |
| 1219 | | |
| 1220 | | // and execute any waiting functions |
| 1221 | | jQuery.ready(); |
| 1222 | | } |
| 1223 | | }, 10); |
| 1224 | | } |
| 1225 | | |
| 1226 | | // A fallback to window.onload, that will always work |
| 1227 | | jQuery.event.add( window, "load", jQuery.ready ); |
| 1228 | | |
| 1229 | | }; |
| 1230 | | jQuery.fn.extend({ |
| 1231 | | |
| 1232 | | // overwrite the old show method |
| 1233 | | _show: jQuery.fn.show, |
| 1234 | | |
| 1235 | | show: function(speed,callback){ |
| 1236 | | return speed ? this.animate({ |
| 1237 | | height: "show", width: "show", opacity: "show" |
| 1238 | | }, speed, callback) : this._show(); |
| 1239 | | }, |
| 1240 | | |
| 1241 | | // Overwrite the old hide method |
| 1242 | | _hide: jQuery.fn.hide, |
| 1243 | | |
| 1244 | | hide: function(speed,callback){ |
| 1245 | | return speed ? this.animate({ |
| 1246 | | height: "hide", width: "hide", opacity: "hide" |
| 1247 | | }, speed, callback) : this._hide(); |
| 1248 | | }, |
| 1249 | | |
| 1250 | | slideDown: function(speed,callback){ |
| 1251 | | return this.animate({height: "show"}, speed, callback); |
| 1252 | | }, |
| 1253 | | |
| 1254 | | slideUp: function(speed,callback){ |
| 1255 | | return this.animate({height: "hide"}, speed, callback); |
| 1256 | | }, |
| 1257 | | |
| 1258 | | slideToggle: function(speed,callback){ |
| 1259 | | return this.each(function(){ |
| 1260 | | var state = $(this).is(":hidden") ? "show" : "hide"; |
| 1261 | | $(this).animate({height: state}, speed, callback); |
| 1262 | | }); |
| 1263 | | }, |
| 1264 | | |
| 1265 | | fadeIn: function(speed,callback){ |
| 1266 | | return this.animate({opacity: "show"}, speed, callback); |
| 1267 | | }, |
| 1268 | | |
| 1269 | | fadeOut: function(speed,callback){ |
| 1270 | | return this.animate({opacity: "hide"}, speed, callback); |
| 1271 | | }, |
| 1272 | | |
| 1273 | | fadeTo: function(speed,to,callback){ |
| 1274 | | return this.animate({opacity: to}, speed, callback); |
| 1275 | | }, |
| 1276 | | animate: function(prop,speed,callback) { |
| 1277 | | return this.queue(function(){ |
| 1278 | | |
| 1279 | | this.curAnim = prop; |
| 1280 | | |
| 1281 | | for ( var p in prop ) { |
| 1282 | | var e = new jQuery.fx( this, jQuery.speed(speed,callback), p ); |
| 1283 | | if ( prop[p].constructor == Number ) |
| 1284 | | e.custom( e.cur(), prop[p] ); |
| 1285 | | else |
| 1286 | | e[ prop[p] ]( prop ); |
| 1287 | | } |
| 1288 | | |
| 1289 | | }); |
| 1290 | | }, |
| 1291 | | queue: function(type,fn){ |
| 1292 | | if ( !fn ) { |
| 1293 | | fn = type; |
| 1294 | | type = "fx"; |
| 1295 | | } |
| 1296 | | |
| 1297 | | return this.each(function(){ |
| 1298 | | if ( !this.queue ) |
| 1299 | | this.queue = {}; |
| 1300 | | |
| 1301 | | if ( !this.queue[type] ) |
| 1302 | | this.queue[type] = []; |
| 1303 | | |
| 1304 | | this.queue[type].push( fn ); |
| 1305 | | |
| 1306 | | if ( this.queue[type].length == 1 ) |
| 1307 | | fn.apply(this); |
| 1308 | | }); |
| 1309 | | } |
| 1310 | | |
| 1311 | | }); |
| 1312 | | |
| 1313 | | jQuery.extend({ |
| 1314 | | |
| 1315 | | setAuto: function(e,p) { |
| 1316 | | if ( e.notAuto ) return; |
| 1317 | | |
| 1318 | | if ( p == "height" && e.scrollHeight != parseInt(jQuery.curCSS(e,p)) ) return; |
| 1319 | | if ( p == "width" && e.scrollWidth != parseInt(jQuery.curCSS(e,p)) ) return; |
| 1320 | | |
| 1321 | | // Remember the original height |
| 1322 | | var a = e.style[p]; |
| 1323 | | |
| 1324 | | // Figure out the size of the height right now |
| 1325 | | var o = jQuery.curCSS(e,p,1); |
| 1326 | | |
| 1327 | | if ( p == "height" && e.scrollHeight != o || |
| 1328 | | p == "width" && e.scrollWidth != o ) return; |
| 1329 | | |
| 1330 | | // Set the height to auto |
| 1331 | | e.style[p] = e.currentStyle ? "" : "auto"; |
| 1332 | | |
| 1333 | | // See what the size of "auto" is |
| 1334 | | var n = jQuery.curCSS(e,p,1); |
| 1335 | | |
| 1336 | | // Revert back to the original size |
| 1337 | | if ( o != n && n != "auto" ) { |
| 1338 | | e.style[p] = a; |
| 1339 | | e.notAuto = true; |
| 1340 | | } |
| 1341 | | }, |
| 1342 | | |
| 1343 | | speed: function(s,o) { |
| 1344 | | o = o || {}; |
| 1345 | | |
| 1346 | | if ( o.constructor == Function ) |
| 1347 | | o = { complete: o }; |
| 1348 | | |
| 1349 | | var ss = { slow: 600, fast: 200 }; |
| 1350 | | o.duration = (s && s.constructor == Number ? s : ss[s]) || 400; |
| 1351 | | |
| 1352 | | // Queueing |
| 1353 | | o.oldComplete = o.complete; |
| 1354 | | o.complete = function(){ |
| 1355 | | jQuery.dequeue(this, "fx"); |
| 1356 | | if ( o.oldComplete && o.oldComplete.constructor == Function ) |
| 1357 | | o.oldComplete.apply( this ); |
| 1358 | | }; |
| 1359 | | |
| 1360 | | return o; |
| 1361 | | }, |
| 1362 | | |
| 1363 | | queue: {}, |
| 1364 | | |
| 1365 | | dequeue: function(elem,type){ |
| 1366 | | type = type || "fx"; |
| 1367 | | |
| 1368 | | if ( elem.queue && elem.queue[type] ) { |
| 1369 | | // Remove self |
| 1370 | | elem.queue[type].shift(); |
| 1371 | | |
| 1372 | | // Get next function |
| 1373 | | var f = elem.queue[type][0]; |
| 1374 | | |
| 1375 | | if ( f ) f.apply( elem ); |
| 1376 | | } |
| 1377 | | }, |
| 1378 | | |
| 1379 | | /* |
| 1380 | | * I originally wrote fx() as a clone of moo.fx and in the process |
| 1381 | | * of making it small in size the code became illegible to sane |
| 1382 | | * people. You've been warned. |
| 1383 | | */ |
| 1384 | | |
| 1385 | | fx: function( elem, options, prop ){ |
| 1386 | | |
| 1387 | | var z = this; |
| 1388 | | |
| 1389 | | // The users options |
| 1390 | | z.o = { |
| 1391 | | duration: options.duration || 400, |
| 1392 | | complete: options.complete, |
| 1393 | | step: options.step |
| 1394 | | }; |
| 1395 | | |
| 1396 | | // The element |
| 1397 | | z.el = elem; |
| 1398 | | |
| 1399 | | // The styles |
| 1400 | | var y = z.el.style; |
| 1401 | | |
| 1402 | | // Simple function for setting a style value |
| 1403 | | z.a = function(){ |
| 1404 | | if ( options.step ) |
| 1405 | | options.step.apply( elem, [ z.now ] ); |
| 1406 | | |
| 1407 | | if ( prop == "opacity" ) { |
| 1408 | | if (jQuery.browser.mozilla && z.now == 1) z.now = 0.9999; |
| 1409 | | if (window.ActiveXObject) |
| 1410 | | y.filter = "alpha(opacity=" + z.now*100 + ")"; |
| 1411 | | else |
| 1412 | | y.opacity = z.now; |
| 1413 | | |
| 1414 | | // My hate for IE will never die |
| 1415 | | } else if ( parseInt(z.now) ) |
| 1416 | | y[prop] = parseInt(z.now) + "px"; |
| 1417 | | |
| 1418 | | y.display = "block"; |
| 1419 | | }; |
| 1420 | | |
| 1421 | | // Figure out the maximum number to run to |
| 1422 | | z.max = function(){ |
| 1423 | | return parseFloat( jQuery.css(z.el,prop) ); |
| 1424 | | }; |
| 1425 | | |
| 1426 | | // Get the current size |
| 1427 | | z.cur = function(){ |
| 1428 | | var r = parseFloat( jQuery.curCSS(z.el, prop) ); |
| 1429 | | return r && r > -10000 ? r : z.max(); |
| 1430 | | }; |
| 1431 | | |
| 1432 | | // Start an animation from one number to another |
| 1433 | | z.custom = function(from,to){ |
| 1434 | | z.startTime = (new Date()).getTime(); |
| 1435 | | z.now = from; |
| 1436 | | z.a(); |
| 1437 | | |
| 1438 | | z.timer = setInterval(function(){ |
| 1439 | | z.step(from, to); |
| 1440 | | }, 13); |
| 1441 | | }; |
| 1442 | | |
| 1443 | | // Simple 'show' function |
| 1444 | | z.show = function( p ){ |
| 1445 | | if ( !z.el.orig ) z.el.orig = {}; |
| 1446 | | |
| 1447 | | // Remember where we started, so that we can go back to it later |
| 1448 | | z.el.orig[prop] = this.cur(); |
| 1449 | | |
| 1450 | | z.custom( 0, z.el.orig[prop] ); |
| 1451 | | |
| 1452 | | // Stupid IE, look what you made me do |
| 1453 | | if ( prop != "opacity" ) |
| 1454 | | y[prop] = "1px"; |
| 1455 | | }; |
| 1456 | | |
| 1457 | | // Simple 'hide' function |
| 1458 | | z.hide = function(){ |
| 1459 | | if ( !z.el.orig ) z.el.orig = {}; |
| 1460 | | |
| 1461 | | // Remember where we started, so that we can go back to it later |
| 1462 | | z.el.orig[prop] = this.cur(); |
| 1463 | | |
| 1464 | | z.o.hide = true; |
| 1465 | | |
| 1466 | | // Begin the animation |
| 1467 | | z.custom(z.el.orig[prop], 0); |
| 1468 | | }; |
| 1469 | | |
| 1470 | | // IE has trouble with opacity if it does not have layout |
| 1471 | | if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) |
| 1472 | | y.zoom = "1"; |
| 1473 | | |
| 1474 | | // Remember the overflow of the element |
| 1475 | | if ( !z.el.oldOverlay ) |
| 1476 | | z.el.oldOverflow = jQuery.css( z.el, "overflow" ); |
| 1477 | | |
| 1478 | | // Make sure that nothing sneaks out |
| 1479 | | y.overflow = "hidden"; |
| 1480 | | |
| 1481 | | // Each step of an animation |
| 1482 | | z.step = function(firstNum, lastNum){ |
| 1483 | | var t = (new Date()).getTime(); |
| 1484 | | |
| 1485 | | if (t > z.o.duration + z.startTime) { |
| 1486 | | // Stop the timer |
| 1487 | | clearInterval(z.timer); |
| 1488 | | z.timer = null; |
| 1489 | | |
| 1490 | | z.now = lastNum; |
| 1491 | | z.a(); |
| 1492 | | |
| 1493 | | z.el.curAnim[ prop ] = true; |
| 1494 | | |
| 1495 | | var done = true; |
| 1496 | | for ( var i in z.el.curAnim ) |
| 1497 | | if ( z.el.curAnim[i] !== true ) |
| 1498 | | done = false; |
| 1499 | | |
| 1500 | | if ( done ) { |
| 1501 | | // Reset the overflow |
| 1502 | | y.overflow = z.el.oldOverflow; |
| 1503 | | |
| 1504 | | // Hide the element if the "hide" operation was done |
| 1505 | | if ( z.o.hide ) |
| 1506 | | y.display = 'none'; |
| 1507 | | |
| 1508 | | // Reset the property, if the item has been hidden |
| 1509 | | if ( z.o.hide ) { |
| 1510 | | for ( var p in z.el.curAnim ) { |
| 1511 | | y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" ); |
| 1512 | | |
| 1513 | | // set its height and/or width to auto |
| 1514 | | if ( p == 'height' || p == 'width' ) |
| 1515 | | jQuery.setAuto( z.el, p ); |
| 1516 | | } |
| 1517 | | } |
| 1518 | | } |
| 1519 | | |
| 1520 | | // If a callback was provided, execute it |
| 1521 | | if( done && z.o.complete && z.o.complete.constructor == Function ) |
| 1522 | | // Execute the complete function |
| 1523 | | z.o.complete.apply( z.el ); |
| 1524 | | } else { |
| 1525 | | // Figure out where in the animation we are and set the number |
| 1526 | | var p = (t - this.startTime) / z.o.duration; |
| 1527 | | z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; |
| 1528 | | |
| 1529 | | // Perform the next step of the animation |
| 1530 | | z.a(); |
| 1531 | | } |
| 1532 | | }; |
| 1533 | | |
| 1534 | | } |
| 1535 | | |
| 1536 | | }); |
| 1537 | | // AJAX Plugin |
| 1538 | | // Docs Here: |
| 1539 | | // http://jquery.com/docs/ajax/ |
| 1540 | | jQuery.fn.loadIfModified = function( url, params, callback ) { |
| 1541 | | this.load( url, params, callback, 1 ); |
| 1542 | | }; |
| 1543 | | |
| 1544 | | jQuery.fn.load = function( url, params, callback, ifModified ) { |
| 1545 | | if ( url.constructor == Function ) |
| 1546 | | return this.bind("load", url); |
| 1547 | | |
| 1548 | | callback = callback || function(){}; |
| 1549 | | |
| 1550 | | // Default to a GET request |
| 1551 | | var type = "GET"; |
| 1552 | | |
| 1553 | | // If the second parameter was provided |
| 1554 | | if ( params ) { |
| 1555 | | // If it's a function |
| 1556 | | if ( params.constructor == Function ) { |
| 1557 | | // We assume that it's the callback |
| 1558 | | callback = params; |
| 1559 | | params = null; |
| 1560 | | |
| 1561 | | // Otherwise, build a param string |
| 1562 | | } else { |
| 1563 | | params = jQuery.param( params ); |
| 1564 | | type = "POST"; |
| 1565 | | } |
| 1566 | | } |
| 1567 | | |
| 1568 | | var self = this; |
| 1569 | | |
| 1570 | | // Request the remote document |
| 1571 | | jQuery.ajax( type, url, params,function(res, status){ |
| 1572 | | |
| 1573 | | if ( status == "success" || !ifModified && status == "notmodified" ) { |
| 1574 | | // Inject the HTML into all the matched elements |
| 1575 | | self.html(res.responseText).each( callback, [res.responseText, status] ); |
| 1576 | | |
| 1577 | | // Execute all the scripts inside of the newly-injected HTML |
| 1578 | | $("script", self).each(function(){ |
| 1579 | | if ( this.src ) |
| 1580 | | $.getScript( this.src ); |
| 1581 | | else |
| 1582 | | eval.call( window, this.text || this.textContent || this.innerHTML || "" ); |
| 1583 | | }); |
| 1584 | | } else |
| 1585 | | callback.apply( self, [res.responseText, status] ); |
| 1586 | | |
| 1587 | | }, ifModified); |
| 1588 | | |
| 1589 | | return this; |
| 1590 | | }; |
| 1591 | | |
| 1592 | | // If IE is used, create a wrapper for the XMLHttpRequest object |
| 1593 | | if ( jQuery.browser.msie && typeof XMLHttpRequest == "undefined" ) |
| 1594 | | XMLHttpRequest = function(){ |
| 1595 | | return new ActiveXObject( |
| 1596 | | navigator.userAgent.indexOf("MSIE 5") >= 0 ? |
| 1597 | | "Microsoft.XMLHTTP" : "Msxml2.XMLHTTP" |
| 1598 | | ); |
| 1599 | | }; |
| 1600 | | |
| 1601 | | // Attach a bunch of functions for handling common AJAX events |
| 1602 | | new function(){ |
| 1603 | | var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(','); |
| 1604 | | |
| 1605 | | for ( var i = 0; i < e.length; i++ ) new function(){ |
| 1606 | | var o = e[i]; |
| 1607 | | jQuery.fn[o] = function(f){ |
| 1608 | | return this.bind(o, f); |
| 1609 | | }; |
| 1610 | | }; |
| 1611 | | }; |
| 1612 | | |
| 1613 | | jQuery.extend({ |
| 1614 | | get: function( url, data, callback, type, ifModified ) { |
| 1615 | | if ( data.constructor == Function ) { |
| 1616 | | type = callback; |
| 1617 | | callback = data; |
| 1618 | | data = null; |
| 1619 | | } |
| 1620 | | |
| 1621 | | if ( data ) url += "?" + jQuery.param(data); |
| 1622 | | |
| 1623 | | // Build and start the HTTP Request |
| 1624 | | jQuery.ajax( "GET", url, null, function(r, status) { |
| 1625 | | if ( callback ) callback( jQuery.httpData(r,type), status ); |
| 1626 | | }, ifModified); |
| 1627 | | }, |
| 1628 | | |
| 1629 | | getIfModified: function( url, data, callback, type ) { |
| 1630 | | jQuery.get(url, data, callback, type, 1); |
| 1631 | | }, |
| 1632 | | |
| 1633 | | getScript: function( url, data, callback ) { |
| 1634 | | jQuery.get(url, data, callback, "script"); |
| 1635 | | }, |
| 1636 | | post: function( url, data, callback, type ) { |
| 1637 | | // Build and start the HTTP Request |
| 1638 | | jQuery.ajax( "POST", url, jQuery.param(data), function(r, status) { |
| 1639 | | if ( callback ) callback( jQuery.httpData(r,type), status ); |
| 1640 | | }); |
| 1641 | | }, |
| 1642 | | |
| 1643 | | // timeout (ms) |
| 1644 | | timeout: 0, |
| 1645 | | |
| 1646 | | ajaxTimeout: function(timeout) { |
| 1647 | | jQuery.timeout = timeout; |
| 1648 | | }, |
| 1649 | | |
| 1650 | | // Last-Modified header cache for next request |
| 1651 | | lastModified: {}, |
| 1652 | | ajax: function( type, url, data, ret, ifModified ) { |
| 1653 | | // If only a single argument was passed in, |
| 1654 | | // assume that it is a object of key/value pairs |
| 1655 | | if ( !url ) { |
| 1656 | | ret = type.complete; |
| 1657 | | var success = type.success; |
| 1658 | | var error = type.error; |
| 1659 | | data = type.data; |
| 1660 | | url = type.url; |
| 1661 | | type = type.type; |
| 1662 | | } |
| 1663 | | |
| 1664 | | // Watch for a new set of requests |
| 1665 | | if ( ! jQuery.active++ ) |
| 1666 | | jQuery.event.trigger( "ajaxStart" ); |
| 1667 | | |
| 1668 | | var requestDone = false; |
| 1669 | | |
| 1670 | | // Create the request object |
| 1671 | | var xml = new XMLHttpRequest(); |
| 1672 | | |
| 1673 | | // Open the socket |
| 1674 | | xml.open(type || "GET", url, true); |
| 1675 | | |
| 1676 | | // Set the correct header, if data is being sent |
| 1677 | | if ( data ) |
| 1678 | | xml.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); |
| 1679 | | |
| 1680 | | // Set the If-Modified-Since header, if ifModified mode. |
| 1681 | | if ( ifModified ) |
| 1682 | | xml.setRequestHeader("If-Modified-Since", |
| 1683 | | jQuery.lastModified[url] || "Thu, 01 Jan 1970 00:00:00 GMT" ); |
| 1684 | | |
| 1685 | | // Set header so calling script knows that it's an XMLHttpRequest |
| 1686 | | xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); |
| 1687 | | |
| 1688 | | // Make sure the browser sends the right content length |
| 1689 | | if ( xml.overrideMimeType ) |
| 1690 | | xml.setRequestHeader("Connection", "close"); |
| 1691 | | |
| 1692 | | // Wait for a response to come back |
| 1693 | | var onreadystatechange = function(istimeout){ |
| 1694 | | // The transfer is complete and the data is available, or the request timed out |
| 1695 | | if ( xml && (xml.readyState == 4 || istimeout == "timeout") ) { |
| 1696 | | requestDone = true; |
| 1697 | | |
| 1698 | | var status = jQuery.httpSuccess( xml ) && istimeout != "timeout" ? |
| 1699 | | ifModified && jQuery.httpNotModified( xml, url ) ? "notmodified" : "success" : "error"; |
| 1700 | | |
| 1701 | | // Make sure that the request was successful or notmodified |
| 1702 | | if ( status != "error" ) { |
| 1703 | | // Cache Last-Modified header, if ifModified mode. |
| 1704 | | var modRes = xml.getResponseHeader("Last-Modified"); |
| 1705 | | if ( ifModified && modRes ) jQuery.lastModified[url] = modRes; |
| 1706 | | |
| 1707 | | // If a local callback was specified, fire it |
| 1708 | | if ( success ) success( xml, status ); |
| 1709 | | |
| 1710 | | // Fire the global callback |
| 1711 | | jQuery.event.trigger( "ajaxSuccess" ); |
| 1712 | | |
| 1713 | | // Otherwise, the request was not successful |
| 1714 | | } else { |
| 1715 | | // If a local callback was specified, fire it |
| 1716 | | if ( error ) error( xml, status ); |
| 1717 | | |
| 1718 | | // Fire the global callback |
| 1719 | | jQuery.event.trigger( "ajaxError" ); |
| 1720 | | } |
| 1721 | | |
| 1722 | | // The request was completed |
| 1723 | | jQuery.event.trigger( "ajaxComplete" ); |
| 1724 | | |
| 1725 | | // Handle the global AJAX counter |
| 1726 | | if ( ! --jQuery.active ) |
| 1727 | | jQuery.event.trigger( "ajaxStop" ); |
| 1728 | | |
| 1729 | | // Process result |
| 1730 | | if ( ret ) ret(xml, status); |
| 1731 | | |
| 1732 | | // Stop memory leaks |
| 1733 | | xml.onreadystatechange = function(){}; |
| 1734 | | xml = null; |
| 1735 | | |
| 1736 | | } |
| 1737 | | }; |
| 1738 | | xml.onreadystatechange = onreadystatechange; |
| 1739 | | |
| 1740 | | // Timeout checker |
| 1741 | | if(jQuery.timeout > 0) |
| 1742 | | setTimeout(function(){ |
| 1743 | | // Check to see if the request is still happening |
| 1744 | | if (xml) { |
| 1745 | | // Cancel the request |
| 1746 | | xml.abort(); |
| 1747 | | |
| 1748 | | if ( !requestDone ) onreadystatechange( "timeout" ); |
| 1749 | | |
| 1750 | | // Clear from memory |
| 1751 | | xml = null; |
| 1752 | | } |
| 1753 | | }, jQuery.timeout); |
| 1754 | | |
| 1755 | | // Send the data |
| 1756 | | xml.send(data); |
| 1757 | | }, |
| 1758 | | |
| 1759 | | // Counter for holding the number of active queries |
| 1760 | | active: 0, |
| 1761 | | |
| 1762 | | // Determines if an XMLHttpRequest was successful or not |
| 1763 | | httpSuccess: function(r) { |
| 1764 | | try { |
| 1765 | | return !r.status && location.protocol == "file:" || |
| 1766 | | ( r.status >= 200 && r.status < 300 ) || r.status == 304 || |
| 1767 | | jQuery.browser.safari && r.status == undefined; |
| 1768 | | } catch(e){} |
| 1769 | | |
| 1770 | | return false; |
| 1771 | | }, |
| 1772 | | |
| 1773 | | // Determines if an XMLHttpRequest returns NotModified |
| 1774 | | httpNotModified: function(xml, url) { |
| 1775 | | try { |
| 1776 | | var xmlRes = xml.getResponseHeader("Last-Modified"); |
| 1777 | | |
| 1778 | | // Firefox always returns 200. check Last-Modified date |
| 1779 | | return xml.status == 304 || xmlRes == jQuery.lastModified[url] || |
| 1780 | | jQuery.browser.safari && xml.status == undefined; |
| 1781 | | } catch(e){} |
| 1782 | | |
| 1783 | | return false; |
| 1784 | | }, |
| 1785 | | |
| 1786 | | // Get the data out of an XMLHttpRequest. |
| 1787 | | // Return parsed XML if content-type header is "xml" and type is "xml" or omitted, |
| 1788 | | // otherwise return plain text. |
| 1789 | | httpData: function(r,type) { |
| 1790 | | var ct = r.getResponseHeader("content-type"); |
| 1791 | | var data = !type && ct && ct.indexOf("xml") >= 0; |
| 1792 | | data = type == "xml" || data ? r.responseXML : r.responseText; |
| 1793 | | |
| 1794 | | // If the type is "script", eval it |
| 1795 | | if ( type == "script" ) eval.call( window, data ); |
| 1796 | | |
| 1797 | | // Get the JavaScript object, if JSON is used. |
| 1798 | | if ( type == "json" ) eval( "data = " + data ); |
| 1799 | | |
| 1800 | | return data; |
| 1801 | | }, |
| 1802 | | |
| 1803 | | // Serialize an array of form elements or a set of |
| 1804 | | // key/values into a query string |
| 1805 | | param: function(a) { |
| 1806 | | var s = []; |
| 1807 | | |
| 1808 | | // If an array was passed in, assume that it is an array |
| 1809 | | // of form elements |
| 1810 | | if ( a.constructor == Array ) { |
| 1811 | | // Serialize the form elements |
| 1812 | | for ( var i = 0; i < a.length; i++ ) |
| 1813 | | s.push( a[i].name + "=" + encodeURIComponent( a[i].value ) ); |
| 1814 | | |
| 1815 | | // Otherwise, assume that it's an object of key/value pairs |
| 1816 | | } else { |
| 1817 | | // Serialize the key/values |
| 1818 | | for ( var j in a ) |
| 1819 | | s.push( j + "=" + encodeURIComponent( a[j] ) ); |
| 1820 | | } |
| 1821 | | |
| 1822 | | // Return the resulting serialization |
| 1823 | | return s.join("&"); |
| 1824 | | } |
| 1825 | | |
| 1826 | | }); |
| | 11 | eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(9(){6(1f C!="Q")E v=C;E C=19.16=9(a,c){6(19==7||!7.4a)F 1s C(a,c);F 7.4a(a,c)};6(1f $!="Q")E B=$;19.$=C;E q=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;C.15=C.3v={4a:9(a,c){a=a||R;6(1f a=="1E"){E m=q.2d(a);6(m&&(m[1]||!c)){6(m[1])a=C.3c([m[1]]);G{E b=R.37(m[3]);6(b)6(b.2j!=m[3])F C().1F(a);G{7[0]=b;7.H=1;F 7}G a=[]}}G F 1s C(c).1F(a)}G 6(C.1g(a))F 1s C(R)[C.15.1L?"1L":"2f"](a);F 7.5J(a.1b==1K&&a||(a.3w||a.H&&a!=19&&!a.1t&&a[0]!=Q&&a[0].1t)&&C.2V(a)||[a])},3w:"1.1.4",7K:9(){F 7.H},H:0,21:9(a){F a==Q?C.2V(7):7[a]},1O:9(a){E b=C(a);b.5c=7;F b},5J:9(a){7.H=0;1K.3v.Y.T(7,a);F 7},J:9(a,b){F C.J(7,a,b)},45:9(a){E b=-1;7.J(9(i){6(7==a)b=i});F b},1j:9(f,d,e){E c=f;6(f.1b==3n)6(d==Q)F 7.H&&C[e||"1j"](7[0],f)||Q;G{c={};c[f]=d}F 7.J(9(a){I(E b 17 c)C.1j(e?7.S:7,b,C.4Q(7,c[b],e,a,b))})},1h:9(b,a){F 7.1j(b,a,"34")},2Q:9(e){6(1f e!="4P"&&e!=K)F 7.3K().3H(R.60(e));E t="";C.J(e||7,9(){C.J(7.2Z,9(){6(7.1t!=8)t+=7.1t!=1?7.5S:C.15.2Q([7])})});F t},82:9(){E a,2e=1a;F 7.J(9(){6(!a)a=C.3c(2e,7.2I);E b=a[0].3B(O);7.P.2p(b,7);20(b.1k)b=b.1k;b.4p(7)})},3H:9(){F 7.2J(1a,O,1,9(a){7.4p(a)})},5v:9(){F 7.2J(1a,O,-1,9(a){7.2p(a,7.1k)})},5u:9(){F 7.2J(1a,M,1,9(a){7.P.2p(a,7)})},5t:9(){F 7.2J(1a,M,-1,9(a){7.P.2p(a,7.2a)})},3L:9(){F 7.5c||C([])},1F:9(t){E b=C.3M(7,9(a){F C.1F(t,a)});F 7.1O(/[^+>] [^+>]/.1d(t)||t.U("..")>-1?C.4d(b):b)},7o:9(e){e=e!=Q?e:O;E d=7.1r(7.1F("*"));6(C.N.12){d.J(9(){7.2l$1i={};I(E a 17 7.$1i)7.2l$1i[a]=C.14({},7.$1i[a])}).49()}E r=7.1O(C.3M(7,9(a){F a.3B(e)}));6(C.N.12){d.J(9(){E c=7.2l$1i;I(E a 17 c)I(E b 17 c[a])C.1c.1r(7,a,c[a][b],c[a][b].V);7.2l$1i=K})}6(e){E f=r.1r(r.1F(\'*\')).1l(\'2b,39[@L=3i]\');d.1l(\'2b,39[@L=3i]\').J(9(i){6(7.3j)f[i].3j=7.3j;6(7.27)f[i].27=O})}F r},1l:9(t){F 7.1O(C.1g(t)&&C.2B(7,9(b,a){F t.T(b,[a])})||C.2R(t,7))},5l:9(t){F 7.1O(t.1b==3n&&C.2R(t,7,O)||C.2B(7,9(a){F(t.1b==1K||t.3w)?C.4K(a,t)<0:a!=t}))},1r:9(t){F 7.1O(C.29(7.21(),t.1b==3n?C(t).21():t.H!=Q&&(!t.W||t.W=="6s")?t:[t]))},3y:9(a){F a?C.2R(a,7).H>0:M},2G:9(a){F a==Q?(7.H?7[0].2A:K):7.1j("2A",a)},5W:9(a){F a==Q?(7.H?7[0].2W:K):7.3K().3H(a)},3S:9(){F 7.1O(1K.3v.3S.T(7,1a))},2J:9(f,d,g,e){E c=7.H>1,a;F 7.J(9(){6(!a){a=C.3c(f,7.2I);6(g<0)a.8E()}E b=7;6(d&&C.W(7,"1A")&&C.W(a[0],"3O"))b=7.4L("1w")[0]||7.4p(R.6a("1w"));C.J(a,9(){6(C.W(7,"33")){6(7.32)C.31({1G:7.32,2w:M,3G:"33"});G C.4E(7.2Q||7.5Z||7.2W||"")}G e.T(b,[c?7.3B(O):7])})})}};C.14=C.15.14=9(){E c=1a[0]||{},a=1,1M=1a.H,4D=M;6(c.1b==8d){4D=c;c=1a[1]||{}}6(1M==1){c=7;a=0}E b;I(;a<1M;a++)6((b=1a[a])!=K)I(E i 17 b){6(c==b[i])5X;6(4D&&1f b[i]==\'4P\'&&c[i])C.14(c[i],b[i]);G 6(b[i]!=Q)c[i]=b[i]}F c};C.14({8a:9(a){19.$=B;6(a)19.16=v;F C},1g:9(a){F!!a&&1f a!="1E"&&!a.W&&a.1b!=1K&&/9/i.1d(a+"")},3E:9(a){F a.3D&&!a.4z||a.4y&&a.2I&&!a.2I.4z},4E:9(a){a=C.2s(a);6(a){6(19.5N)19.5N(a);G 6(C.N.1H)19.4x(a,0);G 2T.2S(19,a)}},W:9(b,a){F b.W&&b.W.1I()==a.1I()},J:9(a,b,c){6(c){6(a.H==Q)I(E i 17 a)b.T(a[i],c);G I(E i=0,3A=a.H;i<3A;i++)6(b.T(a[i],c)===M)1J}G{6(a.H==Q)I(E i 17 a)b.2S(a[i],i,a[i]);G I(E i=0,3A=a.H,2G=a[0];i<3A&&b.2S(2G,i,2G)!==M;2G=a[++i]){}}F a},4Q:9(c,b,d,e,a){6(C.1g(b))b=b.2S(c,[e]);E f=/z-?45|7S-?7Q|1e|5y|7O-?1u/i;F b&&b.1b==3x&&d=="34"&&!f.1d(a)?b+"4t":b},18:{1r:9(b,c){C.J((c||"").2M(/\\s+/),9(i,a){6(!C.18.2N(b.18,a))b.18+=(b.18?" ":"")+a})},23:9(b,c){b.18=c!=Q?C.2B(b.18.2M(/\\s+/),9(a){F!C.18.2N(c,a)}).5w(" "):""},2N:9(t,c){F C.4K(c,(t.18||t).3s().2M(/\\s+/))>-1}},1V:9(e,o,f){I(E i 17 o){e.S["2U"+i]=e.S[i];e.S[i]=o[i]}f.T(e,[]);I(E i 17 o)e.S[i]=e.S["2U"+i]},1h:9(e,p){6(p=="1u"||p=="24"){E b={},3p,3o,d=["7J","7G","7F","7B"];C.J(d,9(){b["7A"+7]=0;b["7x"+7+"7u"]=0});C.1V(e,b,9(){6(C(e).3y(\':4N\')){3p=e.7t;3o=e.7q}G{e=C(e.3B(O)).1F(":4e").5d("27").3L().1h({3V:"1C",3k:"7n",11:"2m",7h:"0",7e:"0"}).57(e.P)[0];E a=C.1h(e.P,"3k")||"3g";6(a=="3g")e.P.S.3k="76";3p=e.74;3o=e.71;6(a=="3g")e.P.S.3k="3g";e.P.3e(e)}});F p=="1u"?3p:3o}F C.34(e,p)},34:9(h,d,g){E i,1R=[],1V=[];9 2E(a){6(!C.N.1H)F M;E b=R.2L.3b(a,K);F!b||b.44("2E")==""}6(d=="1e"&&C.N.12){i=C.1j(h.S,"1e");F i==""?"1":i}6(d.2k(/3a/i))d=x;6(!g&&h.S[d])i=h.S[d];G 6(R.2L&&R.2L.3b){6(d.2k(/3a/i))d="3a";d=d.1v(/([A-Z])/g,"-$1").2D();E e=R.2L.3b(h,K);6(e&&!2E(h))i=e.44(d);G{I(E a=h;a&&2E(a);a=a.P)1R.42(a);I(a=0;a<1R.H;a++)6(2E(1R[a])){1V[a]=1R[a].S.11;1R[a].S.11="2m"}i=d=="11"&&1V[1R.H-1]!=K?"1T":R.2L.3b(h,K).44(d)||"";I(a=0;a<1V.H;a++)6(1V[a]!=K)1R[a].S.11=1V[a]}6(d=="1e"&&i=="")i="1"}G 6(h.41){E f=d.1v(/\\-(\\w)/g,9(m,c){F c.1I()});i=h.41[d]||h.41[f]}F i},3c:9(a,c){E r=[];c=c||R;C.J(a,9(i,b){6(!b)F;6(b.1b==3x)b=b.3s();6(1f b=="1E"){E s=C.2s(b).2D(),1m=c.6a("1m"),1P=[];E a=!s.U("<1Z")&&[1,"<2b>","</2b>"]||!s.U("<6L")&&[1,"<4V>","</4V>"]||s.2k(/^<(6I|1w|6H|6F|6D)/)&&[1,"<1A>","</1A>"]||!s.U("<3O")&&[2,"<1A><1w>","</1w></1A>"]||(!s.U("<6A")||!s.U("<6y"))&&[3,"<1A><1w><3O>","</3O></1w></1A>"]||!s.U("<6x")&&[2,"<1A><1w></1w><4T>","</4T></1A>"]||C.N.12&&[1,"1m<1m>","</1m>"]||[0,"",""];1m.2W=a[1]+b+a[2];20(a[0]--)1m=1m.3Y;6(C.N.12){6(!s.U("<1A")&&s.U("<1w")<0)1P=1m.1k&&1m.1k.2Z;G 6(a[1]=="<1A>"&&s.U("<1w")<0)1P=1m.2Z;I(E n=1P.H-1;n>=0;--n)6(C.W(1P[n],"1w")&&!1P[n].2Z.H)1P[n].P.3e(1P[n]);6(/^\\s/.1d(b))1m.2p(c.60(b.2k(/^\\s*/)[0]),1m.1k)}b=C.2V(1m.2Z)}6(0===b.H&&(!C.W(b,"38")&&!C.W(b,"2b")))F;6(b[0]==Q||C.W(b,"38")||b.6u)r.Y(b);G r=C.29(r,b)});F r},1j:9(c,d,a){E e=C.3E(c)?{}:C.4q;6(d=="28"&&C.N.1H)c.P.3j;6(e[d]){6(a!=Q)c[e[d]]=a;F c[e[d]]}G 6(C.N.12&&d=="S")F C.1j(c.S,"6p",a);G 6(a==Q&&C.N.12&&C.W(c,"38")&&(d=="6n"||d=="6m"))F c.6k(d).5S;G 6(c.4y){6(a!=Q)c.6j(d,a);6(C.N.12&&/5R|32/.1d(d)&&!C.3E(c))F c.3F(d,2);F c.3F(d)}G{6(d=="1e"&&C.N.12){6(a!=Q){c.5y=1;c.1l=(c.1l||"").1v(/5T\\([^)]*\\)/,"")+(3m(a).3s()=="6d"?"":"5T(1e="+a*6c+")")}F c.1l?(3m(c.1l.2k(/1e=([^)]*)/)[1])/6c).3s():""}d=d.1v(/-([a-z])/8I,9(z,b){F b.1I()});6(a!=Q)c[d]=a;F c[d]}},2s:9(t){F(t||"").1v(/^\\s+|\\s+$/g,"")},2V:9(a){E r=[];6(1f a!="8H")I(E i=0,1M=a.H;i<1M;i++)r.Y(a[i]);G r=a.3S(0);F r},4K:9(b,a){I(E i=0,1M=a.H;i<1M;i++)6(a[i]==b)F i;F-1},29:9(a,b){6(C.N.12){I(E i=0;b[i];i++)6(b[i].1t!=8)a.Y(b[i])}G I(E i=0;b[i];i++)a.Y(b[i]);F a},4d:9(a){E r=[],4O=C.1q++;2g{I(E i=0,69=a.H;i<69;i++)6(4O!=a[i].1q){a[i].1q=4O;r.Y(a[i])}}2h(e){r=a}F r},1q:0,2B:9(b,a,c){6(1f a=="1E")a=2T("M||9(a,i){F "+a+"}");E d=[];I(E i=0,3P=b.H;i<3P;i++)6(!c&&a(b[i],i)||c&&!a(b[i],i))d.Y(b[i]);F d},3M:9(c,b){6(1f b=="1E")b=2T("M||9(a){F "+b+"}");E d=[];I(E i=0,3P=c.H;i<3P;i++){E a=b(c[i],i);6(a!==K&&a!=Q){6(a.1b!=1K)a=[a];d=d.8x(a)}}F d}});E u=8w.8u.2D();C.N={6b:(u.2k(/.+(?:8s|8q|8p|8o)[\\/: ]([\\d.]+)/)||[])[1],1H:/61/.1d(u),2t:/2t/.1d(u),12:/12/.1d(u)&&!/2t/.1d(u),3J:/3J/.1d(u)&&!/(8n|61)/.1d(u)};E x=C.N.12?"3I":"4G";C.14({8m:!C.N.12||R.8l=="8k",3I:C.N.12?"3I":"4G",4q:{"I":"8j","8i":"18","3a":x,4G:x,3I:x,2W:"2W",18:"18",2A:"2A",30:"30",27:"27",8h:"8g",28:"28",8f:"8e"}});C.J({5Y:"a.P",4C:"16.4C(a)",8c:"16.25(a,2,\'2a\')",8b:"16.25(a,2,\'4B\')",88:"16.4A(a.P.1k,a)",87:"16.4A(a.1k)"},9(i,n){C.15[i]=9(a){E b=C.3M(7,n);6(a&&1f a=="1E")b=C.2R(a,b);F 7.1O(C.4d(b))}});C.J({57:"3H",86:"5v",2p:"5u",85:"5t"},9(i,n){C.15[i]=9(){E a=1a;F 7.J(9(){I(E j=0,1M=a.H;j<1M;j++)C(a[j])[n](7)})}});C.J({5d:9(a){C.1j(7,a,"");7.84(a)},83:9(c){C.18.1r(7,c)},81:9(c){C.18.23(7,c)},80:9(c){C.18[C.18.2N(7,c)?"23":"1r"](7,c)},23:9(a){6(!a||C.1l(a,[7]).r.H)7.P.3e(7)},3K:9(){20(7.1k)7.3e(7.1k)}},9(i,n){C.15[i]=9(){F 7.J(n,1a)}});C.J(["5Q","5P","5M","5L"],9(i,n){C.15[n]=9(a,b){F 7.1l(":"+n+"("+a+")",b)}});C.J(["1u","24"],9(i,n){C.15[n]=9(h){F h==Q?(7.H?C.1h(7[0],n):K):7.1h(n,h.1b==3n?h:h+"4t")}});E A=C.N.1H&&5K(C.N.6b)<7Z?"(?:[\\\\w*2l-]|\\\\\\\\.)":"(?:[\\\\w\\7Y-\\7V*2l-]|\\\\\\\\.)",5I=1s 3C("^[/>]\\\\s*("+A+"+)"),5H=1s 3C("^("+A+"+)(#)("+A+"+)"),5G=1s 3C("^([#.]?)("+A+"*)");C.14({4w:{"":"m[2]==\'*\'||16.W(a,m[2])","#":"a.3F(\'2j\')==m[2]",":":{5P:"i<m[3]-0",5M:"i>m[3]-0",25:"m[3]-0==i",5Q:"m[3]-0==i",2H:"i==0",2P:"i==r.H-1",5E:"i%2==0",5D:"i%2","2H-3z":"a.P.4L(\'*\')[0]==a","2P-3z":"16.25(a.P.3Y,1,\'4B\')==a","7U-3z":"!16.25(a.P.3Y,2,\'4B\')",5Y:"a.1k",3K:"!a.1k",5L:"(a.5Z||a.7T||\'\').U(m[3])>=0",4N:\'"1C"!=a.L&&16.1h(a,"11")!="1T"&&16.1h(a,"3V")!="1C"\',1C:\'"1C"==a.L||16.1h(a,"11")=="1T"||16.1h(a,"3V")=="1C"\',7R:"!a.30",30:"a.30",27:"a.27",28:"a.28||16.1j(a,\'28\')",2Q:"\'2Q\'==a.L",4e:"\'4e\'==a.L",3i:"\'3i\'==a.L",4v:"\'4v\'==a.L",5C:"\'5C\'==a.L",4u:"\'4u\'==a.L",5B:"\'5B\'==a.L",5A:"\'5A\'==a.L",1X:\'"1X"==a.L||16.W(a,"1X")\',39:"/39|2b|7P|1X/i.1d(a.W)",2N:"16.1F(m[3],a).H"},"[":"16.1F(m[2],a).H"},5x:[/^\\[ *(@)([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1s 3C("^([:.#]*)("+A+"+)")],2R:9(a,c,b){E d,1Y=[];20(a&&a!=d){d=a;E f=C.1l(a,c,b);a=f.t.1v(/^\\s*,\\s*/,"");1Y=b?c=f.r:C.29(1Y,f.r)}F 1Y},1F:9(t,l){6(1f t!="1E")F[t];6(l&&!l.1t)l=K;l=l||R;6(!t.U("//")){t=t.2K(2,t.H)}G 6(!t.U("/")&&!l.2I){l=l.3D;t=t.2K(1,t.H);6(t.U("/")>=1)t=t.2K(t.U("/"),t.H)}E d=[l],2q=[],2P;20(t&&2P!=t){E r=[];2P=t;t=C.2s(t).1v(/^\\/\\//,"");E k=M;E g=5I;E m=g.2d(t);6(m){E o=m[1].1I();I(E i=0;d[i];i++)I(E c=d[i].1k;c;c=c.2a)6(c.1t==1&&(o=="*"||c.W.1I()==o.1I()))r.Y(c);d=r;t=t.1v(g,"");6(t.U(" ")==0)5X;k=O}G{g=/^((\\/?\\.\\.)|([>\\/+~]))\\s*(\\w*)/i;6((m=g.2d(t))!=K){r=[];E o=m[4],1q=C.1q++;m=m[1];I(E j=0,2o=d.H;j<2o;j++)6(m.U("..")<0){E n=m=="~"||m=="+"?d[j].2a:d[j].1k;I(;n;n=n.2a)6(n.1t==1){6(m=="~"&&n.1q==1q)1J;6(!o||n.W.1I()==o.1I()){6(m=="~")n.1q=1q;r.Y(n)}6(m=="+")1J}}G r.Y(d[j].P);d=r;t=C.2s(t.1v(g,""));k=O}}6(t&&!k){6(!t.U(",")){6(l==d[0])d.4s();2q=C.29(2q,d);r=d=[l];t=" "+t.2K(1,t.H)}G{E h=5H;E m=h.2d(t);6(m){m=[0,m[2],m[3],m[1]]}G{h=5G;m=h.2d(t)}m[2]=m[2].1v(/\\\\/g,"");E f=d[d.H-1];6(m[1]=="#"&&f&&f.37&&!C.3E(f)){E p=f.37(m[2]);6((C.N.12||C.N.2t)&&p&&1f p.2j=="1E"&&p.2j!=m[2])p=C(\'[@2j="\'+m[2]+\'"]\',f)[0];d=r=p&&(!m[3]||C.W(p,m[3]))?[p]:[]}G{I(E i=0;d[i];i++){E a=m[1]!=""||m[0]==""?"*":m[2];6(a=="*"&&d[i].W.2D()=="4P")a="2O";r=C.29(r,d[i].4L(a))}6(m[1]==".")r=C.4r(r,m[2]);6(m[1]=="#"){E e=[];I(E i=0;r[i];i++)6(r[i].3F("2j")==m[2]){e=[r[i]];1J}r=e}d=r}t=t.1v(h,"")}}6(t){E b=C.1l(t,r);d=r=b.r;t=C.2s(b.t)}}6(t)d=[];6(d&&l==d[0])d.4s();2q=C.29(2q,d);F 2q},4r:9(r,m,a){m=" "+m+" ";E c=[];I(E i=0;r[i];i++){E b=(" "+r[i].18+" ").U(m)>=0;6(!a&&b||a&&!b)c.Y(r[i])}F c},1l:9(t,r,h){E d;20(t&&t!=d){d=t;E p=C.5x,m;I(E i=0;p[i];i++){m=p[i].2d(t);6(m){t=t.7N(m[0].H);m[2]=m[2].1v(/\\\\/g,"");1J}}6(!m)1J;6(m[1]==":"&&m[2]=="5l")r=C.1l(m[3],r,O).r;G 6(m[1]==".")r=C.4r(r,m[2],h);G 6(m[1]=="@"){E g=[],L=m[3];I(E i=0,2o=r.H;i<2o;i++){E a=r[i],z=a[C.4q[m[2]]||m[2]];6(z==K||/5R|32|28/.1d(m[2]))z=C.1j(a,m[2])||\'\';6((L==""&&!!z||L=="="&&z==m[5]||L=="!="&&z!=m[5]||L=="^="&&z&&!z.U(m[5])||L=="$="&&z.2K(z.H-m[5].H)==m[5]||(L=="*="||L=="~=")&&z.U(m[5])>=0)^h)g.Y(a)}r=g}G 6(m[1]==":"&&m[2]=="25-3z"){E e=C.1q++,g=[],1d=/(\\d*)n\\+?(\\d*)/.2d(m[3]=="5E"&&"2n"||m[3]=="5D"&&"2n+1"||!/\\D/.1d(m[3])&&"n+"+m[3]||m[3]),2H=(1d[1]||1)-0,d=1d[2]-0;I(E i=0,2o=r.H;i<2o;i++){E j=r[i],P=j.P;6(e!=P.1q){E c=1;I(E n=P.1k;n;n=n.2a)6(n.1t==1)n.4o=c++;P.1q=e}E b=M;6(2H==1){6(d==0||j.4o==d)b=O}G 6((j.4o+d)%2H==0)b=O;6(b^h)g.Y(j)}r=g}G{E f=C.4w[m[1]];6(1f f!="1E")f=C.4w[m[1]][m[2]];f=2T("M||9(a,i){F "+f+"}");r=C.2B(r,f,h)}}F{r:r,t:t}},4C:9(c){E b=[];E a=c.P;20(a&&a!=R){b.Y(a);a=a.P}F b},25:9(a,e,c,b){e=e||1;E d=0;I(;a;a=a[c])6(a.1t==1&&++d==e)1J;F a},4A:9(n,a){E r=[];I(;n;n=n.2a){6(n.1t==1&&(!a||n!=a))r.Y(n)}F r}});C.1c={1r:9(f,d,c,b){6(C.N.12&&f.3t!=Q)f=19;6(!c.22)c.22=7.22++;6(b!=Q){E e=c;c=9(){F e.T(7,1a)};c.V=b;c.22=e.22}6(!f.$1i)f.$1i={};6(!f.$1y)f.$1y=9(){E a;6(1f C=="Q"||C.1c.4n)F a;a=C.1c.1y.T(f,1a);F a};E g=f.$1i[d];6(!g){g=f.$1i[d]={};6(f.4m)f.4m(d,f.$1y,M);G f.7M("3r"+d,f.$1y)}g[c.22]=c;7.1D[d]=O},22:1,1D:{},23:9(c,b,a){E d=c.$1i,2c,45;6(d){6(b&&b.L){a=b.4l;b=b.L}6(!b){I(b 17 d)7.23(c,b)}G 6(d[b]){6(a)4k d[b][a.22];G I(a 17 c.$1i[b])4k d[b][a];I(2c 17 d[b])1J;6(!2c){6(c.4j)c.4j(b,c.$1y,M);G c.7L("3r"+b,c.$1y);2c=K;4k d[b]}}I(2c 17 d)1J;6(!2c)c.$1y=c.$1i=K}},1z:9(c,b,d){b=C.2V(b||[]);6(!d){6(7.1D[c])C("*").1r([19,R]).1z(c,b)}G{E a,2c,15=C.1g(d[c]||K);b.42(7.4i({L:c,1S:d}));6(C.1g(d.$1y))a=d.$1y.T(d,b);6(!15&&d["3r"+c]&&d["3r"+c].T(d,b)===M)a=M;6(15&&a!==M&&!(C.W(d,\'a\')&&c=="4h")){7.4n=O;d[c]()}7.4n=M}},1y:9(b){E a;b=C.1c.4i(b||19.1c||{});E c=7.$1i&&7.$1i[b.L],2e=1K.3v.3S.2S(1a,1);2e.42(b);I(E j 17 c){2e[0].4l=c[j];2e[0].V=c[j].V;6(c[j].T(7,2e)===M){b.2u();b.2X();a=M}}6(C.N.12)b.1S=b.2u=b.2X=b.4l=b.V=K;F a},4i:9(c){E a=c;c=C.14({},a);c.2u=9(){6(a.2u)a.2u();a.7I=M};c.2X=9(){6(a.2X)a.2X();a.7H=O};6(!c.1S&&c.5r)c.1S=c.5r;6(C.N.1H&&c.1S.1t==3)c.1S=a.1S.P;6(!c.4g&&c.4F)c.4g=c.4F==c.1S?c.7C:c.4F;6(c.5p==K&&c.66!=K){E e=R.3D,b=R.4z;c.5p=c.66+(e&&e.5o||b.5o||0);c.7z=c.7v+(e&&e.5m||b.5m||0)}6(!c.3Q&&(c.5k||c.5j))c.3Q=c.5k||c.5j;6(!c.5i&&c.5g)c.5i=c.5g;6(!c.3Q&&c.1X)c.3Q=(c.1X&1?1:(c.1X&2?3:(c.1X&4?2:0)));F c}};C.15.14({3l:9(c,a,b){F c=="5f"?7.5e(c,a,b):7.J(9(){C.1c.1r(7,c,b||a,b&&a)})},5e:9(d,b,c){F 7.J(9(){C.1c.1r(7,d,9(a){C(7).49(a);F(c||b).T(7,1a)},c&&b)})},49:9(a,b){F 7.J(9(){C.1c.23(7,a,b)})},1z:9(a,b){F 7.J(9(){C.1c.1z(a,b,7)})},1W:9(){E a=1a;F 7.4h(9(e){7.3T=0==7.3T?1:0;e.2u();F a[7.3T].T(7,[e])||M})},7p:9(f,g){9 3U(e){E p=e.4g;20(p&&p!=7)2g{p=p.P}2h(e){p=7};6(p==7)F M;F(e.L=="3W"?f:g).T(7,[e])}F 7.3W(3U).5b(3U)},1L:9(f){5a();6(C.36)f.T(R,[C]);G C.2C.Y(9(){F f.T(7,[C])});F 7}});C.14({36:M,2C:[],1L:9(){6(!C.36){C.36=O;6(C.2C){C.J(C.2C,9(){7.T(R)});C.2C=K}6(C.N.3J||C.N.2t)R.4j("59",C.1L,M);6(!19.7m.H)C(19).2f(9(){C("#4b").23()})}}});C.J(("7l,7k,2f,7j,7i,5f,4h,7g,"+"7f,7d,7c,3W,5b,7b,2b,"+"4u,7a,79,78,3f").2M(","),9(i,o){C.15[o]=9(f){F f?7.3l(o,f):7.1z(o)}});E w=M;9 5a(){6(w)F;w=O;6(C.N.3J||C.N.2t)R.4m("59",C.1L,M);G 6(C.N.12){R.75("<73"+"72 2j=4b 70=O "+"32=//:><\\/33>");E a=R.37("4b");6(a)a.6Z=9(){6(R.3d!="1x")F;C.1L()};a=K}G 6(C.N.1H)C.48=3t(9(){6(R.3d=="6Y"||R.3d=="1x"){47(C.48);C.48=K;C.1L()}},10);C.1c.1r(19,"2f",C.1L)}C.15.14({6X:9(c,b,a){7.2f(c,b,a,1)},2f:9(g,e,c,d){6(C.1g(g))F 7.3l("2f",g);c=c||9(){};E f="46";6(e)6(C.1g(e)){c=e;e=K}G{e=C.2O(e);f="55"}E h=7;C.31({1G:g,L:f,V:e,2F:d,1x:9(a,b){6(b=="1U"||!d&&b=="54")h.5W(a.43);4x(9(){h.J(c,[a.43,b,a])},13)}});F 7},6W:9(){F C.2O(7)},6V:9(){}});C.J("53,52,51,50,4Z,5h".2M(","),9(i,o){C.15[o]=9(f){F 7.3l(o,f)}});C.14({21:9(e,c,a,d,b){6(C.1g(c)){a=c;c=K}F C.31({L:"46",1G:e,V:c,1U:a,3G:d,2F:b})},6U:9(d,b,a,c){F C.21(d,b,a,c,1)},6T:9(b,a){F C.21(b,K,a,"33")},77:9(c,b,a){F C.21(c,b,a,"56")},6S:9(d,b,a,c){6(C.1g(b)){a=b;b={}}F C.31({L:"55",1G:d,V:b,1U:a,3G:c})},6R:9(a){C.3u.1Q=a},6Q:9(a){C.14(C.3u,a)},3u:{1D:O,L:"46",1Q:0,4Y:"6P/x-6O-38-6N",4X:O,2w:O,V:K},3h:{},31:9(s){s=C.14(O,s,C.14(O,{},C.3u,s));6(s.V){6(s.4X&&1f s.V!="1E")s.V=C.2O(s.V);6(s.L.2D()=="21"){s.1G+=(s.1G.U("?")>-1?"&":"?")+s.V;s.V=K}}6(s.1D&&!C.40++)C.1c.1z("53");E f=M;E h=19.4W?1s 4W("6M.6K"):1s 58();h.6J(s.L,s.1G,s.2w);6(s.V)h.4c("7r-7s",s.4Y);6(s.2F)h.4c("6G-3Z-6E",C.3h[s.1G]||"7w, 6C 7y 6B 4J:4J:4J 6z");h.4c("X-7D-7E","58");6(s.4U)s.4U(h);6(s.1D)C.1c.1z("5h",[h,s]);E g=9(d){6(!f&&h&&(h.3d==4||d=="1Q")){f=O;6(i){47(i);i=K}E c=d=="1Q"&&"1Q"||!C.5n(h)&&"3f"||s.2F&&C.5s(h,s.1G)&&"54"||"1U";6(c=="1U"){2g{E a=C.5q(h,s.3G)}2h(e){c="4I"}}6(c=="1U"){E b;2g{b=h.4f("4S-3Z")}2h(e){}6(s.2F&&b)C.3h[s.1G]=b;6(s.1U)s.1U(a,c);6(s.1D)C.1c.1z("4Z",[h,s])}G C.3X(s,h,c);6(s.1D)C.1c.1z("51",[h,s]);6(s.1D&&!--C.40)C.1c.1z("52");6(s.1x)s.1x(h,c);6(s.2w)h=K}};6(s.2w){E i=3t(g,13);6(s.1Q>0)4x(9(){6(h){h.6w();6(!f)g("1Q")}},s.1Q)}2g{h.6v(s.V)}2h(e){C.3X(s,h,K,e)}6(!s.2w)g();F h},3X:9(s,a,b,e){6(s.3f)s.3f(a,b,e);6(s.1D)C.1c.1z("50",[a,s,e])},40:0,5n:9(r){2g{F!r.26&&6t.6r=="4v:"||(r.26>=4R&&r.26<6q)||r.26==5z||C.N.1H&&r.26==Q}2h(e){}F M},5s:9(a,c){2g{E b=a.4f("4S-3Z");F a.26==5z||b==C.3h[c]||C.N.1H&&a.26==Q}2h(e){}F M},5q:9(r,a){E b=r.4f("6o-L");E c=a=="5F"||!a&&b&&b.U("5F")>=0;V=c?r.7W:r.43;6(c&&V.3D.4y=="4I")7X"4I";6(a=="33")C.4E(V);6(a=="56")V=2T("("+V+")");F V},2O:9(a){E s=[];6(a.1b==1K||a.3w)C.J(a,9(){s.Y(2y(7.6l)+"="+2y(7.2A))});G I(E j 17 a)6(a[j]&&a[j].1b==1K)C.J(a[j],9(){s.Y(2y(j)+"="+2y(7))});G s.Y(2y(j)+"="+2y(a[j]));F s.5w("&")}});C.15.14({1o:9(b,a){F b?7.1B({1u:"1o",24:"1o",1e:"1o"},b,a):7.1l(":1C").J(9(){7.S.11=7.2r?7.2r:"";6(C.1h(7,"11")=="1T")7.S.11="2m"}).3L()},1p:9(b,a){F b?7.1B({1u:"1p",24:"1p",1e:"1p"},b,a):7.1l(":4N").J(9(){7.2r=7.2r||C.1h(7,"11");6(7.2r=="1T")7.2r="2m";7.S.11="1T"}).3L()},5O:C.15.1W,1W:9(a,b){F C.1g(a)&&C.1g(b)?7.5O(a,b):a?7.1B({1u:"1W",24:"1W",1e:"1W"},a,b):7.J(9(){C(7)[C(7).3y(":1C")?"1o":"1p"]()})},6i:9(b,a){F 7.1B({1u:"1o"},b,a)},6h:9(b,a){F 7.1B({1u:"1p"},b,a)},6g:9(b,a){F 7.1B({1u:"1W"},b,a)},6f:9(b,a){F 7.1B({1e:"1o"},b,a)},89:9(b,a){F 7.1B({1e:"1p"},b,a)},6e:9(c,a,b){F 7.1B({1e:a},c,b)},1B:9(d,h,f,g){F 7.1n(9(){E c=C(7).3y(":1C"),1Z=C.5V(h,f,g),5U=7;I(E p 17 d){6(d[p]=="1p"&&c||d[p]=="1o"&&!c)F C.1g(1Z.1x)&&1Z.1x.T(7);6(p=="1u"||p=="24"){1Z.11=C.1h(7,"11");1Z.2z=7.S.2z}}6(1Z.2z!=K)7.S.2z="1C";7.2v=C.14({},d);C.J(d,9(a,b){E e=1s C.2Y(5U,1Z,a);6(b.1b==3x)e.3R(e.1Y()||0,b);G e[b=="1W"?c?"1o":"1p":b](d)});F O})},1n:9(a,b){6(!b){b=a;a="2Y"}F 7.J(9(){6(!7.1n)7.1n={};6(!7.1n[a])7.1n[a]=[];7.1n[a].Y(b);6(7.1n[a].H==1)b.T(7)})}});C.14({5V:9(b,a,c){E d=b&&b.1b==8G?b:{1x:c||!c&&a||C.1g(b)&&b,1N:b,35:c&&a||a&&a.1b!=8F&&a};d.1N=(d.1N&&d.1N.1b==3x?d.1N:{8D:8C,8B:4R}[d.1N])||8A;d.2U=d.1x;d.1x=9(){C.68(7,"2Y");6(C.1g(d.2U))d.2U.T(7)};F d},35:{62:9(p,n,b,a){F b+a*p},4H:9(p,n,b,a){F((-67.8z(p*67.8y)/2)+0.5)*a+b}},1n:{},68:9(b,a){a=a||"2Y";6(b.1n&&b.1n[a]){b.1n[a].4s();E f=b.1n[a][0];6(f)f.T(b)}},3N:[],2Y:9(f,e,g){E z=7;E y=f.S;z.a=9(){6(e.3q)e.3q.T(f,[z.2x]);6(g=="1e")C.1j(y,"1e",z.2x);G{y[g]=5K(z.2x)+"4t";6(g=="1u"||g=="24")y.11="2m"}};z.65=9(){F 3m(C.1h(f,g))};z.1Y=9(){E r=3m(C.34(f,g));F r&&r>-8v?r:z.65()};z.3R=9(c,b){z.4M=(1s 64()).63();z.2x=c;z.a();C.3N.Y(9(){F z.3q(c,b)});6(C.3N.H==1){E d=3t(9(){E a=C.3N;I(E i=0;i<a.H;i++)6(!a[i]())a.8t(i--,1);6(!a.H)47(d)},13)}};z.1o=9(){6(!f.2i)f.2i={};f.2i[g]=C.1j(f.S,g);e.1o=O;z.3R(0,7.1Y());6(g!="1e")y[g]="8r";C(f).1o()};z.1p=9(){6(!f.2i)f.2i={};f.2i[g]=C.1j(f.S,g);e.1p=O;z.3R(7.1Y(),0)};z.3q=9(a,c){E t=(1s 64()).63();6(t>e.1N+z.4M){z.2x=c;z.a();6(f.2v)f.2v[g]=O;E b=O;I(E i 17 f.2v)6(f.2v[i]!==O)b=M;6(b){6(e.11!=K){y.2z=e.2z;y.11=e.11;6(C.1h(f,"11")=="1T")y.11="2m"}6(e.1p)y.11="1T";6(e.1p||e.1o)I(E p 17 f.2v)C.1j(y,p,f.2i[p])}6(b&&C.1g(e.1x))e.1x.T(f);F M}G{E n=t-7.4M;E p=n/e.1N;z.2x=C.35[e.35||(C.35.4H?"4H":"62")](p,n,a,(c-a),e.1N);z.a()}F O}}})})();',62,541,'||||||if|this||function|||||||||||||||||||||||||||||||var|return|else|length|for|each|null|type|false|browser|true|parentNode|undefined|document|style|apply|indexOf|data|nodeName||push|||display|msie||extend|fn|jQuery|in|className|window|arguments|constructor|event|test|opacity|typeof|isFunction|css|events|attr|firstChild|filter|div|queue|show|hide|mergeNum|add|new|nodeType|height|replace|tbody|complete|handle|trigger|table|animate|hidden|global|string|find|url|safari|toUpperCase|break|Array|ready|al|duration|pushStack|tb|timeout|stack|target|none|success|swap|toggle|button|cur|opt|while|get|guid|remove|width|nth|status|checked|selected|merge|nextSibling|select|ret|exec|args|load|try|catch|orig|id|match|_|block||rl|insertBefore|done|oldblock|trim|opera|preventDefault|curAnim|async|now|encodeURIComponent|overflow|value|grep|readyList|toLowerCase|color|ifModified|val|first|ownerDocument|domManip|substr|defaultView|split|has|param|last|text|multiFilter|call|eval|old|makeArray|innerHTML|stopPropagation|fx|childNodes|disabled|ajax|src|script|curCSS|easing|isReady|getElementById|form|input|float|getComputedStyle|clean|readyState|removeChild|error|static|lastModified|checkbox|selectedIndex|position|bind|parseFloat|String|oWidth|oHeight|step|on|toString|setInterval|ajaxSettings|prototype|jquery|Number|is|child|ol|cloneNode|RegExp|documentElement|isXMLDoc|getAttribute|dataType|append|styleFloat|mozilla|empty|end|map|timers|tr|el|which|custom|slice|lastToggle|handleHover|visibility|mouseover|handleError|lastChild|Modified|active|currentStyle|unshift|responseText|getPropertyValue|index|GET|clearInterval|safariTimer|unbind|init|__ie_init|setRequestHeader|unique|radio|getResponseHeader|relatedTarget|click|fix|removeEventListener|delete|handler|addEventListener|triggered|nodeIndex|appendChild|props|classFilter|shift|px|submit|file|expr|setTimeout|tagName|body|sibling|previousSibling|parents|deep|globalEval|fromElement|cssFloat|swing|parsererror|00|inArray|getElementsByTagName|startTime|visible|num|object|prop|200|Last|colgroup|beforeSend|fieldset|ActiveXObject|processData|contentType|ajaxSuccess|ajaxError|ajaxComplete|ajaxStop|ajaxStart|notmodified|POST|json|appendTo|XMLHttpRequest|DOMContentLoaded|bindReady|mouseout|prevObject|removeAttr|one|unload|ctrlKey|ajaxSend|metaKey|keyCode|charCode|not|scrollTop|httpSuccess|scrollLeft|pageX|httpData|srcElement|httpNotModified|after|before|prepend|join|parse|zoom|304|reset|image|password|odd|even|xml|quickClass|quickID|quickChild|setArray|parseInt|contains|gt|execScript|_toggle|lt|eq|href|nodeValue|alpha|self|speed|html|continue|parent|textContent|createTextNode|webkit|linear|getTime|Date|max|clientX|Math|dequeue|fl|createElement|version|100|NaN|fadeTo|fadeIn|slideToggle|slideUp|slideDown|setAttribute|getAttributeNode|name|method|action|content|cssText|300|protocol|FORM|location|options|send|abort|col|th|GMT|td|1970|01|cap|Since|colg|If|tfoot|thead|open|XMLHTTP|leg|Microsoft|urlencoded|www|application|ajaxSetup|ajaxTimeout|post|getScript|getIfModified|evalScripts|serialize|loadIfModified|loaded|onreadystatechange|defer|clientWidth|ipt|scr|clientHeight|write|relative|getJSON|keyup|keypress|keydown|change|mousemove|mouseup|left|mousedown|dblclick|right|scroll|resize|focus|blur|frames|absolute|clone|hover|offsetWidth|Content|Type|offsetHeight|Width|clientY|Thu|border|Jan|pageY|padding|Left|toElement|Requested|With|Right|Bottom|cancelBubble|returnValue|Top|size|detachEvent|attachEvent|substring|line|textarea|weight|enabled|font|innerText|only|uFFFF|responseXML|throw|u0128|417|toggleClass|removeClass|wrap|addClass|removeAttribute|insertAfter|prependTo|children|siblings|fadeOut|noConflict|prev|next|Boolean|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|boxModel|compatible|ie|ra|it|1px|rv|splice|userAgent|10000|navigator|concat|PI|cos|400|fast|600|slow|reverse|Function|Object|array|ig'.split('|'),0,{})) |