Changeset 523

Show
Ignore:
Timestamp:
02/02/10 20:41:03 (5 weeks ago)
Author:
olivier
Message:

- add googlemap based geo navigator
- add latitude and longitude fields to Location Model
- add django admin geocoding command: ./manage.py telemeta-geocode
- upgrade jquery to 1.4.1

Location:
trunk/telemeta
Files:
6 added
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/telemeta/htdocs/css/telemeta.css

    r352 r523  
    7676    position: relative; 
    7777    margin: 5px 0 0; 
     78    z-index: 10; 
    7879} 
    7980#submenu h3, #submenu div { 
  • trunk/telemeta/htdocs/js/jquery.js

    r302 r523  
    1 (function(){ 
    2 /* 
    3  * jQuery 1.2.6 - New Wave Javascript 
     1/*! 
     2 * jQuery JavaScript Library v1.4.1 
     3 * http://jquery.com/ 
    44 * 
    5  * Copyright (c) 2008 John Resig (jquery.com) 
    6  * Dual licensed under the MIT (MIT-LICENSE.txt) 
    7  * and GPL (GPL-LICENSE.txt) licenses. 
     5 * Copyright 2010, John Resig 
     6 * Dual licensed under the MIT or GPL Version 2 licenses. 
     7 * http://jquery.org/license 
    88 * 
    9  * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ 
    10  * $Rev: 5685 $ 
     9 * Includes Sizzle.js 
     10 * http://sizzlejs.com/ 
     11 * Copyright 2010, The Dojo Foundation 
     12 * Released under the MIT, BSD, and GPL Licenses. 
     13 * 
     14 * Date: Mon Jan 25 19:43:33 2010 -0500 
    1115 */ 
    12  
    13 // Map over jQuery in case of overwrite 
    14 var _jQuery = window.jQuery, 
    15 // Map over the $ in case of overwrite 
    16         _$ = window.$; 
    17  
    18 var jQuery = window.jQuery = window.$ = function( selector, context ) { 
    19         // The jQuery object is actually just the init constructor 'enhanced' 
    20         return new jQuery.fn.init( selector, context ); 
    21 }; 
    22  
    23 // A simple way to check for HTML strings or ID strings 
    24 // (both of which we optimize for) 
    25 var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, 
    26  
    27 // Is it a simple selector 
    28         isSimple = /^.[^:#\[\.]*$/, 
    29  
    30 // Will speed up references to undefined, and allows munging its name. 
    31         undefined; 
    32  
    33 jQuery.fn = jQuery.prototype = { 
    34         init: function( selector, context ) { 
    35                 // Make sure that a selection was provided 
    36                 selector = selector || document; 
    37  
    38                 // Handle $(DOMElement) 
    39                 if ( selector.nodeType ) { 
    40                         this[0] = selector; 
    41                         this.length = 1; 
    42                         return this; 
    43                 } 
    44                 // Handle HTML strings 
    45                 if ( typeof selector == "string" ) { 
    46                         // Are we dealing with HTML string or an ID? 
    47                         var match = quickExpr.exec( selector ); 
    48  
    49                         // Verify a match, and that no context was specified for #id 
    50                         if ( match && (match[1] || !context) ) { 
    51  
    52                                 // HANDLE: $(html) -> $(array) 
    53                                 if ( match[1] ) 
    54                                         selector = jQuery.clean( [ match[1] ], context ); 
    55  
    56                                 // HANDLE: $("#id") 
    57                                 else { 
    58                                         var elem = document.getElementById( match[3] ); 
    59  
    60                                         // Make sure an element was located 
    61                                         if ( elem ){ 
    62                                                 // Handle the case where IE and Opera return items 
    63                                                 // by name instead of ID 
    64                                                 if ( elem.id != match[3] ) 
    65                                                         return jQuery().find( selector ); 
    66  
    67                                                 // Otherwise, we inject the element directly into the jQuery object 
    68                                                 return jQuery( elem ); 
    69                                         } 
    70                                         selector = []; 
    71                                 } 
    72  
    73                         // HANDLE: $(expr, [context]) 
    74                         // (which is just equivalent to: $(content).find(expr) 
    75                         } else 
    76                                 return jQuery( context ).find( selector ); 
    77  
    78                 // HANDLE: $(function) 
    79                 // Shortcut for document ready 
    80                 } else if ( jQuery.isFunction( selector ) ) 
    81                         return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); 
    82  
    83                 return this.setArray(jQuery.makeArray(selector)); 
    84         }, 
    85  
    86         // The current version of jQuery being used 
    87         jquery: "1.2.6", 
    88  
    89         // The number of elements contained in the matched element set 
    90         size: function() { 
    91                 return this.length; 
    92         }, 
    93  
    94         // The number of elements contained in the matched element set 
    95         length: 0, 
    96  
    97         // Get the Nth element in the matched element set OR 
    98         // Get the whole matched element set as a clean array 
    99         get: function( num ) { 
    100                 return num == undefined ? 
    101  
    102                         // Return a 'clean' array 
    103                         jQuery.makeArray( this ) : 
    104  
    105                         // Return just the object 
    106                         this[ num ]; 
    107         }, 
    108  
    109         // Take an array of elements and push it onto the stack 
    110         // (returning the new matched element set) 
    111         pushStack: function( elems ) { 
    112                 // Build a new jQuery matched element set 
    113                 var ret = jQuery( elems ); 
    114  
    115                 // Add the old object onto the stack (as a reference) 
    116                 ret.prevObject = this; 
    117  
    118                 // Return the newly-formed element set 
    119                 return ret; 
    120         }, 
    121  
    122         // Force the current matched set of elements to become 
    123         // the specified array of elements (destroying the stack in the process) 
    124         // You should use pushStack() in order to do this, but maintain the stack 
    125         setArray: function( elems ) { 
    126                 // Resetting the length to 0, then using the native Array push 
    127                 // is a super-fast way to populate an object with array-like properties 
    128                 this.length = 0; 
    129                 Array.prototype.push.apply( this, elems ); 
    130  
    131                 return this; 
    132         }, 
    133  
    134         // Execute a callback for every element in the matched set. 
    135         // (You can seed the arguments with an array of args, but this is 
    136         // only used internally.) 
    137         each: function( callback, args ) { 
    138                 return jQuery.each( this, callback, args ); 
    139         }, 
    140  
    141         // Determine the position of an element within 
    142         // the matched set of elements 
    143         index: function( elem ) { 
    144                 var ret = -1; 
    145  
    146                 // Locate the position of the desired element 
    147                 return jQuery.inArray( 
    148                         // If it receives a jQuery object, the first element is used 
    149                         elem && elem.jquery ? elem[0] : elem 
    150                 , this ); 
    151         }, 
    152  
    153         attr: function( name, value, type ) { 
    154                 var options = name; 
    155  
    156                 // Look for the case where we're accessing a style value 
    157                 if ( name.constructor == String ) 
    158                         if ( value === undefined ) 
    159                                 return this[0] && jQuery[ type || "attr" ]( this[0], name ); 
    160  
    161                         else { 
    162                                 options = {}; 
    163                                 options[ name ] = value; 
    164                         } 
    165  
    166                 // Check to see if we're setting style values 
    167                 return this.each(function(i){ 
    168                         // Set all the styles 
    169                         for ( name in options ) 
    170                                 jQuery.attr( 
    171                                         type ? 
    172                                                 this.style : 
    173                                                 this, 
    174                                         name, jQuery.prop( this, options[ name ], type, i, name ) 
    175                                 ); 
    176                 }); 
    177         }, 
    178  
    179         css: function( key, value ) { 
    180                 // ignore negative width and height values 
    181                 if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) 
    182                         value = undefined; 
    183                 return this.attr( key, value, "curCSS" ); 
    184         }, 
    185  
    186         text: function( text ) { 
    187                 if ( typeof text != "object" && text != null ) 
    188                         return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); 
    189  
    190                 var ret = ""; 
    191  
    192                 jQuery.each( text || this, function(){ 
    193                         jQuery.each( this.childNodes, function(){ 
    194                                 if ( this.nodeType != 8 ) 
    195                                         ret += this.nodeType != 1 ? 
    196                                                 this.nodeValue : 
    197                                                 jQuery.fn.text( [ this ] ); 
    198                         }); 
    199                 }); 
    200  
    201                 return ret; 
    202         }, 
    203  
    204         wrapAll: function( html ) { 
    205                 if ( this[0] ) 
    206                         // The elements to wrap the target around 
    207                         jQuery( html, this[0].ownerDocument ) 
    208                                 .clone() 
    209                                 .insertBefore( this[0] ) 
    210                                 .map(function(){ 
    211                                         var elem = this; 
    212  
    213                                         while ( elem.firstChild ) 
    214                                                 elem = elem.firstChild; 
    215  
    216                                         return elem; 
    217                                 }) 
    218                                 .append(this); 
    219  
    220                 return this; 
    221         }, 
    222  
    223         wrapInner: function( html ) { 
    224                 return this.each(function(){ 
    225                         jQuery( this ).contents().wrapAll( html ); 
    226                 }); 
    227         }, 
    228  
    229         wrap: function( html ) { 
    230                 return this.each(function(){ 
    231                         jQuery( this ).wrapAll( html ); 
    232                 }); 
    233         }, 
    234  
    235         append: function() { 
    236                 return this.domManip(arguments, true, false, function(elem){ 
    237                         if (this.nodeType == 1) 
    238                                 this.appendChild( elem ); 
    239                 }); 
    240         }, 
    241  
    242         prepend: function() { 
    243                 return this.domManip(arguments, true, true, function(elem){ 
    244                         if (this.nodeType == 1) 
    245                                 this.insertBefore( elem, this.firstChild ); 
    246                 }); 
    247         }, 
    248  
    249         before: function() { 
    250                 return this.domManip(arguments, false, false, function(elem){ 
    251                         this.parentNode.insertBefore( elem, this ); 
    252                 }); 
    253         }, 
    254  
    255         after: function() { 
    256                 return this.domManip(arguments, false, true, function(elem){ 
    257                         this.parentNode.insertBefore( elem, this.nextSibling ); 
    258                 }); 
    259         }, 
    260  
    261         end: function() { 
    262                 return this.prevObject || jQuery( [] ); 
    263         }, 
    264  
    265         find: function( selector ) { 
    266                 var elems = jQuery.map(this, function(elem){ 
    267                         return jQuery.find( selector, elem ); 
    268                 }); 
    269  
    270                 return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? 
    271                         jQuery.unique( elems ) : 
    272                         elems ); 
    273         }, 
    274  
    275         clone: function( events ) { 
    276                 // Do the clone 
    277                 var ret = this.map(function(){ 
    278                         if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { 
    279                                 // IE copies events bound via attachEvent when 
    280                                 // using cloneNode. Calling detachEvent on the 
    281                                 // clone will also remove the events from the orignal 
    282                                 // In order to get around this, we use innerHTML. 
    283                                 // Unfortunately, this means some modifications to 
    284                                 // attributes in IE that are actually only stored 
    285                                 // as properties will not be copied (such as the 
    286                                 // the name attribute on an input). 
    287                                 var clone = this.cloneNode(true), 
    288                                         container = document.createElement("div"); 
    289                                 container.appendChild(clone); 
    290                                 return jQuery.clean([container.innerHTML])[0]; 
    291                         } else 
    292                                 return this.cloneNode(true); 
    293                 }); 
    294  
    295                 // Need to set the expando to null on the cloned set if it exists 
    296                 // removeData doesn't work here, IE removes it from the original as well 
    297                 // this is primarily for IE but the data expando shouldn't be copied over in any browser 
    298                 var clone = ret.find("*").andSelf().each(function(){ 
    299                         if ( this[ expando ] != undefined ) 
    300                                 this[ expando ] = null; 
    301                 }); 
    302  
    303                 // Copy the events from the original to the clone 
    304                 if ( events === true ) 
    305                         this.find("*").andSelf().each(function(i){ 
    306                                 if (this.nodeType == 3) 
    307                                         return; 
    308                                 var events = jQuery.data( this, "events" ); 
    309  
    310                                 for ( var type in events ) 
    311                                         for ( var handler in events[ type ] ) 
    312                                                 jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); 
    313                         }); 
    314  
    315                 // Return the cloned set 
    316                 return ret; 
    317         }, 
    318  
    319         filter: function( selector ) { 
    320                 return this.pushStack( 
    321                         jQuery.isFunction( selector ) && 
    322                         jQuery.grep(this, function(elem, i){ 
    323                                 return selector.call( elem, i ); 
    324                         }) || 
    325  
    326                         jQuery.multiFilter( selector, this ) ); 
    327         }, 
    328  
    329         not: function( selector ) { 
    330                 if ( selector.constructor == String ) 
    331                         // test special case where just one selector is passed in 
    332                         if ( isSimple.test( selector ) ) 
    333                                 return this.pushStack( jQuery.multiFilter( selector, this, true ) ); 
    334                         else 
    335                                 selector = jQuery.multiFilter( selector, this ); 
    336  
    337                 var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; 
    338                 return this.filter(function() { 
    339                         return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; 
    340                 }); 
    341         }, 
    342  
    343         add: function( selector ) { 
    344                 return this.pushStack( jQuery.unique( jQuery.merge( 
    345                         this.get(), 
    346                         typeof selector == 'string' ? 
    347                                 jQuery( selector ) : 
    348                                 jQuery.makeArray( selector ) 
    349                 ))); 
    350         }, 
    351  
    352         is: function( selector ) { 
    353                 return !!selector && jQuery.multiFilter( selector, this ).length > 0; 
    354         }, 
    355  
    356         hasClass: function( selector ) { 
    357                 return this.is( "." + selector ); 
    358         }, 
    359  
    360         val: function( value ) { 
    361                 if ( value == undefined ) { 
    362  
    363                         if ( this.length ) { 
    364                                 var elem = this[0]; 
    365  
    366                                 // We need to handle select boxes special 
    367                                 if ( jQuery.nodeName( elem, "select" ) ) { 
    368                                         var index = elem.selectedIndex, 
    369                                                 values = [], 
    370                                                 options = elem.options, 
    371                                                 one = elem.type == "select-one"; 
    372  
    373                                         // Nothing was selected 
    374                                         if ( index < 0 ) 
    375                                                 return null; 
    376  
    377                                         // Loop through all the selected options 
    378                                         for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { 
    379                                                 var option = options[ i ]; 
    380  
    381                                                 if ( option.selected ) { 
    382                                                         // Get the specifc value for the option 
    383                                                         value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; 
    384  
    385                                                         // We don't need an array for one selects 
    386                                                         if ( one ) 
    387                                                                 return value; 
    388  
    389                                                         // Multi-Selects return an array 
    390                                                         values.push( value ); 
    391                                                 } 
    392                                         } 
    393  
    394                                         return values; 
    395  
    396                                 // Everything else, we just grab the value 
    397                                 } else 
    398                                         return (this[0].value || "").replace(/\r/g, ""); 
    399  
    400                         } 
    401  
    402                         return undefined; 
    403                 } 
    404  
    405                 if( value.constructor == Number ) 
    406                         value += ''; 
    407  
    408                 return this.each(function(){ 
    409                         if ( this.nodeType != 1 ) 
    410                                 return; 
    411  
    412                         if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) 
    413                                 this.checked = (jQuery.inArray(this.value, value) >= 0 || 
    414                                         jQuery.inArray(this.name, value) >= 0); 
    415  
    416                         else if ( jQuery.nodeName( this, "select" ) ) { 
    417                                 var values = jQuery.makeArray(value); 
    418  
    419                                 jQuery( "option", this ).each(function(){ 
    420                                         this.selected = (jQuery.inArray( this.value, values ) >= 0 || 
    421                                                 jQuery.inArray( this.text, values ) >= 0); 
    422                                 }); 
    423  
    424                                 if ( !values.length ) 
    425                                         this.selectedIndex = -1; 
    426  
    427                         } else 
    428                                 this.value = value; 
    429                 }); 
    430         }, 
    431  
    432         html: function( value ) { 
    433                 return value == undefined ? 
    434                         (this[0] ? 
    435                                 this[0].innerHTML : 
    436                                 null) : 
    437                         this.empty().append( value ); 
    438         }, 
    439  
    440         replaceWith: function( value ) { 
    441                 return this.after( value ).remove(); 
    442         }, 
    443  
    444         eq: function( i ) { 
    445                 return this.slice( i, i + 1 ); 
    446         }, 
    447  
    448         slice: function() { 
    449                 return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); 
    450         }, 
    451  
    452         map: function( callback ) { 
    453                 return this.pushStack( jQuery.map(this, function(elem, i){ 
    454                         return callback.call( elem, i, elem ); 
    455                 })); 
    456         }, 
    457  
    458         andSelf: function() { 
    459                 return this.add( this.prevObject ); 
    460         }, 
    461  
    462         data: function( key, value ){ 
    463                 var parts = key.split("."); 
    464                 parts[1] = parts[1] ? "." + parts[1] : ""; 
    465  
    466                 if ( value === undefined ) { 
    467                         var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); 
    468  
    469                         if ( data === undefined && this.length ) 
    470                                 data = jQuery.data( this[0], key ); 
    471  
    472                         return data === undefined && parts[1] ? 
    473                                 this.data( parts[0] ) : 
    474                                 data; 
    475                 } else 
    476                         return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ 
    477                                 jQuery.data( this, key, value ); 
    478                         }); 
    479         }, 
    480  
    481         removeData: function( key ){ 
    482                 return this.each(function(){ 
    483                         jQuery.removeData( this, key ); 
    484                 }); 
    485         }, 
    486  
    487         domManip: function( args, table, reverse, callback ) { 
    488                 var clone = this.length > 1, elems; 
    489  
    490                 return this.each(function(){ 
    491                         if ( !elems ) { 
    492                                 elems = jQuery.clean( args, this.ownerDocument ); 
    493  
    494                                 if ( reverse ) 
    495                                         elems.reverse(); 
    496                         } 
    497  
    498                         var obj = this; 
    499  
    500                         if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) 
    501                                 obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); 
    502  
    503                         var scripts = jQuery( [] ); 
    504  
    505                         jQuery.each(elems, function(){ 
    506                                 var elem = clone ? 
    507                                         jQuery( this ).clone( true )[0] : 
    508                                         this; 
    509  
    510                                 // execute all scripts after the elements have been injected 
    511                                 if ( jQuery.nodeName( elem, "script" ) ) 
    512                                         scripts = scripts.add( elem ); 
    513                                 else { 
    514                                         // Remove any inner scripts for later evaluation 
    515                                         if ( elem.nodeType == 1 ) 
    516                                                 scripts = scripts.add( jQuery( "script", elem ).remove() ); 
    517  
    518                                         // Inject the elements into the document 
    519                                         callback.call( obj, elem ); 
    520                                 } 
    521                         }); 
    522  
    523                         scripts.each( evalScript ); 
    524                 }); 
    525         } 
    526 }; 
    527  
    528 // Give the init function the jQuery prototype for later instantiation 
    529 jQuery.fn.init.prototype = jQuery.fn; 
    530  
    531 function evalScript( i, elem ) { 
    532         if ( elem.src ) 
    533                 jQuery.ajax({ 
    534                         url: elem.src, 
    535                         async: false, 
    536                         dataType: "script" 
    537                 }); 
    538  
    539         else 
    540                 jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); 
    541  
    542         if ( elem.parentNode ) 
    543                 elem.parentNode.removeChild( elem ); 
    544 } 
    545  
    546 function now(){ 
    547         return +new Date; 
    548 } 
    549  
    550 jQuery.extend = jQuery.fn.extend = function() { 
    551         // copy reference to target object 
    552         var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; 
    553  
    554         // Handle a deep copy situation 
    555         if ( target.constructor == Boolean ) { 
    556                 deep = target; 
    557                 target = arguments[1] || {}; 
    558                 // skip the boolean and the target 
    559                 i = 2; 
    560         } 
    561  
    562         // Handle case when target is a string or something (possible in deep copy) 
    563         if ( typeof target != "object" && typeof target != "function" ) 
    564                 target = {}; 
    565  
    566         // extend jQuery itself if only one argument is passed 
    567         if ( length == i ) { 
    568                 target = this; 
    569                 --i; 
    570         } 
    571  
    572         for ( ; i < length; i++ ) 
    573                 // Only deal with non-null/undefined values 
    574                 if ( (options = arguments[ i ]) != null ) 
    575                         // Extend the base object 
    576                         for ( var name in options ) { 
    577                                 var src = target[ name ], copy = options[ name ]; 
    578  
    579                                 // Prevent never-ending loop 
    580                                 if ( target === copy ) 
    581                                         continue; 
    582  
    583                                 // Recurse if we're merging object values 
    584                                 if ( deep && copy && typeof copy == "object" && !copy.nodeType ) 
    585                                         target[ name ] = jQuery.extend( deep,  
    586                                                 // Never move original objects, clone them 
    587                                                 src || ( copy.length != null ? [ ] : { } ) 
    588                                         , copy ); 
    589  
    590                                 // Don't bring in undefined values 
    591                                 else if ( copy !== undefined ) 
    592                                         target[ name ] = copy; 
    593  
    594                         } 
    595  
    596         // Return the modified object 
    597         return target; 
    598 }; 
    599  
    600 var expando = "jQuery" + now(), uuid = 0, windowData = {}, 
    601         // exclude the following css properties to add px 
    602         exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, 
    603         // cache defaultView 
    604         defaultView = document.defaultView || {}; 
    605  
    606 jQuery.extend({ 
    607         noConflict: function( deep ) { 
    608                 window.$ = _$; 
    609  
    610                 if ( deep ) 
    611                         window.jQuery = _jQuery; 
    612  
    613                 return jQuery; 
    614         }, 
    615  
    616         // See test/unit/core.js for details concerning this function. 
    617         isFunction: function( fn ) { 
    618                 return !!fn && typeof fn != "string" && !fn.nodeName && 
    619                         fn.constructor != Array && /^[\s[]?function/.test( fn + "" ); 
    620         }, 
    621  
    622         // check if an element is in a (or is an) XML document 
    623         isXMLDoc: function( elem ) { 
    624                 return elem.documentElement && !elem.body || 
    625                         elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; 
    626         }, 
    627  
    628         // Evalulates a script in a global context 
    629         globalEval: function( data ) { 
    630                 data = jQuery.trim( data ); 
    631  
    632                 if ( data ) { 
    633                         // Inspired by code by Andrea Giammarchi 
    634                         // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html 
    635                         var head = document.getElementsByTagName("head")[0] || document.documentElement, 
    636                                 script = document.createElement("script"); 
    637  
    638                         script.type = "text/javascript"; 
    639                         if ( jQuery.browser.msie ) 
    640                                 script.text = data; 
    641                         else 
    642                                 script.appendChild( document.createTextNode( data ) ); 
    643  
    644                         // Use insertBefore instead of appendChild  to circumvent an IE6 bug. 
    645                         // This arises when a base node is used (#2709). 
    646                         head.insertBefore( script, head.firstChild ); 
    647                         head.removeChild( script ); 
    648                 } 
    649         }, 
    650  
    651         nodeName: function( elem, name ) { 
    652                 return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); 
    653         }, 
    654  
    655         cache: {}, 
    656  
    657         data: function( elem, name, data ) { 
    658                 elem = elem == window ? 
    659                         windowData : 
    660                         elem; 
    661  
    662                 var id = elem[ expando ]; 
    663  
    664                 // Compute a unique ID for the element 
    665                 if ( !id ) 
    666                         id = elem[ expando ] = ++uuid; 
    667  
    668                 // Only generate the data cache if we're 
    669                 // trying to access or manipulate it 
    670                 if ( name && !jQuery.cache[ id ] ) 
    671                         jQuery.cache[ id ] = {}; 
    672  
    673                 // Prevent overriding the named cache with undefined values 
    674                 if ( data !== undefined ) 
    675                         jQuery.cache[ id ][ name ] = data; 
    676  
    677                 // Return the named cache data, or the ID for the element 
    678                 return name ? 
    679                         jQuery.cache[ id ][ name ] : 
    680                         id; 
    681         }, 
    682  
    683         removeData: function( elem, name ) { 
    684                 elem = elem == window ? 
    685                         windowData : 
    686                         elem; 
    687  
    688                 var id = elem[ expando ]; 
    689  
    690                 // If we want to remove a specific section of the element's data 
    691                 if ( name ) { 
    692                         if ( jQuery.cache[ id ] ) { 
    693                                 // Remove the section of cache data 
    694                                 delete jQuery.cache[ id ][ name ]; 
    695  
    696                                 // If we've removed all the data, remove the element's cache 
    697                                 name = ""; 
    698  
    699                                 for ( name in jQuery.cache[ id ] ) 
    700                                         break; 
    701  
    702                                 if ( !name ) 
    703                                         jQuery.removeData( elem ); 
    704                         } 
    705  
    706                 // Otherwise, we want to remove all of the element's data 
    707                 } else { 
    708                         // Clean up the element expando 
    709                         try { 
    710                                 delete elem[ expando ]; 
    711                         } catch(e){ 
    712                                 // IE has trouble directly removing the expando 
    713                                 // but it's ok with using removeAttribute 
    714                                 if ( elem.removeAttribute ) 
    715                                         elem.removeAttribute( expando ); 
    716                         } 
    717  
    718                         // Completely remove the data cache 
    719                         delete jQuery.cache[ id ]; 
    720                 } 
    721         }, 
    722  
    723         // args is for internal usage only 
    724         each: function( object, callback, args ) { 
    725                 var name, i = 0, length = object.length; 
    726  
    727                 if ( args ) { 
    728                         if ( length == undefined ) { 
    729                                 for ( name in object ) 
    730                                         if ( callback.apply( object[ name ], args ) === false ) 
    731                                                 break; 
    732                         } else 
    733                                 for ( ; i < length; ) 
    734                                         if ( callback.apply( object[ i++ ], args ) === false ) 
    735                                                 break; 
    736  
    737                 // A special, fast, case for the most common use of each 
    738                 } else { 
    739                         if ( length == undefined ) { 
    740                                 for ( name in object ) 
    741                                         if ( callback.call( object[ name ], name, object[ name ] ) === false ) 
    742                                                 break; 
    743                         } else 
    744                                 for ( var value = object[0]; 
    745                                         i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} 
    746                 } 
    747  
    748                 return object; 
    749         }, 
    750  
    751         prop: function( elem, value, type, i, name ) { 
    752                 // Handle executable functions 
    753                 if ( jQuery.isFunction( value ) ) 
    754                         value = value.call( elem, i ); 
    755  
    756                 // Handle passing in a number to a CSS property 
    757                 return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? 
    758                         value + "px" : 
    759                         value; 
    760         }, 
    761  
    762         className: { 
    763                 // internal only, use addClass("class") 
    764                 add: function( elem, classNames ) { 
    765                         jQuery.each((classNames || "").split(/\s+/), function(i, className){ 
    766                                 if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) 
    767                                         elem.className += (elem.className ? " " : "") + className; 
    768                         }); 
    769                 }, 
    770  
    771                 // internal only, use removeClass("class") 
    772                 remove: function( elem, classNames ) { 
    773                         if (elem.nodeType == 1) 
    774                                 elem.className = classNames != undefined ? 
    775                                         jQuery.grep(elem.className.split(/\s+/), function(className){ 
    776                                                 return !jQuery.className.has( classNames, className ); 
    777                                         }).join(" ") : 
    778                                         ""; 
    779                 }, 
    780  
    781                 // internal only, use hasClass("class") 
    782                 has: function( elem, className ) { 
    783                         return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; 
    784                 } 
    785         }, 
    786  
    787         // A method for quickly swapping in/out CSS properties to get correct calculations 
    788         swap: function( elem, options, callback ) { 
    789                 var old = {}; 
    790                 // Remember the old values, and insert the new ones 
    791                 for ( var name in options ) { 
    792                         old[ name ] = elem.style[ name ]; 
    793                         elem.style[ name ] = options[ name ]; 
    794                 } 
    795  
    796                 callback.call( elem ); 
    797  
    798                 // Revert the old values 
    799                 for ( var name in options ) 
    800                         elem.style[ name ] = old[ name ]; 
    801         }, 
    802  
    803         css: function( elem, name, force ) { 
    804                 if ( name == "width" || name == "height" ) { 
    805                         var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; 
    806  
    807                         function getWH() { 
    808                                 val = name == "width" ? elem.offsetWidth : elem.offsetHeight; 
    809                                 var padding = 0, border = 0; 
    810                                 jQuery.each( which, function() { 
    811                                         padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; 
    812                                         border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; 
    813                                 }); 
    814                                 val -= Math.round(padding + border); 
    815                         } 
    816  
    817                         if ( jQuery(elem).is(":visible") ) 
    818                                 getWH(); 
    819                         else 
    820                                 jQuery.swap( elem, props, getWH ); 
    821  
    822                         return Math.max(0, val); 
    823                 } 
    824  
    825                 return jQuery.curCSS( elem, name, force ); 
    826         }, 
    827  
    828         curCSS: function( elem, name, force ) { 
    829                 var ret, style = elem.style; 
    830  
    831                 // A helper method for determining if an element's values are broken 
    832                 function color( elem ) { 
    833                         if ( !jQuery.browser.safari ) 
    834                                 return false; 
    835  
    836                         // defaultView is cached 
    837                         var ret = defaultView.getComputedStyle( elem, null ); 
    838                         return !ret || ret.getPropertyValue("color") == ""; 
    839                 } 
    840  
    841                 // We need to handle opacity special in IE 
    842                 if ( name == "opacity" && jQuery.browser.msie ) { 
    843                         ret = jQuery.attr( style, "opacity" ); 
    844  
    845                         return ret == "" ? 
    846                                 "1" : 
    847                                 ret; 
    848                 } 
    849                 // Opera sometimes will give the wrong display answer, this fixes it, see #2037 
    850                 if ( jQuery.browser.opera && name == "display" ) { 
    851                         var save = style.outline; 
    852                         style.outline = "0 solid black"; 
    853                         style.outline = save; 
    854                 } 
    855  
    856                 // Make sure we're using the right name for getting the float value 
    857                 if ( name.match( /float/i ) ) 
    858                         name = styleFloat; 
    859  
    860                 if ( !force && style && style[ name ] ) 
    861                         ret = style[ name ]; 
    862  
    863                 else if ( defaultView.getComputedStyle ) { 
    864  
    865                         // Only "float" is needed here 
    866                         if ( name.match( /float/i ) ) 
    867                                 name = "float"; 
    868  
    869                         name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); 
    870  
    871                         var computedStyle = defaultView.getComputedStyle( elem, null ); 
    872  
    873                         if ( computedStyle && !color( elem ) ) 
    874                                 ret = computedStyle.getPropertyValue( name ); 
    875  
    876                         // If the element isn't reporting its values properly in Safari 
    877                         // then some display: none elements are involved 
    878                         else { 
    879                                 var swap = [], stack = [], a = elem, i = 0; 
    880  
    881                                 // Locate all of the parent display: none elements 
    882                                 for ( ; a && color(a); a = a.parentNode ) 
    883                                         stack.unshift(a); 
    884  
    885                                 // Go through and make them visible, but in reverse 
    886                                 // (It would be better if we knew the exact display type that they had) 
    887                                 for ( ; i < stack.length; i++ ) 
    888                                         if ( color( stack[ i ] ) ) { 
    889                                                 swap[ i ] = stack[ i ].style.display; 
    890                                                 stack[ i ].style.display = "block"; 
    891                                         } 
    892  
    893                                 // Since we flip the display style, we have to handle that 
    894                                 // one special, otherwise get the value 
    895                                 ret = name == "display" && swap[ stack.length - 1 ] != null ? 
    896                                         "none" : 
    897                                         ( computedStyle && computedStyle.getPropertyValue( name ) ) || ""; 
    898  
    899                                 // Finally, revert the display styles back 
    900                                 for ( i = 0; i < swap.length; i++ ) 
    901                                         if ( swap[ i ] != null ) 
    902                                                 stack[ i ].style.display = swap[ i ]; 
    903                         } 
    904  
    905                         // We should always get a number back from opacity 
    906                         if ( name == "opacity" && ret == "" ) 
    907                                 ret = "1"; 
    908  
    909                 } else if ( elem.currentStyle ) { 
    910                         var camelCase = name.replace(/\-(\w)/g, function(all, letter){ 
    911                                 return letter.toUpperCase(); 
    912                         }); 
    913  
    914                         ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; 
    915  
    916                         // From the awesome hack by Dean Edwards 
    917                         // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 
    918  
    919                         // If we're not dealing with a regular pixel number 
    920                         // but a number that has a weird ending, we need to convert it to pixels 
    921                         if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { 
    922                                 // Remember the original values 
    923                                 var left = style.left, rsLeft = elem.runtimeStyle.left; 
    924  
    925                                 // Put in the new values to get a computed value out 
    926                                 elem.runtimeStyle.left = elem.currentStyle.left; 
    927                                 style.left = ret || 0; 
    928                                 ret = style.pixelLeft + "px"; 
    929  
    930                                 // Revert the changed values 
    931                                 style.left = left; 
    932                                 elem.runtimeStyle.left = rsLeft; 
    933                         } 
    934                 } 
    935  
    936                 return ret; 
    937         }, 
    938  
    939         clean: function( elems, context ) { 
    940                 var ret = []; 
    941                 context = context || document; 
    942                 // !context.createElement fails in IE with an error but returns typeof 'object' 
    943                 if (typeof context.createElement == 'undefined') 
    944                         context = context.ownerDocument || context[0] && context[0].ownerDocument || document; 
    945  
    946                 jQuery.each(elems, function(i, elem){ 
    947                         if ( !elem ) 
    948                                 return; 
    949  
    950                         if ( elem.constructor == Number ) 
    951                                 elem += ''; 
    952  
    953                         // Convert html string into DOM nodes 
    954                         if ( typeof elem == "string" ) { 
    955                                 // Fix "XHTML"-style tags in all browsers 
    956                                 elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ 
    957                                         return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? 
    958                                                 all : 
    959                                                 front + "></" + tag + ">"; 
    960                                 }); 
    961  
    962                                 // Trim whitespace, otherwise indexOf won't work as expected 
    963                                 var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); 
    964  
    965                                 var wrap = 
    966                                         // option or optgroup 
    967                                         !tags.indexOf("<opt") && 
    968                                         [ 1, "<select multiple='multiple'>", "</select>" ] || 
    969  
    970                                         !tags.indexOf("<leg") && 
    971                                         [ 1, "<fieldset>", "</fieldset>" ] || 
    972  
    973                                         tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && 
    974                                         [ 1, "<table>", "</table>" ] || 
    975  
    976                                         !tags.indexOf("<tr") && 
    977                                         [ 2, "<table><tbody>", "</tbody></table>" ] || 
    978  
    979                                         // <thead> matched above 
    980                                         (!tags.indexOf("<td") || !tags.indexOf("<th")) && 
    981                                         [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] || 
    982  
    983                                         !tags.indexOf("<col") && 
    984                                         [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] || 
    985  
    986                                         // IE can't serialize <link> and <script> tags normally 
    987                                         jQuery.browser.msie && 
    988                                         [ 1, "div<div>", "</div>" ] || 
    989  
    990                                         [ 0, "", "" ]; 
    991  
    992                                 // Go to html and back, then peel off extra wrappers 
    993                                 div.innerHTML = wrap[1] + elem + wrap[2]; 
    994  
    995                                 // Move to the right depth 
    996                                 while ( wrap[0]-- ) 
    997                                         div = div.lastChild; 
    998  
    999                                 // Remove IE's autoinserted <tbody> from table fragments 
    1000                                 if ( jQuery.browser.msie ) { 
    1001  
    1002                                         // String was a <table>, *may* have spurious <tbody> 
    1003                                         var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ? 
    1004                                                 div.firstChild && div.firstChild.childNodes : 
    1005  
    1006                                                 // String was a bare <thead> or <tfoot> 
    1007                                                 wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ? 
    1008                                                         div.childNodes : 
    1009                                                         []; 
    1010  
    1011                                         for ( var j = tbody.length - 1; j >= 0 ; --j ) 
    1012                                                 if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) 
    1013                                                         tbody[ j ].parentNode.removeChild( tbody[ j ] ); 
    1014  
    1015                                         // IE completely kills leading whitespace when innerHTML is used 
    1016                                         if ( /^\s/.test( elem ) ) 
    1017                                                 div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild ); 
    1018  
    1019                                 } 
    1020  
    1021                                 elem = jQuery.makeArray( div.childNodes ); 
    1022                         } 
    1023  
    1024                         if ( elem.length === 0 && (!jQuery.nodeName( elem, "form" ) && !jQuery.nodeName( elem, "select" )) ) 
    1025                                 return; 
    1026  
    1027                         if ( elem[0] == undefined || jQuery.nodeName( elem, "form" ) || elem.options ) 
    1028                                 ret.push( elem ); 
    1029  
    1030                         else 
    1031                                 ret = jQuery.merge( ret, elem ); 
    1032  
    1033                 }); 
    1034  
    1035                 return ret; 
    1036         }, 
    1037  
    1038         attr: function( elem, name, value ) { 
    1039                 // don't set attributes on text and comment nodes 
    1040                 if (!elem || elem.nodeType == 3 || elem.nodeType == 8) 
    1041                         return undefined; 
    1042  
    1043                 var notxml = !jQuery.isXMLDoc( elem ), 
    1044                         // Whether we are setting (or getting) 
    1045                         set = value !== undefined, 
    1046                         msie = jQuery.browser.msie; 
    1047  
    1048                 // Try to normalize/fix the name 
    1049                 name = notxml && jQuery.props[ name ] || name; 
    1050  
    1051                 // Only do all the following if this is a node (faster for style) 
    1052                 // IE elem.getAttribute passes even for style 
    1053                 if ( elem.tagName ) { 
    1054  
    1055                         // These attributes require special treatment 
    1056                         var special = /href|src|style/.test( name ); 
    1057  
    1058                         // Safari mis-reports the default selected property of a hidden option 
    1059                         // Accessing the parent's selectedIndex property fixes it 
    1060                         if ( name == "selected" && jQuery.browser.safari ) 
    1061                                 elem.parentNode.selectedIndex; 
    1062  
    1063                         // If applicable, access the attribute via the DOM 0 way 
    1064                         if ( name in elem && notxml && !special ) { 
    1065                                 if ( set ){ 
    1066                                         // We can't allow the type property to be changed (since it causes problems in IE) 
    1067                                         if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode ) 
    1068                                                 throw "type property can't be changed"; 
    1069  
    1070                                         elem[ name ] = value; 
    1071                                 } 
    1072  
    1073                                 // browsers index elements by id/name on forms, give priority to attributes. 
    1074                                 if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) 
    1075                                         return elem.getAttributeNode( name ).nodeValue; 
    1076  
    1077                                 return elem[ name ]; 
    1078                         } 
    1079  
    1080                         if ( msie && notxml &&  name == "style" ) 
    1081                                 return jQuery.attr( elem.style, "cssText", value ); 
    1082  
    1083                         if ( set ) 
    1084                                 // convert the value to a string (all browsers do this but IE) see #1070 
    1085                                 elem.setAttribute( name, "" + value ); 
    1086  
    1087                         var attr = msie && notxml && special 
    1088                                         // Some attributes require a special call on IE 
    1089                                         ? elem.getAttribute( name, 2 ) 
    1090                                         : elem.getAttribute( name ); 
    1091  
    1092                         // Non-existent attributes return null, we normalize to undefined 
    1093                         return attr === null ? undefined : attr; 
    1094                 } 
    1095  
    1096                 // elem is actually elem.style ... set the style 
    1097  
    1098                 // IE uses filters for opacity 
    1099                 if ( msie && name == "opacity" ) { 
    1100                         if ( set ) { 
    1101                                 // IE has trouble with opacity if it does not have layout 
    1102                                 // Force it by setting the zoom level 
    1103                                 elem.zoom = 1; 
    1104  
    1105                                 // Set the alpha filter to set the opacity 
    1106                                 elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) + 
    1107                                         (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); 
    1108                         } 
    1109  
    1110                         return elem.filter && elem.filter.indexOf("opacity=") >= 0 ? 
    1111                                 (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '': 
    1112                                 ""; 
    1113                 } 
    1114  
    1115                 name = name.replace(/-([a-z])/ig, function(all, letter){ 
    1116                         return letter.toUpperCase(); 
    1117                 }); 
    1118  
    1119                 if ( set ) 
    1120                         elem[ name ] = value; 
    1121  
    1122                 return elem[ name ]; 
    1123         }, 
    1124  
    1125         trim: function( text ) { 
    1126                 return (text || "").replace( /^\s+|\s+$/g, "" ); 
    1127         }, 
    1128  
    1129         makeArray: function( array ) { 
    1130                 var ret = []; 
    1131  
    1132                 if( array != null ){ 
    1133                         var i = array.length; 
    1134                         //the window, strings and functions also have 'length' 
    1135                         if( i == null || array.split || array.setInterval || array.call ) 
    1136                                 ret[0] = array; 
    1137                         else 
    1138                                 while( i ) 
    1139                                         ret[--i] = array[i]; 
    1140                 } 
    1141  
    1142                 return ret; 
    1143         }, 
    1144  
    1145         inArray: function( elem, array ) { 
    1146                 for ( var i = 0, length = array.length; i < length; i++ ) 
    1147                 // Use === because on IE, window == document 
    1148                         if ( array[ i ] === elem ) 
    1149                                 return i; 
    1150  
    1151                 return -1; 
    1152         }, 
    1153  
    1154         merge: function( first, second ) { 
    1155                 // We have to loop this way because IE & Opera overwrite the length 
    1156                 // expando of getElementsByTagName 
    1157                 var i = 0, elem, pos = first.length; 
    1158                 // Also, we need to make sure that the correct elements are being returned 
    1159                 // (IE returns comment nodes in a '*' query) 
    1160                 if ( jQuery.browser.msie ) { 
    1161                         while ( elem = second[ i++ ] ) 
    1162                                 if ( elem.nodeType != 8 ) 
    1163                                         first[ pos++ ] = elem; 
    1164  
    1165                 } else 
    1166                         while ( elem = second[ i++ ] ) 
    1167                                 first[ pos++ ] = elem; 
    1168  
    1169                 return first; 
    1170         }, 
    1171  
    1172         unique: function( array ) { 
    1173                 var ret = [], done = {}; 
    1174  
    1175                 try { 
    1176  
    1177                         for ( var i = 0, length = array.length; i < length; i++ ) { 
    1178                                 var id = jQuery.data( array[ i ] ); 
    1179  
    1180                                 if ( !done[ id ] ) { 
    1181                                         done[ id ] = true; 
    1182                                         ret.push( array[ i ] ); 
    1183                                 } 
    1184                         } 
    1185  
    1186                 } catch( e ) { 
    1187                         ret = array; 
    1188                 } 
    1189  
    1190                 return ret; 
    1191         }, 
    1192  
    1193         grep: function( elems, callback, inv ) { 
    1194                 var ret = []; 
    1195  
    1196                 // Go through the array, only saving the items 
    1197                 // that pass the validator function 
    1198                 for ( var i = 0, length = elems.length; i < length; i++ ) 
    1199                         if ( !inv != !callback( elems[ i ], i ) ) 
    1200                                 ret.push( elems[ i ] ); 
    1201  
    1202                 return ret; 
    1203         }, 
    1204  
    1205         map: function( elems, callback ) { 
    1206                 var ret = []; 
    1207  
    1208                 // Go through the array, translating each of the items to their 
    1209                 // new value (or values). 
    1210                 for ( var i = 0, length = elems.length; i < length; i++ ) { 
    1211                         var value = callback( elems[ i ], i ); 
    1212  
    1213                         if ( value != null ) 
    1214                                 ret[ ret.length ] = value; 
    1215                 } 
    1216  
    1217                 return ret.concat.apply( [], ret ); 
    1218         } 
    1219 }); 
    1220  
    1221 var userAgent = navigator.userAgent.toLowerCase(); 
    1222  
    1223 // Figure out what browser is being used 
    1224 jQuery.browser = { 
    1225         version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1], 
    1226         safari: /webkit/.test( userAgent ), 
    1227         opera: /opera/.test( userAgent ), 
    1228         msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ), 
    1229         mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) 
    1230 }; 
    1231  
    1232 var styleFloat = jQuery.browser.msie ? 
    1233         "styleFloat" : 
    1234         "cssFloat"; 
    1235  
    1236 jQuery.extend({ 
    1237         // Check to see if the W3C box model is being used 
    1238         boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat", 
    1239  
    1240         props: { 
    1241                 "for": "htmlFor", 
    1242                 "class": "className", 
    1243                 "float": styleFloat, 
    1244                 cssFloat: styleFloat, 
    1245                 styleFloat: styleFloat, 
    1246                 readonly: "readOnly", 
    1247                 maxlength: "maxLength", 
    1248                 cellspacing: "cellSpacing" 
    1249         } 
    1250 }); 
    1251  
    1252 jQuery.each({ 
    1253         parent: function(elem){return elem.parentNode;}, 
    1254         parents: function(elem){return jQuery.dir(elem,"parentNode");}, 
    1255         next: function(elem){return jQuery.nth(elem,2,"nextSibling");}, 
    1256         prev: function(elem){return jQuery.nth(elem,2,"previousSibling");}, 
    1257         nextAll: function(elem){return jQuery.dir(elem,"nextSibling");}, 
    1258         prevAll: function(elem){return jQuery.dir(elem,"previousSibling");}, 
    1259         siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);}, 
    1260         children: function(elem){return jQuery.sibling(elem.firstChild);}, 
    1261         contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);} 
    1262 }, function(name, fn){ 
    1263         jQuery.fn[ name ] = function( selector ) { 
    1264                 var ret = jQuery.map( this, fn ); 
    1265  
    1266                 if ( selector && typeof selector == "string" ) 
    1267                         ret = jQuery.multiFilter( selector, ret ); 
    1268  
    1269                 return this.pushStack( jQuery.unique( ret ) ); 
    1270         }; 
    1271 }); 
    1272  
    1273 jQuery.each({ 
    1274         appendTo: "append", 
    1275         prependTo: "prepend", 
    1276         insertBefore: "before", 
    1277         insertAfter: "after", 
    1278         replaceAll: "replaceWith" 
    1279 }, function(name, original){ 
    1280         jQuery.fn[ name ] = function() { 
    1281                 var args = arguments; 
    1282  
    1283                 return this.each(function(){ 
    1284                         for ( var i = 0, length = args.length; i < length; i++ ) 
    1285                                 jQuery( args[ i ] )[ original ]( this ); 
    1286                 }); 
    1287         }; 
    1288 }); 
    1289  
    1290 jQuery.each({ 
    1291         removeAttr: function( name ) { 
    1292                 jQuery.attr( this, name, "" ); 
    1293                 if (this.nodeType == 1) 
    1294                         this.removeAttribute( name ); 
    1295         }, 
    1296  
    1297         addClass: function( classNames ) { 
    1298                 jQuery.className.add( this, classNames ); 
    1299         }, 
    1300  
    1301         removeClass: function( classNames ) { 
    1302                 jQuery.className.remove( this, classNames ); 
    1303         }, 
    1304  
    1305         toggleClass: function( classNames ) { 
    1306                 jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames ); 
    1307         }, 
    1308  
    1309         remove: function( selector ) { 
    1310                 if ( !selector || jQuery.filter( selector, [ this ] ).r.length ) { 
    1311                         // Prevent memory leaks 
    1312                         jQuery( "*", this ).add(this).each(function(){ 
    1313                                 jQuery.event.remove(this); 
    1314                                 jQuery.removeData(this); 
    1315                         }); 
    1316                         if (this.parentNode) 
    1317                                 this.parentNode.removeChild( this ); 
    1318                 } 
    1319         }, 
    1320  
    1321         empty: function() { 
    1322                 // Remove element nodes and prevent memory leaks 
    1323                 jQuery( ">*", this ).remove(); 
    1324  
    1325                 // Remove any remaining nodes 
    1326                 while ( this.firstChild ) 
    1327                         this.removeChild( this.firstChild ); 
    1328         } 
    1329 }, function(name, fn){ 
    1330         jQuery.fn[ name ] = function(){ 
    1331                 return this.each( fn, arguments ); 
    1332         }; 
    1333 }); 
    1334  
    1335 jQuery.each([ "Height", "Width" ], function(i, name){ 
    1336         var type = name.toLowerCase(); 
    1337  
    1338         jQuery.fn[ type ] = function( size ) { 
    1339                 // Get window width or height 
    1340                 return this[0] == window ? 
    1341                         // Opera reports document.body.client[Width/Height] properly in both quirks and standards 
    1342                         jQuery.browser.opera && document.body[ "client" + name ] || 
    1343  
    1344                         // Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths) 
    1345                         jQuery.browser.safari && window[ "inner" + name ] || 
    1346  
    1347                         // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode 
    1348                         document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] : 
    1349  
    1350                         // Get document width or height 
    1351                         this[0] == document ? 
    1352                                 // Either scroll[Width/Height] or offset[Width/Height], whichever is greater 
    1353                                 Math.max( 
    1354                                         Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]), 
    1355                                         Math.max(document.body["offset" + name], document.documentElement["offset" + name]) 
    1356                                 ) : 
    1357  
    1358                                 // Get or set width or height on the element 
    1359                                 size == undefined ? 
    1360                                         // Get width or height on the element 
    1361                                         (this.length ? jQuery.css( this[0], type ) : null) : 
    1362  
    1363                                         // Set the width or height on the element (default to pixels if value is unitless) 
    1364                                         this.css( type, size.constructor == String ? size : size + "px" ); 
    1365         }; 
    1366 }); 
    1367  
    1368 // Helper function used by the dimensions and offset modules 
    1369 function num(elem, prop) { 
    1370         return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0; 
    1371 }var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ? 
    1372                 "(?:[\\w*_-]|\\\\.)" : 
    1373                 "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)", 
    1374         quickChild = new RegExp("^>\\s*(" + chars + "+)"), 
    1375         quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"), 
    1376         quickClass = new RegExp("^([#.]?)(" + chars + "*)"); 
    1377  
    1378 jQuery.extend({ 
    1379         expr: { 
    1380                 "": function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);}, 
    1381                 "#": function(a,i,m){return a.getAttribute("id")==m[2];}, 
    1382                 ":": { 
    1383                         // Position Checks 
    1384                         lt: function(a,i,m){return i<m[3]-0;}, 
    1385                         gt: function(a,i,m){return i>m[3]-0;}, 
    1386                         nth: function(a,i,m){return m[3]-0==i;}, 
    1387                         eq: function(a,i,m){return m[3]-0==i;}, 
    1388                         first: function(a,i){return i==0;}, 
    1389                         last: function(a,i,m,r){return i==r.length-1;}, 
    1390                         even: function(a,i){return i%2==0;}, 
    1391                         odd: function(a,i){return i%2;}, 
    1392  
    1393                         // Child Checks 
    1394                         "first-child": function(a){return a.parentNode.getElementsByTagName("*")[0]==a;}, 
    1395                         "last-child": function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;}, 
    1396                         "only-child": function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling");}, 
    1397  
    1398                         // Parent Checks 
    1399                         parent: function(a){return a.firstChild;}, 
    1400                         empty: function(a){return !a.firstChild;}, 
    1401  
    1402                         // Text Check 
    1403                         contains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;}, 
    1404  
    1405                         // Visibility 
    1406                         visible: function(a){return "hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";}, 
    1407                         hidden: function(a){return "hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";}, 
    1408  
    1409                         // Form attributes 
    1410                         enabled: function(a){return !a.disabled;}, 
    1411                         disabled: function(a){return a.disabled;}, 
    1412                         checked: function(a){return a.checked;}, 
    1413                         selected: function(a){return a.selected||jQuery.attr(a,"selected");}, 
    1414  
    1415                         // Form elements 
    1416                         text: function(a){return "text"==a.type;}, 
    1417                         radio: function(a){return "radio"==a.type;}, 
    1418                         checkbox: function(a){return "checkbox"==a.type;}, 
    1419                         file: function(a){return "file"==a.type;}, 
    1420                         password: function(a){return "password"==a.type;}, 
    1421                         submit: function(a){return "submit"==a.type;}, 
    1422                         image: function(a){return "image"==a.type;}, 
    1423                         reset: function(a){return "reset"==a.type;}, 
    1424                         button: function(a){return "button"==a.type||jQuery.nodeName(a,"button");}, 
    1425                         input: function(a){return /input|select|textarea|button/i.test(a.nodeName);}, 
    1426  
    1427                         // :has() 
    1428                         has: function(a,i,m){return jQuery.find(m[3],a).length;}, 
    1429  
    1430                         // :header 
    1431                         header: function(a){return /h\d/i.test(a.nodeName);}, 
    1432  
    1433                         // :animated 
    1434                         animated: function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;} 
    1435                 } 
    1436         }, 
    1437  
    1438         // The regular expressions that power the parsing engine 
    1439         parse: [ 
    1440                 // Match: [@value='test'], [@foo] 
    1441                 /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/, 
    1442  
    1443                 // Match: :contains('foo') 
    1444                 /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/, 
    1445  
    1446                 // Match: :even, :last-child, #id, .class 
    1447                 new RegExp("^([:.#]*)(" + chars + "+)") 
    1448         ], 
    1449  
    1450         multiFilter: function( expr, elems, not ) { 
    1451                 var old, cur = []; 
    1452  
    1453                 while ( expr && expr != old ) { 
    1454                         old = expr; 
    1455                         var f = jQuery.filter( expr, elems, not ); 
    1456                         expr = f.t.replace(/^\s*,\s*/, "" ); 
    1457                         cur = not ? elems = f.r : jQuery.merge( cur, f.r ); 
    1458                 } 
    1459  
    1460                 return cur; 
    1461         }, 
    1462  
    1463         find: function( t, context ) { 
    1464                 // Quickly handle non-string expressions 
    1465                 if ( typeof t != "string" ) 
    1466                         return [ t ]; 
    1467  
    1468                 // check to make sure context is a DOM element or a document 
    1469                 if ( context && context.nodeType != 1 && context.nodeType != 9) 
    1470                         return [ ]; 
    1471  
    1472                 // Set the correct context (if none is provided) 
    1473                 context = context || document; 
    1474  
    1475                 // Initialize the search 
    1476                 var ret = [context], done = [], last, nodeName; 
    1477  
    1478                 // Continue while a selector expression exists, and while 
    1479                 // we're no longer looping upon ourselves 
    1480                 while ( t && last != t ) { 
    1481                         var r = []; 
    1482                         last = t; 
    1483  
    1484                         t = jQuery.trim(t); 
    1485  
    1486                         var foundToken = false, 
    1487  
    1488                         // An attempt at speeding up child selectors that 
    1489                         // point to a specific element tag 
    1490                                 re = quickChild, 
    1491  
    1492                                 m = re.exec(t); 
    1493  
    1494                         if ( m ) { 
    1495                                 nodeName = m[1].toUpperCase(); 
    1496  
    1497                                 // Perform our own iteration and filter 
    1498                                 for ( var i = 0; ret[i]; i++ ) 
    1499                                         for ( var c = ret[i].firstChild; c; c = c.nextSibling ) 
    1500                                                 if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName) ) 
    1501                                                         r.push( c ); 
    1502  
    1503                                 ret = r; 
    1504                                 t = t.replace( re, "" ); 
    1505                                 if ( t.indexOf(" ") == 0 ) continue; 
    1506                                 foundToken = true; 
    1507                         } else { 
    1508                                 re = /^([>+~])\s*(\w*)/i; 
    1509  
    1510                                 if ( (m = re.exec(t)) != null ) { 
    1511                                         r = []; 
    1512  
    1513                                         var merge = {}; 
    1514                                         nodeName = m[2].toUpperCase(); 
    1515                                         m = m[1]; 
    1516  
    1517                                         for ( var j = 0, rl = ret.length; j < rl; j++ ) { 
    1518                                                 var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild; 
    1519                                                 for ( ; n; n = n.nextSibling ) 
    1520                                                         if ( n.nodeType == 1 ) { 
    1521                                                                 var id = jQuery.data(n); 
    1522  
    1523                                                                 if ( m == "~" && merge[id] ) break; 
    1524  
    1525                                                                 if (!nodeName || n.nodeName.toUpperCase() == nodeName ) { 
    1526                                                                         if ( m == "~" ) merge[id] = true; 
    1527                                                                         r.push( n ); 
    1528                                                                 } 
    1529  
    1530                                                                 if ( m == "+" ) break; 
    1531                                                         } 
    1532                                         } 
    1533  
    1534                                         ret = r; 
    1535  
    1536                                         // And remove the token 
    1537                                         t = jQuery.trim( t.replace( re, "" ) ); 
    1538                                         foundToken = true; 
    1539                                 } 
    1540                         } 
    1541  
    1542                         // See if there's still an expression, and that we haven't already 
    1543                         // matched a token 
    1544                         if ( t && !foundToken ) { 
    1545                                 // Handle multiple expressions 
    1546                                 if ( !t.indexOf(",") ) { 
    1547                                         // Clean the result set 
    1548                                         if ( context == ret[0] ) ret.shift(); 
    1549  
    1550                                         // Merge the result sets 
    1551                                         done = jQuery.merge( done, ret ); 
    1552  
    1553                                         // Reset the context 
    1554                                         r = ret = [context]; 
    1555  
    1556                                         // Touch up the selector string 
    1557                                         t = " " + t.substr(1,t.length); 
    1558  
    1559                                 } else { 
    1560                                         // Optimize for the case nodeName#idName 
    1561                                         var re2 = quickID; 
    1562                                         var m = re2.exec(t); 
    1563  
    1564                                         // Re-organize the results, so that they're consistent 
    1565                                         if ( m ) { 
    1566                                                 m = [ 0, m[2], m[3], m[1] ]; 
    1567  
    1568                                         } else { 
    1569                                                 // Otherwise, do a traditional filter check for 
    1570                                                 // ID, class, and element selectors 
    1571                                                 re2 = quickClass; 
    1572                                                 m = re2.exec(t); 
    1573                                         } 
    1574  
    1575                                         m[2] = m[2].replace(/\\/g, ""); 
    1576  
    1577                                         var elem = ret[ret.length-1]; 
    1578  
    1579                                         // Try to do a global search by ID, where we can 
    1580                                         if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) { 
    1581                                                 // Optimization for HTML document case 
    1582                                                 var oid = elem.getElementById(m[2]); 
    1583  
    1584                                                 // Do a quick check for the existence of the actual ID attribute 
    1585                                                 // to avoid selecting by the name attribute in IE 
    1586                                                 // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form 
    1587                                                 if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] ) 
    1588                                                         oid = jQuery('[@id="'+m[2]+'"]', elem)[0]; 
    1589  
    1590                                                 // Do a quick check for node name (where applicable) so 
    1591                                                 // that div#foo searches will be really fast 
    1592                                                 ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : []; 
    1593                                         } else { 
    1594                                                 // We need to find all descendant elements 
    1595                                                 for ( var i = 0; ret[i]; i++ ) { 
    1596                                                         // Grab the tag name being searched for 
    1597                                                         var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2]; 
    1598  
    1599                                                         // Handle IE7 being really dumb about <object>s 
    1600                                                         if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" ) 
    1601                                                                 tag = "param"; 
    1602  
    1603                                                         r = jQuery.merge( r, ret[i].getElementsByTagName( tag )); 
    1604                                                 } 
    1605  
    1606                                                 // It's faster to filter by class and be done with it 
    1607                                                 if ( m[1] == "." ) 
    1608                                                         r = jQuery.classFilter( r, m[2] ); 
    1609  
    1610                                                 // Same with ID filtering 
    1611                                                 if ( m[1] == "#" ) { 
    1612                                                         var tmp = []; 
    1613  
    1614                                                         // Try to find the element with the ID 
    1615                                                         for ( var i = 0; r[i]; i++ ) 
    1616                                                                 if ( r[i].getAttribute("id") == m[2] ) { 
    1617                                                                         tmp = [ r[i] ]; 
    1618                                                                         break; 
    1619                                                                 } 
    1620  
    1621                                                         r = tmp; 
    1622                                                 } 
    1623  
    1624                                                 ret = r; 
    1625                                         } 
    1626  
    1627                                         t = t.replace( re2, "" ); 
    1628                                 } 
    1629  
    1630                         } 
    1631  
    1632                         // If a selector string still exists 
    1633                         if ( t ) { 
    1634                                 // Attempt to filter it 
    1635                                 var val = jQuery.filter(t,r); 
    1636                                 ret = r = val.r; 
    1637                                 t = jQuery.trim(val.t); 
    1638                         } 
    1639                 } 
    1640  
    1641                 // An error occurred with the selector; 
    1642                 // just return an empty set instead 
    1643                 if ( t ) 
    1644                         ret = []; 
    1645  
    1646                 // Remove the root context 
    1647                 if ( ret && context == ret[0] ) 
    1648                         ret.shift(); 
    1649  
    1650                 // And combine the results 
    1651                 done = jQuery.merge( done, ret ); 
    1652  
    1653                 return done; 
    1654         }, 
    1655  
    1656         classFilter: function(r,m,not){ 
    1657                 m = " " + m + " "; 
    1658                 var tmp = []; 
    1659                 for ( var i = 0; r[i]; i++ ) { 
    1660                         var pass = (" " + r[i].className + " ").indexOf( m ) >= 0; 
    1661                         if ( !not && pass || not && !pass ) 
    1662                                 tmp.push( r[i] ); 
    1663                 } 
    1664                 return tmp; 
    1665         }, 
    1666  
    1667         filter: function(t,r,not) { 
    1668                 var last; 
    1669  
    1670                 // Look for common filter expressions 
    1671                 while ( t && t != last ) { 
    1672                         last = t; 
    1673  
    1674                         var p = jQuery.parse, m; 
    1675  
    1676                         for ( var i = 0; p[i]; i++ ) { 
    1677                                 m = p[i].exec( t ); 
    1678  
    1679                                 if ( m ) { 
    1680                                         // Remove what we just matched 
    1681                                         t = t.substring( m[0].length ); 
    1682  
    1683                                         m[2] = m[2].replace(/\\/g, ""); 
    1684                                         break; 
    1685                                 } 
    1686                         } 
    1687  
    1688                         if ( !m ) 
    1689                                 break; 
    1690  
    1691                         // :not() is a special case that can be optimized by 
    1692                         // keeping it out of the expression list 
    1693                         if ( m[1] == ":" && m[2] == "not" ) 
    1694                                 // optimize if only one selector found (most common case) 
    1695                                 r = isSimple.test( m[3] ) ? 
    1696                                         jQuery.filter(m[3], r, true).r : 
    1697                                         jQuery( r ).not( m[3] ); 
    1698  
    1699                         // We can get a big speed boost by filtering by class here 
    1700                         else if ( m[1] == "." ) 
    1701                                 r = jQuery.classFilter(r, m[2], not); 
    1702  
    1703                         else if ( m[1] == "[" ) { 
    1704                                 var tmp = [], type = m[3]; 
    1705  
    1706                                 for ( var i = 0, rl = r.length; i < rl; i++ ) { 
    1707                                         var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ]; 
    1708  
    1709                                         if ( z == null || /href|src|selected/.test(m[2]) ) 
    1710                                                 z = jQuery.attr(a,m[2]) || ''; 
    1711  
    1712                                         if ( (type == "" && !!z || 
    1713                                                  type == "=" && z == m[5] || 
    1714                                                  type == "!=" && z != m[5] || 
    1715                                                  type == "^=" && z && !z.indexOf(m[5]) || 
    1716                                                  type == "$=" && z.substr(z.length - m[5].length) == m[5] || 
    1717                                                  (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not ) 
    1718                                                         tmp.push( a ); 
    1719                                 } 
    1720  
    1721                                 r = tmp; 
    1722  
    1723                         // We can get a speed boost by handling nth-child here 
    1724                         } else if ( m[1] == ":" && m[2] == "nth-child" ) { 
    1725                                 var merge = {}, tmp = [], 
    1726                                         // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' 
    1727                                         test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( 
    1728                                                 m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" || 
    1729                                                 !/\D/.test(m[3]) && "0n+" + m[3] || m[3]), 
    1730                                         // calculate the numbers (first)n+(last) including if they are negative 
    1731                                         first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0; 
    1732  
    1733                                 // loop through all the elements left in the jQuery object 
    1734                                 for ( var i = 0, rl = r.length; i < rl; i++ ) { 
    1735                                         var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode); 
    1736  
    1737                                         if ( !merge[id] ) { 
    1738                                                 var c = 1; 
    1739  
    1740                                                 for ( var n = parentNode.firstChild; n; n = n.nextSibling ) 
    1741                                                         if ( n.nodeType == 1 ) 
    1742                                                                 n.nodeIndex = c++; 
    1743  
    1744                                                 merge[id] = true; 
    1745                                         } 
    1746  
    1747                                         var add = false; 
    1748  
    1749                                         if ( first == 0 ) { 
    1750                                                 if ( node.nodeIndex == last ) 
    1751                                                         add = true; 
    1752                                         } else if ( (node.nodeIndex - last) % first == 0 && (node.nodeIndex - last) / first >= 0 ) 
    1753                                                 add = true; 
    1754  
    1755                                         if ( add ^ not ) 
    1756                                                 tmp.push( node ); 
    1757                                 } 
    1758  
    1759                                 r = tmp; 
    1760  
    1761                         // Otherwise, find the expression to execute 
    1762                         } else { 
    1763                                 var fn = jQuery.expr[ m[1] ]; 
    1764                                 if ( typeof fn == "object" ) 
    1765                                         fn = fn[ m[2] ]; 
    1766  
    1767                                 if ( typeof fn == "string" ) 
    1768                                         fn = eval("false||function(a,i){return " + fn + ";}"); 
    1769  
    1770                                 // Execute it against the current filter 
    1771                                 r = jQuery.grep( r, function(elem, i){ 
    1772                                         return fn(elem, i, m, r); 
    1773                                 }, not ); 
    1774                         } 
    1775                 } 
    1776  
    1777                 // Return an array of filtered elements (r) 
    1778                 // and the modified expression string (t) 
    1779                 return { r: r, t: t }; 
    1780         }, 
    1781  
    1782         dir: function( elem, dir ){ 
    1783                 var matched = [], 
    1784                         cur = elem[dir]; 
    1785                 while ( cur && cur != document ) { 
    1786                         if ( cur.nodeType == 1 ) 
    1787                                 matched.push( cur ); 
    1788                         cur = cur[dir]; 
    1789                 } 
    1790                 return matched; 
    1791         }, 
    1792  
    1793         nth: function(cur,result,dir,elem){ 
    1794                 result = result || 1; 
    1795                 var num = 0; 
    1796  
    1797                 for ( ; cur; cur = cur[dir] ) 
    1798                         if ( cur.nodeType == 1 && ++num == result ) 
    1799                                 break; 
    1800  
    1801                 return cur; 
    1802         }, 
    1803  
    1804         sibling: function( n, elem ) { 
    1805                 var r = []; 
    1806  
    1807                 for ( ; n; n = n.nextSibling ) { 
    1808                         if ( n.nodeType == 1 && n != elem ) 
    1809                                 r.push( n ); 
    1810                 } 
    1811  
    1812                 return r; 
    1813         } 
    1814 }); 
    1815 /* 
    1816  * A number of helper functions used for managing events. 
    1817  * Many of the ideas behind this code orignated from 
    1818  * Dean Edwards' addEvent library. 
    1819  */ 
    1820 jQuery.event = { 
    1821  
    1822         // Bind an event to an element 
    1823         // Original by Dean Edwards 
    1824         add: function(elem, types, handler, data) { 
    1825                 if ( elem.nodeType == 3 || elem.nodeType == 8 ) 
    1826                         return; 
    1827  
    1828                 // For whatever reason, IE has trouble passing the window object 
    1829                 // around, causing it to be cloned in the process 
    1830                 if ( jQuery.browser.msie && elem.setInterval ) 
    1831                         elem = window; 
    1832  
    1833                 // Make sure that the function being executed has a unique ID 
    1834                 if ( !handler.guid ) 
    1835                         handler.guid = this.guid++; 
    1836  
    1837                 // if data is passed, bind to handler 
    1838                 if( data != undefined ) { 
    1839                         // Create temporary function pointer to original handler 
    1840                         var fn = handler; 
    1841  
    1842                         // Create unique handler function, wrapped around original handler 
    1843                         handler = this.proxy( fn, function() { 
    1844                                 // Pass arguments and context to original handler 
    1845                                 return fn.apply(this, arguments); 
    1846                         }); 
    1847  
    1848                         // Store data in unique handler 
    1849                         handler.data = data; 
    1850                 } 
    1851  
    1852                 // Init the element's event structure 
    1853                 var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}), 
    1854                         handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){ 
    1855                                 // Handle the second event of a trigger and when 
    1856                                 // an event is called after a page has unloaded 
    1857                                 if ( typeof jQuery != "undefined" && !jQuery.event.triggered ) 
    1858                                         return jQuery.event.handle.apply(arguments.callee.elem, arguments); 
    1859                         }); 
    1860                 // Add elem as a property of the handle function 
    1861                 // This is to prevent a memory leak with non-native 
    1862                 // event in IE. 
    1863                 handle.elem = elem; 
    1864  
    1865                 // Handle multiple events separated by a space 
    1866                 // jQuery(...).bind("mouseover mouseout", fn); 
    1867                 jQuery.each(types.split(/\s+/), function(index, type) { 
    1868                         // Namespaced event handlers 
    1869                         var parts = type.split("."); 
    1870                         type = parts[0]; 
    1871                         handler.type = parts[1]; 
    1872  
    1873                         // Get the current list of functions bound to this event 
    1874                         var handlers = events[type]; 
    1875  
    1876                         // Init the event handler queue 
    1877                         if (!handlers) { 
    1878                                 handlers = events[type] = {}; 
    1879  
    1880                                 // Check for a special event handler 
    1881                                 // Only use addEventListener/attachEvent if the special 
    1882                                 // events handler returns false 
    1883                                 if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem) === false ) { 
    1884                                         // Bind the global event handler to the element 
    1885                                         if (elem.addEventListener) 
    1886                                                 elem.addEventListener(type, handle, false); 
    1887                                         else if (elem.attachEvent) 
    1888                                                 elem.attachEvent("on" + type, handle); 
    1889                                 } 
    1890                         } 
    1891  
    1892                         // Add the function to the element's handler list 
    1893                         handlers[handler.guid] = handler; 
    1894  
    1895                         // Keep track of which events have been used, for global triggering 
    1896                         jQuery.event.global[type] = true; 
    1897                 }); 
    1898  
    1899                 // Nullify elem to prevent memory leaks in IE 
    1900                 elem = null; 
    1901         }, 
    1902  
    1903         guid: 1, 
    1904         global: {}, 
    1905  
    1906         // Detach an event or set of events from an element 
    1907         remove: function(elem, types, handler) { 
    1908                 // don't do events on text and comment nodes 
    1909                 if ( elem.nodeType == 3 || elem.nodeType == 8 ) 
    1910                         return; 
    1911  
    1912                 var events = jQuery.data(elem, "events"), ret, index; 
    1913  
    1914                 if ( events ) { 
    1915                         // Unbind all events for the element 
    1916                         if ( types == undefined || (typeof types == "string" && types.charAt(0) == ".") ) 
    1917                                 for ( var type in events ) 
    1918                                         this.remove( elem, type + (types || "") ); 
    1919                         else { 
    1920                                 // types is actually an event object here 
    1921                                 if ( types.type ) { 
    1922                                         handler = types.handler; 
    1923                                         types = types.type; 
    1924                                 } 
    1925  
    1926                                 // Handle multiple events seperated by a space 
    1927                                 // jQuery(...).unbind("mouseover mouseout", fn); 
    1928                                 jQuery.each(types.split(/\s+/), function(index, type){ 
    1929                                         // Namespaced event handlers 
    1930                                         var parts = type.split("."); 
    1931                                         type = parts[0]; 
    1932  
    1933                                         if ( events[type] ) { 
    1934                                                 // remove the given handler for the given type 
    1935                                                 if ( handler ) 
    1936                                                         delete events[type][handler.guid]; 
    1937  
    1938                                                 // remove all handlers for the given type 
    1939                                                 else 
    1940                                                         for ( handler in events[type] ) 
    1941                                                                 // Handle the removal of namespaced events 
    1942                                                                 if ( !parts[1] || events[type][handler].type == parts[1] ) 
    1943                                                                         delete events[type][handler]; 
    1944  
    1945                                                 // remove generic event handler if no more handlers exist 
    1946                                                 for ( ret in events[type] ) break; 
    1947                                                 if ( !ret ) { 
    1948                                                         if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem) === false ) { 
    1949                                                                 if (elem.removeEventListener) 
    1950                                                                         elem.removeEventListener(type, jQuery.data(elem, "handle"), false); 
    1951                                                                 else if (elem.detachEvent) 
    1952                                                                         elem.detachEvent("on" + type, jQuery.data(elem, "handle")); 
    1953                                                         } 
    1954                                                         ret = null; 
    1955                                                         delete events[type]; 
    1956                                                 } 
    1957                                         } 
    1958                                 }); 
    1959                         } 
    1960  
    1961                         // Remove the expando if it's no longer used 
    1962                         for ( ret in events ) break; 
    1963                         if ( !ret ) { 
    1964                                 var handle = jQuery.data( elem, "handle" ); 
    1965                                 if ( handle ) handle.elem = null; 
    1966                                 jQuery.removeData( elem, "events" ); 
    1967                                 jQuery.removeData( elem, "handle" ); 
    1968                         } 
    1969                 } 
    1970         }, 
    1971  
    1972         trigger: function(type, data, elem, donative, extra) { 
    1973                 // Clone the incoming data, if any 
    1974                 data = jQuery.makeArray(data); 
    1975  
    1976                 if ( type.indexOf("!") >= 0 ) { 
    1977                         type = type.slice(0, -1); 
    1978                         var exclusive = true; 
    1979                 } 
    1980  
    1981                 // Handle a global trigger 
    1982                 if ( !elem ) { 
    1983                         // Only trigger if we've ever bound an event for it 
    1984                         if ( this.global[type] ) 
    1985                                 jQuery("*").add([window, document]).trigger(type, data); 
    1986  
    1987                 // Handle triggering a single element 
    1988                 } else { 
    1989                         // don't do events on text and comment nodes 
    1990                         if ( elem.nodeType == 3 || elem.nodeType == 8 ) 
    1991                                 return undefined; 
    1992  
    1993                         var val, ret, fn = jQuery.isFunction( elem[ type ] || null ), 
    1994                                 // Check to see if we need to provide a fake event, or not 
    1995                                 event = !data[0] || !data[0].preventDefault; 
    1996  
    1997                         // Pass along a fake event 
    1998                         if ( event ) { 
    1999                                 data.unshift({ 
    2000                                         type: type, 
    2001                                         target: elem, 
    2002                                         preventDefault: function(){}, 
    2003                                         stopPropagation: function(){}, 
    2004                                         timeStamp: now() 
    2005                                 }); 
    2006                                 data[0][expando] = true; // no need to fix fake event 
    2007                         } 
    2008  
    2009                         // Enforce the right trigger type 
    2010                         data[0].type = type; 
    2011                         if ( exclusive ) 
    2012                                 data[0].exclusive = true; 
    2013  
    2014                         // Trigger the event, it is assumed that "handle" is a function 
    2015                         var handle = jQuery.data(elem, "handle"); 
    2016                         if ( handle ) 
    2017                                 val = handle.apply( elem, data ); 
    2018  
    2019                         // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links) 
    2020                         if ( (!fn || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false ) 
    2021                                 val = false; 
    2022  
    2023                         // Extra functions don't get the custom event object 
    2024                         if ( event ) 
    2025                                 data.shift(); 
    2026  
    2027                         // Handle triggering of extra function 
    2028                         if ( extra && jQuery.isFunction( extra ) ) { 
    2029                                 // call the extra function and tack the current return value on the end for possible inspection 
    2030                                 ret = extra.apply( elem, val == null ? data : data.concat( val ) ); 
    2031                                 // if anything is returned, give it precedence and have it overwrite the previous value 
    2032                                 if (ret !== undefined) 
    2033                                         val = ret; 
    2034                         } 
    2035  
    2036                         // Trigger the native events (except for clicks on links) 
    2037                         if ( fn && donative !== false && val !== false && !(jQuery.nodeName(elem, 'a') && type == "click") ) { 
    2038                                 this.triggered = true; 
    2039                                 try { 
    2040                                         elem[ type ](); 
    2041                                 // prevent IE from throwing an error for some hidden elements 
    2042                                 } catch (e) {} 
    2043                         } 
    2044  
    2045                         this.triggered = false; 
    2046                 } 
    2047  
    2048                 return val; 
    2049         }, 
    2050  
    2051         handle: function(event) { 
    2052                 // returned undefined or false 
    2053                 var val, ret, namespace, all, handlers; 
    2054  
    2055                 event = arguments[0] = jQuery.event.fix( event || window.event ); 
    2056  
    2057                 // Namespaced event handlers 
    2058                 namespace = event.type.split("."); 
    2059                 event.type = namespace[0]; 
    2060                 namespace = namespace[1]; 
    2061                 // Cache this now, all = true means, any handler 
    2062                 all = !namespace && !event.exclusive; 
    2063  
    2064                 handlers = ( jQuery.data(this, "events") || {} )[event.type]; 
    2065  
    2066                 for ( var j in handlers ) { 
    2067                         var handler = handlers[j]; 
    2068  
    2069                         // Filter the functions by class 
    2070                         if ( all || handler.type == namespace ) { 
    2071                                 // Pass in a reference to the handler function itself 
    2072                                 // So that we can later remove it 
    2073                                 event.handler = handler; 
    2074                                 event.data = handler.data; 
    2075  
    2076                                 ret = handler.apply( this, arguments ); 
    2077  
    2078                                 if ( val !== false ) 
    2079                                         val = ret; 
    2080  
    2081                                 if ( ret === false ) { 
    2082                                         event.preventDefault(); 
    2083                                         event.stopPropagation(); 
    2084                                 } 
    2085                         } 
    2086                 } 
    2087  
    2088                 return val; 
    2089         }, 
    2090  
    2091         fix: function(event) { 
    2092                 if ( event[expando] == true ) 
    2093                         return event; 
    2094  
    2095                 // store a copy of the original event object 
    2096                 // and "clone" to set read-only properties 
    2097                 var originalEvent = event; 
    2098                 event = { originalEvent: originalEvent }; 
    2099                 var props = "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" "); 
    2100                 for ( var i=props.length; i; i-- ) 
    2101                         event[ props[i] ] = originalEvent[ props[i] ]; 
    2102  
    2103                 // Mark it as fixed 
    2104                 event[expando] = true; 
    2105  
    2106                 // add preventDefault and stopPropagation since 
    2107                 // they will not work on the clone 
    2108                 event.preventDefault = function() { 
    2109                         // if preventDefault exists run it on the original event 
    2110                         if (originalEvent.preventDefault) 
    2111                                 originalEvent.preventDefault(); 
    2112                         // otherwise set the returnValue property of the original event to false (IE) 
    2113                         originalEvent.returnValue = false; 
    2114                 }; 
    2115                 event.stopPropagation = function() { 
    2116                         // if stopPropagation exists run it on the original event 
    2117                         if (originalEvent.stopPropagation) 
    2118                                 originalEvent.stopPropagation(); 
    2119                         // otherwise set the cancelBubble property of the original event to true (IE) 
    2120                         originalEvent.cancelBubble = true; 
    2121                 }; 
    2122  
    2123                 // Fix timeStamp 
    2124                 event.timeStamp = event.timeStamp || now(); 
    2125  
    2126                 // Fix target property, if necessary 
    2127                 if ( !event.target ) 
    2128                         event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either 
    2129  
    2130                 // check if target is a textnode (safari) 
    2131                 if ( event.target.nodeType == 3 ) 
    2132                         event.target = event.target.parentNode; 
    2133  
    2134                 // Add relatedTarget, if necessary 
    2135                 if ( !event.relatedTarget && event.fromElement ) 
    2136                         event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement; 
    2137  
    2138                 // Calculate pageX/Y if missing and clientX/Y available 
    2139                 if ( event.pageX == null && event.clientX != null ) { 
    2140                         var doc = document.documentElement, body = document.body; 
    2141                         event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); 
    2142                         event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); 
    2143                 } 
    2144  
    2145                 // Add which for key events 
    2146                 if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) 
    2147                         event.which = event.charCode || event.keyCode; 
    2148  
    2149                 // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) 
    2150                 if ( !event.metaKey && event.ctrlKey ) 
    2151                         event.metaKey = event.ctrlKey; 
    2152  
    2153                 // Add which for click: 1 == left; 2 == middle; 3 == right 
    2154                 // Note: button is not normalized, so don't use it 
    2155                 if ( !event.which && event.button ) 
    2156                         event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); 
    2157  
    2158                 return event; 
    2159         }, 
    2160  
    2161         proxy: function( fn, proxy ){ 
    2162                 // Set the guid of unique handler to the same of original handler, so it can be removed 
    2163                 proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++; 
    2164                 // So proxy can be declared as an argument 
    2165                 return proxy; 
    2166         }, 
    2167  
    2168         special: { 
    2169                 ready: { 
    2170                         setup: function() { 
    2171                                 // Make sure the ready event is setup 
    2172                                 bindReady(); 
    2173                                 return; 
    2174                         }, 
    2175  
    2176                         teardown: function() { return; } 
    2177                 }, 
    2178  
    2179                 mouseenter: { 
    2180                         setup: function() { 
    2181                                 if ( jQuery.browser.msie ) return false; 
    2182                                 jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler); 
    2183                                 return true; 
    2184                         }, 
    2185  
    2186                         teardown: function() { 
    2187                                 if ( jQuery.browser.msie ) return false; 
    2188                                 jQuery(this).unbind("mouseover", jQuery.event.special.mouseenter.handler); 
    2189                                 return true; 
    2190                         }, 
    2191  
    2192                         handler: function(event) { 
    2193                                 // If we actually just moused on to a sub-element, ignore it 
    2194                                 if ( withinElement(event, this) ) return true; 
    2195                                 // Execute the right handlers by setting the event type to mouseenter 
    2196                                 event.type = "mouseenter"; 
    2197                                 return jQuery.event.handle.apply(this, arguments); 
    2198                         } 
    2199                 }, 
    2200  
    2201                 mouseleave: { 
    2202                         setup: function() { 
    2203                                 if ( jQuery.browser.msie ) return false; 
    2204                                 jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler); 
    2205                                 return true; 
    2206                         }, 
    2207  
    2208                         teardown: function() { 
    2209                                 if ( jQuery.browser.msie ) return false; 
    2210                                 jQuery(this).unbind("mouseout", jQuery.event.special.mouseleave.handler); 
    2211                                 return true; 
    2212                         }, 
    2213  
    2214                         handler: function(event) { 
    2215                                 // If we actually just moused on to a sub-element, ignore it 
    2216                                 if ( withinElement(event, this) ) return true; 
    2217                                 // Execute the right handlers by setting the event type to mouseleave 
    2218                                 event.type = "mouseleave"; 
    2219                                 return jQuery.event.handle.apply(this, arguments); 
    2220                         } 
    2221                 } 
    2222         } 
    2223 }; 
    2224  
    2225 jQuery.fn.extend({ 
    2226         bind: function( type, data, fn ) { 
    2227                 return type == "unload" ? this.one(type, data, fn) : this.each(function(){ 
    2228                         jQuery.event.add( this, type, fn || data, fn && data ); 
    2229                 }); 
    2230         }, 
    2231  
    2232         one: function( type, data, fn ) { 
    2233                 var one = jQuery.event.proxy( fn || data, function(event) { 
    2234                         jQuery(this).unbind(event, one); 
    2235                         return (fn || data).apply( this, arguments ); 
    2236                 }); 
    2237                 return this.each(function(){ 
    2238                         jQuery.event.add( this, type, one, fn && data); 
    2239                 }); 
    2240         }, 
    2241  
    2242         unbind: function( type, fn ) { 
    2243                 return this.each(function(){ 
    2244                         jQuery.event.remove( this, type, fn ); 
    2245                 }); 
    2246         }, 
    2247  
    2248         trigger: function( type, data, fn ) { 
    2249                 return this.each(function(){ 
    2250                         jQuery.event.trigger( type, data, this, true, fn ); 
    2251                 }); 
    2252         }, 
    2253  
    2254         triggerHandler: function( type, data, fn ) { 
    2255                 return this[0] && jQuery.event.trigger( type, data, this[0], false, fn ); 
    2256         }, 
    2257  
    2258         toggle: function( fn ) { 
    2259                 // Save reference to arguments for access in closure 
    2260                 var args = arguments, i = 1; 
    2261  
    2262                 // link all the functions, so any of them can unbind this click handler 
    2263                 while( i < args.length ) 
    2264                         jQuery.event.proxy( fn, args[i++] ); 
    2265  
    2266                 return this.click( jQuery.event.proxy( fn, function(event) { 
    2267                         // Figure out which function to execute 
    2268                         this.lastToggle = ( this.lastToggle || 0 ) % i; 
    2269  
    2270                         // Make sure that clicks stop 
    2271                         event.preventDefault(); 
    2272  
    2273                         // and execute the function 
    2274                         return args[ this.lastToggle++ ].apply( this, arguments ) || false; 
    2275                 })); 
    2276         }, 
    2277  
    2278         hover: function(fnOver, fnOut) { 
    2279                 return this.bind('mouseenter', fnOver).bind('mouseleave', fnOut); 
    2280         }, 
    2281  
    2282         ready: function(fn) { 
    2283                 // Attach the listeners 
    2284                 bindReady(); 
    2285  
    2286                 // If the DOM is already ready 
    2287                 if ( jQuery.isReady ) 
    2288                         // Execute the function immediately 
    2289                         fn.call( document, jQuery ); 
    2290  
    2291                 // Otherwise, remember the function for later 
    2292                 else 
    2293                         // Add the function to the wait list 
    2294                         jQuery.readyList.push( function() { return fn.call(this, jQuery); } ); 
    2295  
    2296                 return this; 
    2297         } 
    2298 }); 
    2299  
    2300 jQuery.extend({ 
    2301         isReady: false, 
    2302         readyList: [], 
    2303         // Handle when the DOM is ready 
    2304         ready: function() { 
    2305                 // Make sure that the DOM is not already loaded 
    2306                 if ( !jQuery.isReady ) { 
    2307                         // Remember that the DOM is ready 
    2308                         jQuery.isReady = true; 
    2309  
    2310                         // If there are functions bound, to execute 
    2311                         if ( jQuery.readyList ) { 
    2312                                 // Execute all of them 
    2313                                 jQuery.each( jQuery.readyList, function(){ 
    2314                                         this.call( document ); 
    2315                                 }); 
    2316  
    2317                                 // Reset the list of functions 
    2318                                 jQuery.readyList = null; 
    2319                         } 
    2320  
    2321                         // Trigger any bound ready events 
    2322                         jQuery(document).triggerHandler("ready"); 
    2323                 } 
    2324         } 
    2325 }); 
    2326  
    2327 var readyBound = false; 
    2328  
    2329 function bindReady(){ 
    2330         if ( readyBound ) return; 
    2331         readyBound = true; 
    2332  
    2333         // Mozilla, Opera (see further below for it) and webkit nightlies currently support this event 
    2334         if ( document.addEventListener && !jQuery.browser.opera) 
    2335                 // Use the handy event callback 
    2336                 document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); 
    2337  
    2338         // If IE is used and is not in a frame 
    2339         // Continually check to see if the document is ready 
    2340         if ( jQuery.browser.msie && window == top ) (function(){ 
    2341                 if (jQuery.isReady) return; 
    2342                 try { 
    2343                         // If IE is used, use the trick by Diego Perini 
    2344                         // http://javascript.nwbox.com/IEContentLoaded/ 
    2345                         document.documentElement.doScroll("left"); 
    2346                 } catch( error ) { 
    2347                         setTimeout( arguments.callee, 0 ); 
    2348                         return; 
    2349                 } 
    2350                 // and execute any waiting functions 
    2351                 jQuery.ready(); 
    2352         })(); 
    2353  
    2354         if ( jQuery.browser.opera ) 
    2355                 document.addEventListener( "DOMContentLoaded", function () { 
    2356                         if (jQuery.isReady) return; 
    2357                         for (var i = 0; i < document.styleSheets.length; i++) 
    2358                                 if (document.styleSheets[i].disabled) { 
    2359                                         setTimeout( arguments.callee, 0 ); 
    2360                                         return; 
    2361                                 } 
    2362                         // and execute any waiting functions 
    2363                         jQuery.ready(); 
    2364                 }, false); 
    2365  
    2366         if ( jQuery.browser.safari ) { 
    2367                 var numStyles; 
    2368                 (function(){ 
    2369                         if (jQuery.isReady) return; 
    2370                         if ( document.readyState != "loaded" && document.readyState != "complete" ) { 
    2371                                 setTimeout( arguments.callee, 0 ); 
    2372                                 return; 
    2373                         } 
    2374                         if ( numStyles === undefined ) 
    2375                                 numStyles = jQuery("style, link[rel=stylesheet]").length; 
    2376                         if ( document.styleSheets.length != numStyles ) { 
    2377                                 setTimeout( arguments.callee, 0 ); 
    2378                                 return; 
    2379                         } 
    2380                         // and execute any waiting functions 
    2381                         jQuery.ready(); 
    2382                 })(); 
    2383         } 
    2384  
    2385         // A fallback to window.onload, that will always work 
    2386         jQuery.event.add( window, "load", jQuery.ready ); 
    2387 } 
    2388  
    2389 jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + 
    2390         "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + 
    2391         "submit,keydown,keypress,keyup,error").split(","), function(i, name){ 
    2392  
    2393         // Handle event binding 
    2394         jQuery.fn[name] = function(fn){ 
    2395                 return fn ? this.bind(name, fn) : this.trigger(name); 
    2396         }; 
    2397 }); 
    2398  
    2399 // Checks if an event happened on an element within another element 
    2400 // Used in jQuery.event.special.mouseenter and mouseleave handlers 
    2401 var withinElement = function(event, elem) { 
    2402         // Check if mouse(over|out) are still within the same parent element 
    2403         var parent = event.relatedTarget; 
    2404         // Traverse up the tree 
    2405         while ( parent && parent != elem ) try { parent = parent.parentNode; } catch(error) { parent = elem; } 
    2406         // Return true if we actually just moused on to a sub-element 
    2407         return parent == elem; 
    2408 }; 
    2409  
    2410 // Prevent memory leaks in IE 
    2411 // And prevent errors on refresh with events like mouseover in other browsers 
    2412 // Window isn't included so as not to unbind existing unload events 
    2413 jQuery(window).bind("unload", function() { 
    2414         jQuery("*").add(document).unbind(); 
    2415 }); 
    2416 jQuery.fn.extend({ 
    2417         // Keep a copy of the old load 
    2418         _load: jQuery.fn.load, 
    2419  
    2420         load: function( url, params, callback ) { 
    2421                 if ( typeof url != 'string' ) 
    2422                         return this._load( url ); 
    2423  
    2424                 var off = url.indexOf(" "); 
    2425                 if ( off >= 0 ) { 
    2426                         var selector = url.slice(off, url.length); 
    2427                         url = url.slice(0, off); 
    2428                 } 
    2429  
    2430                 callback = callback || function(){}; 
    2431  
    2432                 // Default to a GET request 
    2433                 var type = "GET"; 
    2434  
    2435                 // If the second parameter was provided 
    2436                 if ( params ) 
    2437                         // If it's a function 
    2438                         if ( jQuery.isFunction( params ) ) { 
    2439                                 // We assume that it's the callback 
    2440                                 callback = params; 
    2441                                 params = null; 
    2442  
    2443                         // Otherwise, build a param string 
    2444                         } else { 
    2445                                 params = jQuery.param( params ); 
    2446                                 type = "POST"; 
    2447                         } 
    2448  
    2449                 var self = this; 
    2450  
    2451                 // Request the remote document 
    2452                 jQuery.ajax({ 
    2453                         url: url, 
    2454                         type: type, 
    2455                         dataType: "html", 
    2456                         data: params, 
    2457                         complete: function(res, status){ 
    2458                                 // If successful, inject the HTML into all the matched elements 
    2459                                 if ( status == "success" || status == "notmodified" ) 
    2460                                         // See if a selector was specified 
    2461                                         self.html( selector ? 
    2462                                                 // Create a dummy div to hold the results 
    2463                                                 jQuery("<div/>") 
    2464                                                         // inject the contents of the document in, removing the scripts 
    2465                                                         // to avoid any 'Permission Denied' errors in IE 
    2466                                                         .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, "")) 
    2467  
    2468                                                         // Locate the specified elements 
    2469                                                         .find(selector) : 
    2470  
    2471                                                 // If not, just inject the full result 
    2472                                                 res.responseText ); 
    2473  
    2474                                 self.each( callback, [res.responseText, status, res] ); 
    2475                         } 
    2476                 }); 
    2477                 return this; 
    2478         }, 
    2479  
    2480         serialize: function() { 
    2481                 return jQuery.param(this.serializeArray()); 
    2482         }, 
    2483         serializeArray: function() { 
    2484                 return this.map(function(){ 
    2485                         return jQuery.nodeName(this, "form") ? 
    2486                                 jQuery.makeArray(this.elements) : this; 
    2487                 }) 
    2488                 .filter(function(){ 
    2489                         return this.name && !this.disabled && 
    2490                                 (this.checked || /select|textarea/i.test(this.nodeName) || 
    2491                                         /text|hidden|password/i.test(this.type)); 
    2492                 }) 
    2493                 .map(function(i, elem){ 
    2494                         var val = jQuery(this).val(); 
    2495                         return val == null ? null : 
    2496                                 val.constructor == Array ? 
    2497                                         jQuery.map( val, function(val, i){ 
    2498                                                 return {name: elem.name, value: val}; 
    2499                                         }) : 
    2500                                         {name: elem.name, value: val}; 
    2501                 }).get(); 
    2502         } 
    2503 }); 
    2504  
    2505 // Attach a bunch of functions for handling common AJAX events 
    2506 jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){ 
    2507         jQuery.fn[o] = function(f){ 
    2508                 return this.bind(o, f); 
    2509         }; 
    2510 }); 
    2511  
    2512 var jsc = now(); 
    2513  
    2514 jQuery.extend({ 
    2515         get: function( url, data, callback, type ) { 
    2516                 // shift arguments if data argument was ommited 
    2517                 if ( jQuery.isFunction( data ) ) { 
    2518                         callback = data; 
    2519                         data = null; 
    2520                 } 
    2521  
    2522                 return jQuery.ajax({ 
    2523                         type: "GET", 
    2524                         url: url, 
    2525                         data: data, 
    2526                         success: callback, 
    2527                         dataType: type 
    2528                 }); 
    2529         }, 
    2530  
    2531         getScript: function( url, callback ) { 
    2532                 return jQuery.get(url, null, callback, "script"); 
    2533         }, 
    2534  
    2535         getJSON: function( url, data, callback ) { 
    2536                 return jQuery.get(url, data, callback, "json"); 
    2537         }, 
    2538  
    2539         post: function( url, data, callback, type ) { 
    2540                 if ( jQuery.isFunction( data ) ) { 
    2541                         callback = data; 
    2542                         data = {}; 
    2543                 } 
    2544  
    2545                 return jQuery.ajax({ 
    2546                         type: "POST", 
    2547                         url: url, 
    2548                         data: data, 
    2549                         success: callback, 
    2550                         dataType: type 
    2551                 }); 
    2552         }, 
    2553  
    2554         ajaxSetup: function( settings ) { 
    2555                 jQuery.extend( jQuery.ajaxSettings, settings ); 
    2556         }, 
    2557  
    2558         ajaxSettings: { 
    2559                 url: location.href, 
    2560                 global: true, 
    2561                 type: "GET", 
    2562                 timeout: 0, 
    2563                 contentType: "application/x-www-form-urlencoded", 
    2564                 processData: true, 
    2565                 async: true, 
    2566                 data: null, 
    2567                 username: null, 
    2568                 password: null, 
    2569                 accepts: { 
    2570                         xml: "application/xml, text/xml", 
    2571                         html: "text/html", 
    2572                         script: "text/javascript, application/javascript", 
    2573                         json: "application/json, text/javascript", 
    2574                         text: "text/plain", 
    2575                         _default: "*/*" 
    2576                 } 
    2577         }, 
    2578  
    2579         // Last-Modified header cache for next request 
    2580         lastModified: {}, 
    2581  
    2582         ajax: function( s ) { 
    2583                 // Extend the settings, but re-extend 's' so that it can be 
    2584                 // checked again later (in the test suite, specifically) 
    2585                 s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s)); 
    2586  
    2587                 var jsonp, jsre = /=\?(&|$)/g, status, data, 
    2588                         type = s.type.toUpperCase(); 
    2589  
    2590                 // convert data if not already a string 
    2591                 if ( s.data && s.processData && typeof s.data != "string" ) 
    2592                         s.data = jQuery.param(s.data); 
    2593  
    2594                 // Handle JSONP Parameter Callbacks 
    2595                 if ( s.dataType == "jsonp" ) { 
    2596                         if ( type == "GET" ) { 
    2597                                 if ( !s.url.match(jsre) ) 
    2598                                         s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?"; 
    2599                         } else if ( !s.data || !s.data.match(jsre) ) 
    2600                                 s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; 
    2601                         s.dataType = "json"; 
    2602                 } 
    2603  
    2604                 // Build temporary JSONP function 
    2605                 if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) { 
    2606                         jsonp = "jsonp" + jsc++; 
    2607  
    2608                         // Replace the =? sequence both in the query string and the data 
    2609                         if ( s.data ) 
    2610                                 s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1"); 
    2611                         s.url = s.url.replace(jsre, "=" + jsonp + "$1"); 
    2612  
    2613                         // We need to make sure 
    2614                         // that a JSONP style response is executed properly 
    2615                         s.dataType = "script"; 
    2616  
    2617                         // Handle JSONP-style loading 
    2618                         window[ jsonp ] = function(tmp){ 
    2619                                 data = tmp; 
    2620                                 success(); 
    2621                                 complete(); 
    2622                                 // Garbage collect 
    2623                                 window[ jsonp ] = undefined; 
    2624                                 try{ delete window[ jsonp ]; } catch(e){} 
    2625                                 if ( head ) 
    2626                                         head.removeChild( script ); 
    2627                         }; 
    2628                 } 
    2629  
    2630                 if ( s.dataType == "script" && s.cache == null ) 
    2631                         s.cache = false; 
    2632  
    2633                 if ( s.cache === false && type == "GET" ) { 
    2634                         var ts = now(); 
    2635                         // try replacing _= if it is there 
    2636                         var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2"); 
    2637                         // if nothing was replaced, add timestamp to the end 
    2638                         s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : ""); 
    2639                 } 
    2640  
    2641                 // If data is available, append data to url for get requests 
    2642                 if ( s.data && type == "GET" ) { 
    2643                         s.url += (s.url.match(/\?/) ? "&" : "?") + s.data; 
    2644  
    2645                         // IE likes to send both get and post data, prevent this 
    2646                         s.data = null; 
    2647                 } 
    2648  
    2649                 // Watch for a new set of requests 
    2650                 if ( s.global && ! jQuery.active++ ) 
    2651                         jQuery.event.trigger( "ajaxStart" ); 
    2652  
    2653                 // Matches an absolute URL, and saves the domain 
    2654                 var remote = /^(?:\w+:)?\/\/([^\/?#]+)/; 
    2655  
    2656                 // If we're requesting a remote document 
    2657                 // and trying to load JSON or Script with a GET 
    2658                 if ( s.dataType == "script" && type == "GET" 
    2659                                 && remote.test(s.url) && remote.exec(s.url)[1] != location.host ){ 
    2660                         var head = document.getElementsByTagName("head")[0]; 
    2661                         var script = document.createElement("script"); 
    2662                         script.src = s.url; 
    2663                         if (s.scriptCharset) 
    2664                                 script.charset = s.scriptCharset; 
    2665  
    2666                         // Handle Script loading 
    2667                         if ( !jsonp ) { 
    2668                                 var done = false; 
    2669  
    2670                                 // Attach handlers for all browsers 
    2671                                 script.onload = script.onreadystatechange = function(){ 
    2672                                         if ( !done && (!this.readyState || 
    2673                                                         this.readyState == "loaded" || this.readyState == "complete") ) { 
    2674                                                 done = true; 
    2675                                                 success(); 
    2676                                                 complete(); 
    2677                                                 head.removeChild( script ); 
    2678                                         } 
    2679                                 }; 
    2680                         } 
    2681  
    2682                         head.appendChild(script); 
    2683  
    2684                         // We handle everything using the script element injection 
    2685                         return undefined; 
    2686                 } 
    2687  
    2688                 var requestDone = false; 
    2689  
    2690                 // Create the request object; Microsoft failed to properly 
    2691                 // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available 
    2692                 var xhr = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); 
    2693  
    2694                 // Open the socket 
    2695                 // Passing null username, generates a login popup on Opera (#2865) 
    2696                 if( s.username ) 
    2697                         xhr.open(type, s.url, s.async, s.username, s.password); 
    2698                 else 
    2699                         xhr.open(type, s.url, s.async); 
    2700  
    2701                 // Need an extra try/catch for cross domain requests in Firefox 3 
    2702                 try { 
    2703                         // Set the correct header, if data is being sent 
    2704                         if ( s.data ) 
    2705                                 xhr.setRequestHeader("Content-Type", s.contentType); 
    2706  
    2707                         // Set the If-Modified-Since header, if ifModified mode. 
    2708                         if ( s.ifModified ) 
    2709                                 xhr.setRequestHeader("If-Modified-Since", 
    2710                                         jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" ); 
    2711  
    2712                         // Set header so the called script knows that it's an XMLHttpRequest 
    2713                         xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); 
    2714  
    2715                         // Set the Accepts header for the server, depending on the dataType 
    2716                         xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ? 
    2717                                 s.accepts[ s.dataType ] + ", */*" : 
    2718                                 s.accepts._default ); 
    2719                 } catch(e){} 
    2720  
    2721                 // Allow custom headers/mimetypes 
    2722                 if ( s.beforeSend && s.beforeSend(xhr, s) === false ) { 
    2723                         // cleanup active request counter 
    2724                         s.global && jQuery.active--; 
    2725                         // close opended socket 
    2726                         xhr.abort(); 
    2727                         return false; 
    2728                 } 
    2729  
    2730                 if ( s.global ) 
    2731                         jQuery.event.trigger("ajaxSend", [xhr, s]); 
    2732  
    2733                 // Wait for a response to come back 
    2734                 var onreadystatechange = function(isTimeout){ 
    2735                         // The transfer is complete and the data is available, or the request timed out 
    2736                         if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) { 
    2737                                 requestDone = true; 
    2738  
    2739                                 // clear poll interval 
    2740                                 if (ival) { 
    2741                                         clearInterval(ival); 
    2742                                         ival = null; 
    2743                                 } 
    2744  
    2745                                 status = isTimeout == "timeout" && "timeout" || 
    2746                                         !jQuery.httpSuccess( xhr ) && "error" || 
    2747                                         s.ifModified && jQuery.httpNotModified( xhr, s.url ) && "notmodified" || 
    2748                                         "success"; 
    2749  
    2750                                 if ( status == "success" ) { 
    2751                                         // Watch for, and catch, XML document parse errors 
    2752                                         try { 
    2753                                                 // process the data (runs the xml through httpData regardless of callback) 
    2754                                                 data = jQuery.httpData( xhr, s.dataType, s.dataFilter ); 
    2755                                         } catch(e) { 
    2756                                                 status = "parsererror"; 
    2757                                         } 
    2758                                 } 
    2759  
    2760                                 // Make sure that the request was successful or notmodified 
    2761                                 if ( status == "success" ) { 
    2762                                         // Cache Last-Modified header, if ifModified mode. 
    2763                                         var modRes; 
    2764                                         try { 
    2765                                                 modRes = xhr.getResponseHeader("Last-Modified"); 
    2766                                         } catch(e) {} // swallow exception thrown by FF if header is not available 
    2767  
    2768                                         if ( s.ifModified && modRes ) 
    2769                                                 jQuery.lastModified[s.url] = modRes; 
    2770  
    2771                                         // JSONP handles its own success callback 
    2772                                         if ( !jsonp ) 
    2773                                                 success(); 
    2774                                 } else 
    2775                                         jQuery.handleError(s, xhr, status); 
    2776  
    2777                                 // Fire the complete handlers 
    2778                                 complete(); 
    2779  
    2780                                 // Stop memory leaks 
    2781                                 if ( s.async ) 
    2782                                         xhr = null; 
    2783                         } 
    2784                 }; 
    2785  
    2786                 if ( s.async ) { 
    2787                         // don't attach the handler to the request, just poll it instead 
    2788                         var ival = setInterval(onreadystatechange, 13); 
    2789  
    2790                         // Timeout checker 
    2791                         if ( s.timeout > 0 ) 
    2792                                 setTimeout(function(){ 
    2793                                         // Check to see if the request is still happening 
    2794                                         if ( xhr ) { 
    2795                                                 // Cancel the request 
    2796                                                 xhr.abort(); 
    2797  
    2798                                                 if( !requestDone ) 
    2799                                                         onreadystatechange( "timeout" ); 
    2800                                         } 
    2801                                 }, s.timeout); 
    2802                 } 
    2803  
    2804                 // Send the data 
    2805                 try { 
    2806                         xhr.send(s.data); 
    2807                 } catch(e) { 
    2808                         jQuery.handleError(s, xhr, null, e); 
    2809                 } 
    2810  
    2811                 // firefox 1.5 doesn't fire statechange for sync requests 
    2812                 if ( !s.async ) 
    2813                         onreadystatechange(); 
    2814  
    2815                 function success(){ 
    2816                         // If a local callback was specified, fire it and pass it the data 
    2817                         if ( s.success ) 
    2818                                 s.success( data, status ); 
    2819  
    2820                         // Fire the global callback 
    2821                         if ( s.global ) 
    2822                                 jQuery.event.trigger( "ajaxSuccess", [xhr, s] ); 
    2823                 } 
    2824  
    2825                 function complete(){ 
    2826                         // Process result 
    2827                         if ( s.complete ) 
    2828                                 s.complete(xhr, status); 
    2829  
    2830                         // The request was completed 
    2831                         if ( s.global ) 
    2832                                 jQuery.event.trigger( "ajaxComplete", [xhr, s] ); 
    2833  
    2834                         // Handle the global AJAX counter 
    2835                         if ( s.global && ! --jQuery.active ) 
    2836                                 jQuery.event.trigger( "ajaxStop" ); 
    2837                 } 
    2838  
    2839                 // return XMLHttpRequest to allow aborting the request etc. 
    2840                 return xhr; 
    2841         }, 
    2842  
    2843         handleError: function( s, xhr, status, e ) { 
    2844                 // If a local callback was specified, fire it 
    2845                 if ( s.error ) s.error( xhr, status, e ); 
    2846  
    2847                 // Fire the global callback 
    2848                 if ( s.global ) 
    2849                         jQuery.event.trigger( "ajaxError", [xhr, s, e] ); 
    2850         }, 
    2851  
    2852         // Counter for holding the number of active queries 
    2853         active: 0, 
    2854  
    2855         // Determines if an XMLHttpRequest was successful or not 
    2856         httpSuccess: function( xhr ) { 
    2857                 try { 
    2858                         // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 
    2859                         return !xhr.status && location.protocol == "file:" || 
    2860                                 ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223 || 
    2861                                 jQuery.browser.safari && xhr.status == undefined; 
    2862                 } catch(e){} 
    2863                 return false; 
    2864         }, 
    2865  
    2866         // Determines if an XMLHttpRequest returns NotModified 
    2867         httpNotModified: function( xhr, url ) { 
    2868                 try { 
    2869                         var xhrRes = xhr.getResponseHeader("Last-Modified"); 
    2870  
    2871                         // Firefox always returns 200. check Last-Modified date 
    2872                         return xhr.status == 304 || xhrRes == jQuery.lastModified[url] || 
    2873                                 jQuery.browser.safari && xhr.status == undefined; 
    2874                 } catch(e){} 
    2875                 return false; 
    2876         }, 
    2877  
    2878         httpData: function( xhr, type, filter ) { 
    2879                 var ct = xhr.getResponseHeader("content-type"), 
    2880                         xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0, 
    2881                         data = xml ? xhr.responseXML : xhr.responseText; 
    2882  
    2883                 if ( xml && data.documentElement.tagName == "parsererror" ) 
    2884                         throw "parsererror"; 
    2885                          
    2886                 // Allow a pre-filtering function to sanitize the response 
    2887                 if( filter ) 
    2888                         data = filter( data, type ); 
    2889  
    2890                 // If the type is "script", eval it in global context 
    2891                 if ( type == "script" ) 
    2892                         jQuery.globalEval( data ); 
    2893  
    2894                 // Get the JavaScript object, if JSON is used. 
    2895                 if ( type == "json" ) 
    2896                         data = eval("(" + data + ")"); 
    2897  
    2898                 return data; 
    2899         }, 
    2900  
    2901         // Serialize an array of form elements or a set of 
    2902         // key/values into a query string 
    2903         param: function( a ) { 
    2904                 var s = []; 
    2905  
    2906                 // If an array was passed in, assume that it is an array 
    2907                 // of form elements 
    2908                 if ( a.constructor == Array || a.jquery ) 
    2909                         // Serialize the form elements 
    2910                         jQuery.each( a, function(){ 
    2911                                 s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) ); 
    2912                         }); 
    2913  
    2914                 // Otherwise, assume that it's an object of key/value pairs 
    2915                 else 
    2916                         // Serialize the key/values 
    2917                         for ( var j in a ) 
    2918                                 // If the value is an array then the key names need to be repeated 
    2919                                 if ( a[j] && a[j].constructor == Array ) 
    2920                                         jQuery.each( a[j], function(){ 
    2921                                                 s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) ); 
    2922                                         }); 
    2923                                 else 
    2924                                         s.push( encodeURIComponent(j) + "=" + encodeURIComponent( jQuery.isFunction(a[j]) ? a[j]() : a[j] ) ); 
    2925  
    2926                 // Return the resulting serialization 
    2927                 return s.join("&").replace(/%20/g, "+"); 
    2928         } 
    2929  
    2930 }); 
    2931 jQuery.fn.extend({ 
    2932         show: function(speed,callback){ 
    2933                 return speed ? 
    2934                         this.animate({ 
    2935                                 height: "show", width: "show", opacity: "show" 
    2936                         }, speed, callback) : 
    2937  
    2938                         this.filter(":hidden").each(function(){ 
    2939                                 this.style.display = this.oldblock || ""; 
    2940                                 if ( jQuery.css(this,"display") == "none" ) { 
    2941                                         var elem = jQuery("<" + this.tagName + " />").appendTo("body"); 
    2942                                         this.style.display = elem.css("display"); 
    2943                                         // handle an edge condition where css is - div { display:none; } or similar 
    2944                                         if (this.style.display == "none") 
    2945                                                 this.style.display = "block"; 
    2946                                         elem.remove(); 
    2947                                 } 
    2948                         }).end(); 
    2949         }, 
    2950  
    2951         hide: function(speed,callback){ 
    2952                 return speed ? 
    2953                         this.animate({ 
    2954                                 height: "hide", width: "hide", opacity: "hide" 
    2955                         }, speed, callback) : 
    2956  
    2957                         this.filter(":visible").each(function(){ 
    2958                                 this.oldblock = this.oldblock || jQuery.css(this,"display"); 
    2959                                 this.style.display = "none"; 
    2960                         }).end(); 
    2961         }, 
    2962  
    2963         // Save the old toggle function 
    2964         _toggle: jQuery.fn.toggle, 
    2965  
    2966         toggle: function( fn, fn2 ){ 
    2967                 return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? 
    2968                         this._toggle.apply( this, arguments ) : 
    2969                         fn ? 
    2970                                 this.animate({ 
    2971                                         height: "toggle", width: "toggle", opacity: "toggle" 
    2972                                 }, fn, fn2) : 
    2973                                 this.each(function(){ 
    2974                                         jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); 
    2975                                 }); 
    2976         }, 
    2977  
    2978         slideDown: function(speed,callback){ 
    2979                 return this.animate({height: "show"}, speed, callback); 
    2980         }, 
    2981  
    2982         slideUp: function(speed,callback){ 
    2983                 return this.animate({height: "hide"}, speed, callback); 
    2984         }, 
    2985  
    2986         slideToggle: function(speed, callback){ 
    2987                 return this.animate({height: "toggle"}, speed, callback); 
    2988         }, 
    2989  
    2990         fadeIn: function(speed, callback){ 
    2991                 return this.animate({opacity: "show"}, speed, callback); 
    2992         }, 
    2993  
    2994         fadeOut: function(speed, callback){ 
    2995                 return this.animate({opacity: "hide"}, speed, callback); 
    2996         }, 
    2997  
    2998         fadeTo: function(speed,to,callback){ 
    2999                 return this.animate({opacity: to}, speed, callback); 
    3000         }, 
    3001  
    3002         animate: function( prop, speed, easing, callback ) { 
    3003                 var optall = jQuery.speed(speed, easing, callback); 
    3004  
    3005                 return this[ optall.queue === false ? "each" : "queue" ](function(){ 
    3006                         if ( this.nodeType != 1) 
    3007                                 return false; 
    3008  
    3009                         var opt = jQuery.extend({}, optall), p, 
    3010                                 hidden = jQuery(this).is(":hidden"), self = this; 
    3011  
    3012                         for ( p in prop ) { 
    3013                                 if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) 
    3014                                         return opt.complete.call(this); 
    3015  
    3016                                 if ( p == "height" || p == "width" ) { 
    3017                                         // Store display property 
    3018                                         opt.display = jQuery.css(this, "display"); 
    3019  
    3020                                         // Make sure that nothing sneaks out 
    3021                                         opt.overflow = this.style.overflow; 
    3022                                 } 
    3023                         } 
    3024  
    3025                         if ( opt.overflow != null ) 
    3026                                 this.style.overflow = "hidden"; 
    3027  
    3028                         opt.curAnim = jQuery.extend({}, prop); 
    3029  
    3030                         jQuery.each( prop, function(name, val){ 
    3031                                 var e = new jQuery.fx( self, opt, name ); 
    3032  
    3033                                 if ( /toggle|show|hide/.test(val) ) 
    3034                                         e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop ); 
    3035                                 else { 
    3036                                         var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), 
    3037                                                 start = e.cur(true) || 0; 
    3038  
    3039                                         if ( parts ) { 
    3040                                                 var end = parseFloat(parts[2]), 
    3041                                                         unit = parts[3] || "px"; 
    3042  
    3043                                                 // We need to compute starting value 
    3044                                                 if ( unit != "px" ) { 
    3045                                                         self.style[ name ] = (end || 1) + unit; 
    3046                                                         start = ((end || 1) / e.cur(true)) * start; 
    3047                                                         self.style[ name ] = start + unit; 
    3048                                                 } 
    3049  
    3050                                                 // If a +=/-= token was provided, we're doing a relative animation 
    3051                                                 if ( parts[1] ) 
    3052                                                         end = ((parts[1] == "-=" ? -1 : 1) * end) + start; 
    3053  
    3054                                                 e.custom( start, end, unit ); 
    3055                                         } else 
    3056                                                 e.custom( start, val, "" ); 
    3057                                 } 
    3058                         }); 
    3059  
    3060                         // For JS strict compliance 
    3061                         return true; 
    3062                 }); 
    3063         }, 
    3064  
    3065         queue: function(type, fn){ 
    3066                 if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) { 
    3067                         fn = type; 
    3068                         type = "fx"; 
    3069                 } 
    3070  
    3071                 if ( !type || (typeof type == "string" && !fn) ) 
    3072                         return queue( this[0], type ); 
    3073  
    3074                 return this.each(function(){ 
    3075                         if ( fn.constructor == Array ) 
    3076                                 queue(this, type, fn); 
    3077                         else { 
    3078                                 queue(this, type).push( fn ); 
    3079  
    3080                                 if ( queue(this, type).length == 1 ) 
    3081                                         fn.call(this); 
    3082                         } 
    3083                 }); 
    3084         }, 
    3085  
    3086         stop: function(clearQueue, gotoEnd){ 
    3087                 var timers = jQuery.timers; 
    3088  
    3089                 if (clearQueue) 
    3090                         this.queue([]); 
    3091  
    3092                 this.each(function(){ 
    3093                         // go in reverse order so anything added to the queue during the loop is ignored 
    3094                         for ( var i = timers.length - 1; i >= 0; i-- ) 
    3095                                 if ( timers[i].elem == this ) { 
    3096                                         if (gotoEnd) 
    3097                                                 // force the next step to be the last 
    3098                                                 timers[i](true); 
    3099                                         timers.splice(i, 1); 
    3100                                 } 
    3101                 }); 
    3102  
    3103                 // start the next in the queue if the last step wasn't forced 
    3104                 if (!gotoEnd) 
    3105                         this.dequeue(); 
    3106  
    3107                 return this; 
    3108         } 
    3109  
    3110 }); 
    3111  
    3112 var queue = function( elem, type, array ) { 
    3113         if ( elem ){ 
    3114  
    3115                 type = type || "fx"; 
    3116  
    3117                 var q = jQuery.data( elem, type + "queue" ); 
    3118  
    3119                 if ( !q || array ) 
    3120                         q = jQuery.data( elem, type + "queue", jQuery.makeArray(array) ); 
    3121  
    3122         } 
    3123         return q; 
    3124 }; 
    3125  
    3126 jQuery.fn.dequeue = function(type){ 
    3127         type = type || "fx"; 
    3128  
    3129         return this.each(function(){ 
    3130                 var q = queue(this, type); 
    3131  
    3132                 q.shift(); 
    3133  
    3134                 if ( q.length ) 
    3135                         q[0].call( this ); 
    3136         }); 
    3137 }; 
    3138  
    3139 jQuery.extend({ 
    3140  
    3141         speed: function(speed, easing, fn) { 
    3142                 var opt = speed && speed.constructor == Object ? speed : { 
    3143                         complete: fn || !fn && easing || 
    3144                                 jQuery.isFunction( speed ) && speed, 
    3145                         duration: speed, 
    3146                         easing: fn && easing || easing && easing.constructor != Function && easing 
    3147                 }; 
    3148  
    3149                 opt.duration = (opt.duration && opt.duration.constructor == Number ? 
    3150                         opt.duration : 
    3151                         jQuery.fx.speeds[opt.duration]) || jQuery.fx.speeds.def; 
    3152  
    3153                 // Queueing 
    3154                 opt.old = opt.complete; 
    3155                 opt.complete = function(){ 
    3156                         if ( opt.queue !== false ) 
    3157                                 jQuery(this).dequeue(); 
    3158                         if ( jQuery.isFunction( opt.old ) ) 
    3159                                 opt.old.call( this ); 
    3160                 }; 
    3161  
    3162                 return opt; 
    3163         }, 
    3164  
    3165         easing: { 
    3166                 linear: function( p, n, firstNum, diff ) { 
    3167                         return firstNum + diff * p; 
    3168                 }, 
    3169                 swing: function( p, n, firstNum, diff ) { 
    3170                         return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; 
    3171                 } 
    3172         }, 
    3173  
    3174         timers: [], 
    3175         timerId: null, 
    3176  
    3177         fx: function( elem, options, prop ){ 
    3178                 this.options = options; 
    3179                 this.elem = elem; 
    3180                 this.prop = prop; 
    3181  
    3182                 if ( !options.orig ) 
    3183                         options.orig = {}; 
    3184         } 
    3185  
    3186 }); 
    3187  
    3188 jQuery.fx.prototype = { 
    3189  
    3190         // Simple function for setting a style value 
    3191         update: function(){ 
    3192                 if ( this.options.step ) 
    3193                         this.options.step.call( this.elem, this.now, this ); 
    3194  
    3195                 (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); 
    3196  
    3197                 // Set display property to block for height/width animations 
    3198                 if ( this.prop == "height" || this.prop == "width" ) 
    3199                         this.elem.style.display = "block"; 
    3200         }, 
    3201  
    3202         // Get the current size 
    3203         cur: function(force){ 
    3204                 if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null ) 
    3205                         return this.elem[ this.prop ]; 
    3206  
    3207                 var r = parseFloat(jQuery.css(this.elem, this.prop, force)); 
    3208                 return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0; 
    3209         }, 
    3210  
    3211         // Start an animation from one number to another 
    3212         custom: function(from, to, unit){ 
    3213                 this.startTime = now(); 
    3214                 this.start = from; 
    3215                 this.end = to; 
    3216                 this.unit = unit || this.unit || "px"; 
    3217                 this.now = this.start; 
    3218                 this.pos = this.state = 0; 
    3219                 this.update(); 
    3220  
    3221                 var self = this; 
    3222                 function t(gotoEnd){ 
    3223                         return self.step(gotoEnd); 
    3224                 } 
    3225  
    3226                 t.elem = this.elem; 
    3227  
    3228                 jQuery.timers.push(t); 
    3229  
    3230                 if ( jQuery.timerId == null ) { 
    3231                         jQuery.timerId = setInterval(function(){ 
    3232                                 var timers = jQuery.timers; 
    3233  
    3234                                 for ( var i = 0; i < timers.length; i++ ) 
    3235                                         if ( !timers[i]() ) 
    3236                                                 timers.splice(i--, 1); 
    3237  
    3238                                 if ( !timers.length ) { 
    3239                                         clearInterval( jQuery.timerId ); 
    3240                                         jQuery.timerId = null; 
    3241                                 } 
    3242                         }, 13); 
    3243                 } 
    3244         }, 
    3245  
    3246         // Simple 'show' function 
    3247         show: function(){ 
    3248                 // Remember where we started, so that we can go back to it later 
    3249                 this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); 
    3250                 this.options.show = true; 
    3251  
    3252                 // Begin the animation 
    3253                 this.custom(0, this.cur()); 
    3254  
    3255                 // Make sure that we start at a small width/height to avoid any 
    3256                 // flash of content 
    3257                 if ( this.prop == "width" || this.prop == "height" ) 
    3258                         this.elem.style[this.prop] = "1px"; 
    3259  
    3260                 // Start by showing the element 
    3261                 jQuery(this.elem).show(); 
    3262         }, 
    3263  
    3264         // Simple 'hide' function 
    3265         hide: function(){ 
    3266                 // Remember where we started, so that we can go back to it later 
    3267                 this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); 
    3268                 this.options.hide = true; 
    3269  
    3270                 // Begin the animation 
    3271                 this.custom(this.cur(), 0); 
    3272         }, 
    3273  
    3274         // Each step of an animation 
    3275         step: function(gotoEnd){ 
    3276                 var t = now(); 
    3277  
    3278                 if ( gotoEnd || t > this.options.duration + this.startTime ) { 
    3279                         this.now = this.end; 
    3280                         this.pos = this.state = 1; 
    3281                         this.update(); 
    3282  
    3283                         this.options.curAnim[ this.prop ] = true; 
    3284  
    3285                         var done = true; 
    3286                         for ( var i in this.options.curAnim ) 
    3287                                 if ( this.options.curAnim[i] !== true ) 
    3288                                         done = false; 
    3289  
    3290                         if ( done ) { 
    3291                                 if ( this.options.display != null ) { 
    3292                                         // Reset the overflow 
    3293                                         this.elem.style.overflow = this.options.overflow; 
    3294  
    3295                                         // Reset the display 
    3296                                         this.elem.style.display = this.options.display; 
    3297                                         if ( jQuery.css(this.elem, "display") == "none" ) 
    3298                                                 this.elem.style.display = "block"; 
    3299                                 } 
    3300  
    3301                                 // Hide the element if the "hide" operation was done 
    3302                                 if ( this.options.hide ) 
    3303                                         this.elem.style.display = "none"; 
    3304  
    3305                                 // Reset the properties, if the item has been hidden or shown 
    3306                                 if ( this.options.hide || this.options.show ) 
    3307                                         for ( var p in this.options.curAnim ) 
    3308                                                 jQuery.attr(this.elem.style, p, this.options.orig[p]); 
    3309                         } 
    3310  
    3311                         if ( done ) 
    3312                                 // Execute the complete function 
    3313                                 this.options.complete.call( this.elem ); 
    3314  
    3315                         return false; 
    3316                 } else { 
    3317                         var n = t - this.startTime; 
    3318                         this.state = n / this.options.duration; 
    3319  
    3320                         // Perform the easing function, defaults to swing 
    3321                         this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration); 
    3322                         this.now = this.start + ((this.end - this.start) * this.pos); 
    3323  
    3324                         // Perform the next step of the animation 
    3325                         this.update(); 
    3326                 } 
    3327  
    3328                 return true; 
    3329         } 
    3330  
    3331 }; 
    3332  
    3333 jQuery.extend( jQuery.fx, { 
    3334         speeds:{ 
    3335                 slow: 600, 
    3336                 fast: 200, 
    3337                 // Default speed 
    3338                 def: 400 
    3339         }, 
    3340         step: { 
    3341                 scrollLeft: function(fx){ 
    3342                         fx.elem.scrollLeft = fx.now; 
    3343                 }, 
    3344  
    3345                 scrollTop: function(fx){ 
    3346                         fx.elem.scrollTop = fx.now; 
    3347                 }, 
    3348  
    3349                 opacity: function(fx){ 
    3350                         jQuery.attr(fx.elem.style, "opacity", fx.now); 
    3351                 }, 
    3352  
    3353                 _default: function(fx){ 
    3354                         fx.elem.style[ fx.prop ] = fx.now + fx.unit; 
    3355                 } 
    3356         } 
    3357 }); 
    3358 // The Offset Method 
    3359 // Originally By Brandon Aaron, part of the Dimension Plugin 
    3360 // http://jquery.com/plugins/project/dimensions 
    3361 jQuery.fn.offset = function() { 
    3362         var left = 0, top = 0, elem = this[0], results; 
    3363  
    3364         if ( elem ) with ( jQuery.browser ) { 
    3365                 var parent       = elem.parentNode, 
    3366                     offsetChild  = elem, 
    3367                     offsetParent = elem.offsetParent, 
    3368                     doc          = elem.ownerDocument, 
    3369                     safari2      = safari && parseInt(version) < 522 && !/adobeair/i.test(userAgent), 
    3370                     css          = jQuery.curCSS, 
    3371                     fixed        = css(elem, "position") == "fixed"; 
    3372  
    3373                 // Use getBoundingClientRect if available 
    3374                 if ( elem.getBoundingClientRect ) { 
    3375                         var box = elem.getBoundingClientRect(); 
    3376  
    3377                         // Add the document scroll offsets 
    3378                         add(box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), 
    3379                                 box.top  + Math.max(doc.documentElement.scrollTop,  doc.body.scrollTop)); 
    3380  
    3381                         // IE adds the HTML element's border, by default it is medium which is 2px 
    3382                         // IE 6 and 7 quirks mode the border width is overwritable by the following css html { border: 0; } 
    3383                         // IE 7 standards mode, the border is always 2px 
    3384                         // This border/offset is typically represented by the clientLeft and clientTop properties 
    3385                         // However, in IE6 and 7 quirks mode the clientLeft and clientTop properties are not updated when overwriting it via CSS 
    3386                         // Therefore this method will be off by 2px in IE while in quirksmode 
    3387                         add( -doc.documentElement.clientLeft, -doc.documentElement.clientTop ); 
    3388  
    3389                 // Otherwise loop through the offsetParents and parentNodes 
    3390                 } else { 
    3391  
    3392                         // Initial element offsets 
    3393                         add( elem.offsetLeft, elem.offsetTop ); 
    3394  
    3395                         // Get parent offsets 
    3396                         while ( offsetParent ) { 
    3397                                 // Add offsetParent offsets 
    3398                                 add( offsetParent.offsetLeft, offsetParent.offsetTop ); 
    3399  
    3400                                 // Mozilla and Safari > 2 does not include the border on offset parents 
    3401                                 // However Mozilla adds the border for table or table cells 
    3402                                 if ( mozilla && !/^t(able|d|h)$/i.test(offsetParent.tagName) || safari && !safari2 ) 
    3403                                         border( offsetParent ); 
    3404  
    3405                                 // Add the document scroll offsets if position is fixed on any offsetParent 
    3406                                 if ( !fixed && css(offsetParent, "position") == "fixed" ) 
    3407                                         fixed = true; 
    3408  
    3409                                 // Set offsetChild to previous offsetParent unless it is the body element 
    3410                                 offsetChild  = /^body$/i.test(offsetParent.tagName) ? offsetChild : offsetParent; 
    3411                                 // Get next offsetParent 
    3412                                 offsetParent = offsetParent.offsetParent; 
    3413                         } 
    3414  
    3415                         // Get parent scroll offsets 
    3416                         while ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) { 
    3417                                 // Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug 
    3418                                 if ( !/^inline|table.*$/i.test(css(parent, "display")) ) 
    3419                                         // Subtract parent scroll offsets 
    3420                                         add( -parent.scrollLeft, -parent.scrollTop ); 
    3421  
    3422                                 // Mozilla does not add the border for a parent that has overflow != visible 
    3423                                 if ( mozilla && css(parent, "overflow") != "visible" ) 
    3424                                         border( parent ); 
    3425  
    3426                                 // Get next parent 
    3427                                 parent = parent.parentNode; 
    3428                         } 
    3429  
    3430                         // Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild 
    3431                         // Mozilla doubles body offsets with a non-absolutely positioned offsetChild 
    3432                         if ( (safari2 && (fixed || css(offsetChild, "position") == "absolute")) || 
    3433                                 (mozilla && css(offsetChild, "position") != "absolute") ) 
    3434                                         add( -doc.body.offsetLeft, -doc.body.offsetTop ); 
    3435  
    3436                         // Add the document scroll offsets if position is fixed 
    3437                         if ( fixed ) 
    3438                                 add(Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), 
    3439                                         Math.max(doc.documentElement.scrollTop,  doc.body.scrollTop)); 
    3440                 } 
    3441  
    3442                 // Return an object with top and left properties 
    3443                 results = { top: top, left: left }; 
    3444         } 
    3445  
    3446         function border(elem) { 
    3447                 add( jQuery.curCSS(elem, "borderLeftWidth", true), jQuery.curCSS(elem, "borderTopWidth", true) ); 
    3448         } 
    3449  
    3450         function add(l, t) { 
    3451                 left += parseInt(l, 10) || 0; 
    3452                 top += parseInt(t, 10) || 0; 
    3453         } 
    3454  
    3455         return results; 
    3456 }; 
    3457  
    3458  
    3459 jQuery.fn.extend({ 
    3460         position: function() { 
    3461                 var left = 0, top = 0, results; 
    3462  
    3463                 if ( this[0] ) { 
    3464                         // Get *real* offsetParent 
    3465                         var offsetParent = this.offsetParent(), 
    3466  
    3467                         // Get correct offsets 
    3468                         offset       = this.offset(), 
    3469                         parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset(); 
    3470  
    3471                         // Subtract element margins 
    3472                         // note: when an element has margin: auto the offsetLeft and marginLeft  
    3473                         // are the same in Safari causing offset.left to incorrectly be 0 
    3474                         offset.top  -= num( this, 'marginTop' ); 
    3475                         offset.left -= num( this, 'marginLeft' ); 
    3476  
    3477                         // Add offsetParent borders 
    3478                         parentOffset.top  += num( offsetParent, 'borderTopWidth' ); 
    3479                         parentOffset.left += num( offsetParent, 'borderLeftWidth' ); 
    3480  
    3481                         // Subtract the two offsets 
    3482                         results = { 
    3483                                 top:  offset.top  - parentOffset.top, 
    3484                                 left: offset.left - parentOffset.left 
    3485                         }; 
    3486                 } 
    3487  
    3488                 return results; 
    3489         }, 
    3490  
    3491         offsetParent: function() { 
    3492                 var offsetParent = this[0].offsetParent; 
    3493                 while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') ) 
    3494                         offsetParent = offsetParent.offsetParent; 
    3495                 return jQuery(offsetParent); 
    3496         } 
    3497 }); 
    3498  
    3499  
    3500 // Create scrollLeft and scrollTop methods 
    3501 jQuery.each( ['Left', 'Top'], function(i, name) { 
    3502         var method = 'scroll' + name; 
    3503          
    3504         jQuery.fn[ method ] = function(val) { 
    3505                 if (!this[0]) return; 
    3506  
    3507                 return val != undefined ? 
    3508  
    3509                         // Set the scroll offset 
    3510                         this.each(function() { 
    3511                                 this == window || this == document ? 
    3512                                         window.scrollTo( 
    3513                                                 !i ? val : jQuery(window).scrollLeft(), 
    3514                                                  i ? val : jQuery(window).scrollTop() 
    3515                                         ) : 
    3516                                         this[ method ] = val; 
    3517                         }) : 
    3518  
    3519                         // Return the scroll offset 
    3520                         this[0] == window || this[0] == document ? 
    3521                                 self[ i ? 'pageYOffset' : 'pageXOffset' ] || 
    3522                                         jQuery.boxModel && document.documentElement[ method ] || 
    3523                                         document.body[ method ] : 
    3524                                 this[0][ method ]; 
    3525         }; 
    3526 }); 
    3527 // Create innerHeight, innerWidth, outerHeight and outerWidth methods 
    3528 jQuery.each([ "Height", "Width" ], function(i, name){ 
    3529  
    3530         var tl = i ? "Left"  : "Top",  // top or left 
    3531                 br = i ? "Right" : "Bottom"; // bottom or right 
    3532  
    3533         // innerHeight and innerWidth 
    3534         jQuery.fn["inner" + name] = function(){ 
    3535                 return this[ name.toLowerCase() ]() + 
    3536                         num(this, "padding" + tl) + 
    3537                         num(this, "padding" + br); 
    3538         }; 
    3539  
    3540         // outerHeight and outerWidth 
    3541         jQuery.fn["outer" + name] = function(margin) { 
    3542                 return this["inner" + name]() + 
    3543                         num(this, "border" + tl + "Width") + 
    3544                         num(this, "border" + br + "Width") + 
    3545                         (margin ? 
    3546                                 num(this, "margin" + tl) + num(this, "margin" + br) : 0); 
    3547         }; 
    3548  
    3549 });})(); 
     16(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n<j;n++)e(a[n],b,f?d.call(a[n],n,e(a[n],b)):d,i);return a}return j? 
     17e(a[0],b):null}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function ma(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function na(a){var b,d=[],f=[],e=arguments,i,j,n,o,m,s,x=c.extend({},c.data(this,"events").live);if(!(a.button&&a.type==="click")){for(o in x){j=x[o];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f, 
     18a.currentTarget);m=0;for(s=i.length;m<s;m++)for(o in x){j=x[o];n=i[m].elem;f=null;if(i[m].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==n)d.push({elem:n,fn:j})}}m=0;for(s=d.length;m<s;m++){i=d[m];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}}function oa(a,b){return"live."+(a?a+".":"")+b.replace(/\./g,"`").replace(/ /g,"&")}function pa(a){return!a||!a.parentNode||a.parentNode.nodeType=== 
     1911}function qa(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ra(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0&&(c.support.checkClone||!sa.test(a[0]))){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:r;f=b.createDocumentFragment(); 
     20c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=i?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(ta.concat.apply([],ta.slice(0,b)),function(){d[this]=a});return d}function ua(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Na=z.jQuery,Oa=z.$,r=z.document,S,Pa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent, 
     21va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]], 
     22[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a, 
     23this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this, 
     24a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice}; 
     25c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];n=e[i];if(a!==n)if(f&&n&&(c.isPlainObject(n)||c.isArray(n))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(n)?[]:{};a[i]=c.extend(f,j,n)}else if(n!==v)a[i]=n}return a};c.extend({noConflict:function(a){z.$= 
     26Oa;if(a)z.jQuery=Na;return c},isReady:false,ready:function(){if(!c.isReady){if(!r.body)return setTimeout(c.ready,13);c.isReady=true;if(P){for(var a,b=0;a=P[b++];)a.call(r,c);P=null}c.fn.triggerHandler&&c(r).triggerHandler("ready")}},bindReady:function(){if(!va){va=true;if(r.readyState==="complete")return c.ready();if(r.addEventListener){r.addEventListener("DOMContentLoaded",L,false);z.addEventListener("load",c.ready,false)}else if(r.attachEvent){r.attachEvent("onreadystatechange",L);z.attachEvent("onload", 
     27c.ready);var a=false;try{a=z.frameElement==null}catch(b){}r.documentElement.doScroll&&a&&la()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===v||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false; 
     28return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return z.JSON&&z.JSON.parse?z.JSON.parse(a):(new Function("return "+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Ra.test(a)){var b=r.getElementsByTagName("head")[0]|| 
     29r.documentElement,d=r.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(r.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===v||c.isFunction(a);if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d= 
     30a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Sa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!== 
     31v;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=v}else if(b&&!c.isFunction(b)){d=b;b=v}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b}, 
     32uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});O=c.uaMatch(O);if(O.browser){c.browser[O.browser]=true;c.browser.version=O.version}if(c.browser.webkit)c.browser.safari=true;if(wa)c.inArray=function(a,b){return wa.call(b,a)};S=c(r);if(r.addEventListener)L=function(){r.removeEventListener("DOMContentLoaded", 
     33L,false);c.ready()};else if(r.attachEvent)L=function(){if(r.readyState==="complete"){r.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=r.documentElement,b=r.createElement("script"),d=r.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support= 
     34{leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null}; 
     35b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=r.createDocumentFragment();a.appendChild(d.firstChild); 
     36c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props= 
     37{"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true, 
     38{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this, 
     39a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d); 
     40return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]|| 
     41a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m= 
     42c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,n=b.length;j<n;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var m=c(this);m.removeClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string"||a===v)for(var b=(a||"").split(ca), 
     43d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(ya," "),j=0,n=b.length;j<n;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),n=b,o= 
     44a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| 
     45{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val()); 
     46if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); 
     47f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText= 
     48""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j= 
     49function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a, 
     50d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+ 
     51s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a, 
     52"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d, 
     53b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b, 
     54d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), 
     55fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| 
     56d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b= 
     570,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true}; 
     58c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b= 
     59a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!== 
     60"form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this, 
     61"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"|| 
     62d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a= 
     63a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this, 
     64f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, 
     65b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+ 
     66a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e){var i,j=0;if(c.isFunction(f)){e=f;f=v}for(d=(d||"").split(/\s+/);(i=d[j++])!=null;){i=i==="focus"?"focusin":i==="blur"?"focusout":i==="hover"?d.push("mouseleave")&&"mouseenter":i;b==="live"?c(this.context).bind(oa(i,this.selector),{data:f,selector:this.selector, 
     67live:i},e):c(this.context).unbind(oa(i,this.selector),e?{guid:e.guid+this.selector+i}:null)}return this}});c.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".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});z.attachEvent&&!z.addEventListener&&z.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); 
     68(function(){function a(g){for(var h="",k,l=0;g[l];l++){k=g[l];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===k){y=l[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=k;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}l[q]=y}}}function d(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache=== 
     69k){y=l[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=k;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(o.filter(h,[t]).length>0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g|| 
     70typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u= 
     71l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&& 
     72y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};o.matches=function(g,h){return o(g,null,null,h)};o.find=function(g,h,k){var l,q;if(!g)return[];for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q, 
     73h,k);if(l!=null){g=g.replace(m.match[t],"");break}}}}l||(l=h.getElementsByTagName("*"));return{set:l,expr:g}};o.filter=function(g,h,k,l){for(var q=g,p=[],u=h,t,y,R=h&&h[0]&&w(h[0]);g&&h.length;){for(var H in m.filter)if((t=m.leftMatch[H].exec(g))!=null&&t[2]){var M=m.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(u===p)p=[];if(m.preFilter[H])if(t=m.preFilter[H](t,u,k,p,l,R)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=u[U])!=null;U++)if(D){I=M(D,t,U,u);var Da= 
     74l^!!I;if(k&&I!=null)if(Da)y=true;else u[U]=false;else if(Da){p.push(D);y=true}}if(I!==v){k||(u=p);g=g.replace(m.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)o.error(g);else break;q=g}return u};o.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var m=o.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, 
     75TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,h){var k=typeof h==="string",l=k&&!/\W/.test(h);k=k&&!l;if(l)h=h.toLowerCase();l=0;for(var q=g.length, 
     76p;l<q;l++)if(p=g[l]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[l]=k||p&&p.nodeName.toLowerCase()===h?p||false:p===h}k&&o.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l<q;l++){var p=g[l];if(p){k=p.parentNode;g[l]=k.nodeName.toLowerCase()===h?k:false}}}else{l=0;for(q=g.length;l<q;l++)if(p=g[l])g[l]=k?p.parentNode:p.parentNode===h;k&&o.filter(h,g,true)}},"":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p= 
     77h=h.toLowerCase();q=b}q("parentNode",h,l,g,p,k)},"~":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,l,g,p,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];h=h.getElementsByName(g[1]);for(var l=0,q=h.length;l<q;l++)h[l].getAttribute("name")===g[1]&&k.push(h[l]);return k.length===0?null:k}}, 
     78TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,l,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var u;(u=h[p])!=null;p++)if(u)if(q^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&& 
     79"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true); 
     80return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"=== 
     81g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2=== 
     820},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k<l;k++)if(h[k]===g)return false;return true}else o.error("Syntax error, unrecognized expression: "+ 
     83q)},CHILD:function(g,h){var k=h[1],l=g;switch(k){case "only":case "first":for(;l=l.previousSibling;)if(l.nodeType===1)return false;if(k==="first")return true;l=g;case "last":for(;l=l.nextSibling;)if(l.nodeType===1)return false;return true;case "nth":k=h[2];var q=h[3];if(k===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var u=0;for(l=p.firstChild;l;l=l.nextSibling)if(l.nodeType===1)l.nodeIndex=++u;p.sizcache=h}g=g.nodeIndex-q;return k===0?g===0:g%k===0&&g/k>= 
     840}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="? 
     85k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g}; 
     86try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k<l;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var C;if(r.documentElement.compareDocumentPosition)C=function(g,h){if(!g.compareDocumentPosition||!h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g=== 
     87h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in r.documentElement)C=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(r.createRange)C=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),l=h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);l.setStart(h,0);l.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END, 
     88l);if(g===0)j=true;return g};(function(){var g=r.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id"); 
     89return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href", 
     902)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length=== 
     910)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[], 
     92l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)o(g,h[q],k);return o.filter(l,k)};c.find=o;c.expr=o.selectors;c.expr[":"]=c.expr.filters;c.unique=o.uniqueSort;c.getText=a;c.isXMLDoc=w;c.contains=E})();var bb=/Until$/,cb=/^(?:parents|prevUntil|prevAll)/,db=/,/;Q=Array.prototype.slice;var Ea=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a, 
     93function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Qa.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d= 
     940,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ea(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ea(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e<n;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)> 
     95-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(), 
     96a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")}, 
     97nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e): 
     98e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!== 
     99b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,sa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ia=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"], 
     100col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)}, 
     101wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length? 
     102d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, 
     103false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&& 
     104!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(Ha.exec(a)|| 
     105["",""])[1].toLowerCase()]){a=a.replace(Ga,Ia);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this, 
     106b,f))});else a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(s){return c.nodeName(s,"table")?s.getElementsByTagName("tbody")[0]||s.appendChild(s.ownerDocument.createElement("tbody")):s}var e,i,j=a[0],n=[];if(!c.support.checkClone&&arguments.length===3&&typeof j=== 
     107"string"&&sa.test(j))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(j))return this.each(function(s){var x=c(this);a[0]=j.call(this,s,b?x.html():v);x.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ra(a,this,n);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var o=0,m=this.length;o<m;o++)d.call(b?f(this[o],i):this[o],e.cacheable||this.length>1||o>0?e.fragment.cloneNode(true):e.fragment)}n&&c.each(n, 
     108Ma)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){c.cleanData(this.getElementsByTagName("*"));c.cleanData([this])}this.parentNode&& 
     109this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&c.cleanData(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||r;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||r;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j=== 
     110"string"){j=j.replace(Ga,Ia);var n=(Ha.exec(j)||["",""])[1].toLowerCase(),o=F[n]||F._default,m=o[0];i=b.createElement("div");for(i.innerHTML=o[1]+j+o[2];m--;)i=i.lastChild;if(!c.support.tbody){m=fb.test(j);n=n==="table"&&!m?i.firstChild&&i.firstChild.childNodes:o[1]==="<table>"&&!m?i.childNodes:[];for(o=n.length-1;o>=0;--o)c.nodeName(n[o],"tbody")&&!n[o].childNodes.length&&n[o].parentNode.removeChild(n[o])}!c.support.leadingWhitespace&&V.test(j)&&i.insertBefore(b.createTextNode(V.exec(j)[0]),i.firstChild); 
     111j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()==="text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e},cleanData:function(a){for(var b=0,d;(d=a[b])!=null;b++){c.event.remove(d);c.removeData(d)}}});var hb=/z-?index|font-?weight|opacity|zoom|line-?height/i, 
     112Ja=/alpha\([^)]*\)/,Ka=/opacity=([^)]*)/,ga=/float/i,ha=/-([a-z])/ig,ib=/([A-Z])/g,jb=/^-?\d+(?:px)?$/i,kb=/^-?\d/,lb={position:"absolute",visibility:"hidden",display:"block"},mb=["Left","Right"],nb=["Top","Bottom"],ob=r.defaultView&&r.defaultView.getComputedStyle,La=c.support.cssFloat?"cssFloat":"styleFloat",ia=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===v)return c.curCSS(d,f);if(typeof e==="number"&&!hb.test(f))e+="px";c.style(d,f,e)})}; 
     113c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return v;if((b==="width"||b==="height")&&parseFloat(d)<0)d=v;var f=a.style||a,e=d!==v;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ja.test(a)?a.replace(Ja,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ka.exec(f.filter)[1])/100+"":""}if(ga.test(b))b=La;b=b.replace(ha,ia);if(e)f[b]=d;return f[b]},css:function(a, 
     114b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?mb:nb;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,lb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&& 
     115a.currentStyle){f=Ka.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ga.test(b))b=La;if(!d&&e&&e[b])f=e[b];else if(ob){if(ga.test(b))b="float";b=b.replace(ib,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ha,ia);f=a.currentStyle[b]||a.currentStyle[d];if(!jb.test(f)&&kb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left= 
     116a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var pb= 
     117J(),qb=/<script(.|\s)*?\/script>/gi,rb=/select|textarea/i,sb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ja=/\?/,tb=/(\?|&)_=.*?(&|$)/,ub=/^(\w+:)?\/\/([^\/?#]+)/,vb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b= 
     118c.param(b,c.ajaxSettings.traditional);f="POST"}var i=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(j,n){if(n==="success"||n==="notmodified")i.html(e?c("<div />").append(j.responseText.replace(qb,"")).find(e):j.responseText);d&&i.each(d,[j.responseText,n,j])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&& 
     119(this.checked||rb.test(this.nodeName)||sb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a, 
     120b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:z.XMLHttpRequest&&(z.location.protocol!=="file:"||!z.ActiveXObject)?function(){return new z.XMLHttpRequest}: 
     121function(){try{return new z.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(o,n,j,w);e.global&&f("ajaxSuccess",[w,e])}function d(){e.complete&&e.complete.call(o,w,j);e.global&&f("ajaxComplete",[w,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")} 
     122function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,n,o=a&&a.context||e,m=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(m==="GET")N.test(e.url)||(e.url+=(ja.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)|| 
     123N.test(e.url))){i=e.jsonpCallback||"jsonp"+pb++;if(e.data)e.data=(e.data+"").replace(N,"="+i+"$1");e.url=e.url.replace(N,"="+i+"$1");e.dataType="script";z[i]=z[i]||function(q){n=q;b();d();z[i]=v;try{delete z[i]}catch(p){}A&&A.removeChild(B)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&m==="GET"){var s=J(),x=e.url.replace(tb,"$1_="+s+"$2");e.url=x+(x===e.url?(ja.test(e.url)?"&":"?")+"_="+s:"")}if(e.data&&m==="GET")e.url+=(ja.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&& 
     124c.event.trigger("ajaxStart");s=(s=ub.exec(e.url))&&(s[1]&&s[1]!==location.protocol||s[2]!==location.host);if(e.dataType==="script"&&m==="GET"&&s){var A=r.getElementsByTagName("head")[0]||r.documentElement,B=r.createElement("script");B.src=e.url;if(e.scriptCharset)B.charset=e.scriptCharset;if(!i){var C=false;B.onload=B.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;b();d();B.onload=B.onreadystatechange=null;A&&B.parentNode&& 
     125A.removeChild(B)}}}A.insertBefore(B,A.firstChild);return v}var E=false,w=e.xhr();if(w){e.username?w.open(m,e.url,e.async,e.username,e.password):w.open(m,e.url,e.async);try{if(e.data||a&&a.contentType)w.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&w.setRequestHeader("If-None-Match",c.etag[e.url])}s||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept", 
     126e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(fa){}if(e.beforeSend&&e.beforeSend.call(o,w,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");w.abort();return false}e.global&&f("ajaxSend",[w,e]);var g=w.onreadystatechange=function(q){if(!w||w.readyState===0||q==="abort"){E||d();E=true;if(w)w.onreadystatechange=c.noop}else if(!E&&w&&(w.readyState===4||q==="timeout")){E=true;w.onreadystatechange=c.noop;j=q==="timeout"?"timeout":!c.httpSuccess(w)? 
     127"error":e.ifModified&&c.httpNotModified(w,e.url)?"notmodified":"success";var p;if(j==="success")try{n=c.httpData(w,e.dataType,e)}catch(u){j="parsererror";p=u}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,w,j,p);d();q==="timeout"&&w.abort();if(e.async)w=null}};try{var h=w.abort;w.abort=function(){w&&h.call(w);g("abort")}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){w&&!E&&g("timeout")},e.timeout);try{w.send(m==="POST"||m==="PUT"||m==="DELETE"?e.data:null)}catch(l){c.handleError(e, 
     128w,null,l);d()}e.async||g();return w}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]= 
     129f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(j,n){if(c.isArray(n))c.each(n, 
     130function(o,m){b?f(j,m):d(j+"["+(typeof m==="object"||c.isArray(m)?o:"")+"]",m)});else!b&&n!=null&&typeof n==="object"?c.each(n,function(o,m){d(j+"["+o+"]",m)}):f(j,n)}function f(j,n){n=c.isFunction(n)?n():n;e[e.length]=encodeURIComponent(j)+"="+encodeURIComponent(n)}var e=[];if(b===v)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var i in a)d(i,a[i]);return e.join("&").replace(vb,"+")}});var ka={},wb=/toggle|show|hide/,xb=/^([+-]=)?([\d+-.]+)(.*)$/, 
     131W,ta=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(ka[d])f=ka[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove(); 
     132ka[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&& 
     133c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,n=this.nodeType===1&&c(this).is(":hidden"), 
     134o=this;for(j in a){var m=j.replace(ha,ia);if(j!==m){a[m]=a[j];delete a[j];j=m}if(a[j]==="hide"&&n||a[j]==="show"&&!n)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(s,x){var A=new c.fx(o,i,s);if(wb.test(x))A[x==="toggle"?n?"show":"hide":x](a); 
     135else{var B=xb.exec(x),C=A.cur(true)||0;if(B){x=parseFloat(B[2]);var E=B[3]||"px";if(E!=="px"){o.style[s]=(x||1)+E;C=(x||1)/A.cur(true)*C;o.style[s]=C+E}if(B[1])x=(B[1]==="-="?-1:1)*x+C;A.custom(C,x,E)}else A.custom(C,x,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle", 
     1361),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a, 
     137b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]== 
     138null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop=== 
     139"width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow= 
     140this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos= 
     141c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!= 
     142null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in r.documentElement?function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(), 
     143f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(s){c.offset.setOffset(this,a,s)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f= 
     144b,e=b.ownerDocument,i,j=e.documentElement,n=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var o=b.offsetTop,m=b.offsetLeft;(b=b.parentNode)&&b!==n&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;o-=b.scrollTop;m-=b.scrollLeft;if(b===d){o+=b.offsetTop;m+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){o+=parseFloat(i.borderTopWidth)|| 
     1450;m+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){o+=parseFloat(i.borderTopWidth)||0;m+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){o+=n.offsetTop;m+=n.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){o+=Math.max(j.scrollTop,n.scrollTop);m+=Math.max(j.scrollLeft,n.scrollLeft)}return{top:o,left:m}};c.offset={initialize:function(){var a=r.body,b=r.createElement("div"), 
     146d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild); 
     147d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop}, 
     148bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left- 
     149e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a= 
     150this.offsetParent||r.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==v)return this.each(function(){if(i=ua(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=ua(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}}); 
     151c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(i){var j=c(this);j[d](f.call(this,i,j[d]()))});return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]|| 
     152e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===v?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});z.jQuery=z.$=c})(window); 
  • trunk/telemeta/models/crem.py

    r522 r523  
    561561    current_location = WeakForeignKey('self', related_name="past_names",  
    562562                                      verbose_name=_('current location'))  
     563    latitude         = FloatField(null=True)                                     
     564    longitude        = FloatField(null=True)                                     
    563565    is_authoritative = BooleanField(_('authoritative')) 
    564566 
  • trunk/telemeta/templates/telemeta_default/base.html

    r512 r523  
    1212<![endif]--> 
    1313{% endblock %} 
     14<script src="{% url telemeta-js "jquery.js" %}" type="text/javascript"></script> 
    1415{% block extra_javascript %}{% endblock %} 
    1516</head> 
  • trunk/telemeta/templates/telemeta_default/collection_detail.html

    r517 r523  
    44 
    55{% block extra_javascript %} 
    6 <script src="{% url telemeta-js "jquery.js" %}" type="text/javascript"></script> 
    76<script src="{% url telemeta-js "application.js" %}" type="text/javascript"></script> 
    87<script src="{% url telemeta-js "swfobject.js" %}" type="text/javascript"></script> 
     
    1211 
    1312{% block submenu %} 
    14     <h3>Collection: {{ collection.title }}</h3> 
    1513    <div><a href="{% url telemeta-collection-dublincore collection.public_id %}">Dublin Core</a></div> 
    1614{% endblock %} 
    1715 
    1816{% block content %} 
     17    <h3>Collection: {{ collection.title }}</h3> 
    1918    <div class="{% if collection.has_mediafile %}with-rightcol{% endif %}"> 
    2019        {% if collection.has_mediafile %} 
  • trunk/telemeta/templates/telemeta_default/geo_continents.html

    r520 r523  
    11{% extends "telemeta/base.html" %} 
    22{% load telemeta_utils %} 
     3{% load i18n %} 
    34 
     5{% block extra_javascript %} 
     6{% if gmap_key %} 
     7<script src="http://www.google.com/jsapi?key={{ gmap_key }}" type="text/javascript"></script> 
     8<script src="{% url telemeta-js "resourcemap.js" %}" type="text/javascript"></script> 
     9<script type="text/javascript"> 
     10var resourceMap = new ResourceMap('.continents'); 
     11</script> 
     12{% endif %} 
     13{% endblock %} 
     14 
     15{% block submenu %} 
     16    <div> 
     17        <a href="#" onclick="resourceMap.toggle('map'); return false;">{% trans "Map" %}</a> | 
     18        <a href="#"onclick="resourceMap.toggle('list'); return false;">{% trans "List" %}</a>  
     19    </div> 
     20{% endblock %} 
    421{% block content %} 
    522<h3>Geographic Navigator</h3> 
     
    926  <li class="name"><b><a href="{% url telemeta-geo-countries continent.location.flatname %}">{{ continent.location }}</a></b> 
    1027    <ul> 
    11     {% for country in continent.countries|slice:":10" %} 
    12       <li class="country_name"> 
    13         <a href="{% url telemeta-geo-country-collections continent.location.flatname,country.location.flatname %}"> 
    14           {{ country.location }}</a></li> 
     28    {% for country in continent.countries %} 
     29      <li class="country_name resourcemap-element"> 
     30        <a href="{% url telemeta-geo-country-collections continent.location.flatname,country.location.flatname %}" 
     31           title="{{ country.count }} {% trans "collections" %}"> 
     32          <span class="resourcemap-name">{{ country.location }}</span></a> 
     33        {% if not country.location.latitude|is_none and not country.location.longitude|is_none %} 
     34        <input type="hidden" class="resourcemap-lat" value="{{country.location.latitude}}" /> 
     35        <input type="hidden" class="resourcemap-lng" value="{{country.location.longitude}}" /> 
     36        {% endif %} 
     37      </li> 
    1538    {% endfor %} 
    1639    {% if continent.countries.10 %} 
  • trunk/telemeta/templates/telemeta_default/mediaitem_detail.html

    r517 r523  
    1111{% block extra_javascript %} 
    1212 
    13 <script src="{% url telemeta-js "jquery.js" %}" type="text/javascript"></script> 
    1413<script src="{% url telemeta-js "application.js" %}" type="text/javascript"></script> 
    1514<script src="{% url telemeta-js "wz_jsgraphics.js" %}" type="text/javascript"></script> 
     
    3130{% if item %} 
    3231{% block submenu %} 
    33     <h3>Item : {{ item.title }}</h3> 
    3432    <div><a href="{% url telemeta-item-dublincore item.public_id %}">Dublin Core</a></div> 
    3533{% endblock %} 
     
    3735{% block content %} 
    3836 
     37<h3>Item : {{ item.title }}</h3> 
    3938<div class="{% if item.file %}with-rightcol{% endif %}"> 
    4039 
  • trunk/telemeta/templatetags/telemeta_utils.py

    r517 r523  
    169169             
    170170    return capfirst(unicode(model.field_label(field))) 
    171      
     171 
     172@register.filter 
     173def is_none(value): 
     174    return value is None 
  • trunk/telemeta/web/base.py

    r520 r523  
    340340        continents = MediaCollection.objects.stat_continents() 
    341341        return render_to_response('telemeta/geo_continents.html',  
    342                     {'continents': continents }) 
     342                    {'continents': continents, 'gmap_key': settings.TELEMETA_GMAP_KEY }) 
    343343 
    344344    def get_continents_js(self, request):