Changeset 18321


Ignore:
Timestamp:
2009/09/29 01:55:14 (15 years ago)
Author:
Seasoft
Message:

#403(インクルードしているライブラリ群をバージョンアップする)

  • jQuery 1.2.6 → 1.3.2
  • jQuery UI 1.5.2 → 1.7.2
  • jQuery UI Sortable 2008 → 1.7.2(2009)
Location:
branches/comu-ver2/html/user_data/packages/default/js
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/html/user_data/packages/default/js/jquery.js

    r17417 r18321  
    1 (function(){ 
    21/* 
    3  * jQuery 1.2.6 - New Wave Javascript 
     2 * jQuery JavaScript Library v1.3.2 
     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 (c) 2009 John Resig 
     6 * Dual licensed under the MIT and GPL licenses. 
     7 * http://docs.jquery.com/License 
    88 * 
    9  * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ 
    10  * $Rev: 5685 $ 
     9 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) 
     10 * Revision: 6246 
    1111 */ 
    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 }); 
     12(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); 
    181513/* 
    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. 
     14 * Sizzle CSS Selector Engine - v0.9.3 
     15 *  Copyright 2009, The Dojo Foundation 
     16 *  Released under the MIT, BSD, and GPL Licenses. 
     17 *  More information: http://sizzlejs.com/ 
    181918 */ 
    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 });})(); 
     19(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.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*\]/,TAG:/^((?:[\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\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},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 toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<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>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); 
  • branches/comu-ver2/html/user_data/packages/default/js/ui.core.js

    r17417 r18321  
    11/* 
    2  * jQuery UI 1.5.2 
     2 * jQuery UI 1.7.2 
    33 * 
    4  * Copyright (c) 2008 Paul Bakaus (ui.jquery.com) 
     4 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 
    55 * Dual licensed under the MIT (MIT-LICENSE.txt) 
    66 * and GPL (GPL-LICENSE.txt) licenses. 
     
    88 * http://docs.jquery.com/UI 
    99 */ 
    10 ;(function($) { 
    11  
    12 $.ui = { 
    13     plugin: { 
    14         add: function(module, option, set) { 
    15             var proto = $.ui[module].prototype; 
    16             for(var i in set) { 
    17                 proto.plugins[i] = proto.plugins[i] || []; 
    18                 proto.plugins[i].push([option, set[i]]); 
    19             } 
    20         }, 
    21         call: function(instance, name, args) { 
    22             var set = instance.plugins[name]; 
    23             if(!set) { return; } 
    24              
    25             for (var i = 0; i < set.length; i++) { 
    26                 if (instance.options[set[i][0]]) { 
    27                     set[i][1].apply(instance.element, args); 
    28                 } 
    29             } 
    30         }    
    31     }, 
    32     cssCache: {}, 
    33     css: function(name) { 
    34         if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; } 
    35         var tmp = $('<div class="ui-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body'); 
    36          
    37         //if (!$.browser.safari) 
    38             //tmp.appendTo('body');  
    39          
    40         //Opera and Safari set width and height to 0px instead of auto 
    41         //Safari returns rgba(0,0,0,0) when bgcolor is not set 
    42         $.ui.cssCache[name] = !!( 
    43             (!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) ||  
    44             !(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))) 
    45         ); 
    46         try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){} 
    47         return $.ui.cssCache[name]; 
    48     }, 
    49     disableSelection: function(el) { 
    50         $(el).attr('unselectable', 'on').css('MozUserSelect', 'none'); 
    51     }, 
    52     enableSelection: function(el) { 
    53         $(el).attr('unselectable', 'off').css('MozUserSelect', ''); 
    54     }, 
    55     hasScroll: function(e, a) { 
    56         var scroll = /top/.test(a||"top") ? 'scrollTop' : 'scrollLeft', has = false; 
    57         if (e[scroll] > 0) return true; e[scroll] = 1; 
    58         has = e[scroll] > 0 ? true : false; e[scroll] = 0; 
    59         return has; 
    60     } 
    61 }; 
    62  
    63  
    64 /** jQuery core modifications and additions **/ 
    65  
    66 var _remove = $.fn.remove; 
    67 $.fn.remove = function() { 
    68     $("*", this).add(this).triggerHandler("remove"); 
    69     return _remove.apply(this, arguments ); 
    70 }; 
    71  
    72 // $.widget is a factory to create jQuery plugins 
    73 // taking some boilerplate code out of the plugin code 
    74 // created by Scott González and Jörn Zaefferer 
    75 function getter(namespace, plugin, method) { 
    76     var methods = $[namespace][plugin].getter || []; 
    77     methods = (typeof methods == "string" ? methods.split(/,?\s+/) : methods); 
    78     return ($.inArray(method, methods) != -1); 
    79 } 
    80  
    81 $.widget = function(name, prototype) { 
    82     var namespace = name.split(".")[0]; 
    83     name = name.split(".")[1]; 
    84      
    85     // create plugin method 
    86     $.fn[name] = function(options) { 
    87         var isMethodCall = (typeof options == 'string'), 
    88             args = Array.prototype.slice.call(arguments, 1); 
    89          
    90         if (isMethodCall && getter(namespace, name, options)) { 
    91             var instance = $.data(this[0], name); 
    92             return (instance ? instance[options].apply(instance, args) 
    93                 : undefined); 
    94         } 
    95          
    96         return this.each(function() { 
    97             var instance = $.data(this, name); 
    98             if (isMethodCall && instance && $.isFunction(instance[options])) { 
    99                 instance[options].apply(instance, args); 
    100             } else if (!isMethodCall) { 
    101                 $.data(this, name, new $[namespace][name](this, options)); 
    102             } 
    103         }); 
    104     }; 
    105      
    106     // create widget constructor 
    107     $[namespace][name] = function(element, options) { 
    108         var self = this; 
    109          
    110         this.widgetName = name; 
    111         this.widgetBaseClass = namespace + '-' + name; 
    112          
    113         this.options = $.extend({}, $.widget.defaults, $[namespace][name].defaults, options); 
    114         this.element = $(element) 
    115             .bind('setData.' + name, function(e, key, value) { 
    116                 return self.setData(key, value); 
    117             }) 
    118             .bind('getData.' + name, function(e, key) { 
    119                 return self.getData(key); 
    120             }) 
    121             .bind('remove', function() { 
    122                 return self.destroy(); 
    123             }); 
    124         this.init(); 
    125     }; 
    126      
    127     // add widget prototype 
    128     $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype); 
    129 }; 
    130  
    131 $.widget.prototype = { 
    132     init: function() {}, 
    133     destroy: function() { 
    134         this.element.removeData(this.widgetName); 
    135     }, 
    136      
    137     getData: function(key) { 
    138         return this.options[key]; 
    139     }, 
    140     setData: function(key, value) { 
    141         this.options[key] = value; 
    142          
    143         if (key == 'disabled') { 
    144             this.element[value ? 'addClass' : 'removeClass']( 
    145                 this.widgetBaseClass + '-disabled'); 
    146         } 
    147     }, 
    148      
    149     enable: function() { 
    150         this.setData('disabled', false); 
    151     }, 
    152     disable: function() { 
    153         this.setData('disabled', true); 
    154     } 
    155 }; 
    156  
    157 $.widget.defaults = { 
    158     disabled: false 
    159 }; 
    160  
    161  
    162 /** Mouse Interaction Plugin **/ 
    163  
    164 $.ui.mouse = { 
    165     mouseInit: function() { 
    166         var self = this; 
    167      
    168         this.element.bind('mousedown.'+this.widgetName, function(e) { 
    169             return self.mouseDown(e); 
    170         }); 
    171          
    172         // Prevent text selection in IE 
    173         if ($.browser.msie) { 
    174             this._mouseUnselectable = this.element.attr('unselectable'); 
    175             this.element.attr('unselectable', 'on'); 
    176         } 
    177          
    178         this.started = false; 
    179     }, 
    180      
    181     // TODO: make sure destroying one instance of mouse doesn't mess with 
    182     // other instances of mouse 
    183     mouseDestroy: function() { 
    184         this.element.unbind('.'+this.widgetName); 
    185          
    186         // Restore text selection in IE 
    187         ($.browser.msie 
    188             && this.element.attr('unselectable', this._mouseUnselectable)); 
    189     }, 
    190      
    191     mouseDown: function(e) { 
    192         // we may have missed mouseup (out of window) 
    193         (this._mouseStarted && this.mouseUp(e)); 
    194          
    195         this._mouseDownEvent = e; 
    196          
    197         var self = this, 
    198             btnIsLeft = (e.which == 1), 
    199             elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).parents().add(e.target).filter(this.options.cancel).length : false); 
    200         if (!btnIsLeft || elIsCancel || !this.mouseCapture(e)) { 
    201             return true; 
    202         } 
    203          
    204         this._mouseDelayMet = !this.options.delay; 
    205         if (!this._mouseDelayMet) { 
    206             this._mouseDelayTimer = setTimeout(function() { 
    207                 self._mouseDelayMet = true; 
    208             }, this.options.delay); 
    209         } 
    210          
    211         if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) { 
    212             this._mouseStarted = (this.mouseStart(e) !== false); 
    213             if (!this._mouseStarted) { 
    214                 e.preventDefault(); 
    215                 return true; 
    216             } 
    217         } 
    218          
    219         // these delegates are required to keep context 
    220         this._mouseMoveDelegate = function(e) { 
    221             return self.mouseMove(e); 
    222         }; 
    223         this._mouseUpDelegate = function(e) { 
    224             return self.mouseUp(e); 
    225         }; 
    226         $(document) 
    227             .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate) 
    228             .bind('mouseup.'+this.widgetName, this._mouseUpDelegate); 
    229          
    230         return false; 
    231     }, 
    232      
    233     mouseMove: function(e) { 
    234         // IE mouseup check - mouseup happened when mouse was out of window 
    235         if ($.browser.msie && !e.button) { 
    236             return this.mouseUp(e); 
    237         } 
    238          
    239         if (this._mouseStarted) { 
    240             this.mouseDrag(e); 
    241             return false; 
    242         } 
    243          
    244         if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) { 
    245             this._mouseStarted = 
    246                 (this.mouseStart(this._mouseDownEvent, e) !== false); 
    247             (this._mouseStarted ? this.mouseDrag(e) : this.mouseUp(e)); 
    248         } 
    249          
    250         return !this._mouseStarted; 
    251     }, 
    252      
    253     mouseUp: function(e) { 
    254         $(document) 
    255             .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) 
    256             .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); 
    257          
    258         if (this._mouseStarted) { 
    259             this._mouseStarted = false; 
    260             this.mouseStop(e); 
    261         } 
    262          
    263         return false; 
    264     }, 
    265      
    266     mouseDistanceMet: function(e) { 
    267         return (Math.max( 
    268                 Math.abs(this._mouseDownEvent.pageX - e.pageX), 
    269                 Math.abs(this._mouseDownEvent.pageY - e.pageY) 
    270             ) >= this.options.distance 
    271         ); 
    272     }, 
    273      
    274     mouseDelayMet: function(e) { 
    275         return this._mouseDelayMet; 
    276     }, 
    277      
    278     // These are placeholder methods, to be overriden by extending plugin 
    279     mouseStart: function(e) {}, 
    280     mouseDrag: function(e) {}, 
    281     mouseStop: function(e) {}, 
    282     mouseCapture: function(e) { return true; } 
    283 }; 
    284  
    285 $.ui.mouse.defaults = { 
    286     cancel: null, 
    287     distance: 1, 
    288     delay: 0 
    289 }; 
    290  
    291 })(jQuery); 
     10jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);; 
  • branches/comu-ver2/html/user_data/packages/default/js/ui.sortable.js

    r17417 r18321  
    11/* 
    2  * jQuery UI Sortable 
     2 * jQuery UI Sortable 1.7.2 
    33 * 
    4  * Copyright (c) 2008 Paul Bakaus 
     4 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 
    55 * Dual licensed under the MIT (MIT-LICENSE.txt) 
    66 * and GPL (GPL-LICENSE.txt) licenses. 
    7  *  
     7 * 
    88 * http://docs.jquery.com/UI/Sortables 
    99 * 
     
    1111 *  ui.core.js 
    1212 */ 
    13 (function($) { 
    14  
    15 function contains(a, b) {  
    16     var safari2 = $.browser.safari && $.browser.version < 522;  
    17     if (a.contains && !safari2) {  
    18         return a.contains(b);  
    19     }  
    20     if (a.compareDocumentPosition)  
    21         return !!(a.compareDocumentPosition(b) & 16);  
    22     while (b = b.parentNode)  
    23           if (b == a) return true;  
    24     return false;  
    25 }; 
    26  
    27 $.widget("ui.sortable", $.extend({}, $.ui.mouse, { 
    28     init: function() { 
    29  
    30         var o = this.options; 
    31         this.containerCache = {}; 
    32         this.element.addClass("ui-sortable"); 
    33      
    34         //Get the items 
    35         this.refresh(); 
    36  
    37         //Let's determine if the items are floating 
    38         this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false; 
    39          
    40         //Let's determine the parent's offset 
    41         if(!(/(relative|absolute|fixed)/).test(this.element.css('position'))) this.element.css('position', 'relative'); 
    42         this.offset = this.element.offset(); 
    43  
    44         //Initialize mouse events for interaction 
    45         this.mouseInit(); 
    46          
    47     }, 
    48     plugins: {}, 
    49     ui: function(inst) { 
    50         return { 
    51             helper: (inst || this)["helper"], 
    52             placeholder: (inst || this)["placeholder"] || $([]), 
    53             position: (inst || this)["position"], 
    54             absolutePosition: (inst || this)["positionAbs"], 
    55             options: this.options, 
    56             element: this.element, 
    57             item: (inst || this)["currentItem"], 
    58             sender: inst ? inst.element : null 
    59         };       
    60     }, 
    61     propagate: function(n,e,inst, noPropagation) { 
    62         $.ui.plugin.call(this, n, [e, this.ui(inst)]); 
    63         if(!noPropagation) this.element.triggerHandler(n == "sort" ? n : "sort"+n, [e, this.ui(inst)], this.options[n]); 
    64     }, 
    65     serialize: function(o) { 
    66  
    67         var items = ($.isFunction(this.options.items) ? this.options.items.call(this.element) : $(this.options.items, this.element)).not('.ui-sortable-helper'); //Only the items of the sortable itself 
    68         var str = []; o = o || {}; 
    69          
    70         items.each(function() { 
    71             var res = ($(this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/)); 
    72             if(res) str.push((o.key || res[1])+'[]='+(o.key && o.expression ? res[1] : res[2])); 
    73         }); 
    74          
    75         return str.join('&'); 
    76          
    77     }, 
    78     toArray: function(attr) { 
    79          
    80         var items = ($.isFunction(this.options.items) ? this.options.items.call(this.element) : $(this.options.items, this.element)).not('.ui-sortable-helper'); //Only the items of the sortable itself 
    81         var ret = []; 
    82  
    83         items.each(function() { ret.push($(this).attr(attr || 'id')); }); 
    84         return ret; 
    85          
    86     }, 
    87     /* Be careful with the following core functions */ 
    88     intersectsWith: function(item) { 
    89          
    90         var x1 = this.positionAbs.left, x2 = x1 + this.helperProportions.width, 
    91         y1 = this.positionAbs.top, y2 = y1 + this.helperProportions.height; 
    92         var l = item.left, r = l + item.width,  
    93         t = item.top, b = t + item.height; 
    94  
    95         if(this.options.tolerance == "pointer" || this.options.forcePointerForContainers || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) { 
    96             return (y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r); 
    97         } else { 
    98          
    99             return (l < x1 + (this.helperProportions.width / 2) // Right Half 
    100                 && x2 - (this.helperProportions.width / 2) < r // Left Half 
    101                 && t < y1 + (this.helperProportions.height / 2) // Bottom Half 
    102                 && y2 - (this.helperProportions.height / 2) < b ); // Top Half 
    103          
    104         } 
    105          
    106     }, 
    107     intersectsWithEdge: function(item) {     
    108         var x1 = this.positionAbs.left, x2 = x1 + this.helperProportions.width, 
    109             y1 = this.positionAbs.top, y2 = y1 + this.helperProportions.height; 
    110         var l = item.left, r = l + item.width,  
    111             t = item.top, b = t + item.height; 
    112  
    113         if(this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) { 
    114  
    115             if(!(y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r)) return false; 
    116              
    117             if(this.floating) { 
    118                 if(x1 + this.offset.click.left > l && x1 + this.offset.click.left < l + item.width/2) return 2; 
    119                 if(x1 + this.offset.click.left > l+item.width/2 && x1 + this.offset.click.left < r) return 1; 
    120             } else { 
    121                 if(y1 + this.offset.click.top > t && y1 + this.offset.click.top < t + item.height/2) return 2; 
    122                 if(y1 + this.offset.click.top > t+item.height/2 && y1 + this.offset.click.top < b) return 1; 
    123             } 
    124  
    125         } else { 
    126          
    127             if (!(l < x1 + (this.helperProportions.width / 2) // Right Half 
    128                 && x2 - (this.helperProportions.width / 2) < r // Left Half 
    129                 && t < y1 + (this.helperProportions.height / 2) // Bottom Half 
    130                 && y2 - (this.helperProportions.height / 2) < b )) return false; // Top Half 
    131              
    132             if(this.floating) { 
    133                 if(x2 > l && x1 < l) return 2; //Crosses left edge 
    134                 if(x1 < r && x2 > r) return 1; //Crosses right edge 
    135             } else { 
    136                 if(y2 > t && y1 < t) return 1; //Crosses top edge 
    137                 if(y1 < b && y2 > b) return 2; //Crosses bottom edge 
    138             } 
    139          
    140         } 
    141          
    142         return false; 
    143          
    144     }, 
    145     refresh: function() { 
    146         this.refreshItems(); 
    147         this.refreshPositions(); 
    148     }, 
    149     refreshItems: function() { 
    150          
    151         this.items = []; 
    152         this.containers = [this]; 
    153         var items = this.items; 
    154         var self = this; 
    155         var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element), this]]; 
    156      
    157         if(this.options.connectWith) { 
    158             for (var i = this.options.connectWith.length - 1; i >= 0; i--){ 
    159                 var cur = $(this.options.connectWith[i]); 
    160                 for (var j = cur.length - 1; j >= 0; j--){ 
    161                     var inst = $.data(cur[j], 'sortable'); 
    162                     if(inst && !inst.options.disabled) { 
    163                         queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element), inst]); 
    164                         this.containers.push(inst); 
    165                     } 
    166                 }; 
    167             }; 
    168         } 
    169  
    170         for (var i = queries.length - 1; i >= 0; i--){ 
    171             queries[i][0].each(function() { 
    172                 $.data(this, 'sortable-item', queries[i][1]); // Data for target checking (mouse manager) 
    173                 items.push({ 
    174                     item: $(this), 
    175                     instance: queries[i][1], 
    176                     width: 0, height: 0, 
    177                     left: 0, top: 0 
    178                 }); 
    179             }); 
    180         }; 
    181  
    182     }, 
    183     refreshPositions: function(fast) { 
    184  
    185         //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change 
    186         if(this.offsetParent) { 
    187             var po = this.offsetParent.offset(); 
    188             this.offset.parent = { top: po.top + this.offsetParentBorders.top, left: po.left + this.offsetParentBorders.left }; 
    189         } 
    190  
    191         for (var i = this.items.length - 1; i >= 0; i--){        
    192              
    193             //We ignore calculating positions of all connected containers when we're not over them 
    194             if(this.items[i].instance != this.currentContainer && this.currentContainer && this.items[i].item[0] != this.currentItem[0]) 
    195                 continue; 
    196                  
    197             var t = this.options.toleranceElement ? $(this.options.toleranceElement, this.items[i].item) : this.items[i].item; 
    198              
    199             if(!fast) { 
    200                 this.items[i].width = t[0].offsetWidth; 
    201                 this.items[i].height = t[0].offsetHeight; 
    202             } 
    203              
    204             var p = t.offset(); 
    205             this.items[i].left = p.left; 
    206             this.items[i].top = p.top; 
    207              
    208         }; 
    209  
    210         if(this.options.custom && this.options.custom.refreshContainers) { 
    211             this.options.custom.refreshContainers.call(this); 
    212         } else { 
    213             for (var i = this.containers.length - 1; i >= 0; i--){ 
    214                 var p =this.containers[i].element.offset(); 
    215                 this.containers[i].containerCache.left = p.left; 
    216                 this.containers[i].containerCache.top = p.top; 
    217                 this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); 
    218                 this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); 
    219             }; 
    220         } 
    221  
    222     }, 
    223     destroy: function() { 
    224         this.element 
    225             .removeClass("ui-sortable ui-sortable-disabled") 
    226             .removeData("sortable") 
    227             .unbind(".sortable"); 
    228         this.mouseDestroy(); 
    229          
    230         for ( var i = this.items.length - 1; i >= 0; i-- ) 
    231             this.items[i].item.removeData("sortable-item"); 
    232     }, 
    233     createPlaceholder: function(that) { 
    234          
    235         var self = that || this, o = self.options; 
    236  
    237         if(o.placeholder.constructor == String) { 
    238             var className = o.placeholder; 
    239             o.placeholder = { 
    240                 element: function() { 
    241                     return $('<div></div>').addClass(className)[0]; 
    242                 }, 
    243                 update: function(i, p) { 
    244                     p.css(i.offset()).css({ width: i.outerWidth(), height: i.outerHeight() }); 
    245                 } 
    246             }; 
    247         } 
    248          
    249         self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem)).appendTo('body').css({ position: 'absolute' }); 
    250         o.placeholder.update.call(self.element, self.currentItem, self.placeholder); 
    251     }, 
    252     contactContainers: function(e) { 
    253         for (var i = this.containers.length - 1; i >= 0; i--){ 
    254  
    255             if(this.intersectsWith(this.containers[i].containerCache)) { 
    256                 if(!this.containers[i].containerCache.over) { 
    257                      
    258  
    259                     if(this.currentContainer != this.containers[i]) { 
    260                          
    261                         //When entering a new container, we will find the item with the least distance and append our item near it 
    262                         var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[i].floating ? 'left' : 'top']; 
    263                         for (var j = this.items.length - 1; j >= 0; j--) { 
    264                             if(!contains(this.containers[i].element[0], this.items[j].item[0])) continue; 
    265                             var cur = this.items[j][this.containers[i].floating ? 'left' : 'top']; 
    266                             if(Math.abs(cur - base) < dist) { 
    267                                 dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; 
    268                             } 
    269                         } 
    270                          
    271                         if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled 
    272                             continue; 
    273                          
    274                         //We also need to exchange the placeholder 
    275                         if(this.placeholder) this.placeholder.remove(); 
    276                         if(this.containers[i].options.placeholder) { 
    277                             this.containers[i].createPlaceholder(this); 
    278                         } else { 
    279                             this.placeholder = null;; 
    280                         } 
    281                          
    282                         this.currentContainer = this.containers[i]; 
    283                         itemWithLeastDistance ? this.rearrange(e, itemWithLeastDistance, null, true) : this.rearrange(e, null, this.containers[i].element, true); 
    284                         this.propagate("change", e); //Call plugins and callbacks 
    285                         this.containers[i].propagate("change", e, this); //Call plugins and callbacks 
    286  
    287                     } 
    288                      
    289                     this.containers[i].propagate("over", e, this); 
    290                     this.containers[i].containerCache.over = 1; 
    291                 } 
    292             } else { 
    293                 if(this.containers[i].containerCache.over) { 
    294                     this.containers[i].propagate("out", e, this); 
    295                     this.containers[i].containerCache.over = 0; 
    296                 } 
    297             } 
    298              
    299         };           
    300     }, 
    301     mouseCapture: function(e, overrideHandle) { 
    302      
    303         if(this.options.disabled || this.options.type == 'static') return false; 
    304  
    305         //We have to refresh the items data once first 
    306         this.refreshItems(); 
    307  
    308         //Find out if the clicked node (or one of its parents) is a actual item in this.items 
    309         var currentItem = null, self = this, nodes = $(e.target).parents().each(function() {     
    310             if($.data(this, 'sortable-item') == self) { 
    311                 currentItem = $(this); 
    312                 return false; 
    313             } 
    314         }); 
    315         if($.data(e.target, 'sortable-item') == self) currentItem = $(e.target); 
    316  
    317         if(!currentItem) return false; 
    318         if(this.options.handle && !overrideHandle) { 
    319             var validHandle = false; 
    320              
    321             $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == e.target) validHandle = true; }); 
    322             if(!validHandle) return false; 
    323         } 
    324              
    325         this.currentItem = currentItem; 
    326         return true;     
    327              
    328     }, 
    329     mouseStart: function(e, overrideHandle, noActivation) { 
    330  
    331         var o = this.options; 
    332         this.currentContainer = this; 
    333  
    334         //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture 
    335         this.refreshPositions(); 
    336  
    337         //Create and append the visible helper           
    338         this.helper = typeof o.helper == 'function' ? $(o.helper.apply(this.element[0], [e, this.currentItem])) : this.currentItem.clone(); 
    339         if (!this.helper.parents('body').length) $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(this.helper[0]); //Add the helper to the DOM if that didn't happen already 
    340         this.helper.css({ position: 'absolute', clear: 'both' }).addClass('ui-sortable-helper'); //Position it absolutely and add a helper class 
    341  
    342         /* 
    343          * - Position generation - 
    344          * This block generates everything position related - it's the core of draggables. 
    345          */ 
    346  
    347         this.margins = {                                                                                //Cache the margins 
    348             left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), 
    349             top: (parseInt(this.currentItem.css("marginTop"),10) || 0) 
    350         };       
    351      
    352         this.offset = this.currentItem.offset();                                                        //The element's absolute position on the page 
    353         this.offset = {                                                                                 //Substract the margins from the element's absolute offset 
    354             top: this.offset.top - this.margins.top, 
    355             left: this.offset.left - this.margins.left 
    356         }; 
    357          
    358         this.offset.click = {                                                                           //Where the click happened, relative to the element 
    359             left: e.pageX - this.offset.left, 
    360             top: e.pageY - this.offset.top 
    361         }; 
    362          
    363         this.offsetParent = this.helper.offsetParent();                                                 //Get the offsetParent and cache its position 
    364         var po = this.offsetParent.offset();             
    365  
    366         this.offsetParentBorders = { 
    367             top: (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), 
    368             left: (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) 
    369         }; 
    370         this.offset.parent = {                                                                          //Store its position plus border 
    371             top: po.top + this.offsetParentBorders.top, 
    372             left: po.left + this.offsetParentBorders.left 
    373         }; 
    374      
    375         this.originalPosition = this.generatePosition(e);                                               //Generate the original position 
    376         this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };  //Cache the former DOM position 
    377          
    378         //If o.placeholder is used, create a new element at the given position with the class 
    379         this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Cache the helper size 
    380         if(o.placeholder) this.createPlaceholder(); 
    381          
    382         //Call plugins and callbacks 
    383         this.propagate("start", e); 
    384         this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Recache the helper size 
    385          
    386         if(o.cursorAt) { 
    387             if(o.cursorAt.left != undefined) this.offset.click.left = o.cursorAt.left; 
    388             if(o.cursorAt.right != undefined) this.offset.click.left = this.helperProportions.width - o.cursorAt.right; 
    389             if(o.cursorAt.top != undefined) this.offset.click.top = o.cursorAt.top; 
    390             if(o.cursorAt.bottom != undefined) this.offset.click.top = this.helperProportions.height - o.cursorAt.bottom; 
    391         } 
    392  
    393         /* 
    394          * - Position constraining - 
    395          * Here we prepare position constraining like grid and containment. 
    396          */  
    397          
    398         if(o.containment) { 
    399             if(o.containment == 'parent') o.containment = this.helper[0].parentNode; 
    400             if(o.containment == 'document' || o.containment == 'window') this.containment = [ 
    401                 0 - this.offset.parent.left, 
    402                 0 - this.offset.parent.top, 
    403                 $(o.containment == 'document' ? document : window).width() - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0), 
    404                 ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0) 
    405             ]; 
    406  
    407             if(!(/^(document|window|parent)$/).test(o.containment)) { 
    408                 var ce = $(o.containment)[0]; 
    409                 var co = $(o.containment).offset(); 
    410                  
    411                 this.containment = [ 
    412                     co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.parent.left, 
    413                     co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.parent.top, 
    414                     co.left+Math.max(ce.scrollWidth,ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.currentItem.css("marginRight"),10) || 0), 
    415                     co.top+Math.max(ce.scrollHeight,ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.currentItem.css("marginBottom"),10) || 0) 
    416                 ]; 
    417             } 
    418         } 
    419  
    420         //Set the original element visibility to hidden to still fill out the white space 
    421         if(this.options.placeholder != 'clone') 
    422             this.currentItem.css('visibility', 'hidden'); 
    423          
    424         //Post 'activate' events to possible containers 
    425         if(!noActivation) { 
    426              for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i].propagate("activate", e, this); } 
    427         } 
    428          
    429         //Prepare possible droppables 
    430         if($.ui.ddmanager) $.ui.ddmanager.current = this; 
    431         if ($.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(this, e); 
    432  
    433         this.dragging = true; 
    434  
    435         this.mouseDrag(e); //Execute the drag once - this causes the helper not to be visible before getting its correct position 
    436         return true; 
    437  
    438  
    439     }, 
    440     convertPositionTo: function(d, pos) { 
    441         if(!pos) pos = this.position; 
    442         var mod = d == "absolute" ? 1 : -1; 
    443         return { 
    444             top: ( 
    445                 pos.top                                                                 // the calculated relative position 
    446                 + this.offset.parent.top * mod                                          // The offsetParent's offset without borders (offset + border) 
    447                 - (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) * mod    // The offsetParent's scroll position 
    448                 + this.margins.top * mod                                                //Add the margin (you don't want the margin counting in intersection methods) 
    449             ), 
    450             left: ( 
    451                 pos.left                                                                // the calculated relative position 
    452                 + this.offset.parent.left * mod                                         // The offsetParent's offset without borders (offset + border) 
    453                 - (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft) * mod   // The offsetParent's scroll position 
    454                 + this.margins.left * mod                                               //Add the margin (you don't want the margin counting in intersection methods) 
    455             ) 
    456         }; 
    457     }, 
    458     generatePosition: function(e) { 
    459          
    460         var o = this.options; 
    461         var position = { 
    462             top: ( 
    463                 e.pageY                                                                 // The absolute mouse position 
    464                 - this.offset.click.top                                                 // Click offset (relative to the element) 
    465                 - this.offset.parent.top                                                // The offsetParent's offset without borders (offset + border) 
    466                 + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)  // The offsetParent's scroll position, not if the element is fixed 
    467             ), 
    468             left: ( 
    469                 e.pageX                                                                 // The absolute mouse position 
    470                 - this.offset.click.left                                                // Click offset (relative to the element) 
    471                 - this.offset.parent.left                                               // The offsetParent's offset without borders (offset + border) 
    472                 + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft) // The offsetParent's scroll position, not if the element is fixed 
    473             ) 
    474         }; 
    475          
    476         if(!this.originalPosition) return position;                                     //If we are not dragging yet, we won't check for options 
    477          
    478         /* 
    479          * - Position constraining - 
    480          * Constrain the position to a mix of grid, containment. 
    481          */ 
    482         if(this.containment) { 
    483             if(position.left < this.containment[0]) position.left = this.containment[0]; 
    484             if(position.top < this.containment[1]) position.top = this.containment[1]; 
    485             if(position.left > this.containment[2]) position.left = this.containment[2]; 
    486             if(position.top > this.containment[3]) position.top = this.containment[3]; 
    487         } 
    488          
    489         if(o.grid) { 
    490             var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1]; 
    491             position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; 
    492              
    493             var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0]; 
    494             position.left = this.containment ? (!(left < this.containment[0] || left > this.containment[2]) ? left : (!(left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; 
    495         } 
    496          
    497         return position; 
    498     }, 
    499     mouseDrag: function(e) { 
    500  
    501         //Compute the helpers position 
    502         this.position = this.generatePosition(e); 
    503         this.positionAbs = this.convertPositionTo("absolute"); 
    504  
    505         //Call the internal plugins 
    506         $.ui.plugin.call(this, "sort", [e, this.ui()]); 
    507          
    508         //Regenerate the absolute position used for position checks 
    509         this.positionAbs = this.convertPositionTo("absolute"); 
    510          
    511         //Set the helper's position 
    512         this.helper[0].style.left = this.position.left+'px'; 
    513         this.helper[0].style.top = this.position.top+'px'; 
    514  
    515         //Rearrange 
    516         for (var i = this.items.length - 1; i >= 0; i--) { 
    517             var intersection = this.intersectsWithEdge(this.items[i]); 
    518             if(!intersection) continue; 
    519              
    520             if(this.items[i].item[0] != this.currentItem[0] //cannot intersect with itself 
    521                 &&  this.currentItem[intersection == 1 ? "next" : "prev"]()[0] != this.items[i].item[0] //no useless actions that have been done before 
    522                 &&  !contains(this.currentItem[0], this.items[i].item[0]) //no action if the item moved is the parent of the item checked 
    523                 && (this.options.type == 'semi-dynamic' ? !contains(this.element[0], this.items[i].item[0]) : true) 
    524             ) { 
    525                  
    526                 this.direction = intersection == 1 ? "down" : "up"; 
    527                 this.rearrange(e, this.items[i]); 
    528                 this.propagate("change", e); //Call plugins and callbacks 
    529                 break; 
    530             } 
    531         } 
    532          
    533         //Post events to containers 
    534         this.contactContainers(e); 
    535          
    536         //Interconnect with droppables 
    537         if($.ui.ddmanager) $.ui.ddmanager.drag(this, e); 
    538  
    539         //Call callbacks 
    540         this.element.triggerHandler("sort", [e, this.ui()], this.options["sort"]); 
    541  
    542         return false; 
    543          
    544     }, 
    545     rearrange: function(e, i, a, hardRefresh) { 
    546         a ? a[0].appendChild(this.currentItem[0]) : i.item[0].parentNode.insertBefore(this.currentItem[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling)); 
    547          
    548         //Various things done here to improve the performance: 
    549         // 1. we create a setTimeout, that calls refreshPositions 
    550         // 2. on the instance, we have a counter variable, that get's higher after every append 
    551         // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same 
    552         // 4. this lets only the last addition to the timeout stack through 
    553         this.counter = this.counter ? ++this.counter : 1; 
    554         var self = this, counter = this.counter; 
    555  
    556         window.setTimeout(function() { 
    557             if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove 
    558         },0); 
    559          
    560         if(this.options.placeholder) 
    561             this.options.placeholder.update.call(this.element, this.currentItem, this.placeholder); 
    562     }, 
    563     mouseStop: function(e, noPropagation) { 
    564  
    565         //If we are using droppables, inform the manager about the drop 
    566         if ($.ui.ddmanager && !this.options.dropBehaviour) 
    567             $.ui.ddmanager.drop(this, e); 
    568              
    569         if(this.options.revert) { 
    570             var self = this; 
    571             var cur = self.currentItem.offset(); 
    572  
    573             //Also animate the placeholder if we have one 
    574             if(self.placeholder) self.placeholder.animate({ opacity: 'hide' }, (parseInt(this.options.revert, 10) || 500)-50); 
    575  
    576             $(this.helper).animate({ 
    577                 left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), 
    578                 top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) 
    579             }, parseInt(this.options.revert, 10) || 500, function() { 
    580                 self.clear(e); 
    581             }); 
    582         } else { 
    583             this.clear(e, noPropagation); 
    584         } 
    585  
    586         return false; 
    587          
    588     }, 
    589     clear: function(e, noPropagation) { 
    590  
    591         if(this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) this.propagate("update", e, null, noPropagation); //Trigger update callback if the DOM position has changed 
    592         if(!contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element 
    593             this.propagate("remove", e, null, noPropagation); 
    594             for (var i = this.containers.length - 1; i >= 0; i--){ 
    595                 if(contains(this.containers[i].element[0], this.currentItem[0])) { 
    596                     this.containers[i].propagate("update", e, this, noPropagation); 
    597                     this.containers[i].propagate("receive", e, this, noPropagation); 
    598                 } 
    599             }; 
    600         }; 
    601          
    602         //Post events to containers 
    603         for (var i = this.containers.length - 1; i >= 0; i--){ 
    604             this.containers[i].propagate("deactivate", e, this, noPropagation); 
    605             if(this.containers[i].containerCache.over) { 
    606                 this.containers[i].propagate("out", e, this); 
    607                 this.containers[i].containerCache.over = 0; 
    608             } 
    609         } 
    610          
    611         this.dragging = false; 
    612         if(this.cancelHelperRemoval) { 
    613             this.propagate("stop", e, null, noPropagation); 
    614             return false; 
    615         } 
    616          
    617         $(this.currentItem).css('visibility', ''); 
    618         if(this.placeholder) this.placeholder.remove(); 
    619         this.helper.remove(); this.helper = null; 
    620         this.propagate("stop", e, null, noPropagation); 
    621          
    622         return true; 
    623          
    624     } 
    625 })); 
    626  
    627 $.extend($.ui.sortable, { 
    628     getter: "serialize toArray", 
    629     defaults: { 
    630         helper: "clone", 
    631         tolerance: "guess", 
    632         distance: 1, 
    633         delay: 0, 
    634         scroll: true, 
    635         scrollSensitivity: 20, 
    636         scrollSpeed: 20, 
    637         cancel: ":input", 
    638         items: '> *', 
    639         zIndex: 1000, 
    640         dropOnEmpty: true, 
    641         appendTo: "parent" 
    642     } 
    643 }); 
    644  
    645 /* 
    646  * Sortable Extensions 
    647  */ 
    648  
    649 $.ui.plugin.add("sortable", "cursor", { 
    650     start: function(e, ui) { 
    651         var t = $('body'); 
    652         if (t.css("cursor")) ui.options._cursor = t.css("cursor"); 
    653         t.css("cursor", ui.options.cursor); 
    654     }, 
    655     stop: function(e, ui) { 
    656         if (ui.options._cursor) $('body').css("cursor", ui.options._cursor); 
    657     } 
    658 }); 
    659  
    660 $.ui.plugin.add("sortable", "zIndex", { 
    661     start: function(e, ui) { 
    662         var t = ui.helper; 
    663         if(t.css("zIndex")) ui.options._zIndex = t.css("zIndex"); 
    664         t.css('zIndex', ui.options.zIndex); 
    665     }, 
    666     stop: function(e, ui) { 
    667         if(ui.options._zIndex) $(ui.helper).css('zIndex', ui.options._zIndex); 
    668     } 
    669 }); 
    670  
    671 $.ui.plugin.add("sortable", "opacity", { 
    672     start: function(e, ui) { 
    673         var t = ui.helper; 
    674         if(t.css("opacity")) ui.options._opacity = t.css("opacity"); 
    675         t.css('opacity', ui.options.opacity); 
    676     }, 
    677     stop: function(e, ui) { 
    678         if(ui.options._opacity) $(ui.helper).css('opacity', ui.options._opacity); 
    679     } 
    680 }); 
    681  
    682 $.ui.plugin.add("sortable", "scroll", { 
    683     start: function(e, ui) { 
    684         var o = ui.options; 
    685         var i = $(this).data("sortable"); 
    686      
    687         i.overflowY = function(el) { 
    688             do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y'))) return el; el = el.parent(); } while (el[0].parentNode); 
    689             return $(document); 
    690         }(i.currentItem); 
    691         i.overflowX = function(el) { 
    692             do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x'))) return el; el = el.parent(); } while (el[0].parentNode); 
    693             return $(document); 
    694         }(i.currentItem); 
    695          
    696         if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') i.overflowYOffset = i.overflowY.offset(); 
    697         if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') i.overflowXOffset = i.overflowX.offset(); 
    698          
    699     }, 
    700     sort: function(e, ui) { 
    701          
    702         var o = ui.options; 
    703         var i = $(this).data("sortable"); 
    704          
    705         if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') { 
    706             if((i.overflowYOffset.top + i.overflowY[0].offsetHeight) - e.pageY < o.scrollSensitivity) 
    707                 i.overflowY[0].scrollTop = i.overflowY[0].scrollTop + o.scrollSpeed; 
    708             if(e.pageY - i.overflowYOffset.top < o.scrollSensitivity) 
    709                 i.overflowY[0].scrollTop = i.overflowY[0].scrollTop - o.scrollSpeed; 
    710         } else { 
    711             if(e.pageY - $(document).scrollTop() < o.scrollSensitivity) 
    712                 $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); 
    713             if($(window).height() - (e.pageY - $(document).scrollTop()) < o.scrollSensitivity) 
    714                 $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); 
    715         } 
    716          
    717         if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') { 
    718             if((i.overflowXOffset.left + i.overflowX[0].offsetWidth) - e.pageX < o.scrollSensitivity) 
    719                 i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft + o.scrollSpeed; 
    720             if(e.pageX - i.overflowXOffset.left < o.scrollSensitivity) 
    721                 i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft - o.scrollSpeed; 
    722         } else { 
    723             if(e.pageX - $(document).scrollLeft() < o.scrollSensitivity) 
    724                 $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); 
    725             if($(window).width() - (e.pageX - $(document).scrollLeft()) < o.scrollSensitivity) 
    726                 $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); 
    727         } 
    728          
    729     } 
    730 }); 
    731  
    732 $.ui.plugin.add("sortable", "axis", { 
    733     sort: function(e, ui) { 
    734          
    735         var i = $(this).data("sortable"); 
    736          
    737         if(ui.options.axis == "y") i.position.left = i.originalPosition.left; 
    738         if(ui.options.axis == "x") i.position.top = i.originalPosition.top; 
    739          
    740     } 
    741 }); 
    742  
    743 })(jQuery); 
     13(function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return b&&((b=="down"&&c)||(b=="up"&&!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d<n;d++){var o=a(c[d]);o.data("sortable-item",k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b]}}if(!g&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!e){f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger("remove",g,this._uiHash())})}for(var c=this.containers.length-1;c>=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}return false}if(!e){this._trigger("beforeStop",d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);; 
Note: See TracChangeset for help on using the changeset viewer.