Changeset 13052


Ignore:
Timestamp:
Feb 7, 2012, 10:25:20 PM (12 years ago)
Author:
rvelices
Message:

upgrade jquery to 1.7.1
mouseout on index drop down bozes
improved multisize center of interest

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r13025 r13052  
    203203
    204204    $ok = true;
    205                 if (!isset($conf['never_delete_originals']))
    206                 {
    207                         foreach ($files as $path)
    208                         {
    209                                 if (is_file($path) and !unlink($path))
    210                                 {
    211                                         $ok = false;
    212                                         trigger_error('"'.$path.'" cannot be removed', E_USER_WARNING);
    213                                         break;
    214                                 }
    215                         }
    216                 }
     205    if (!isset($conf['never_delete_originals']))
     206    {
     207      foreach ($files as $path)
     208      {
     209        if (is_file($path) and !unlink($path))
     210        {
     211          $ok = false;
     212          trigger_error('"'.$path.'" cannot be removed', E_USER_WARNING);
     213          break;
     214        }
     215      }
     216    }
    217217
    218218    if ($ok)
     
    23072307}
    23082308
    2309 function delete_element_derivatives($infos)
     2309function delete_element_derivatives($infos, $type='all')
    23102310{
    23112311  $path = $infos['path'];
     
    23182318    $path = substr($path, 3);
    23192319  }
    2320   $dot = strpos($path, '.');
    2321   $path = substr_replace($path, '-*', $dot, 0);
     2320  $dot = strrpos($path, '.');
     2321  if ($type=='all')
     2322  {
     2323    $pattern = '-*';
     2324  }
     2325  else
     2326  {
     2327    $pattern = '-'.derivative_to_url($type).'*';
     2328  }
     2329  $path = substr_replace($path, $pattern, $dot, 0);
    23222330  foreach( glob(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$path) as $file)
    23232331  {
  • trunk/admin/picture_coi.php

    r13038 r13052  
    5858if (isset($_POST['submit']))
    5959{
    60   delete_element_derivatives($row);
     60  foreach(ImageStdParams::get_defined_type_map() as $params)
     61  {
     62    if ($params->sizing->max_crop != 0)
     63    {
     64      delete_element_derivatives($row, $params->type);
     65    }
     66  }
     67  delete_element_derivatives($row, IMG_CUSTOM);
     68  $uid = '&b='.time();
     69  $conf['question_mark_in_urls'] = $conf['php_extension_in_urls'] = true;
     70  if ($conf['derivative_url_style']==1)
     71  {
     72    $conf['derivative_url_style']=0; //auto
     73  }
     74}
     75else
     76{
     77  $uid = '';
    6178}
    6279
     
    7794}
    7895
    79 if (isset($_POST['submit']))
     96foreach(ImageStdParams::get_defined_type_map() as $params)
    8097{
    81   $uid = '&b='.time();
    82   $conf['question_mark_in_urls'] = $conf['php_extension_in_urls'] = true;
    83   $conf['derivative_url_style']=2; //script
    84   $tpl_var['U_SQUARE'] = DerivativeImage::url(IMG_SQUARE, $row).$uid;
    85   $tpl_var['U_THUMB'] = DerivativeImage::url(IMG_THUMB, $row).$uid;
     98  if ($params->sizing->max_crop != 0)
     99  {
     100    $derivative = new DerivativeImage($params, new SrcImage($row) );
     101    $template->append( 'cropped_derivatives', array(
     102      'U_IMG' => $derivative->get_url().$uid,
     103      'HTM_SIZE' => $derivative->get_size_htm(),
     104    ) );
     105  }
    86106}
    87 else
    88 {
    89   $tpl_var['U_SQUARE'] = DerivativeImage::url(IMG_SQUARE, $row);
    90   $tpl_var['U_THUMB'] = DerivativeImage::url(IMG_THUMB, $row);
    91 }
     107
    92108
    93109$template->assign($tpl_var);
  • trunk/admin/themes/default/template/picture_coi.tpl

    r13038 r13052  
    99</div>
    1010
    11 <div>
    12 <img src="{$U_SQUARE}" alt="{$ALT}">
    13 <img src="{$U_THUMB}" alt="{$ALT}">
    14 </div>
     11<form method="post">
    1512
    16 <div>
    17 <form method="post">
     13<fieldset>
     14<legend>{'Crop'|@translate}</legend>
     15{foreach from=$cropped_derivatives item=deriv}
     16<img src="{$deriv.U_IMG}" alt="{$ALT}" {$deriv.HTM_SIZE}>
     17{/foreach}
     18</fieldset>
     19
     20<fieldset>
     21<legend>{'Center of interest'|@translate}</legend>
    1822<input type="hidden" id="l" name="l" value="{if isset($coi)}{$coi.l}{/if}">
    1923<input type="hidden" id="t" name="t" value="{if isset($coi)}{$coi.t}{/if}">
     
    2630<input type="submit" name="submit" value="{'Submit'|@translate}">
    2731</p>
     32</fieldset>
    2833</form>
    29 </div>
    3034
    3135{footer_script}
     
    5256{/literal}
    5357jQuery("#jcrop").Jcrop( {ldelim}
    54         boxWidth: 400, boxHeight: 400,
     58        boxWidth: 500, boxHeight: 400,
    5559        onChange: jOnChange,
    5660        onRelease: jOnRelease
  • trunk/themes/default/js/jquery.js

    r12525 r13052  
    11/*!
    2  * jQuery JavaScript Library v1.6.4
     2 * jQuery JavaScript Library v1.7.1
    33 * http://jquery.com/
    44 *
     
    1212 * Released under the MIT, BSD, and GPL Licenses.
    1313 *
    14  * Date: Mon Sep 12 18:54:48 2011 -0400
     14 * Date: Mon Nov 21 21:11:03 2011 -0500
    1515 */
    1616(function( window, undefined ) {
     
    4747        trimLeft = /^\s+/,
    4848        trimRight = /\s+$/,
    49 
    50         // Check for digits
    51         rdigit = /\d/,
    5249
    5350        // Match a standalone tag
     
    141138                                if ( match[1] ) {
    142139                                        context = context instanceof jQuery ? context[0] : context;
    143                                         doc = (context ? context.ownerDocument || context : document);
     140                                        doc = ( context ? context.ownerDocument || context : document );
    144141
    145142                                        // If a single string is passed in and it's a single tag
     
    158155                                        } else {
    159156                                                ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
    160                                                 selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
     157                                                selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
    161158                                        }
    162159
     
    188185                        // HANDLE: $(expr, $(...))
    189186                        } else if ( !context || context.jquery ) {
    190                                 return (context || rootjQuery).find( selector );
     187                                return ( context || rootjQuery ).find( selector );
    191188
    192189                        // HANDLE: $(expr, context)
     
    202199                }
    203200
    204                 if (selector.selector !== undefined) {
     201                if ( selector.selector !== undefined ) {
    205202                        this.selector = selector.selector;
    206203                        this.context = selector.context;
     
    214211
    215212        // The current version of jQuery being used
    216         jquery: "1.6.4",
     213        jquery: "1.7.1",
    217214
    218215        // The default length of a jQuery object is 0
     
    259256
    260257                if ( name === "find" ) {
    261                         ret.selector = this.selector + (this.selector ? " " : "") + selector;
     258                        ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
    262259                } else if ( name ) {
    263260                        ret.selector = this.selector + "." + name + "(" + selector + ")";
     
    280277
    281278                // Add the callback
    282                 readyList.done( fn );
     279                readyList.add( fn );
    283280
    284281                return this;
     
    286283
    287284        eq: function( i ) {
     285                i = +i;
    288286                return i === -1 ?
    289287                        this.slice( i ) :
    290                         this.slice( i, +i + 1 );
     288                        this.slice( i, i + 1 );
    291289        },
    292290
     
    435433
    436434                        // If there are functions bound, to execute
    437                         readyList.resolveWith( document, [ jQuery ] );
     435                        readyList.fireWith( document, [ jQuery ] );
    438436
    439437                        // Trigger any bound ready events
    440438                        if ( jQuery.fn.trigger ) {
    441                                 jQuery( document ).trigger( "ready" ).unbind( "ready" );
     439                                jQuery( document ).trigger( "ready" ).off( "ready" );
    442440                        }
    443441                }
     
    449447                }
    450448
    451                 readyList = jQuery._Deferred();
     449                readyList = jQuery.Callbacks( "once memory" );
    452450
    453451                // Catch cases where $(document).ready() is called after the
     
    505503        },
    506504
    507         isNaN: function( obj ) {
    508                 return obj == null || !rdigit.test( obj ) || isNaN( obj );
     505        isNumeric: function( obj ) {
     506                return !isNaN( parseFloat(obj) ) && isFinite( obj );
    509507        },
    510508
     
    552550
    553551        error: function( msg ) {
    554                 throw msg;
     552                throw new Error( msg );
    555553        },
    556554
     
    574572                        .replace( rvalidbraces, "")) ) {
    575573
    576                         return (new Function( "return " + data ))();
     574                        return ( new Function( "return " + data ) )();
    577575
    578576                }
     
    689687                if ( array != null ) {
    690688                        // The window, strings (and functions) also have 'length'
    691                         // The extra typeof function check is to prevent crashes
    692                         // in Safari 2 (See: #3039)
    693689                        // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
    694690                        var type = jQuery.type( array );
     
    704700        },
    705701
    706         inArray: function( elem, array ) {
    707                 if ( !array ) {
    708                         return -1;
    709                 }
    710 
    711                 if ( indexOf ) {
    712                         return indexOf.call( array, elem );
    713                 }
    714 
    715                 for ( var i = 0, length = array.length; i < length; i++ ) {
    716                         if ( array[ i ] === elem ) {
    717                                 return i;
     702        inArray: function( elem, array, i ) {
     703                var len;
     704
     705                if ( array ) {
     706                        if ( indexOf ) {
     707                                return indexOf.call( array, elem, i );
     708                        }
     709
     710                        len = array.length;
     711                        i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
     712
     713                        for ( ; i < len; i++ ) {
     714                                // Skip accessing in sparse arrays
     715                                if ( i in array && array[ i ] === elem ) {
     716                                        return i;
     717                                }
    718718                        }
    719719                }
     
    851851
    852852        now: function() {
    853                 return (new Date()).getTime();
     853                return ( new Date() ).getTime();
    854854        },
    855855
     
    958958
    959959
    960 var // Promise methods
    961         promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ),
    962         // Static reference to slice
    963         sliceDeferred = [].slice;
    964 
    965 jQuery.extend({
    966         // Create a simple deferred (one callbacks list)
    967         _Deferred: function() {
    968                 var // callbacks list
    969                         callbacks = [],
    970                         // stored [ context , args ]
    971                         fired,
    972                         // to avoid firing when already doing so
    973                         firing,
    974                         // flag to know if the deferred has been cancelled
    975                         cancelled,
    976                         // the deferred itself
    977                         deferred  = {
    978 
    979                                 // done( f1, f2, ...)
    980                                 done: function() {
    981                                         if ( !cancelled ) {
    982                                                 var args = arguments,
    983                                                         i,
    984                                                         length,
    985                                                         elem,
    986                                                         type,
    987                                                         _fired;
    988                                                 if ( fired ) {
    989                                                         _fired = fired;
    990                                                         fired = 0;
    991                                                 }
    992                                                 for ( i = 0, length = args.length; i < length; i++ ) {
    993                                                         elem = args[ i ];
    994                                                         type = jQuery.type( elem );
    995                                                         if ( type === "array" ) {
    996                                                                 deferred.done.apply( deferred, elem );
    997                                                         } else if ( type === "function" ) {
    998                                                                 callbacks.push( elem );
     960// String to Object flags format cache
     961var flagsCache = {};
     962
     963// Convert String-formatted flags into Object-formatted ones and store in cache
     964function createFlags( flags ) {
     965        var object = flagsCache[ flags ] = {},
     966                i, length;
     967        flags = flags.split( /\s+/ );
     968        for ( i = 0, length = flags.length; i < length; i++ ) {
     969                object[ flags[i] ] = true;
     970        }
     971        return object;
     972}
     973
     974/*
     975 * Create a callback list using the following parameters:
     976 *
     977 *      flags:  an optional list of space-separated flags that will change how
     978 *                      the callback list behaves
     979 *
     980 * By default a callback list will act like an event callback list and can be
     981 * "fired" multiple times.
     982 *
     983 * Possible flags:
     984 *
     985 *      once:                   will ensure the callback list can only be fired once (like a Deferred)
     986 *
     987 *      memory:                 will keep track of previous values and will call any callback added
     988 *                                      after the list has been fired right away with the latest "memorized"
     989 *                                      values (like a Deferred)
     990 *
     991 *      unique:                 will ensure a callback can only be added once (no duplicate in the list)
     992 *
     993 *      stopOnFalse:    interrupt callings when a callback returns false
     994 *
     995 */
     996jQuery.Callbacks = function( flags ) {
     997
     998        // Convert flags from String-formatted to Object-formatted
     999        // (we check in cache first)
     1000        flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
     1001
     1002        var // Actual callback list
     1003                list = [],
     1004                // Stack of fire calls for repeatable lists
     1005                stack = [],
     1006                // Last fire value (for non-forgettable lists)
     1007                memory,
     1008                // Flag to know if list is currently firing
     1009                firing,
     1010                // First callback to fire (used internally by add and fireWith)
     1011                firingStart,
     1012                // End of the loop when firing
     1013                firingLength,
     1014                // Index of currently firing callback (modified by remove if needed)
     1015                firingIndex,
     1016                // Add one or several callbacks to the list
     1017                add = function( args ) {
     1018                        var i,
     1019                                length,
     1020                                elem,
     1021                                type,
     1022                                actual;
     1023                        for ( i = 0, length = args.length; i < length; i++ ) {
     1024                                elem = args[ i ];
     1025                                type = jQuery.type( elem );
     1026                                if ( type === "array" ) {
     1027                                        // Inspect recursively
     1028                                        add( elem );
     1029                                } else if ( type === "function" ) {
     1030                                        // Add if not in unique mode and callback is not in
     1031                                        if ( !flags.unique || !self.has( elem ) ) {
     1032                                                list.push( elem );
     1033                                        }
     1034                                }
     1035                        }
     1036                },
     1037                // Fire callbacks
     1038                fire = function( context, args ) {
     1039                        args = args || [];
     1040                        memory = !flags.memory || [ context, args ];
     1041                        firing = true;
     1042                        firingIndex = firingStart || 0;
     1043                        firingStart = 0;
     1044                        firingLength = list.length;
     1045                        for ( ; list && firingIndex < firingLength; firingIndex++ ) {
     1046                                if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
     1047                                        memory = true; // Mark as halted
     1048                                        break;
     1049                                }
     1050                        }
     1051                        firing = false;
     1052                        if ( list ) {
     1053                                if ( !flags.once ) {
     1054                                        if ( stack && stack.length ) {
     1055                                                memory = stack.shift();
     1056                                                self.fireWith( memory[ 0 ], memory[ 1 ] );
     1057                                        }
     1058                                } else if ( memory === true ) {
     1059                                        self.disable();
     1060                                } else {
     1061                                        list = [];
     1062                                }
     1063                        }
     1064                },
     1065                // Actual Callbacks object
     1066                self = {
     1067                        // Add a callback or a collection of callbacks to the list
     1068                        add: function() {
     1069                                if ( list ) {
     1070                                        var length = list.length;
     1071                                        add( arguments );
     1072                                        // Do we need to add the callbacks to the
     1073                                        // current firing batch?
     1074                                        if ( firing ) {
     1075                                                firingLength = list.length;
     1076                                        // With memory, if we're not firing then
     1077                                        // we should call right away, unless previous
     1078                                        // firing was halted (stopOnFalse)
     1079                                        } else if ( memory && memory !== true ) {
     1080                                                firingStart = length;
     1081                                                fire( memory[ 0 ], memory[ 1 ] );
     1082                                        }
     1083                                }
     1084                                return this;
     1085                        },
     1086                        // Remove a callback from the list
     1087                        remove: function() {
     1088                                if ( list ) {
     1089                                        var args = arguments,
     1090                                                argIndex = 0,
     1091                                                argLength = args.length;
     1092                                        for ( ; argIndex < argLength ; argIndex++ ) {
     1093                                                for ( var i = 0; i < list.length; i++ ) {
     1094                                                        if ( args[ argIndex ] === list[ i ] ) {
     1095                                                                // Handle firingIndex and firingLength
     1096                                                                if ( firing ) {
     1097                                                                        if ( i <= firingLength ) {
     1098                                                                                firingLength--;
     1099                                                                                if ( i <= firingIndex ) {
     1100                                                                                        firingIndex--;
     1101                                                                                }
     1102                                                                        }
     1103                                                                }
     1104                                                                // Remove the element
     1105                                                                list.splice( i--, 1 );
     1106                                                                // If we have some unicity property then
     1107                                                                // we only need to do this once
     1108                                                                if ( flags.unique ) {
     1109                                                                        break;
     1110                                                                }
    9991111                                                        }
    10001112                                                }
    1001                                                 if ( _fired ) {
    1002                                                         deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );
     1113                                        }
     1114                                }
     1115                                return this;
     1116                        },
     1117                        // Control if a given callback is in the list
     1118                        has: function( fn ) {
     1119                                if ( list ) {
     1120                                        var i = 0,
     1121                                                length = list.length;
     1122                                        for ( ; i < length; i++ ) {
     1123                                                if ( fn === list[ i ] ) {
     1124                                                        return true;
    10031125                                                }
    10041126                                        }
     1127                                }
     1128                                return false;
     1129                        },
     1130                        // Remove all callbacks from the list
     1131                        empty: function() {
     1132                                list = [];
     1133                                return this;
     1134                        },
     1135                        // Have the list do nothing anymore
     1136                        disable: function() {
     1137                                list = stack = memory = undefined;
     1138                                return this;
     1139                        },
     1140                        // Is it disabled?
     1141                        disabled: function() {
     1142                                return !list;
     1143                        },
     1144                        // Lock the list in its current state
     1145                        lock: function() {
     1146                                stack = undefined;
     1147                                if ( !memory || memory === true ) {
     1148                                        self.disable();
     1149                                }
     1150                                return this;
     1151                        },
     1152                        // Is it locked?
     1153                        locked: function() {
     1154                                return !stack;
     1155                        },
     1156                        // Call all callbacks with the given context and arguments
     1157                        fireWith: function( context, args ) {
     1158                                if ( stack ) {
     1159                                        if ( firing ) {
     1160                                                if ( !flags.once ) {
     1161                                                        stack.push( [ context, args ] );
     1162                                                }
     1163                                        } else if ( !( flags.once && memory ) ) {
     1164                                                fire( context, args );
     1165                                        }
     1166                                }
     1167                                return this;
     1168                        },
     1169                        // Call all the callbacks with the given arguments
     1170                        fire: function() {
     1171                                self.fireWith( this, arguments );
     1172                                return this;
     1173                        },
     1174                        // To know if the callbacks have already been called at least once
     1175                        fired: function() {
     1176                                return !!memory;
     1177                        }
     1178                };
     1179
     1180        return self;
     1181};
     1182
     1183
     1184
     1185
     1186var // Static reference to slice
     1187        sliceDeferred = [].slice;
     1188
     1189jQuery.extend({
     1190
     1191        Deferred: function( func ) {
     1192                var doneList = jQuery.Callbacks( "once memory" ),
     1193                        failList = jQuery.Callbacks( "once memory" ),
     1194                        progressList = jQuery.Callbacks( "memory" ),
     1195                        state = "pending",
     1196                        lists = {
     1197                                resolve: doneList,
     1198                                reject: failList,
     1199                                notify: progressList
     1200                        },
     1201                        promise = {
     1202                                done: doneList.add,
     1203                                fail: failList.add,
     1204                                progress: progressList.add,
     1205
     1206                                state: function() {
     1207                                        return state;
     1208                                },
     1209
     1210                                // Deprecated
     1211                                isResolved: doneList.fired,
     1212                                isRejected: failList.fired,
     1213
     1214                                then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
     1215                                        deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
    10051216                                        return this;
    10061217                                },
    1007 
    1008                                 // resolve with given context and args
    1009                                 resolveWith: function( context, args ) {
    1010                                         if ( !cancelled && !fired && !firing ) {
    1011                                                 // make sure args are available (#8421)
    1012                                                 args = args || [];
    1013                                                 firing = 1;
    1014                                                 try {
    1015                                                         while( callbacks[ 0 ] ) {
    1016                                                                 callbacks.shift().apply( context, args );
    1017                                                         }
    1018                                                 }
    1019                                                 finally {
    1020                                                         fired = [ context, args ];
    1021                                                         firing = 0;
    1022                                                 }
    1023                                         }
     1218                                always: function() {
     1219                                        deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
    10241220                                        return this;
    10251221                                },
    1026 
    1027                                 // resolve with this as context and given arguments
    1028                                 resolve: function() {
    1029                                         deferred.resolveWith( this, arguments );
    1030                                         return this;
     1222                                pipe: function( fnDone, fnFail, fnProgress ) {
     1223                                        return jQuery.Deferred(function( newDefer ) {
     1224                                                jQuery.each( {
     1225                                                        done: [ fnDone, "resolve" ],
     1226                                                        fail: [ fnFail, "reject" ],
     1227                                                        progress: [ fnProgress, "notify" ]
     1228                                                }, function( handler, data ) {
     1229                                                        var fn = data[ 0 ],
     1230                                                                action = data[ 1 ],
     1231                                                                returned;
     1232                                                        if ( jQuery.isFunction( fn ) ) {
     1233                                                                deferred[ handler ](function() {
     1234                                                                        returned = fn.apply( this, arguments );
     1235                                                                        if ( returned && jQuery.isFunction( returned.promise ) ) {
     1236                                                                                returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
     1237                                                                        } else {
     1238                                                                                newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
     1239                                                                        }
     1240                                                                });
     1241                                                        } else {
     1242                                                                deferred[ handler ]( newDefer[ action ] );
     1243                                                        }
     1244                                                });
     1245                                        }).promise();
    10311246                                },
    1032 
    1033                                 // Has this deferred been resolved?
    1034                                 isResolved: function() {
    1035                                         return !!( firing || fired );
    1036                                 },
    1037 
    1038                                 // Cancel
    1039                                 cancel: function() {
    1040                                         cancelled = 1;
    1041                                         callbacks = [];
    1042                                         return this;
    1043                                 }
    1044                         };
    1045 
    1046                 return deferred;
    1047         },
    1048 
    1049         // Full fledged deferred (two callbacks list)
    1050         Deferred: function( func ) {
    1051                 var deferred = jQuery._Deferred(),
    1052                         failDeferred = jQuery._Deferred(),
    1053                         promise;
    1054                 // Add errorDeferred methods, then and promise
    1055                 jQuery.extend( deferred, {
    1056                         then: function( doneCallbacks, failCallbacks ) {
    1057                                 deferred.done( doneCallbacks ).fail( failCallbacks );
    1058                                 return this;
     1247                                // Get a promise for this deferred
     1248                                // If obj is provided, the promise aspect is added to the object
     1249                                promise: function( obj ) {
     1250                                        if ( obj == null ) {
     1251                                                obj = promise;
     1252                                        } else {
     1253                                                for ( var key in promise ) {
     1254                                                        obj[ key ] = promise[ key ];
     1255                                                }
     1256                                        }
     1257                                        return obj;
     1258                                }
    10591259                        },
    1060                         always: function() {
    1061                                 return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments );
    1062                         },
    1063                         fail: failDeferred.done,
    1064                         rejectWith: failDeferred.resolveWith,
    1065                         reject: failDeferred.resolve,
    1066                         isRejected: failDeferred.isResolved,
    1067                         pipe: function( fnDone, fnFail ) {
    1068                                 return jQuery.Deferred(function( newDefer ) {
    1069                                         jQuery.each( {
    1070                                                 done: [ fnDone, "resolve" ],
    1071                                                 fail: [ fnFail, "reject" ]
    1072                                         }, function( handler, data ) {
    1073                                                 var fn = data[ 0 ],
    1074                                                         action = data[ 1 ],
    1075                                                         returned;
    1076                                                 if ( jQuery.isFunction( fn ) ) {
    1077                                                         deferred[ handler ](function() {
    1078                                                                 returned = fn.apply( this, arguments );
    1079                                                                 if ( returned && jQuery.isFunction( returned.promise ) ) {
    1080                                                                         returned.promise().then( newDefer.resolve, newDefer.reject );
    1081                                                                 } else {
    1082                                                                         newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
    1083                                                                 }
    1084                                                         });
    1085                                                 } else {
    1086                                                         deferred[ handler ]( newDefer[ action ] );
    1087                                                 }
    1088                                         });
    1089                                 }).promise();
    1090                         },
    1091                         // Get a promise for this deferred
    1092                         // If obj is provided, the promise aspect is added to the object
    1093                         promise: function( obj ) {
    1094                                 if ( obj == null ) {
    1095                                         if ( promise ) {
    1096                                                 return promise;
    1097                                         }
    1098                                         promise = obj = {};
    1099                                 }
    1100                                 var i = promiseMethods.length;
    1101                                 while( i-- ) {
    1102                                         obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
    1103                                 }
    1104                                 return obj;
    1105                         }
    1106                 });
    1107                 // Make sure only one callback list will be used
    1108                 deferred.done( failDeferred.cancel ).fail( deferred.cancel );
    1109                 // Unexpose cancel
    1110                 delete deferred.cancel;
     1260                        deferred = promise.promise({}),
     1261                        key;
     1262
     1263                for ( key in lists ) {
     1264                        deferred[ key ] = lists[ key ].fire;
     1265                        deferred[ key + "With" ] = lists[ key ].fireWith;
     1266                }
     1267
     1268                // Handle state
     1269                deferred.done( function() {
     1270                        state = "resolved";
     1271                }, failList.disable, progressList.lock ).fail( function() {
     1272                        state = "rejected";
     1273                }, doneList.disable, progressList.lock );
     1274
    11111275                // Call given func if any
    11121276                if ( func ) {
    11131277                        func.call( deferred, deferred );
    11141278                }
     1279
     1280                // All done!
    11151281                return deferred;
    11161282        },
     
    11181284        // Deferred helper
    11191285        when: function( firstParam ) {
    1120                 var args = arguments,
     1286                var args = sliceDeferred.call( arguments, 0 ),
    11211287                        i = 0,
    11221288                        length = args.length,
     1289                        pValues = new Array( length ),
    11231290                        count = length,
     1291                        pCount = length,
    11241292                        deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
    11251293                                firstParam :
    1126                                 jQuery.Deferred();
     1294                                jQuery.Deferred(),
     1295                        promise = deferred.promise();
    11271296                function resolveFunc( i ) {
    11281297                        return function( value ) {
    11291298                                args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
    11301299                                if ( !( --count ) ) {
    1131                                         // Strange bug in FF4:
    1132                                         // Values changed onto the arguments object sometimes end up as undefined values
    1133                                         // outside the $.when method. Cloning the object into a fresh array solves the issue
    1134                                         deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );
     1300                                        deferred.resolveWith( deferred, args );
    11351301                                }
    11361302                        };
    11371303                }
     1304                function progressFunc( i ) {
     1305                        return function( value ) {
     1306                                pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
     1307                                deferred.notifyWith( promise, pValues );
     1308                        };
     1309                }
    11381310                if ( length > 1 ) {
    1139                         for( ; i < length; i++ ) {
    1140                                 if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) {
    1141                                         args[ i ].promise().then( resolveFunc(i), deferred.reject );
     1311                        for ( ; i < length; i++ ) {
     1312                                if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
     1313                                        args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
    11421314                                } else {
    11431315                                        --count;
     
    11501322                        deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
    11511323                }
    1152                 return deferred.promise();
     1324                return promise;
    11531325        }
    11541326});
     
    11561328
    11571329
     1330
    11581331jQuery.support = (function() {
    11591332
    1160         var div = document.createElement( "div" ),
    1161                 documentElement = document.documentElement,
     1333        var support,
    11621334                all,
    11631335                a,
     
    11661338                input,
    11671339                marginDiv,
    1168                 support,
    11691340                fragment,
    1170                 body,
    1171                 testElementParent,
    1172                 testElement,
    1173                 testElementStyle,
    11741341                tds,
    11751342                events,
    11761343                eventName,
    11771344                i,
    1178                 isSupported;
     1345                isSupported,
     1346                div = document.createElement( "div" ),
     1347                documentElement = document.documentElement;
    11791348
    11801349        // Preliminary tests
    11811350        div.setAttribute("className", "t");
    11821351        div.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
    1183 
    11841352
    11851353        all = div.getElementsByTagName( "*" );
     
    12021370                // Make sure that tbody elements aren't automatically inserted
    12031371                // IE will insert them into empty tables
    1204                 tbody: !div.getElementsByTagName( "tbody" ).length,
     1372                tbody: !div.getElementsByTagName("tbody").length,
    12051373
    12061374                // Make sure that link elements get serialized correctly by innerHTML
    12071375                // This requires a wrapper element in IE
    1208                 htmlSerialize: !!div.getElementsByTagName( "link" ).length,
     1376                htmlSerialize: !!div.getElementsByTagName("link").length,
    12091377
    12101378                // Get the style information from getAttribute
     
    12141382                // Make sure that URLs aren't manipulated
    12151383                // (IE normalizes it by default)
    1216                 hrefNormalized: ( a.getAttribute( "href" ) === "/a" ),
     1384                hrefNormalized: ( a.getAttribute("href") === "/a" ),
    12171385
    12181386                // Make sure that element opacity exists
    12191387                // (IE uses filter instead)
    12201388                // Use a regex to work around a WebKit issue. See #5145
    1221                 opacity: /^0.55$/.test( a.style.opacity ),
     1389                opacity: /^0.55/.test( a.style.opacity ),
    12221390
    12231391                // Verify style float existence
     
    12361404                // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
    12371405                getSetAttribute: div.className !== "t",
     1406
     1407                // Tests for enctype support on a form(#6743)
     1408                enctype: !!document.createElement("form").enctype,
     1409
     1410                // Makes sure cloning an html5 element does not cause problems
     1411                // Where outerHTML is undefined, this still works
     1412                html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
    12381413
    12391414                // Will be defined later
     
    12741449        }
    12751450
    1276         // Check if a radio maintains it's value
     1451        // Check if a radio maintains its value
    12771452        // after being appended to the DOM
    12781453        input = document.createElement("input");
     
    12841459        div.appendChild( input );
    12851460        fragment = document.createDocumentFragment();
    1286         fragment.appendChild( div.firstChild );
     1461        fragment.appendChild( div.lastChild );
    12871462
    12881463        // WebKit doesn't clone checked state correctly in fragments
    12891464        support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
    1290 
    1291         div.innerHTML = "";
    1292 
    1293         // Figure out if the W3C box model works as expected
    1294         div.style.width = div.style.paddingLeft = "1px";
    1295 
    1296         body = document.getElementsByTagName( "body" )[ 0 ];
    1297         // We use our own, invisible, body unless the body is already present
    1298         // in which case we use a div (#9239)
    1299         testElement = document.createElement( body ? "div" : "body" );
    1300         testElementStyle = {
    1301                 visibility: "hidden",
    1302                 width: 0,
    1303                 height: 0,
    1304                 border: 0,
    1305                 margin: 0,
    1306                 background: "none"
    1307         };
    1308         if ( body ) {
    1309                 jQuery.extend( testElementStyle, {
    1310                         position: "absolute",
    1311                         left: "-1000px",
    1312                         top: "-1000px"
    1313                 });
    1314         }
    1315         for ( i in testElementStyle ) {
    1316                 testElement.style[ i ] = testElementStyle[ i ];
    1317         }
    1318         testElement.appendChild( div );
    1319         testElementParent = body || documentElement;
    1320         testElementParent.insertBefore( testElement, testElementParent.firstChild );
    13211465
    13221466        // Check if a disconnected checkbox will retain its checked
     
    13241468        support.appendChecked = input.checked;
    13251469
    1326         support.boxModel = div.offsetWidth === 2;
    1327 
    1328         if ( "zoom" in div.style ) {
    1329                 // Check if natively block-level elements act like inline-block
    1330                 // elements when setting their display to 'inline' and giving
    1331                 // them layout
    1332                 // (IE < 8 does this)
    1333                 div.style.display = "inline";
    1334                 div.style.zoom = 1;
    1335                 support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
    1336 
    1337                 // Check if elements with layout shrink-wrap their children
    1338                 // (IE 6 does this)
    1339                 div.style.display = "";
    1340                 div.innerHTML = "<div style='width:4px;'></div>";
    1341                 support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
    1342         }
    1343 
    1344         div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
    1345         tds = div.getElementsByTagName( "td" );
    1346 
    1347         // Check if table cells still have offsetWidth/Height when they are set
    1348         // to display:none and there are still other visible table cells in a
    1349         // table row; if so, offsetWidth/Height are not reliable for use when
    1350         // determining if an element has been hidden directly using
    1351         // display:none (it is still safe to use offsets if a parent element is
    1352         // hidden; don safety goggles and see bug #4512 for more information).
    1353         // (only IE 8 fails this test)
    1354         isSupported = ( tds[ 0 ].offsetHeight === 0 );
    1355 
    1356         tds[ 0 ].style.display = "";
    1357         tds[ 1 ].style.display = "none";
    1358 
    1359         // Check if empty table cells still have offsetWidth/Height
    1360         // (IE < 8 fail this test)
    1361         support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
     1470        fragment.removeChild( input );
     1471        fragment.appendChild( div );
     1472
    13621473        div.innerHTML = "";
    13631474
     
    13671478        // Fails in WebKit before Feb 2011 nightlies
    13681479        // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
    1369         if ( document.defaultView && document.defaultView.getComputedStyle ) {
     1480        if ( window.getComputedStyle ) {
    13701481                marginDiv = document.createElement( "div" );
    13711482                marginDiv.style.width = "0";
    13721483                marginDiv.style.marginRight = "0";
     1484                div.style.width = "2px";
    13731485                div.appendChild( marginDiv );
    13741486                support.reliableMarginRight =
    1375                         ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
    1376         }
    1377 
    1378         // Remove the body element we added
    1379         testElement.innerHTML = "";
    1380         testElementParent.removeChild( testElement );
     1487                        ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
     1488        }
    13811489
    13821490        // Technique from Juriy Zaytsev
    1383         // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
     1491        // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
    13841492        // We only care about the case where non-standard event systems
    13851493        // are used, namely in IE. Short-circuiting here helps us to
     
    13911499                        change: 1,
    13921500                        focusin: 1
    1393                 } ) {
     1501                }) {
    13941502                        eventName = "on" + i;
    13951503                        isSupported = ( eventName in div );
     
    14021510        }
    14031511
    1404         // Null connected elements to avoid leaks in IE
    1405         testElement = fragment = select = opt = body = marginDiv = div = input = null;
     1512        fragment.removeChild( div );
     1513
     1514        // Null elements to avoid leaks in IE
     1515        fragment = select = opt = marginDiv = div = input = null;
     1516
     1517        // Run tests that need a body at doc ready
     1518        jQuery(function() {
     1519                var container, outer, inner, table, td, offsetSupport,
     1520                        conMarginTop, ptlm, vb, style, html,
     1521                        body = document.getElementsByTagName("body")[0];
     1522
     1523                if ( !body ) {
     1524                        // Return for frameset docs that don't have a body
     1525                        return;
     1526                }
     1527
     1528                conMarginTop = 1;
     1529                ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";
     1530                vb = "visibility:hidden;border:0;";
     1531                style = "style='" + ptlm + "border:5px solid #000;padding:0;'";
     1532                html = "<div " + style + "><div></div></div>" +
     1533                        "<table " + style + " cellpadding='0' cellspacing='0'>" +
     1534                        "<tr><td></td></tr></table>";
     1535
     1536                container = document.createElement("div");
     1537                container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
     1538                body.insertBefore( container, body.firstChild );
     1539
     1540                // Construct the test element
     1541                div = document.createElement("div");
     1542                container.appendChild( div );
     1543
     1544                // Check if table cells still have offsetWidth/Height when they are set
     1545                // to display:none and there are still other visible table cells in a
     1546                // table row; if so, offsetWidth/Height are not reliable for use when
     1547                // determining if an element has been hidden directly using
     1548                // display:none (it is still safe to use offsets if a parent element is
     1549                // hidden; don safety goggles and see bug #4512 for more information).
     1550                // (only IE 8 fails this test)
     1551                div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
     1552                tds = div.getElementsByTagName( "td" );
     1553                isSupported = ( tds[ 0 ].offsetHeight === 0 );
     1554
     1555                tds[ 0 ].style.display = "";
     1556                tds[ 1 ].style.display = "none";
     1557
     1558                // Check if empty table cells still have offsetWidth/Height
     1559                // (IE <= 8 fail this test)
     1560                support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
     1561
     1562                // Figure out if the W3C box model works as expected
     1563                div.innerHTML = "";
     1564                div.style.width = div.style.paddingLeft = "1px";
     1565                jQuery.boxModel = support.boxModel = div.offsetWidth === 2;
     1566
     1567                if ( typeof div.style.zoom !== "undefined" ) {
     1568                        // Check if natively block-level elements act like inline-block
     1569                        // elements when setting their display to 'inline' and giving
     1570                        // them layout
     1571                        // (IE < 8 does this)
     1572                        div.style.display = "inline";
     1573                        div.style.zoom = 1;
     1574                        support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
     1575
     1576                        // Check if elements with layout shrink-wrap their children
     1577                        // (IE 6 does this)
     1578                        div.style.display = "";
     1579                        div.innerHTML = "<div style='width:4px;'></div>";
     1580                        support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
     1581                }
     1582
     1583                div.style.cssText = ptlm + vb;
     1584                div.innerHTML = html;
     1585
     1586                outer = div.firstChild;
     1587                inner = outer.firstChild;
     1588                td = outer.nextSibling.firstChild.firstChild;
     1589
     1590                offsetSupport = {
     1591                        doesNotAddBorder: ( inner.offsetTop !== 5 ),
     1592                        doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
     1593                };
     1594
     1595                inner.style.position = "fixed";
     1596                inner.style.top = "20px";
     1597
     1598                // safari subtracts parent border width here which is 5px
     1599                offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
     1600                inner.style.position = inner.style.top = "";
     1601
     1602                outer.style.overflow = "hidden";
     1603                outer.style.position = "relative";
     1604
     1605                offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
     1606                offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
     1607
     1608                body.removeChild( container );
     1609                div  = container = null;
     1610
     1611                jQuery.extend( support, offsetSupport );
     1612        });
    14061613
    14071614        return support;
    14081615})();
    1409 
    1410 // Keep track of boxModel
    1411 jQuery.boxModel = jQuery.support.boxModel;
    14121616
    14131617
     
    14381642        hasData: function( elem ) {
    14391643                elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
    1440 
    14411644                return !!elem && !isEmptyDataObject( elem );
    14421645        },
     
    14471650                }
    14481651
    1449                 var thisCache, ret,
     1652                var privateCache, thisCache, ret,
    14501653                        internalKey = jQuery.expando,
    14511654                        getByName = typeof name === "string",
     
    14611664                        // Only defining an ID for JS objects if its cache already exists allows
    14621665                        // the code to shortcut on the same path as a DOM node with no cache
    1463                         id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;
     1666                        id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
     1667                        isEvents = name === "events";
    14641668
    14651669                // Avoid doing any more work than we need to when trying to get data on an
    14661670                // object that has no data at all
    1467                 if ( (!id || (pvt && id && (cache[ id ] && !cache[ id ][ internalKey ]))) && getByName && data === undefined ) {
     1671                if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
    14681672                        return;
    14691673                }
     
    14731677                        // ends up in the global cache
    14741678                        if ( isNode ) {
    1475                                 elem[ jQuery.expando ] = id = ++jQuery.uuid;
     1679                                elem[ internalKey ] = id = ++jQuery.uuid;
    14761680                        } else {
    1477                                 id = jQuery.expando;
     1681                                id = internalKey;
    14781682                        }
    14791683                }
     
    14821686                        cache[ id ] = {};
    14831687
    1484                         // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
    1485                         // metadata on plain JS objects when the object is serialized using
    1486                         // JSON.stringify
     1688                        // Avoids exposing jQuery metadata on plain JS objects when the object
     1689                        // is serialized using JSON.stringify
    14871690                        if ( !isNode ) {
    14881691                                cache[ id ].toJSON = jQuery.noop;
     
    14941697                if ( typeof name === "object" || typeof name === "function" ) {
    14951698                        if ( pvt ) {
    1496                                 cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
     1699                                cache[ id ] = jQuery.extend( cache[ id ], name );
    14971700                        } else {
    1498                                 cache[ id ] = jQuery.extend(cache[ id ], name);
    1499                         }
    1500                 }
    1501 
    1502                 thisCache = cache[ id ];
    1503 
    1504                 // Internal jQuery data is stored in a separate object inside the object's data
     1701                                cache[ id ].data = jQuery.extend( cache[ id ].data, name );
     1702                        }
     1703                }
     1704
     1705                privateCache = thisCache = cache[ id ];
     1706
     1707                // jQuery data() is stored in a separate object inside the object's internal data
    15051708                // cache in order to avoid key collisions between internal data and user-defined
    1506                 // data
    1507                 if ( pvt ) {
    1508                         if ( !thisCache[ internalKey ] ) {
    1509                                 thisCache[ internalKey ] = {};
    1510                         }
    1511 
    1512                         thisCache = thisCache[ internalKey ];
     1709                // data.
     1710                if ( !pvt ) {
     1711                        if ( !thisCache.data ) {
     1712                                thisCache.data = {};
     1713                        }
     1714
     1715                        thisCache = thisCache.data;
    15131716                }
    15141717
     
    15171720                }
    15181721
    1519                 // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
    1520                 // not attempt to inspect the internal events object using jQuery.data, as this
    1521                 // internal data object is undocumented and subject to change.
    1522                 if ( name === "events" && !thisCache[name] ) {
    1523                         return thisCache[ internalKey ] && thisCache[ internalKey ].events;
     1722                // Users should not attempt to inspect the internal events object using jQuery.data,
     1723                // it is undocumented and subject to change. But does anyone listen? No.
     1724                if ( isEvents && !thisCache[ name ] ) {
     1725                        return privateCache.events;
    15241726                }
    15251727
     
    15491751                }
    15501752
    1551                 var thisCache,
     1753                var thisCache, i, l,
    15521754
    15531755                        // Reference to internal data cache key
     
    15601762
    15611763                        // See jQuery.data for more information
    1562                         id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
     1764                        id = isNode ? elem[ internalKey ] : internalKey;
    15631765
    15641766                // If there is already no cache entry for this object, there is no
     
    15701772                if ( name ) {
    15711773
    1572                         thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
     1774                        thisCache = pvt ? cache[ id ] : cache[ id ].data;
    15731775
    15741776                        if ( thisCache ) {
    15751777
    1576                                 // Support interoperable removal of hyphenated or camelcased keys
    1577                                 if ( !thisCache[ name ] ) {
    1578                                         name = jQuery.camelCase( name );
    1579                                 }
    1580 
    1581                                 delete thisCache[ name ];
     1778                                // Support array or space separated string names for data keys
     1779                                if ( !jQuery.isArray( name ) ) {
     1780
     1781                                        // try the string as a key before any manipulation
     1782                                        if ( name in thisCache ) {
     1783                                                name = [ name ];
     1784                                        } else {
     1785
     1786                                                // split the camel cased version by spaces unless a key with the spaces exists
     1787                                                name = jQuery.camelCase( name );
     1788                                                if ( name in thisCache ) {
     1789                                                        name = [ name ];
     1790                                                } else {
     1791                                                        name = name.split( " " );
     1792                                                }
     1793                                        }
     1794                                }
     1795
     1796                                for ( i = 0, l = name.length; i < l; i++ ) {
     1797                                        delete thisCache[ name[i] ];
     1798                                }
    15821799
    15831800                                // If there is no data left in the cache, we want to continue
    15841801                                // and let the cache object itself get destroyed
    1585                                 if ( !isEmptyDataObject(thisCache) ) {
     1802                                if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
    15861803                                        return;
    15871804                                }
     
    15901807
    15911808                // See jQuery.data for more information
    1592                 if ( pvt ) {
    1593                         delete cache[ id ][ internalKey ];
     1809                if ( !pvt ) {
     1810                        delete cache[ id ].data;
    15941811
    15951812                        // Don't destroy the parent cache unless the internal data object
     
    15991816                        }
    16001817                }
    1601 
    1602                 var internalCache = cache[ id ][ internalKey ];
    16031818
    16041819                // Browsers that fail expando deletion also refuse to delete expandos on
     
    16121827                }
    16131828
    1614                 // We destroyed the entire user cache at once because it's faster than
    1615                 // iterating through each key, but we need to continue to persist internal
    1616                 // data if it existed
    1617                 if ( internalCache ) {
    1618                         cache[ id ] = {};
    1619                         // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
    1620                         // metadata on plain JS objects when the object is serialized using
    1621                         // JSON.stringify
    1622                         if ( !isNode ) {
    1623                                 cache[ id ].toJSON = jQuery.noop;
    1624                         }
    1625 
    1626                         cache[ id ][ internalKey ] = internalCache;
    1627 
    1628                 // Otherwise, we need to eliminate the expando on the node to avoid
     1829                // We destroyed the cache and need to eliminate the expando on the node to avoid
    16291830                // false lookups in the cache for entries that no longer exist
    1630                 } else if ( isNode ) {
     1831                if ( isNode ) {
    16311832                        // IE does not allow us to delete expando properties from nodes,
    16321833                        // nor does it have a removeAttribute function on Document nodes;
    16331834                        // we must handle all of these cases
    16341835                        if ( jQuery.support.deleteExpando ) {
    1635                                 delete elem[ jQuery.expando ];
     1836                                delete elem[ internalKey ];
    16361837                        } else if ( elem.removeAttribute ) {
    1637                                 elem.removeAttribute( jQuery.expando );
     1838                                elem.removeAttribute( internalKey );
    16381839                        } else {
    1639                                 elem[ jQuery.expando ] = null;
     1840                                elem[ internalKey ] = null;
    16401841                        }
    16411842                }
     
    16631864jQuery.fn.extend({
    16641865        data: function( key, value ) {
    1665                 var data = null;
     1866                var parts, attr, name,
     1867                        data = null;
    16661868
    16671869                if ( typeof key === "undefined" ) {
     
    16691871                                data = jQuery.data( this[0] );
    16701872
    1671                                 if ( this[0].nodeType === 1 ) {
    1672                             var attr = this[0].attributes, name;
     1873                                if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) {
     1874                                        attr = this[0].attributes;
    16731875                                        for ( var i = 0, l = attr.length; i < l; i++ ) {
    16741876                                                name = attr[i].name;
     
    16801882                                                }
    16811883                                        }
     1884                                        jQuery._data( this[0], "parsedAttrs", true );
    16821885                                }
    16831886                        }
     
    16911894                }
    16921895
    1693                 var parts = key.split(".");
     1896                parts = key.split(".");
    16941897                parts[1] = parts[1] ? "." + parts[1] : "";
    16951898
     
    17091912                } else {
    17101913                        return this.each(function() {
    1711                                 var $this = jQuery( this ),
     1914                                var self = jQuery( this ),
    17121915                                        args = [ parts[0], value ];
    17131916
    1714                                 $this.triggerHandler( "setData" + parts[1] + "!", args );
     1917                                self.triggerHandler( "setData" + parts[1] + "!", args );
    17151918                                jQuery.data( this, key, value );
    1716                                 $this.triggerHandler( "changeData" + parts[1] + "!", args );
     1919                                self.triggerHandler( "changeData" + parts[1] + "!", args );
    17171920                        });
    17181921                }
     
    17401943                                data === "false" ? false :
    17411944                                data === "null" ? null :
    1742                                 !jQuery.isNaN( data ) ? parseFloat( data ) :
     1945                                jQuery.isNumeric( data ) ? parseFloat( data ) :
    17431946                                        rbrace.test( data ) ? jQuery.parseJSON( data ) :
    17441947                                        data;
     
    17561959}
    17571960
    1758 // TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON
    1759 // property to be considered empty objects; this property always exists in
    1760 // order to make sure JSON.stringify does not expose internal metadata
     1961// checks a cache object for emptiness
    17611962function isEmptyDataObject( obj ) {
    17621963        for ( var name in obj ) {
     1964
     1965                // if the public data object is empty, the private is still empty
     1966                if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
     1967                        continue;
     1968                }
    17631969                if ( name !== "toJSON" ) {
    17641970                        return false;
     
    17761982                queueDataKey = type + "queue",
    17771983                markDataKey = type + "mark",
    1778                 defer = jQuery.data( elem, deferDataKey, undefined, true );
     1984                defer = jQuery._data( elem, deferDataKey );
    17791985        if ( defer &&
    1780                 ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) &&
    1781                 ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) {
     1986                ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
     1987                ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
    17821988                // Give room for hard-coded callbacks to fire first
    17831989                // and eventually mark/queue something else on the element
    17841990                setTimeout( function() {
    1785                         if ( !jQuery.data( elem, queueDataKey, undefined, true ) &&
    1786                                 !jQuery.data( elem, markDataKey, undefined, true ) ) {
     1991                        if ( !jQuery._data( elem, queueDataKey ) &&
     1992                                !jQuery._data( elem, markDataKey ) ) {
    17871993                                jQuery.removeData( elem, deferDataKey, true );
    1788                                 defer.resolve();
     1994                                defer.fire();
    17891995                        }
    17901996                }, 0 );
     
    17962002        _mark: function( elem, type ) {
    17972003                if ( elem ) {
    1798                         type = (type || "fx") + "mark";
    1799                         jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
     2004                        type = ( type || "fx" ) + "mark";
     2005                        jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
    18002006                }
    18012007        },
     
    18102016                        type = type || "fx";
    18112017                        var key = type + "mark",
    1812                                 count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
     2018                                count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
    18132019                        if ( count ) {
    1814                                 jQuery.data( elem, key, count, true );
     2020                                jQuery._data( elem, key, count );
    18152021                        } else {
    18162022                                jQuery.removeData( elem, key, true );
     
    18212027
    18222028        queue: function( elem, type, data ) {
     2029                var q;
    18232030                if ( elem ) {
    1824                         type = (type || "fx") + "queue";
    1825                         var q = jQuery.data( elem, type, undefined, true );
     2031                        type = ( type || "fx" ) + "queue";
     2032                        q = jQuery._data( elem, type );
     2033
    18262034                        // Speed up dequeue by getting out quickly if this is just a lookup
    18272035                        if ( data ) {
    18282036                                if ( !q || jQuery.isArray(data) ) {
    1829                                         q = jQuery.data( elem, type, jQuery.makeArray(data), true );
     2037                                        q = jQuery._data( elem, type, jQuery.makeArray(data) );
    18302038                                } else {
    18312039                                        q.push( data );
     
    18412049                var queue = jQuery.queue( elem, type ),
    18422050                        fn = queue.shift(),
    1843                         defer;
     2051                        hooks = {};
    18442052
    18452053                // If the fx queue is dequeued, always remove the progress sentinel
     
    18522060                        // automatically dequeued
    18532061                        if ( type === "fx" ) {
    1854                                 queue.unshift("inprogress");
    1855                         }
    1856 
    1857                         fn.call(elem, function() {
    1858                                 jQuery.dequeue(elem, type);
    1859                         });
     2062                                queue.unshift( "inprogress" );
     2063                        }
     2064
     2065                        jQuery._data( elem, type + ".run", hooks );
     2066                        fn.call( elem, function() {
     2067                                jQuery.dequeue( elem, type );
     2068                        }, hooks );
    18602069                }
    18612070
    18622071                if ( !queue.length ) {
    1863                         jQuery.removeData( elem, type + "queue", true );
     2072                        jQuery.removeData( elem, type + "queue " + type + ".run", true );
    18642073                        handleQueueMarkDefer( elem, type, "queue" );
    18652074                }
     
    18932102        // http://blindsignals.com/index.php/2009/07/jquery-delay/
    18942103        delay: function( time, type ) {
    1895                 time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
     2104                time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
    18962105                type = type || "fx";
    18972106
    1898                 return this.queue( type, function() {
    1899                         var elem = this;
    1900                         setTimeout(function() {
    1901                                 jQuery.dequeue( elem, type );
    1902                         }, time );
     2107                return this.queue( type, function( next, hooks ) {
     2108                        var timeout = setTimeout( next, time );
     2109                        hooks.stop = function() {
     2110                                clearTimeout( timeout );
     2111                        };
    19032112                });
    19042113        },
     
    19312140                                        ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
    19322141                                                jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
    1933                                         jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
     2142                                        jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
    19342143                                count++;
    1935                                 tmp.done( resolve );
     2144                                tmp.add( resolve );
    19362145                        }
    19372146                }
     
    19512160        rclickable = /^a(?:rea)?$/i,
    19522161        rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
    1953         nodeHook, boolHook;
     2162        getSetAttribute = jQuery.support.getSetAttribute,
     2163        nodeHook, boolHook, fixSpecified;
    19542164
    19552165jQuery.fn.extend({
     
    19632173                });
    19642174        },
    1965        
     2175
    19662176        prop: function( name, value ) {
    19672177                return jQuery.access( this, name, value, true, jQuery.prop );
    19682178        },
    1969        
     2179
    19702180        removeProp: function( name ) {
    19712181                name = jQuery.propFix[ name ] || name;
     
    20262236
    20272237                if ( (value && typeof value === "string") || value === undefined ) {
    2028                         classNames = (value || "").split( rspace );
     2238                        classNames = ( value || "" ).split( rspace );
    20292239
    20302240                        for ( i = 0, l = this.length; i < l; i++ ) {
     
    20872297
    20882298        hasClass: function( selector ) {
    2089                 var className = " " + selector + " ";
    2090                 for ( var i = 0, l = this.length; i < l; i++ ) {
     2299                var className = " " + selector + " ",
     2300                        i = 0,
     2301                        l = this.length;
     2302                for ( ; i < l; i++ ) {
    20912303                        if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
    20922304                                return true;
     
    20982310
    20992311        val: function( value ) {
    2100                 var hooks, ret,
     2312                var hooks, ret, isFunction,
    21012313                        elem = this[0];
    2102                
     2314
    21032315                if ( !arguments.length ) {
    21042316                        if ( elem ) {
     
    21112323                                ret = elem.value;
    21122324
    2113                                 return typeof ret === "string" ? 
     2325                                return typeof ret === "string" ?
    21142326                                        // handle most common string cases
    2115                                         ret.replace(rreturn, "") : 
     2327                                        ret.replace(rreturn, "") :
    21162328                                        // handle cases where value is null/undef or number
    21172329                                        ret == null ? "" : ret;
    21182330                        }
    21192331
    2120                         return undefined;
    2121                 }
    2122 
    2123                 var isFunction = jQuery.isFunction( value );
     2332                        return;
     2333                }
     2334
     2335                isFunction = jQuery.isFunction( value );
    21242336
    21252337                return this.each(function( i ) {
     
    21692381                select: {
    21702382                        get: function( elem ) {
    2171                                 var value,
     2383                                var value, i, max, option,
    21722384                                        index = elem.selectedIndex,
    21732385                                        values = [],
     
    21812393
    21822394                                // Loop through all the selected options
    2183                                 for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
    2184                                         var option = options[ i ];
     2395                                i = one ? index : 0;
     2396                                max = one ? index + 1 : options.length;
     2397                                for ( ; i < max; i++ ) {
     2398                                        option = options[ i ];
    21852399
    21862400                                        // Don't return options that are disabled or in a disabled optgroup
     
    22342448                offset: true
    22352449        },
    2236        
    2237         attrFix: {
    2238                 // Always normalize to ensure hook usage
    2239                 tabindex: "tabIndex"
    2240         },
    2241        
     2450
    22422451        attr: function( elem, name, value, pass ) {
    2243                 var nType = elem.nodeType;
    2244                
     2452                var ret, hooks, notxml,
     2453                        nType = elem.nodeType;
     2454
    22452455                // don't get/set attributes on text, comment and attribute nodes
    22462456                if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
    2247                         return undefined;
     2457                        return;
    22482458                }
    22492459
     
    22532463
    22542464                // Fallback to prop when attributes are not supported
    2255                 if ( !("getAttribute" in elem) ) {
     2465                if ( typeof elem.getAttribute === "undefined" ) {
    22562466                        return jQuery.prop( elem, name, value );
    22572467                }
    22582468
    2259                 var ret, hooks,
    2260                         notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
    2261 
    2262                 // Normalize the name if needed
     2469                notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
     2470
     2471                // All attributes are lowercase
     2472                // Grab necessary hook if one is defined
    22632473                if ( notxml ) {
    2264                         name = jQuery.attrFix[ name ] || name;
    2265 
    2266                         hooks = jQuery.attrHooks[ name ];
    2267 
    2268                         if ( !hooks ) {
    2269                                 // Use boolHook for boolean attributes
    2270                                 if ( rboolean.test( name ) ) {
    2271                                         hooks = boolHook;
    2272 
    2273                                 // Use nodeHook if available( IE6/7 )
    2274                                 } else if ( nodeHook ) {
    2275                                         hooks = nodeHook;
    2276                                 }
    2277                         }
     2474                        name = name.toLowerCase();
     2475                        hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
    22782476                }
    22792477
     
    22822480                        if ( value === null ) {
    22832481                                jQuery.removeAttr( elem, name );
    2284                                 return undefined;
     2482                                return;
    22852483
    22862484                        } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
     
    23062504        },
    23072505
    2308         removeAttr: function( elem, name ) {
    2309                 var propName;
    2310                 if ( elem.nodeType === 1 ) {
    2311                         name = jQuery.attrFix[ name ] || name;
    2312 
    2313                         jQuery.attr( elem, name, "" );
    2314                         elem.removeAttribute( name );
    2315 
    2316                         // Set corresponding property to false for boolean attributes
    2317                         if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) {
    2318                                 elem[ propName ] = false;
     2506        removeAttr: function( elem, value ) {
     2507                var propName, attrNames, name, l,
     2508                        i = 0;
     2509
     2510                if ( value && elem.nodeType === 1 ) {
     2511                        attrNames = value.toLowerCase().split( rspace );
     2512                        l = attrNames.length;
     2513
     2514                        for ( ; i < l; i++ ) {
     2515                                name = attrNames[ i ];
     2516
     2517                                if ( name ) {
     2518                                        propName = jQuery.propFix[ name ] || name;
     2519
     2520                                        // See #9699 for explanation of this approach (setting first, then removal)
     2521                                        jQuery.attr( elem, name, "" );
     2522                                        elem.removeAttribute( getSetAttribute ? name : propName );
     2523
     2524                                        // Set corresponding property to false for boolean attributes
     2525                                        if ( rboolean.test( name ) && propName in elem ) {
     2526                                                elem[ propName ] = false;
     2527                                        }
     2528                                }
    23192529                        }
    23202530                }
     
    23752585                contenteditable: "contentEditable"
    23762586        },
    2377        
     2587
    23782588        prop: function( elem, name, value ) {
    2379                 var nType = elem.nodeType;
     2589                var ret, hooks, notxml,
     2590                        nType = elem.nodeType;
    23802591
    23812592                // don't get/set properties on text, comment and attribute nodes
    23822593                if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
    2383                         return undefined;
    2384                 }
    2385 
    2386                 var ret, hooks,
    2387                         notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
     2594                        return;
     2595                }
     2596
     2597                notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
    23882598
    23892599                if ( notxml ) {
     
    23982608
    23992609                        } else {
    2400                                 return (elem[ name ] = value);
     2610                                return ( elem[ name ] = value );
    24012611                        }
    24022612
     
    24102620                }
    24112621        },
    2412        
     2622
    24132623        propHooks: {
    24142624                tabIndex: {
     
    24282638});
    24292639
    2430 // Add the tabindex propHook to attrHooks for back-compat
    2431 jQuery.attrHooks.tabIndex = jQuery.propHooks.tabIndex;
     2640// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
     2641jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
    24322642
    24332643// Hook for boolean attributes
     
    24362646                // Align boolean attributes with corresponding properties
    24372647                // Fall back to attribute presence where some booleans are not supported
    2438                 var attrNode;
    2439                 return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ?
     2648                var attrNode,
     2649                        property = jQuery.prop( elem, name );
     2650                return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
    24402651                        name.toLowerCase() :
    24412652                        undefined;
     
    24622673
    24632674// IE6/7 do not support getting/setting some attributes with get/setAttribute
    2464 if ( !jQuery.support.getSetAttribute ) {
    2465        
     2675if ( !getSetAttribute ) {
     2676
     2677        fixSpecified = {
     2678                name: true,
     2679                id: true
     2680        };
     2681
    24662682        // Use this for any attribute in IE6/7
    24672683        // This fixes almost every IE6/7 issue
     
    24702686                        var ret;
    24712687                        ret = elem.getAttributeNode( name );
    2472                         // Return undefined if nodeValue is empty string
    2473                         return ret && ret.nodeValue !== "" ?
     2688                        return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
    24742689                                ret.nodeValue :
    24752690                                undefined;
     
    24822697                                elem.setAttributeNode( ret );
    24832698                        }
    2484                         return (ret.nodeValue = value + "");
     2699                        return ( ret.nodeValue = value + "" );
    24852700                }
    24862701        };
     2702
     2703        // Apply the nodeHook to tabindex
     2704        jQuery.attrHooks.tabindex.set = nodeHook.set;
    24872705
    24882706        // Set width and height to auto instead of 0 on empty string( Bug #8150 )
     
    24982716                });
    24992717        });
     2718
     2719        // Set contenteditable to false on removals(#10429)
     2720        // Setting to empty string throws an error as an invalid value
     2721        jQuery.attrHooks.contenteditable = {
     2722                get: nodeHook.get,
     2723                set: function( elem, value, name ) {
     2724                        if ( value === "" ) {
     2725                                value = "false";
     2726                        }
     2727                        nodeHook.set( elem, value, name );
     2728                }
     2729        };
    25002730}
    25012731
     
    25212751                },
    25222752                set: function( elem, value ) {
    2523                         return (elem.style.cssText = "" + value);
     2753                        return ( elem.style.cssText = "" + value );
    25242754                }
    25252755        };
     
    25442774                }
    25452775        });
     2776}
     2777
     2778// IE6/7 call enctype encoding
     2779if ( !jQuery.support.enctype ) {
     2780        jQuery.propFix.enctype = "encoding";
    25462781}
    25472782
     
    25612796                set: function( elem, value ) {
    25622797                        if ( jQuery.isArray( value ) ) {
    2563                                 return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0);
     2798                                return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
    25642799                        }
    25652800                }
     
    25702805
    25712806
    2572 var rnamespaces = /\.(.*)$/,
    2573         rformElems = /^(?:textarea|input|select)$/i,
    2574         rperiod = /\./g,
    2575         rspaces = / /g,
    2576         rescape = /[^\w\s.|`]/g,
    2577         fcleanup = function( nm ) {
    2578                 return nm.replace(rescape, "\\$&");
     2807var rformElems = /^(?:textarea|input|select)$/i,
     2808        rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
     2809        rhoverHack = /\bhover(\.\S+)?\b/,
     2810        rkeyEvent = /^key/,
     2811        rmouseEvent = /^(?:mouse|contextmenu)|click/,
     2812        rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
     2813        rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
     2814        quickParse = function( selector ) {
     2815                var quick = rquickIs.exec( selector );
     2816                if ( quick ) {
     2817                        //   0  1    2   3
     2818                        // [ _, tag, id, class ]
     2819                        quick[1] = ( quick[1] || "" ).toLowerCase();
     2820                        quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
     2821                }
     2822                return quick;
     2823        },
     2824        quickIs = function( elem, m ) {
     2825                var attrs = elem.attributes || {};
     2826                return (
     2827                        (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
     2828                        (!m[2] || (attrs.id || {}).value === m[2]) &&
     2829                        (!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
     2830                );
     2831        },
     2832        hoverHack = function( events ) {
     2833                return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
    25792834        };
    25802835
    25812836/*
    2582  * A number of helper functions used for managing events.
    2583  * Many of the ideas behind this code originated from
    2584  * Dean Edwards' addEvent library.
     2837 * Helper functions for managing events -- not part of the public interface.
     2838 * Props to Dean Edwards' addEvent library for many of the ideas.
    25852839 */
    25862840jQuery.event = {
    25872841
    2588         // Bind an event to an element
    2589         // Original by Dean Edwards
    2590         add: function( elem, types, handler, data ) {
    2591                 if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
     2842        add: function( elem, types, handler, data, selector ) {
     2843
     2844                var elemData, eventHandle, events,
     2845                        t, tns, type, namespaces, handleObj,
     2846                        handleObjIn, quick, handlers, special;
     2847
     2848                // Don't attach events to noData or text/comment nodes (allow plain objects tho)
     2849                if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
    25922850                        return;
    25932851                }
    25942852
    2595                 if ( handler === false ) {
    2596                         handler = returnFalse;
    2597                 } else if ( !handler ) {
    2598                         // Fixes bug #7229. Fix recommended by jdalton
    2599                         return;
    2600                 }
    2601 
    2602                 var handleObjIn, handleObj;
    2603 
     2853                // Caller can pass in an object of custom data in lieu of the handler
    26042854                if ( handler.handler ) {
    26052855                        handleObjIn = handler;
     
    26072857                }
    26082858
    2609                 // Make sure that the function being executed has a unique ID
     2859                // Make sure that the handler has a unique ID, used to find/remove it later
    26102860                if ( !handler.guid ) {
    26112861                        handler.guid = jQuery.guid++;
    26122862                }
    26132863
    2614                 // Init the element's event structure
    2615                 var elemData = jQuery._data( elem );
    2616 
    2617                 // If no elemData is found then we must be trying to bind to one of the
    2618                 // banned noData elements
    2619                 if ( !elemData ) {
    2620                         return;
    2621                 }
    2622 
    2623                 var events = elemData.events,
    2624                         eventHandle = elemData.handle;
    2625 
     2864                // Init the element's event structure and main handler, if this is the first
     2865                events = elemData.events;
    26262866                if ( !events ) {
    26272867                        elemData.events = events = {};
    26282868                }
    2629 
     2869                eventHandle = elemData.handle;
    26302870                if ( !eventHandle ) {
    26312871                        elemData.handle = eventHandle = function( e ) {
     
    26332873                                // when an event is called after a page has unloaded
    26342874                                return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
    2635                                         jQuery.event.handle.apply( eventHandle.elem, arguments ) :
     2875                                        jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
    26362876                                        undefined;
    26372877                        };
    2638                 }
    2639 
    2640                 // Add elem as a property of the handle function
    2641                 // This is to prevent a memory leak with non-native events in IE.
    2642                 eventHandle.elem = elem;
     2878                        // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
     2879                        eventHandle.elem = elem;
     2880                }
    26432881
    26442882                // Handle multiple events separated by a space
    26452883                // jQuery(...).bind("mouseover mouseout", fn);
    2646                 types = types.split(" ");
    2647 
    2648                 var type, i = 0, namespaces;
    2649 
    2650                 while ( (type = types[ i++ ]) ) {
    2651                         handleObj = handleObjIn ?
    2652                                 jQuery.extend({}, handleObjIn) :
    2653                                 { handler: handler, data: data };
    2654 
    2655                         // Namespaced event handlers
    2656                         if ( type.indexOf(".") > -1 ) {
    2657                                 namespaces = type.split(".");
    2658                                 type = namespaces.shift();
    2659                                 handleObj.namespace = namespaces.slice(0).sort().join(".");
    2660 
    2661                         } else {
    2662                                 namespaces = [];
    2663                                 handleObj.namespace = "";
    2664                         }
    2665 
    2666                         handleObj.type = type;
    2667                         if ( !handleObj.guid ) {
    2668                                 handleObj.guid = handler.guid;
    2669                         }
    2670 
    2671                         // Get the current list of functions bound to this event
    2672                         var handlers = events[ type ],
    2673                                 special = jQuery.event.special[ type ] || {};
    2674 
    2675                         // Init the event handler queue
     2884                types = jQuery.trim( hoverHack(types) ).split( " " );
     2885                for ( t = 0; t < types.length; t++ ) {
     2886
     2887                        tns = rtypenamespace.exec( types[t] ) || [];
     2888                        type = tns[1];
     2889                        namespaces = ( tns[2] || "" ).split( "." ).sort();
     2890
     2891                        // If event changes its type, use the special event handlers for the changed type
     2892                        special = jQuery.event.special[ type ] || {};
     2893
     2894                        // If selector defined, determine special event api type, otherwise given type
     2895                        type = ( selector ? special.delegateType : special.bindType ) || type;
     2896
     2897                        // Update special based on newly reset type
     2898                        special = jQuery.event.special[ type ] || {};
     2899
     2900                        // handleObj is passed to all event handlers
     2901                        handleObj = jQuery.extend({
     2902                                type: type,
     2903                                origType: tns[1],
     2904                                data: data,
     2905                                handler: handler,
     2906                                guid: handler.guid,
     2907                                selector: selector,
     2908                                quick: quickParse( selector ),
     2909                                namespace: namespaces.join(".")
     2910                        }, handleObjIn );
     2911
     2912                        // Init the event handler queue if we're the first
     2913                        handlers = events[ type ];
    26762914                        if ( !handlers ) {
    26772915                                handlers = events[ type ] = [];
    2678 
    2679                                 // Check for a special event handler
    2680                                 // Only use addEventListener/attachEvent if the special
    2681                                 // events handler returns false
     2916                                handlers.delegateCount = 0;
     2917
     2918                                // Only use addEventListener/attachEvent if the special events handler returns false
    26822919                                if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
    26832920                                        // Bind the global event handler to the element
     
    26992936                        }
    27002937
    2701                         // Add the function to the element's handler list
    2702                         handlers.push( handleObj );
    2703 
    2704                         // Keep track of which events have been used, for event optimization
     2938                        // Add to the element's handler list, delegates in front
     2939                        if ( selector ) {
     2940                                handlers.splice( handlers.delegateCount++, 0, handleObj );
     2941                        } else {
     2942                                handlers.push( handleObj );
     2943                        }
     2944
     2945                        // Keep track of which events have ever been used, for event optimization
    27052946                        jQuery.event.global[ type ] = true;
    27062947                }
     
    27132954
    27142955        // Detach an event or set of events from an element
    2715         remove: function( elem, types, handler, pos ) {
    2716                 // don't do events on text and comment nodes
    2717                 if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
     2956        remove: function( elem, types, handler, selector, mappedTypes ) {
     2957
     2958                var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
     2959                        t, tns, type, origType, namespaces, origCount,
     2960                        j, events, special, handle, eventType, handleObj;
     2961
     2962                if ( !elemData || !(events = elemData.events) ) {
    27182963                        return;
    27192964                }
    27202965
    2721                 if ( handler === false ) {
    2722                         handler = returnFalse;
    2723                 }
    2724 
    2725                 var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
    2726                         elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
    2727                         events = elemData && elemData.events;
    2728 
    2729                 if ( !elemData || !events ) {
    2730                         return;
    2731                 }
    2732 
    2733                 // types is actually an event object here
    2734                 if ( types && types.type ) {
    2735                         handler = types.handler;
    2736                         types = types.type;
    2737                 }
    2738 
    2739                 // Unbind all events for the element
    2740                 if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
    2741                         types = types || "";
    2742 
    2743                         for ( type in events ) {
    2744                                 jQuery.event.remove( elem, type + types );
    2745                         }
    2746 
    2747                         return;
    2748                 }
    2749 
    2750                 // Handle multiple events separated by a space
    2751                 // jQuery(...).unbind("mouseover mouseout", fn);
    2752                 types = types.split(" ");
    2753 
    2754                 while ( (type = types[ i++ ]) ) {
    2755                         origType = type;
    2756                         handleObj = null;
    2757                         all = type.indexOf(".") < 0;
    2758                         namespaces = [];
    2759 
    2760                         if ( !all ) {
    2761                                 // Namespaced event handlers
    2762                                 namespaces = type.split(".");
    2763                                 type = namespaces.shift();
    2764 
    2765                                 namespace = new RegExp("(^|\\.)" +
    2766                                         jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
    2767                         }
    2768 
    2769                         eventType = events[ type ];
    2770 
    2771                         if ( !eventType ) {
     2966                // Once for each type.namespace in types; type may be omitted
     2967                types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
     2968                for ( t = 0; t < types.length; t++ ) {
     2969                        tns = rtypenamespace.exec( types[t] ) || [];
     2970                        type = origType = tns[1];
     2971                        namespaces = tns[2];
     2972
     2973                        // Unbind all events (on this namespace, if provided) for the element
     2974                        if ( !type ) {
     2975                                for ( type in events ) {
     2976                                        jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
     2977                                }
    27722978                                continue;
    27732979                        }
    27742980
    2775                         if ( !handler ) {
    2776                                 for ( j = 0; j < eventType.length; j++ ) {
    2777                                         handleObj = eventType[ j ];
    2778 
    2779                                         if ( all || namespace.test( handleObj.namespace ) ) {
    2780                                                 jQuery.event.remove( elem, origType, handleObj.handler, j );
    2781                                                 eventType.splice( j--, 1 );
    2782                                         }
    2783                                 }
    2784 
    2785                                 continue;
    2786                         }
    2787 
    27882981                        special = jQuery.event.special[ type ] || {};
    2789 
    2790                         for ( j = pos || 0; j < eventType.length; j++ ) {
     2982                        type = ( selector? special.delegateType : special.bindType ) || type;
     2983                        eventType = events[ type ] || [];
     2984                        origCount = eventType.length;
     2985                        namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
     2986
     2987                        // Remove matching events
     2988                        for ( j = 0; j < eventType.length; j++ ) {
    27912989                                handleObj = eventType[ j ];
    27922990
    2793                                 if ( handler.guid === handleObj.guid ) {
    2794                                         // remove the given handler for the given type
    2795                                         if ( all || namespace.test( handleObj.namespace ) ) {
    2796                                                 if ( pos == null ) {
    2797                                                         eventType.splice( j--, 1 );
    2798                                                 }
    2799 
    2800                                                 if ( special.remove ) {
    2801                                                         special.remove.call( elem, handleObj );
    2802                                                 }
    2803                                         }
    2804 
    2805                                         if ( pos != null ) {
    2806                                                 break;
    2807                                         }
    2808                                 }
    2809                         }
    2810 
    2811                         // remove generic event handler if no more handlers exist
    2812                         if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
     2991                                if ( ( mappedTypes || origType === handleObj.origType ) &&
     2992                                         ( !handler || handler.guid === handleObj.guid ) &&
     2993                                         ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
     2994                                         ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
     2995                                        eventType.splice( j--, 1 );
     2996
     2997                                        if ( handleObj.selector ) {
     2998                                                eventType.delegateCount--;
     2999                                        }
     3000                                        if ( special.remove ) {
     3001                                                special.remove.call( elem, handleObj );
     3002                                        }
     3003                                }
     3004                        }
     3005
     3006                        // Remove generic event handler if we removed something and no more handlers exist
     3007                        // (avoids potential for endless recursion during removal of special event handlers)
     3008                        if ( eventType.length === 0 && origCount !== eventType.length ) {
    28133009                                if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
    28143010                                        jQuery.removeEvent( elem, type, elemData.handle );
    28153011                                }
    28163012
    2817                                 ret = null;
    28183013                                delete events[ type ];
    28193014                        }
     
    28223017                // Remove the expando if it's no longer used
    28233018                if ( jQuery.isEmptyObject( events ) ) {
    2824                         var handle = elemData.handle;
     3019                        handle = elemData.handle;
    28253020                        if ( handle ) {
    28263021                                handle.elem = null;
    28273022                        }
    28283023
    2829                         delete elemData.events;
    2830                         delete elemData.handle;
    2831 
    2832                         if ( jQuery.isEmptyObject( elemData ) ) {
    2833                                 jQuery.removeData( elem, undefined, true );
    2834                         }
    2835                 }
    2836         },
    2837        
     3024                        // removeData also checks for emptiness and clears the expando if empty
     3025                        // so use it instead of delete
     3026                        jQuery.removeData( elem, [ "events", "handle" ], true );
     3027                }
     3028        },
     3029
    28383030        // Events that are safe to short-circuit if no handlers are attached.
    28393031        // Native DOM events should not be added, they may have inline handlers.
     
    28453037
    28463038        trigger: function( event, data, elem, onlyHandlers ) {
     3039                // Don't do events on text and comment nodes
     3040                if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
     3041                        return;
     3042                }
     3043
    28473044                // Event object or event type
    28483045                var type = event.type || event,
    28493046                        namespaces = [],
    2850                         exclusive;
    2851 
    2852                 if ( type.indexOf("!") >= 0 ) {
     3047                        cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
     3048
     3049                // focus/blur morphs to focusin/out; ensure we're not firing them right now
     3050                if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
     3051                        return;
     3052                }
     3053
     3054                if ( type.indexOf( "!" ) >= 0 ) {
    28533055                        // Exclusive events trigger only for the exact event (no namespaces)
    28543056                        type = type.slice(0, -1);
     
    28563058                }
    28573059
    2858                 if ( type.indexOf(".") >= 0 ) {
     3060                if ( type.indexOf( "." ) >= 0 ) {
    28593061                        // Namespaced trigger; create a regexp to match event type in handle()
    28603062                        namespaces = type.split(".");
     
    28783080
    28793081                event.type = type;
     3082                event.isTrigger = true;
    28803083                event.exclusive = exclusive;
    2881                 event.namespace = namespaces.join(".");
    2882                 event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
    2883                
    2884                 // triggerHandler() and global events don't bubble or run the default action
    2885                 if ( onlyHandlers || !elem ) {
    2886                         event.preventDefault();
    2887                         event.stopPropagation();
    2888                 }
     3084                event.namespace = namespaces.join( "." );
     3085                event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
     3086                ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
    28893087
    28903088                // Handle a global trigger
    28913089                if ( !elem ) {
     3090
    28923091                        // TODO: Stop taunting the data cache; remove global events and always attach to document
    2893                         jQuery.each( jQuery.cache, function() {
    2894                                 // internalKey variable is just used to make it easier to find
    2895                                 // and potentially change this stuff later; currently it just
    2896                                 // points to jQuery.expando
    2897                                 var internalKey = jQuery.expando,
    2898                                         internalCache = this[ internalKey ];
    2899                                 if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
    2900                                         jQuery.event.trigger( event, data, internalCache.handle.elem );
    2901                                 }
    2902                         });
    2903                         return;
    2904                 }
    2905 
    2906                 // Don't do events on text and comment nodes
    2907                 if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
     3092                        cache = jQuery.cache;
     3093                        for ( i in cache ) {
     3094                                if ( cache[ i ].events && cache[ i ].events[ type ] ) {
     3095                                        jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
     3096                                }
     3097                        }
    29083098                        return;
    29093099                }
     
    29113101                // Clean up the event in case it is being reused
    29123102                event.result = undefined;
    2913                 event.target = elem;
     3103                if ( !event.target ) {
     3104                        event.target = elem;
     3105                }
    29143106
    29153107                // Clone any incoming data and prepend the event, creating the handler arg list
     
    29173109                data.unshift( event );
    29183110
    2919                 var cur = elem,
    2920                         // IE doesn't like method names with a colon (#3533, #8272)
    2921                         ontype = type.indexOf(":") < 0 ? "on" + type : "";
    2922 
    2923                 // Fire event on the current element, then bubble up the DOM tree
    2924                 do {
    2925                         var handle = jQuery._data( cur, "handle" );
    2926 
    2927                         event.currentTarget = cur;
     3111                // Allow special events to draw outside the lines
     3112                special = jQuery.event.special[ type ] || {};
     3113                if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
     3114                        return;
     3115                }
     3116
     3117                // Determine event propagation path in advance, per W3C events spec (#9951)
     3118                // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
     3119                eventPath = [[ elem, special.bindType || type ]];
     3120                if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
     3121
     3122                        bubbleType = special.delegateType || type;
     3123                        cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
     3124                        old = null;
     3125                        for ( ; cur; cur = cur.parentNode ) {
     3126                                eventPath.push([ cur, bubbleType ]);
     3127                                old = cur;
     3128                        }
     3129
     3130                        // Only add window if we got to document (e.g., not plain obj or detached DOM)
     3131                        if ( old && old === elem.ownerDocument ) {
     3132                                eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
     3133                        }
     3134                }
     3135
     3136                // Fire handlers on the event path
     3137                for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
     3138
     3139                        cur = eventPath[i][0];
     3140                        event.type = eventPath[i][1];
     3141
     3142                        handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
    29283143                        if ( handle ) {
    29293144                                handle.apply( cur, data );
    29303145                        }
    2931 
    2932                         // Trigger an inline bound script
    2933                         if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) {
    2934                                 event.result = false;
     3146                        // Note that this is a bare JS function and not a jQuery handler
     3147                        handle = ontype && cur[ ontype ];
     3148                        if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
    29353149                                event.preventDefault();
    29363150                        }
    2937 
    2938                         // Bubble up to document, then to window
    2939                         cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window;
    2940                 } while ( cur && !event.isPropagationStopped() );
     3151                }
     3152                event.type = type;
    29413153
    29423154                // If nobody prevented the default action, do it now
    2943                 if ( !event.isDefaultPrevented() ) {
    2944                         var old,
    2945                                 special = jQuery.event.special[ type ] || {};
    2946 
    2947                         if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) &&
     3155                if ( !onlyHandlers && !event.isDefaultPrevented() ) {
     3156
     3157                        if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
    29483158                                !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
    29493159
    29503160                                // Call a native DOM method on the target with the same name name as the event.
    2951                                 // Can't use an .isFunction)() check here because IE6/7 fails that test.
    2952                                 // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch.
    2953                                 try {
    2954                                         if ( ontype && elem[ type ] ) {
    2955                                                 // Don't re-trigger an onFOO event when we call its FOO() method
    2956                                                 old = elem[ ontype ];
    2957 
    2958                                                 if ( old ) {
    2959                                                         elem[ ontype ] = null;
     3161                                // Can't use an .isFunction() check here because IE6/7 fails that test.
     3162                                // Don't do default actions on window, that's where global variables be (#6170)
     3163                                // IE<9 dies on focus/blur to hidden element (#1486)
     3164                                if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
     3165
     3166                                        // Don't re-trigger an onFOO event when we call its FOO() method
     3167                                        old = elem[ ontype ];
     3168
     3169                                        if ( old ) {
     3170                                                elem[ ontype ] = null;
     3171                                        }
     3172
     3173                                        // Prevent re-triggering of the same event, since we already bubbled it above
     3174                                        jQuery.event.triggered = type;
     3175                                        elem[ type ]();
     3176                                        jQuery.event.triggered = undefined;
     3177
     3178                                        if ( old ) {
     3179                                                elem[ ontype ] = old;
     3180                                        }
     3181                                }
     3182                        }
     3183                }
     3184
     3185                return event.result;
     3186        },
     3187
     3188        dispatch: function( event ) {
     3189
     3190                // Make a writable jQuery.Event from the native event object
     3191                event = jQuery.event.fix( event || window.event );
     3192
     3193                var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
     3194                        delegateCount = handlers.delegateCount,
     3195                        args = [].slice.call( arguments, 0 ),
     3196                        run_all = !event.exclusive && !event.namespace,
     3197                        handlerQueue = [],
     3198                        i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
     3199
     3200                // Use the fix-ed jQuery.Event rather than the (read-only) native event
     3201                args[0] = event;
     3202                event.delegateTarget = this;
     3203
     3204                // Determine handlers that should run if there are delegated events
     3205                // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861)
     3206                if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) {
     3207
     3208                        // Pregenerate a single jQuery object for reuse with .is()
     3209                        jqcur = jQuery(this);
     3210                        jqcur.context = this.ownerDocument || this;
     3211
     3212                        for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
     3213                                selMatch = {};
     3214                                matches = [];
     3215                                jqcur[0] = cur;
     3216                                for ( i = 0; i < delegateCount; i++ ) {
     3217                                        handleObj = handlers[ i ];
     3218                                        sel = handleObj.selector;
     3219
     3220                                        if ( selMatch[ sel ] === undefined ) {
     3221                                                selMatch[ sel ] = (
     3222                                                        handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
     3223                                                );
     3224                                        }
     3225                                        if ( selMatch[ sel ] ) {
     3226                                                matches.push( handleObj );
     3227                                        }
     3228                                }
     3229                                if ( matches.length ) {
     3230                                        handlerQueue.push({ elem: cur, matches: matches });
     3231                                }
     3232                        }
     3233                }
     3234
     3235                // Add the remaining (directly-bound) handlers
     3236                if ( handlers.length > delegateCount ) {
     3237                        handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
     3238                }
     3239
     3240                // Run delegates first; they may want to stop propagation beneath us
     3241                for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
     3242                        matched = handlerQueue[ i ];
     3243                        event.currentTarget = matched.elem;
     3244
     3245                        for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
     3246                                handleObj = matched.matches[ j ];
     3247
     3248                                // Triggered event must either 1) be non-exclusive and have no namespace, or
     3249                                // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
     3250                                if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
     3251
     3252                                        event.data = handleObj.data;
     3253                                        event.handleObj = handleObj;
     3254
     3255                                        ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
     3256                                                        .apply( matched.elem, args );
     3257
     3258                                        if ( ret !== undefined ) {
     3259                                                event.result = ret;
     3260                                                if ( ret === false ) {
     3261                                                        event.preventDefault();
     3262                                                        event.stopPropagation();
    29603263                                                }
    2961 
    2962                                                 jQuery.event.triggered = type;
    2963                                                 elem[ type ]();
    2964                                         }
    2965                                 } catch ( ieError ) {}
    2966 
    2967                                 if ( old ) {
    2968                                         elem[ ontype ] = old;
    2969                                 }
    2970 
    2971                                 jQuery.event.triggered = undefined;
    2972                         }
    2973                 }
    2974                
     3264                                        }
     3265                                }
     3266                        }
     3267                }
     3268
    29753269                return event.result;
    29763270        },
    29773271
    2978         handle: function( event ) {
    2979                 event = jQuery.event.fix( event || window.event );
    2980                 // Snapshot the handlers list since a called handler may add/remove events.
    2981                 var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
    2982                         run_all = !event.exclusive && !event.namespace,
    2983                         args = Array.prototype.slice.call( arguments, 0 );
    2984 
    2985                 // Use the fix-ed Event rather than the (read-only) native event
    2986                 args[0] = event;
    2987                 event.currentTarget = this;
    2988 
    2989                 for ( var j = 0, l = handlers.length; j < l; j++ ) {
    2990                         var handleObj = handlers[ j ];
    2991 
    2992                         // Triggered event must 1) be non-exclusive and have no namespace, or
    2993                         // 2) have namespace(s) a subset or equal to those in the bound event.
    2994                         if ( run_all || event.namespace_re.test( handleObj.namespace ) ) {
    2995                                 // Pass in a reference to the handler function itself
    2996                                 // So that we can later remove it
    2997                                 event.handler = handleObj.handler;
    2998                                 event.data = handleObj.data;
    2999                                 event.handleObj = handleObj;
    3000 
    3001                                 var ret = handleObj.handler.apply( this, args );
    3002 
    3003                                 if ( ret !== undefined ) {
    3004                                         event.result = ret;
    3005                                         if ( ret === false ) {
    3006                                                 event.preventDefault();
    3007                                                 event.stopPropagation();
    3008                                         }
    3009                                 }
    3010 
    3011                                 if ( event.isImmediatePropagationStopped() ) {
    3012                                         break;
    3013                                 }
    3014                         }
    3015                 }
    3016                 return event.result;
    3017         },
    3018 
    3019         props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
     3272        // Includes some event props shared by KeyEvent and MouseEvent
     3273        // *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
     3274        props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
     3275
     3276        fixHooks: {},
     3277
     3278        keyHooks: {
     3279                props: "char charCode key keyCode".split(" "),
     3280                filter: function( event, original ) {
     3281
     3282                        // Add which for key events
     3283                        if ( event.which == null ) {
     3284                                event.which = original.charCode != null ? original.charCode : original.keyCode;
     3285                        }
     3286
     3287                        return event;
     3288                }
     3289        },
     3290
     3291        mouseHooks: {
     3292                props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
     3293                filter: function( event, original ) {
     3294                        var eventDoc, doc, body,
     3295                                button = original.button,
     3296                                fromElement = original.fromElement;
     3297
     3298                        // Calculate pageX/Y if missing and clientX/Y available
     3299                        if ( event.pageX == null && original.clientX != null ) {
     3300                                eventDoc = event.target.ownerDocument || document;
     3301                                doc = eventDoc.documentElement;
     3302                                body = eventDoc.body;
     3303
     3304                                event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
     3305                                event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
     3306                        }
     3307
     3308                        // Add relatedTarget, if necessary
     3309                        if ( !event.relatedTarget && fromElement ) {
     3310                                event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
     3311                        }
     3312
     3313                        // Add which for click: 1 === left; 2 === middle; 3 === right
     3314                        // Note: button is not normalized, so don't use it
     3315                        if ( !event.which && button !== undefined ) {
     3316                                event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
     3317                        }
     3318
     3319                        return event;
     3320                }
     3321        },
    30203322
    30213323        fix: function( event ) {
     
    30243326                }
    30253327
    3026                 // store a copy of the original event object
    3027                 // and "clone" to set read-only properties
    3028                 var originalEvent = event;
     3328                // Create a writable copy of the event object and normalize some properties
     3329                var i, prop,
     3330                        originalEvent = event,
     3331                        fixHook = jQuery.event.fixHooks[ event.type ] || {},
     3332                        copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
     3333
    30293334                event = jQuery.Event( originalEvent );
    30303335
    3031                 for ( var i = this.props.length, prop; i; ) {
    3032                         prop = this.props[ --i ];
     3336                for ( i = copy.length; i; ) {
     3337                        prop = copy[ --i ];
    30333338                        event[ prop ] = originalEvent[ prop ];
    30343339                }
    30353340
    3036                 // Fix target property, if necessary
     3341                // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
    30373342                if ( !event.target ) {
    3038                         // Fixes #1925 where srcElement might not be defined either
    3039                         event.target = event.srcElement || document;
    3040                 }
    3041 
    3042                 // check if target is a textnode (safari)
     3343                        event.target = originalEvent.srcElement || document;
     3344                }
     3345
     3346                // Target should not be a text node (#504, Safari)
    30433347                if ( event.target.nodeType === 3 ) {
    30443348                        event.target = event.target.parentNode;
    30453349                }
    30463350
    3047                 // Add relatedTarget, if necessary
    3048                 if ( !event.relatedTarget && event.fromElement ) {
    3049                         event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
    3050                 }
    3051 
    3052                 // Calculate pageX/Y if missing and clientX/Y available
    3053                 if ( event.pageX == null && event.clientX != null ) {
    3054                         var eventDocument = event.target.ownerDocument || document,
    3055                                 doc = eventDocument.documentElement,
    3056                                 body = eventDocument.body;
    3057 
    3058                         event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
    3059                         event.pageY = event.clientY + (doc && doc.scrollTop  || body && body.scrollTop  || 0) - (doc && doc.clientTop  || body && body.clientTop  || 0);
    3060                 }
    3061 
    3062                 // Add which for key events
    3063                 if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
    3064                         event.which = event.charCode != null ? event.charCode : event.keyCode;
    3065                 }
    3066 
    3067                 // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
    3068                 if ( !event.metaKey && event.ctrlKey ) {
     3351                // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
     3352                if ( event.metaKey === undefined ) {
    30693353                        event.metaKey = event.ctrlKey;
    30703354                }
    30713355
    3072                 // Add which for click: 1 === left; 2 === middle; 3 === right
    3073                 // Note: button is not normalized, so don't use it
    3074                 if ( !event.which && event.button !== undefined ) {
    3075                         event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
    3076                 }
    3077 
    3078                 return event;
    3079         },
    3080 
    3081         // Deprecated, use jQuery.guid instead
    3082         guid: 1E8,
    3083 
    3084         // Deprecated, use jQuery.proxy instead
    3085         proxy: jQuery.proxy,
     3356                return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
     3357        },
    30863358
    30873359        special: {
    30883360                ready: {
    30893361                        // Make sure the ready event is setup
    3090                         setup: jQuery.bindReady,
    3091                         teardown: jQuery.noop
     3362                        setup: jQuery.bindReady
    30923363                },
    30933364
    3094                 live: {
    3095                         add: function( handleObj ) {
    3096                                 jQuery.event.add( this,
    3097                                         liveConvert( handleObj.origType, handleObj.selector ),
    3098                                         jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
    3099                         },
    3100 
    3101                         remove: function( handleObj ) {
    3102                                 jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
    3103                         }
     3365                load: {
     3366                        // Prevent triggered image.load events from bubbling to window.load
     3367                        noBubble: true
     3368                },
     3369
     3370                focus: {
     3371                        delegateType: "focusin"
     3372                },
     3373                blur: {
     3374                        delegateType: "focusout"
    31043375                },
    31053376
     
    31183389                        }
    31193390                }
     3391        },
     3392
     3393        simulate: function( type, elem, event, bubble ) {
     3394                // Piggyback on a donor event to simulate a different one.
     3395                // Fake originalEvent to avoid donor's stopPropagation, but if the
     3396                // simulated event prevents default then we do the same on the donor.
     3397                var e = jQuery.extend(
     3398                        new jQuery.Event(),
     3399                        event,
     3400                        { type: type,
     3401                                isSimulated: true,
     3402                                originalEvent: {}
     3403                        }
     3404                );
     3405                if ( bubble ) {
     3406                        jQuery.event.trigger( e, null, elem );
     3407                } else {
     3408                        jQuery.event.dispatch.call( elem, e );
     3409                }
     3410                if ( e.isDefaultPrevented() ) {
     3411                        event.preventDefault();
     3412                }
    31203413        }
    31213414};
     3415
     3416// Some plugins are using, but it's undocumented/deprecated and will be removed.
     3417// The 1.7 special event interface should provide all the hooks needed now.
     3418jQuery.event.handle = jQuery.event.dispatch;
    31223419
    31233420jQuery.removeEvent = document.removeEventListener ?
     
    31353432jQuery.Event = function( src, props ) {
    31363433        // Allow instantiation without the 'new' keyword
    3137         if ( !this.preventDefault ) {
     3434        if ( !(this instanceof jQuery.Event) ) {
    31383435                return new jQuery.Event( src, props );
    31393436        }
     
    31463443                // Events bubbling up the document may have been marked as prevented
    31473444                // by a handler lower down the tree; reflect the correct value.
    3148                 this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
    3149                         src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
     3445                this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
     3446                        src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
    31503447
    31513448        // Event type
     
    31593456        }
    31603457
    3161         // timeStamp is buggy for some events on Firefox(#3843)
    3162         // So we won't rely on the native value
    3163         this.timeStamp = jQuery.now();
     3458        // Create a timestamp if incoming event doesn't have one
     3459        this.timeStamp = src && src.timeStamp || jQuery.now();
    31643460
    31653461        // Mark it as fixed
     
    32173513};
    32183514
    3219 // Checks if an event happened on an element within another element
    3220 // Used in jQuery.event.special.mouseenter and mouseleave handlers
    3221 var withinElement = function( event ) {
    3222 
    3223         // Check if mouse(over|out) are still within the same parent element
    3224         var related = event.relatedTarget,
    3225                 inside = false,
    3226                 eventType = event.type;
    3227 
    3228         event.type = event.data;
    3229 
    3230         if ( related !== this ) {
    3231 
    3232                 if ( related ) {
    3233                         inside = jQuery.contains( this, related );
    3234                 }
    3235 
    3236                 if ( !inside ) {
    3237 
    3238                         jQuery.event.handle.apply( this, arguments );
    3239 
    3240                         event.type = eventType;
    3241                 }
    3242         }
    3243 },
    3244 
    3245 // In case of event delegation, we only need to rename the event.type,
    3246 // liveHandler will take care of the rest.
    3247 delegate = function( event ) {
    3248         event.type = event.data;
    3249         jQuery.event.handle.apply( this, arguments );
    3250 };
    3251 
    3252 // Create mouseenter and mouseleave events
     3515// Create mouseenter/leave events using mouseover/out and event-time checks
    32533516jQuery.each({
    32543517        mouseenter: "mouseover",
     
    32563519}, function( orig, fix ) {
    32573520        jQuery.event.special[ orig ] = {
    3258                 setup: function( data ) {
    3259                         jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
    3260                 },
    3261                 teardown: function( data ) {
    3262                         jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
     3521                delegateType: fix,
     3522                bindType: fix,
     3523
     3524                handle: function( event ) {
     3525                        var target = this,
     3526                                related = event.relatedTarget,
     3527                                handleObj = event.handleObj,
     3528                                selector = handleObj.selector,
     3529                                ret;
     3530
     3531                        // For mousenter/leave call the handler if related is outside the target.
     3532                        // NB: No relatedTarget if the mouse left/entered the browser window
     3533                        if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
     3534                                event.type = handleObj.origType;
     3535                                ret = handleObj.handler.apply( this, arguments );
     3536                                event.type = fix;
     3537                        }
     3538                        return ret;
    32633539                }
    32643540        };
    32653541});
    32663542
    3267 // submit delegation
     3543// IE submit delegation
    32683544if ( !jQuery.support.submitBubbles ) {
    32693545
    32703546        jQuery.event.special.submit = {
    3271                 setup: function( data, namespaces ) {
    3272                         if ( !jQuery.nodeName( this, "form" ) ) {
    3273                                 jQuery.event.add(this, "click.specialSubmit", function( e ) {
    3274                                         // Avoid triggering error on non-existent type attribute in IE VML (#7071)
    3275                                         var elem = e.target,
    3276                                                 type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.type : "";
    3277 
    3278                                         if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
    3279                                                 trigger( "submit", this, arguments );
    3280                                         }
    3281                                 });
    3282 
    3283                                 jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
    3284                                         var elem = e.target,
    3285                                                 type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.type : "";
    3286 
    3287                                         if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
    3288                                                 trigger( "submit", this, arguments );
    3289                                         }
    3290                                 });
    3291 
    3292                         } else {
     3547                setup: function() {
     3548                        // Only need this for delegated form submit events
     3549                        if ( jQuery.nodeName( this, "form" ) ) {
    32933550                                return false;
    32943551                        }
     3552
     3553                        // Lazy-add a submit handler when a descendant form may potentially be submitted
     3554                        jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
     3555                                // Node name check avoids a VML-related crash in IE (#9807)
     3556                                var elem = e.target,
     3557                                        form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
     3558                                if ( form && !form._submit_attached ) {
     3559                                        jQuery.event.add( form, "submit._submit", function( event ) {
     3560                                                // If form was submitted by the user, bubble the event up the tree
     3561                                                if ( this.parentNode && !event.isTrigger ) {
     3562                                                        jQuery.event.simulate( "submit", this.parentNode, event, true );
     3563                                                }
     3564                                        });
     3565                                        form._submit_attached = true;
     3566                                }
     3567                        });
     3568                        // return undefined since we don't need an event listener
    32953569                },
    32963570
    3297                 teardown: function( namespaces ) {
    3298                         jQuery.event.remove( this, ".specialSubmit" );
     3571                teardown: function() {
     3572                        // Only need this for delegated form submit events
     3573                        if ( jQuery.nodeName( this, "form" ) ) {
     3574                                return false;
     3575                        }
     3576
     3577                        // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
     3578                        jQuery.event.remove( this, "._submit" );
    32993579                }
    33003580        };
    3301 
    33023581}
    33033582
    3304 // change delegation, happens here so we have bind.
     3583// IE change delegation and checkbox/radio fix
    33053584if ( !jQuery.support.changeBubbles ) {
    33063585
    3307         var changeFilters,
    3308 
    3309         getVal = function( elem ) {
    3310                 var type = jQuery.nodeName( elem, "input" ) ? elem.type : "",
    3311                         val = elem.value;
    3312 
    3313                 if ( type === "radio" || type === "checkbox" ) {
    3314                         val = elem.checked;
    3315 
    3316                 } else if ( type === "select-multiple" ) {
    3317                         val = elem.selectedIndex > -1 ?
    3318                                 jQuery.map( elem.options, function( elem ) {
    3319                                         return elem.selected;
    3320                                 }).join("-") :
    3321                                 "";
    3322 
    3323                 } else if ( jQuery.nodeName( elem, "select" ) ) {
    3324                         val = elem.selectedIndex;
    3325                 }
    3326 
    3327                 return val;
    3328         },
    3329 
    3330         testChange = function testChange( e ) {
    3331                 var elem = e.target, data, val;
    3332 
    3333                 if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
    3334                         return;
    3335                 }
    3336 
    3337                 data = jQuery._data( elem, "_change_data" );
    3338                 val = getVal(elem);
    3339 
    3340                 // the current data will be also retrieved by beforeactivate
    3341                 if ( e.type !== "focusout" || elem.type !== "radio" ) {
    3342                         jQuery._data( elem, "_change_data", val );
    3343                 }
    3344 
    3345                 if ( data === undefined || val === data ) {
    3346                         return;
    3347                 }
    3348 
    3349                 if ( data != null || val ) {
    3350                         e.type = "change";
    3351                         e.liveFired = undefined;
    3352                         jQuery.event.trigger( e, arguments[1], elem );
     3586        jQuery.event.special.change = {
     3587
     3588                setup: function() {
     3589
     3590                        if ( rformElems.test( this.nodeName ) ) {
     3591                                // IE doesn't fire change on a check/radio until blur; trigger it on click
     3592                                // after a propertychange. Eat the blur-change in special.change.handle.
     3593                                // This still fires onchange a second time for check/radio after blur.
     3594                                if ( this.type === "checkbox" || this.type === "radio" ) {
     3595                                        jQuery.event.add( this, "propertychange._change", function( event ) {
     3596                                                if ( event.originalEvent.propertyName === "checked" ) {
     3597                                                        this._just_changed = true;
     3598                                                }
     3599                                        });
     3600                                        jQuery.event.add( this, "click._change", function( event ) {
     3601                                                if ( this._just_changed && !event.isTrigger ) {
     3602                                                        this._just_changed = false;
     3603                                                        jQuery.event.simulate( "change", this, event, true );
     3604                                                }
     3605                                        });
     3606                                }
     3607                                return false;
     3608                        }
     3609                        // Delegated event; lazy-add a change handler on descendant inputs
     3610                        jQuery.event.add( this, "beforeactivate._change", function( e ) {
     3611                                var elem = e.target;
     3612
     3613                                if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
     3614                                        jQuery.event.add( elem, "change._change", function( event ) {
     3615                                                if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
     3616                                                        jQuery.event.simulate( "change", this.parentNode, event, true );
     3617                                                }
     3618                                        });
     3619                                        elem._change_attached = true;
     3620                                }
     3621                        });
     3622                },
     3623
     3624                handle: function( event ) {
     3625                        var elem = event.target;
     3626
     3627                        // Swallow native change events from checkbox/radio, we already triggered them above
     3628                        if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
     3629                                return event.handleObj.handler.apply( this, arguments );
     3630                        }
     3631                },
     3632
     3633                teardown: function() {
     3634                        jQuery.event.remove( this, "._change" );
     3635
     3636                        return rformElems.test( this.nodeName );
    33533637                }
    33543638        };
    3355 
    3356         jQuery.event.special.change = {
    3357                 filters: {
    3358                         focusout: testChange,
    3359 
    3360                         beforedeactivate: testChange,
    3361 
    3362                         click: function( e ) {
    3363                                 var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
    3364 
    3365                                 if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) {
    3366                                         testChange.call( this, e );
    3367                                 }
    3368                         },
    3369 
    3370                         // Change has to be called before submit
    3371                         // Keydown will be called before keypress, which is used in submit-event delegation
    3372                         keydown: function( e ) {
    3373                                 var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
    3374 
    3375                                 if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
    3376                                         (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
    3377                                         type === "select-multiple" ) {
    3378                                         testChange.call( this, e );
    3379                                 }
    3380                         },
    3381 
    3382                         // Beforeactivate happens also before the previous element is blurred
    3383                         // with this event you can't trigger a change event, but you can store
    3384                         // information
    3385                         beforeactivate: function( e ) {
    3386                                 var elem = e.target;
    3387                                 jQuery._data( elem, "_change_data", getVal(elem) );
    3388                         }
    3389                 },
    3390 
    3391                 setup: function( data, namespaces ) {
    3392                         if ( this.type === "file" ) {
    3393                                 return false;
    3394                         }
    3395 
    3396                         for ( var type in changeFilters ) {
    3397                                 jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
    3398                         }
    3399 
    3400                         return rformElems.test( this.nodeName );
    3401                 },
    3402 
    3403                 teardown: function( namespaces ) {
    3404                         jQuery.event.remove( this, ".specialChange" );
    3405 
    3406                         return rformElems.test( this.nodeName );
    3407                 }
    3408         };
    3409 
    3410         changeFilters = jQuery.event.special.change.filters;
    3411 
    3412         // Handle when the input is .focus()'d
    3413         changeFilters.focus = changeFilters.beforeactivate;
    3414 }
    3415 
    3416 function trigger( type, elem, args ) {
    3417         // Piggyback on a donor event to simulate a different one.
    3418         // Fake originalEvent to avoid donor's stopPropagation, but if the
    3419         // simulated event prevents default then we do the same on the donor.
    3420         // Don't pass args or remember liveFired; they apply to the donor event.
    3421         var event = jQuery.extend( {}, args[ 0 ] );
    3422         event.type = type;
    3423         event.originalEvent = {};
    3424         event.liveFired = undefined;
    3425         jQuery.event.handle.call( elem, event );
    3426         if ( event.isDefaultPrevented() ) {
    3427                 args[ 0 ].preventDefault();
    3428         }
    34293639}
    34303640
     
    34343644
    34353645                // Attach a single capturing handler while someone wants focusin/focusout
    3436                 var attaches = 0;
     3646                var attaches = 0,
     3647                        handler = function( event ) {
     3648                                jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
     3649                        };
    34373650
    34383651                jQuery.event.special[ fix ] = {
     
    34483661                        }
    34493662                };
    3450 
    3451                 function handler( donor ) {
    3452                         // Donor event is always a native one; fix it and switch its type.
    3453                         // Let focusin/out handler cancel the donor focus/blur event.
    3454                         var e = jQuery.event.fix( donor );
    3455                         e.type = fix;
    3456                         e.originalEvent = {};
    3457                         jQuery.event.trigger( e, null, e.target );
    3458                         if ( e.isDefaultPrevented() ) {
    3459                                 donor.preventDefault();
    3460                         }
    3461                 }
    34623663        });
    34633664}
    34643665
    3465 jQuery.each(["bind", "one"], function( i, name ) {
    3466         jQuery.fn[ name ] = function( type, data, fn ) {
    3467                 var handler;
    3468 
    3469                 // Handle object literals
    3470                 if ( typeof type === "object" ) {
    3471                         for ( var key in type ) {
    3472                                 this[ name ](key, data, type[key], fn);
     3666jQuery.fn.extend({
     3667
     3668        on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
     3669                var origFn, type;
     3670
     3671                // Types can be a map of types/handlers
     3672                if ( typeof types === "object" ) {
     3673                        // ( types-Object, selector, data )
     3674                        if ( typeof selector !== "string" ) {
     3675                                // ( types-Object, data )
     3676                                data = selector;
     3677                                selector = undefined;
     3678                        }
     3679                        for ( type in types ) {
     3680                                this.on( type, selector, data, types[ type ], one );
    34733681                        }
    34743682                        return this;
    34753683                }
    34763684
    3477                 if ( arguments.length === 2 || data === false ) {
    3478                         fn = data;
    3479                         data = undefined;
    3480                 }
    3481 
    3482                 if ( name === "one" ) {
    3483                         handler = function( event ) {
    3484                                 jQuery( this ).unbind( event, handler );
    3485                                 return fn.apply( this, arguments );
     3685                if ( data == null && fn == null ) {
     3686                        // ( types, fn )
     3687                        fn = selector;
     3688                        data = selector = undefined;
     3689                } else if ( fn == null ) {
     3690                        if ( typeof selector === "string" ) {
     3691                                // ( types, selector, fn )
     3692                                fn = data;
     3693                                data = undefined;
     3694                        } else {
     3695                                // ( types, data, fn )
     3696                                fn = data;
     3697                                data = selector;
     3698                                selector = undefined;
     3699                        }
     3700                }
     3701                if ( fn === false ) {
     3702                        fn = returnFalse;
     3703                } else if ( !fn ) {
     3704                        return this;
     3705                }
     3706
     3707                if ( one === 1 ) {
     3708                        origFn = fn;
     3709                        fn = function( event ) {
     3710                                // Can use an empty set, since event contains the info
     3711                                jQuery().off( event );
     3712                                return origFn.apply( this, arguments );
    34863713                        };
    3487                         handler.guid = fn.guid || jQuery.guid++;
    3488                 } else {
    3489                         handler = fn;
    3490                 }
    3491 
    3492                 if ( type === "unload" && name !== "one" ) {
    3493                         this.one( type, data, fn );
    3494 
    3495                 } else {
    3496                         for ( var i = 0, l = this.length; i < l; i++ ) {
    3497                                 jQuery.event.add( this[i], type, handler, data );
    3498                         }
    3499                 }
    3500 
     3714                        // Use same guid so caller can remove using origFn
     3715                        fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
     3716                }
     3717                return this.each( function() {
     3718                        jQuery.event.add( this, types, fn, data, selector );
     3719                });
     3720        },
     3721        one: function( types, selector, data, fn ) {
     3722                return this.on.call( this, types, selector, data, fn, 1 );
     3723        },
     3724        off: function( types, selector, fn ) {
     3725                if ( types && types.preventDefault && types.handleObj ) {
     3726                        // ( event )  dispatched jQuery.Event
     3727                        var handleObj = types.handleObj;
     3728                        jQuery( types.delegateTarget ).off(
     3729                                handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
     3730                                handleObj.selector,
     3731                                handleObj.handler
     3732                        );
     3733                        return this;
     3734                }
     3735                if ( typeof types === "object" ) {
     3736                        // ( types-object [, selector] )
     3737                        for ( var type in types ) {
     3738                                this.off( type, selector, types[ type ] );
     3739                        }
     3740                        return this;
     3741                }
     3742                if ( selector === false || typeof selector === "function" ) {
     3743                        // ( types [, fn] )
     3744                        fn = selector;
     3745                        selector = undefined;
     3746                }
     3747                if ( fn === false ) {
     3748                        fn = returnFalse;
     3749                }
     3750                return this.each(function() {
     3751                        jQuery.event.remove( this, types, fn, selector );
     3752                });
     3753        },
     3754
     3755        bind: function( types, data, fn ) {
     3756                return this.on( types, null, data, fn );
     3757        },
     3758        unbind: function( types, fn ) {
     3759                return this.off( types, null, fn );
     3760        },
     3761
     3762        live: function( types, data, fn ) {
     3763                jQuery( this.context ).on( types, this.selector, data, fn );
    35013764                return this;
    3502         };
    3503 });
    3504 
    3505 jQuery.fn.extend({
    3506         unbind: function( type, fn ) {
    3507                 // Handle object literals
    3508                 if ( typeof type === "object" && !type.preventDefault ) {
    3509                         for ( var key in type ) {
    3510                                 this.unbind(key, type[key]);
    3511                         }
    3512 
    3513                 } else {
    3514                         for ( var i = 0, l = this.length; i < l; i++ ) {
    3515                                 jQuery.event.remove( this[i], type, fn );
    3516                         }
    3517                 }
    3518 
     3765        },
     3766        die: function( types, fn ) {
     3767                jQuery( this.context ).off( types, this.selector || "**", fn );
    35193768                return this;
    35203769        },
    35213770
    35223771        delegate: function( selector, types, data, fn ) {
    3523                 return this.live( types, data, fn, selector );
    3524         },
    3525 
     3772                return this.on( types, selector, data, fn );
     3773        },
    35263774        undelegate: function( selector, types, fn ) {
    3527                 if ( arguments.length === 0 ) {
    3528                         return this.unbind( "live" );
    3529 
    3530                 } else {
    3531                         return this.die( types, null, fn, selector );
    3532                 }
     3775                // ( namespace ) or ( selector, types [, fn] )
     3776                return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
    35333777        },
    35343778
     
    35383782                });
    35393783        },
    3540 
    35413784        triggerHandler: function( type, data ) {
    35423785                if ( this[0] ) {
     
    35523795                        toggler = function( event ) {
    35533796                                // Figure out which function to execute
    3554                                 var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
    3555                                 jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
     3797                                var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
     3798                                jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
    35563799
    35573800                                // Make sure that clicks stop
     
    35763819});
    35773820
    3578 var liveMap = {
    3579         focus: "focusin",
    3580         blur: "focusout",
    3581         mouseenter: "mouseover",
    3582         mouseleave: "mouseout"
    3583 };
    3584 
    3585 jQuery.each(["live", "die"], function( i, name ) {
    3586         jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
    3587                 var type, i = 0, match, namespaces, preType,
    3588                         selector = origSelector || this.selector,
    3589                         context = origSelector ? this : jQuery( this.context );
    3590 
    3591                 if ( typeof types === "object" && !types.preventDefault ) {
    3592                         for ( var key in types ) {
    3593                                 context[ name ]( key, data, types[key], selector );
    3594                         }
    3595 
    3596                         return this;
    3597                 }
    3598 
    3599                 if ( name === "die" && !types &&
    3600                                         origSelector && origSelector.charAt(0) === "." ) {
    3601 
    3602                         context.unbind( origSelector );
    3603 
    3604                         return this;
    3605                 }
    3606 
    3607                 if ( data === false || jQuery.isFunction( data ) ) {
    3608                         fn = data || returnFalse;
    3609                         data = undefined;
    3610                 }
    3611 
    3612                 types = (types || "").split(" ");
    3613 
    3614                 while ( (type = types[ i++ ]) != null ) {
    3615                         match = rnamespaces.exec( type );
    3616                         namespaces = "";
    3617 
    3618                         if ( match )  {
    3619                                 namespaces = match[0];
    3620                                 type = type.replace( rnamespaces, "" );
    3621                         }
    3622 
    3623                         if ( type === "hover" ) {
    3624                                 types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
    3625                                 continue;
    3626                         }
    3627 
    3628                         preType = type;
    3629 
    3630                         if ( liveMap[ type ] ) {
    3631                                 types.push( liveMap[ type ] + namespaces );
    3632                                 type = type + namespaces;
    3633 
    3634                         } else {
    3635                                 type = (liveMap[ type ] || type) + namespaces;
    3636                         }
    3637 
    3638                         if ( name === "live" ) {
    3639                                 // bind live handler
    3640                                 for ( var j = 0, l = context.length; j < l; j++ ) {
    3641                                         jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
    3642                                                 { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
    3643                                 }
    3644 
    3645                         } else {
    3646                                 // unbind live handler
    3647                                 context.unbind( "live." + liveConvert( type, selector ), fn );
    3648                         }
    3649                 }
    3650 
    3651                 return this;
    3652         };
    3653 });
    3654 
    3655 function liveHandler( event ) {
    3656         var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
    3657                 elems = [],
    3658                 selectors = [],
    3659                 events = jQuery._data( this, "events" );
    3660 
    3661         // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
    3662         if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
    3663                 return;
    3664         }
    3665 
    3666         if ( event.namespace ) {
    3667                 namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
    3668         }
    3669 
    3670         event.liveFired = this;
    3671 
    3672         var live = events.live.slice(0);
    3673 
    3674         for ( j = 0; j < live.length; j++ ) {
    3675                 handleObj = live[j];
    3676 
    3677                 if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
    3678                         selectors.push( handleObj.selector );
    3679 
    3680                 } else {
    3681                         live.splice( j--, 1 );
    3682                 }
    3683         }
    3684 
    3685         match = jQuery( event.target ).closest( selectors, event.currentTarget );
    3686 
    3687         for ( i = 0, l = match.length; i < l; i++ ) {
    3688                 close = match[i];
    3689 
    3690                 for ( j = 0; j < live.length; j++ ) {
    3691                         handleObj = live[j];
    3692 
    3693                         if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {
    3694                                 elem = close.elem;
    3695                                 related = null;
    3696 
    3697                                 // Those two events require additional checking
    3698                                 if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
    3699                                         event.type = handleObj.preType;
    3700                                         related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
    3701 
    3702                                         // Make sure not to accidentally match a child element with the same selector
    3703                                         if ( related && jQuery.contains( elem, related ) ) {
    3704                                                 related = elem;
    3705                                         }
    3706                                 }
    3707 
    3708                                 if ( !related || related !== elem ) {
    3709                                         elems.push({ elem: elem, handleObj: handleObj, level: close.level });
    3710                                 }
    3711                         }
    3712                 }
    3713         }
    3714 
    3715         for ( i = 0, l = elems.length; i < l; i++ ) {
    3716                 match = elems[i];
    3717 
    3718                 if ( maxLevel && match.level > maxLevel ) {
    3719                         break;
    3720                 }
    3721 
    3722                 event.currentTarget = match.elem;
    3723                 event.data = match.handleObj.data;
    3724                 event.handleObj = match.handleObj;
    3725 
    3726                 ret = match.handleObj.origHandler.apply( match.elem, arguments );
    3727 
    3728                 if ( ret === false || event.isPropagationStopped() ) {
    3729                         maxLevel = match.level;
    3730 
    3731                         if ( ret === false ) {
    3732                                 stop = false;
    3733                         }
    3734                         if ( event.isImmediatePropagationStopped() ) {
    3735                                 break;
    3736                         }
    3737                 }
    3738         }
    3739 
    3740         return stop;
    3741 }
    3742 
    3743 function liveConvert( type, selector ) {
    3744         return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
    3745 }
    3746 
    37473821jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
    37483822        "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
    3749         "change select submit keydown keypress keyup error").split(" "), function( i, name ) {
     3823        "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
    37503824
    37513825        // Handle event binding
     
    37573831
    37583832                return arguments.length > 0 ?
    3759                         this.bind( name, data, fn ) :
     3833                        this.on( name, null, data, fn ) :
    37603834                        this.trigger( name );
    37613835        };
     
    37633837        if ( jQuery.attrFn ) {
    37643838                jQuery.attrFn[ name ] = true;
     3839        }
     3840
     3841        if ( rkeyEvent.test( name ) ) {
     3842                jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
     3843        }
     3844
     3845        if ( rmouseEvent.test( name ) ) {
     3846                jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
    37653847        }
    37663848});
     
    37773859
    37783860var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
     3861        expando = "sizcache" + (Math.random() + '').replace('.', ''),
    37793862        done = 0,
    37803863        toString = Object.prototype.toString,
     
    37823865        baseHasDuplicate = true,
    37833866        rBackslash = /\\/g,
     3867        rReturn = /\r\n/g,
    37843868        rNonWord = /\W/;
    37853869
     
    38333917
    38343918                if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
    3835                         set = posProcess( parts[0] + parts[1], context );
     3919                        set = posProcess( parts[0] + parts[1], context, seed );
    38363920
    38373921                } else {
     
    38473931                                }
    38483932                               
    3849                                 set = posProcess( selector, set );
     3933                                set = posProcess( selector, set, seed );
    38503934                        }
    38513935                }
     
    39664050
    39674051Sizzle.find = function( expr, context, isXML ) {
    3968         var set;
     4052        var set, i, len, match, type, left;
    39694053
    39704054        if ( !expr ) {
     
    39724056        }
    39734057
    3974         for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
    3975                 var match,
    3976                         type = Expr.order[i];
     4058        for ( i = 0, len = Expr.order.length; i < len; i++ ) {
     4059                type = Expr.order[i];
    39774060               
    39784061                if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
    3979                         var left = match[1];
     4062                        left = match[1];
    39804063                        match.splice( 1, 1 );
    39814064
     
    40034086Sizzle.filter = function( expr, set, inplace, not ) {
    40044087        var match, anyFound,
     4088                type, found, item, filter, left,
     4089                i, pass,
    40054090                old = expr,
    40064091                result = [],
     
    40094094
    40104095        while ( expr && set.length ) {
    4011                 for ( var type in Expr.filter ) {
     4096                for ( type in Expr.filter ) {
    40124097                        if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
    4013                                 var found, item,
    4014                                         filter = Expr.filter[ type ],
    4015                                         left = match[1];
     4098                                filter = Expr.filter[ type ];
     4099                                left = match[1];
    40164100
    40174101                                anyFound = false;
     
    40394123
    40404124                                if ( match ) {
    4041                                         for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
     4125                                        for ( i = 0; (item = curLoop[i]) != null; i++ ) {
    40424126                                                if ( item ) {
    40434127                                                        found = filter( item, match, i, curLoop );
    4044                                                         var pass = not ^ !!found;
     4128                                                        pass = not ^ found;
    40454129
    40464130                                                        if ( inplace && found != null ) {
     
    40934177
    40944178Sizzle.error = function( msg ) {
    4095         throw "Syntax error, unrecognized expression: " + msg;
     4179        throw new Error( "Syntax error, unrecognized expression: " + msg );
     4180};
     4181
     4182/**
     4183 * Utility function for retreiving the text value of an array of DOM nodes
     4184 * @param {Array|Element} elem
     4185 */
     4186var getText = Sizzle.getText = function( elem ) {
     4187    var i, node,
     4188                nodeType = elem.nodeType,
     4189                ret = "";
     4190
     4191        if ( nodeType ) {
     4192                if ( nodeType === 1 || nodeType === 9 ) {
     4193                        // Use textContent || innerText for elements
     4194                        if ( typeof elem.textContent === 'string' ) {
     4195                                return elem.textContent;
     4196                        } else if ( typeof elem.innerText === 'string' ) {
     4197                                // Replace IE's carriage returns
     4198                                return elem.innerText.replace( rReturn, '' );
     4199                        } else {
     4200                                // Traverse it's children
     4201                                for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
     4202                                        ret += getText( elem );
     4203                                }
     4204                        }
     4205                } else if ( nodeType === 3 || nodeType === 4 ) {
     4206                        return elem.nodeValue;
     4207                }
     4208        } else {
     4209
     4210                // If no nodeType, this is expected to be an array
     4211                for ( i = 0; (node = elem[i]); i++ ) {
     4212                        // Do not traverse comment nodes
     4213                        if ( node.nodeType !== 8 ) {
     4214                                ret += getText( node );
     4215                        }
     4216                }
     4217        }
     4218        return ret;
    40964219};
    40974220
     
    44834606
    44844607                        } else if ( name === "contains" ) {
    4485                                 return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
     4608                                return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
    44864609
    44874610                        } else if ( name === "not" ) {
     
    45024625
    45034626                CHILD: function( elem, match ) {
    4504                         var type = match[1],
     4627                        var first, last,
     4628                                doneName, parent, cache,
     4629                                count, diff,
     4630                                type = match[1],
    45054631                                node = elem;
    45064632
     
    45304656
    45314657                                case "nth":
    4532                                         var first = match[2],
    4533                                                 last = match[3];
     4658                                        first = match[2];
     4659                                        last = match[3];
    45344660
    45354661                                        if ( first === 1 && last === 0 ) {
     
    45374663                                        }
    45384664                                       
    4539                                         var doneName = match[0],
    4540                                                 parent = elem.parentNode;
     4665                                        doneName = match[0];
     4666                                        parent = elem.parentNode;
    45414667       
    4542                                         if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
    4543                                                 var count = 0;
     4668                                        if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
     4669                                                count = 0;
    45444670                                               
    45454671                                                for ( node = parent.firstChild; node; node = node.nextSibling ) {
     
    45494675                                                }
    45504676
    4551                                                 parent.sizcache = doneName;
     4677                                                parent[ expando ] = doneName;
    45524678                                        }
    45534679                                       
    4554                                         var diff = elem.nodeIndex - last;
     4680                                        diff = elem.nodeIndex - last;
    45554681
    45564682                                        if ( first === 0 ) {
     
    45684694
    45694695                TAG: function( elem, match ) {
    4570                         return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
     4696                        return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
    45714697                },
    45724698               
     
    45784704                ATTR: function( elem, match ) {
    45794705                        var name = match[1],
    4580                                 result = Expr.attrHandle[ name ] ?
     4706                                result = Sizzle.attr ?
     4707                                        Sizzle.attr( elem, name ) :
     4708                                        Expr.attrHandle[ name ] ?
    45814709                                        Expr.attrHandle[ name ]( elem ) :
    45824710                                        elem[ name ] != null ?
     
    45894717                        return result == null ?
    45904718                                type === "!=" :
     4719                                !type && Sizzle.attr ?
     4720                                result != null :
    45914721                                type === "=" ?
    45924722                                value === check :
     
    47694899}
    47704900
    4771 // Utility function for retreiving the text value of an array of DOM nodes
    4772 Sizzle.getText = function( elems ) {
    4773         var ret = "", elem;
    4774 
    4775         for ( var i = 0; elems[i]; i++ ) {
    4776                 elem = elems[i];
    4777 
    4778                 // Get the text from text nodes and CDATA nodes
    4779                 if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
    4780                         ret += elem.nodeValue;
    4781 
    4782                 // Traverse everything else, except comment nodes
    4783                 } else if ( elem.nodeType !== 8 ) {
    4784                         ret += Sizzle.getText( elem.childNodes );
    4785                 }
    4786         }
    4787 
    4788         return ret;
    4789 };
    4790 
    47914901// Check to see if the browser returns elements by name when
    47924902// querying by getElementById (and provide a workaround)
     
    50665176
    50675177                        while ( elem ) {
    5068                                 if ( elem.sizcache === doneName ) {
     5178                                if ( elem[ expando ] === doneName ) {
    50695179                                        match = checkSet[elem.sizset];
    50705180                                        break;
     
    50725182
    50735183                                if ( elem.nodeType === 1 && !isXML ){
    5074                                         elem.sizcache = doneName;
     5184                                        elem[ expando ] = doneName;
    50755185                                        elem.sizset = i;
    50765186                                }
     
    50995209
    51005210                        while ( elem ) {
    5101                                 if ( elem.sizcache === doneName ) {
     5211                                if ( elem[ expando ] === doneName ) {
    51025212                                        match = checkSet[elem.sizset];
    51035213                                        break;
     
    51065216                                if ( elem.nodeType === 1 ) {
    51075217                                        if ( !isXML ) {
    5108                                                 elem.sizcache = doneName;
     5218                                                elem[ expando ] = doneName;
    51095219                                                elem.sizset = i;
    51105220                                        }
     
    51545264};
    51555265
    5156 var posProcess = function( selector, context ) {
     5266var posProcess = function( selector, context, seed ) {
    51575267        var match,
    51585268                tmpSet = [],
     
    51705280
    51715281        for ( var i = 0, l = root.length; i < l; i++ ) {
    5172                 Sizzle( selector, root[i], tmpSet );
     5282                Sizzle( selector, root[i], tmpSet, seed );
    51735283        }
    51745284
     
    51775287
    51785288// EXPOSE
     5289// Override sizzle attribute retrieval
     5290Sizzle.attr = jQuery.attr;
     5291Sizzle.selectors.attrMap = {};
    51795292jQuery.find = Sizzle;
    51805293jQuery.expr = Sizzle.selectors;
     
    52625375
    52635376        is: function( selector ) {
    5264                 return !!selector && ( typeof selector === "string" ?
    5265                         jQuery.filter( selector, this ).length > 0 :
    5266                         this.filter( selector ).length > 0 );
     5377                return !!selector && (
     5378                        typeof selector === "string" ?
     5379                                // If this is a positional selector, check membership in the returned set
     5380                                // so $("p:first").is("p:last") won't return true for a doc with two "p".
     5381                                POS.test( selector ) ?
     5382                                        jQuery( selector, this.context ).index( this[0] ) >= 0 :
     5383                                        jQuery.filter( selector, this ).length > 0 :
     5384                                this.filter( selector ).length > 0 );
    52675385        },
    52685386
     
    52705388                var ret = [], i, l, cur = this[0];
    52715389               
    5272                 // Array
     5390                // Array (deprecated as of jQuery 1.7)
    52735391                if ( jQuery.isArray( selectors ) ) {
    5274                         var match, selector,
    5275                                 matches = {},
    5276                                 level = 1;
    5277 
    5278                         if ( cur && selectors.length ) {
    5279                                 for ( i = 0, l = selectors.length; i < l; i++ ) {
    5280                                         selector = selectors[i];
    5281 
    5282                                         if ( !matches[ selector ] ) {
    5283                                                 matches[ selector ] = POS.test( selector ) ?
    5284                                                         jQuery( selector, context || this.context ) :
    5285                                                         selector;
    5286                                         }
    5287                                 }
    5288 
    5289                                 while ( cur && cur.ownerDocument && cur !== context ) {
    5290                                         for ( selector in matches ) {
    5291                                                 match = matches[ selector ];
    5292 
    5293                                                 if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) {
    5294                                                         ret.push({ selector: selector, elem: cur, level: level });
    5295                                                 }
    5296                                         }
    5297 
    5298                                         cur = cur.parentNode;
    5299                                         level++;
    5300                                 }
     5392                        var level = 1;
     5393
     5394                        while ( cur && cur.ownerDocument && cur !== context ) {
     5395                                for ( i = 0; i < selectors.length; i++ ) {
     5396
     5397                                        if ( jQuery( cur ).is( selectors[ i ] ) ) {
     5398                                                ret.push({ selector: selectors[ i ], elem: cur, level: level });
     5399                                        }
     5400                                }
     5401
     5402                                cur = cur.parentNode;
     5403                                level++;
    53015404                        }
    53025405
     
    54155518}, function( name, fn ) {
    54165519        jQuery.fn[ name ] = function( until, selector ) {
    5417                 var ret = jQuery.map( this, fn, until ),
    5418                         // The variable 'args' was introduced in
    5419                         // https://github.com/jquery/jquery/commit/52a0238
    5420                         // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
    5421                         // http://code.google.com/p/v8/issues/detail?id=1050
    5422                         args = slice.call(arguments);
     5520                var ret = jQuery.map( this, fn, until );
    54235521
    54245522                if ( !runtil.test( name ) ) {
     
    54365534                }
    54375535
    5438                 return this.pushStack( ret, name, args.join(",") );
     5536                return this.pushStack( ret, name, slice.call( arguments ).join(",") );
    54395537        };
    54405538});
     
    55055603        } else if ( qualifier.nodeType ) {
    55065604                return jQuery.grep(elements, function( elem, i ) {
    5507                         return (elem === qualifier) === keep;
     5605                        return ( elem === qualifier ) === keep;
    55085606                });
    55095607
     
    55215619
    55225620        return jQuery.grep(elements, function( elem, i ) {
    5523                 return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
     5621                return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
    55245622        });
    55255623}
     
    55285626
    55295627
    5530 var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
     5628function createSafeFragment( document ) {
     5629        var list = nodeNames.split( "|" ),
     5630        safeFrag = document.createDocumentFragment();
     5631
     5632        if ( safeFrag.createElement ) {
     5633                while ( list.length ) {
     5634                        safeFrag.createElement(
     5635                                list.pop()
     5636                        );
     5637                }
     5638        }
     5639        return safeFrag;
     5640}
     5641
     5642var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" +
     5643                "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
     5644        rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
    55315645        rleadingWhitespace = /^\s+/,
    55325646        rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
     
    55345648        rtbody = /<tbody/i,
    55355649        rhtml = /<|&#?\w+;/,
     5650        rnoInnerhtml = /<(?:script|style)/i,
    55365651        rnocache = /<(?:script|object|embed|option|style)/i,
     5652        rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"),
    55375653        // checked="checked" or checked
    55385654        rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
     
    55485664                area: [ 1, "<map>", "</map>" ],
    55495665                _default: [ 0, "", "" ]
    5550         };
     5666        },
     5667        safeFragment = createSafeFragment( document );
    55515668
    55525669wrapMap.optgroup = wrapMap.option;
     
    56265743
    56275744        wrap: function( html ) {
    5628                 return this.each(function() {
    5629                         jQuery( this ).wrapAll( html );
     5745                var isFunction = jQuery.isFunction( html );
     5746
     5747                return this.each(function(i) {
     5748                        jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
    56305749                });
    56315750        },
     
    56615780                        });
    56625781                } else if ( arguments.length ) {
    5663                         var set = jQuery(arguments[0]);
     5782                        var set = jQuery.clean( arguments );
    56645783                        set.push.apply( set, this.toArray() );
    56655784                        return this.pushStack( set, "before", arguments );
     
    56745793                } else if ( arguments.length ) {
    56755794                        var set = this.pushStack( this, "after", arguments );
    5676                         set.push.apply( set, jQuery(arguments[0]).toArray() );
     5795                        set.push.apply( set, jQuery.clean(arguments) );
    56775796                        return set;
    56785797                }
     
    57295848
    57305849                // See if we can take a shortcut and just use innerHTML
    5731                 } else if ( typeof value === "string" && !rnocache.test( value ) &&
     5850                } else if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
    57325851                        (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
    57335852                        !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
     
    58555974                                                // Fragments from the fragment cache must always be cloned and never used
    58565975                                                // in place.
    5857                                                 results.cacheable || (l > 1 && i < lastIndex) ?
     5976                                                results.cacheable || ( l > 1 && i < lastIndex ) ?
    58585977                                                        jQuery.clone( fragment, true, true ) :
    58595978                                                        fragment
     
    58846003        }
    58856004
    5886         var internalKey = jQuery.expando,
    5887                 oldData = jQuery.data( src ),
    5888                 curData = jQuery.data( dest, oldData );
    5889 
    5890         // Switch to use the internal data object, if it exists, for the next
    5891         // stage of data copying
    5892         if ( (oldData = oldData[ internalKey ]) ) {
    5893                 var events = oldData.events;
    5894                                 curData = curData[ internalKey ] = jQuery.extend({}, oldData);
    5895 
    5896                 if ( events ) {
    5897                         delete curData.handle;
    5898                         curData.events = {};
    5899 
    5900                         for ( var type in events ) {
    5901                                 for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
    5902                                         jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
    5903                                 }
    5904                         }
    5905                 }
     6005        var type, i, l,
     6006                oldData = jQuery._data( src ),
     6007                curData = jQuery._data( dest, oldData ),
     6008                events = oldData.events;
     6009
     6010        if ( events ) {
     6011                delete curData.handle;
     6012                curData.events = {};
     6013
     6014                for ( type in events ) {
     6015                        for ( i = 0, l = events[ type ].length; i < l; i++ ) {
     6016                                jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
     6017                        }
     6018                }
     6019        }
     6020
     6021        // make the cloned public data object a copy from the original
     6022        if ( curData.data ) {
     6023                curData.data = jQuery.extend( {}, curData.data );
    59066024        }
    59076025}
     
    59666084
    59676085jQuery.buildFragment = function( args, nodes, scripts ) {
    5968         var fragment, cacheable, cacheresults, doc;
    5969 
    5970   // nodes may contain either an explicit document object,
    5971   // a jQuery collection or context object.
    5972   // If nodes[0] contains a valid object to assign to doc
    5973   if ( nodes && nodes[0] ) {
    5974     doc = nodes[0].ownerDocument || nodes[0];
    5975   }
    5976 
    5977   // Ensure that an attr object doesn't incorrectly stand in as a document object
     6086        var fragment, cacheable, cacheresults, doc,
     6087        first = args[ 0 ];
     6088
     6089        // nodes may contain either an explicit document object,
     6090        // a jQuery collection or context object.
     6091        // If nodes[0] contains a valid object to assign to doc
     6092        if ( nodes && nodes[0] ) {
     6093                doc = nodes[0].ownerDocument || nodes[0];
     6094        }
     6095
     6096        // Ensure that an attr object doesn't incorrectly stand in as a document object
    59786097        // Chrome and Firefox seem to allow this to occur and will throw exception
    59796098        // Fixes #8950
     
    59866105        // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
    59876106        // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
    5988         if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
    5989                 args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
     6107        // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
     6108        if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
     6109                first.charAt(0) === "<" && !rnocache.test( first ) &&
     6110                (jQuery.support.checkClone || !rchecked.test( first )) &&
     6111                (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
    59906112
    59916113                cacheable = true;
    59926114
    5993                 cacheresults = jQuery.fragments[ args[0] ];
     6115                cacheresults = jQuery.fragments[ first ];
    59946116                if ( cacheresults && cacheresults !== 1 ) {
    59956117                        fragment = cacheresults;
     
    60036125
    60046126        if ( cacheable ) {
    6005                 jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
     6127                jQuery.fragments[ first ] = cacheresults ? fragment : 1;
    60066128        }
    60076129
     
    60296151                } else {
    60306152                        for ( var i = 0, l = insert.length; i < l; i++ ) {
    6031                                 var elems = (i > 0 ? this.clone(true) : this).get();
     6153                                var elems = ( i > 0 ? this.clone(true) : this ).get();
    60326154                                jQuery( insert[i] )[ original ]( elems );
    60336155                                ret = ret.concat( elems );
     
    60406162
    60416163function getAll( elem ) {
    6042         if ( "getElementsByTagName" in elem ) {
     6164        if ( typeof elem.getElementsByTagName !== "undefined" ) {
    60436165                return elem.getElementsByTagName( "*" );
    60446166
    6045         } else if ( "querySelectorAll" in elem ) {
     6167        } else if ( typeof elem.querySelectorAll !== "undefined" ) {
    60466168                return elem.querySelectorAll( "*" );
    60476169
     
    60596181// Finds all inputs and passes them to fixDefaultChecked
    60606182function findInputs( elem ) {
    6061         if ( jQuery.nodeName( elem, "input" ) ) {
     6183        var nodeName = ( elem.nodeName || "" ).toLowerCase();
     6184        if ( nodeName === "input" ) {
    60626185                fixDefaultChecked( elem );
    6063         } else if ( "getElementsByTagName" in elem ) {
     6186        // Skip scripts, get other children
     6187        } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
    60646188                jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
    60656189        }
     6190}
     6191
     6192// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
     6193function shimCloneNode( elem ) {
     6194        var div = document.createElement( "div" );
     6195        safeFragment.appendChild( div );
     6196
     6197        div.innerHTML = elem.outerHTML;
     6198        return div.firstChild;
    60666199}
    60676200
    60686201jQuery.extend({
    60696202        clone: function( elem, dataAndEvents, deepDataAndEvents ) {
    6070                 var clone = elem.cloneNode(true),
    6071                                 srcElements,
    6072                                 destElements,
    6073                                 i;
     6203                var srcElements,
     6204                        destElements,
     6205                        i,
     6206                        // IE<=8 does not properly clone detached, unknown element nodes
     6207                        clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ?
     6208                                elem.cloneNode( true ) :
     6209                                shimCloneNode( elem );
    60746210
    60756211                if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
     
    60836219                        cloneFixAttributes( elem, clone );
    60846220
    6085                         // Using Sizzle here is crazy slow, so we use getElementsByTagName
    6086                         // instead
     6221                        // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
    60876222                        srcElements = getAll( elem );
    60886223                        destElements = getAll( clone );
     
    61496284
    61506285                                        // Trim whitespace, otherwise indexOf won't work as expected
    6151                                         var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
     6286                                        var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
    61526287                                                wrap = wrapMap[ tag ] || wrapMap._default,
    61536288                                                depth = wrap[0],
    61546289                                                div = context.createElement("div");
     6290
     6291                                        // Append wrapper element to unknown element safe doc fragment
     6292                                        if ( context === document ) {
     6293                                                // Use the fragment we've already created for this document
     6294                                                safeFragment.appendChild( div );
     6295                                        } else {
     6296                                                // Use a fragment created with the owner document
     6297                                                createSafeFragment( context ).appendChild( div );
     6298                                        }
    61556299
    61566300                                        // Go to html and back, then peel off extra wrappers
     
    62346378
    62356379        cleanData: function( elems ) {
    6236                 var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
     6380                var data, id,
     6381                        cache = jQuery.cache,
     6382                        special = jQuery.event.special,
    62376383                        deleteExpando = jQuery.support.deleteExpando;
    62386384
     
    62456391
    62466392                        if ( id ) {
    6247                                 data = cache[ id ] && cache[ id ][ internalKey ];
     6393                                data = cache[ id ];
    62486394
    62496395                                if ( data && data.events ) {
     
    65076653                        var style = elem.style,
    65086654                                currentStyle = elem.currentStyle,
    6509                                 opacity = jQuery.isNaN( value ) ? "" : "alpha(opacity=" + value * 100 + ")",
     6655                                opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
    65106656                                filter = currentStyle && currentStyle.filter || style.filter || "";
    65116657
     
    65646710                name = name.replace( rupper, "-$1" ).toLowerCase();
    65656711
    6566                 if ( !(defaultView = elem.ownerDocument.defaultView) ) {
    6567                         return undefined;
    6568                 }
    6569 
    6570                 if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
     6712                if ( (defaultView = elem.ownerDocument.defaultView) &&
     6713                                (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
    65716714                        ret = computedStyle.getPropertyValue( name );
    65726715                        if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
     
    65816724if ( document.documentElement.currentStyle ) {
    65826725        currentStyle = function( elem, name ) {
    6583                 var left,
     6726                var left, rsLeft, uncomputed,
    65846727                        ret = elem.currentStyle && elem.currentStyle[ name ],
    6585                         rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],
    65866728                        style = elem.style;
     6729
     6730                // Avoid setting ret to empty string here
     6731                // so we don't default to auto
     6732                if ( ret === null && style && (uncomputed = style[ name ]) ) {
     6733                        ret = uncomputed;
     6734                }
    65876735
    65886736                // From the awesome hack by Dean Edwards
     
    65926740                // but a number that has a weird ending, we need to convert it to pixels
    65936741                if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
     6742
    65946743                        // Remember the original values
    65956744                        left = style.left;
     6745                        rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
    65966746
    65976747                        // Put in the new values to get a computed value out
     
    65996749                                elem.runtimeStyle.left = elem.currentStyle.left;
    66006750                        }
    6601                         style.left = name === "fontSize" ? "1em" : (ret || 0);
     6751                        style.left = name === "fontSize" ? "1em" : ( ret || 0 );
    66026752                        ret = style.pixelLeft + "px";
    66036753
     
    66196769        // Start with offset property
    66206770        var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
    6621                 which = name === "width" ? cssWidth : cssHeight;
     6771                which = name === "width" ? cssWidth : cssHeight,
     6772                i = 0,
     6773                len = which.length;
    66226774
    66236775        if ( val > 0 ) {
    66246776                if ( extra !== "border" ) {
    6625                         jQuery.each( which, function() {
     6777                        for ( ; i < len; i++ ) {
    66266778                                if ( !extra ) {
    6627                                         val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
     6779                                        val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
    66286780                                }
    66296781                                if ( extra === "margin" ) {
    6630                                         val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
     6782                                        val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
    66316783                                } else {
    6632                                         val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
    6633                                 }
    6634                         });
     6784                                        val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
     6785                                }
     6786                        }
    66356787                }
    66366788
     
    66486800        // Add padding, border, margin
    66496801        if ( extra ) {
    6650                 jQuery.each( which, function() {
    6651                         val += parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
     6802                for ( ; i < len; i++ ) {
     6803                        val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
    66526804                        if ( extra !== "padding" ) {
    6653                                 val += parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
     6805                                val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
    66546806                        }
    66556807                        if ( extra === "margin" ) {
    6656                                 val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
    6657                         }
    6658                 });
     6808                                val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
     6809                        }
     6810                }
    66596811        }
    66606812
     
    66676819                        height = elem.offsetHeight;
    66686820
    6669                 return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
     6821                return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
    66706822        };
    66716823
     
    67216873        // Document location segments
    67226874        ajaxLocParts,
    6723        
     6875
    67246876        // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
    67256877        allTypes = ["*/"] + ["*"];
     
    67606912
    67616913                        // For each dataType in the dataTypeExpression
    6762                         for(; i < length; i++ ) {
     6914                        for ( ; i < length; i++ ) {
    67636915                                dataType = dataTypes[ i ];
    67646916                                // We control if we're asked to add before
     
    67916943                selection;
    67926944
    6793         for(; i < length && ( executeOnly || !selection ); i++ ) {
     6945        for ( ; i < length && ( executeOnly || !selection ); i++ ) {
    67946946                selection = list[ i ]( options, originalOptions, jqXHR );
    67956947                // If we got redirected to another dataType
     
    68226974        var key, deep,
    68236975                flatOptions = jQuery.ajaxSettings.flatOptions || {};
    6824         for( key in src ) {
     6976        for ( key in src ) {
    68256977                if ( src[ key ] !== undefined ) {
    68266978                        ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
     
    69397091jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
    69407092        jQuery.fn[ o ] = function( f ){
    6941                 return this.bind( o, f );
     7093                return this.on( o, f );
    69427094        };
    69437095});
     
    70817233                        // Deferreds
    70827234                        deferred = jQuery.Deferred(),
    7083                         completeDeferred = jQuery._Deferred(),
     7235                        completeDeferred = jQuery.Callbacks( "once memory" ),
    70847236                        // Status-dependent callbacks
    70857237                        statusCode = s.statusCode || {},
     
    72317383                                // then normalize statusText and status for non-aborts
    72327384                                error = statusText;
    7233                                 if( !statusText || status ) {
     7385                                if ( !statusText || status ) {
    72347386                                        statusText = "error";
    72357387                                        if ( status < 0 ) {
     
    72607412
    72617413                        // Complete
    7262                         completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
     7414                        completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
    72637415
    72647416                        if ( fireGlobals ) {
     
    72757427                jqXHR.success = jqXHR.done;
    72767428                jqXHR.error = jqXHR.fail;
    7277                 jqXHR.complete = completeDeferred.done;
     7429                jqXHR.complete = completeDeferred.add;
    72787430
    72797431                // Status-dependent callbacks
     
    72827434                                var tmp;
    72837435                                if ( state < 2 ) {
    7284                                         for( tmp in map ) {
     7436                                        for ( tmp in map ) {
    72857437                                                statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
    72867438                                        }
     
    73597511
    73607512                                // if nothing was replaced, add timestamp to the end
    7361                                 s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
     7513                                s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
    73627514                        }
    73637515                }
     
    74337585                                // Simply rethrow otherwise
    74347586                                } else {
    7435                                         jQuery.error( e );
     7587                                        throw e;
    74367588                                }
    74377589                        }
     
    75377689
    75387690        // Fill responseXXX fields
    7539         for( type in responseFields ) {
     7691        for ( type in responseFields ) {
    75407692                if ( type in responses ) {
    75417693                        jqXHR[ responseFields[type] ] = responses[ type ];
     
    76167768
    76177769        // For each dataType in the chain
    7618         for( i = 1; i < length; i++ ) {
     7770        for ( i = 1; i < length; i++ ) {
    76197771
    76207772                // Create converters map
    76217773                // with lowercased keys
    76227774                if ( i === 1 ) {
    7623                         for( key in s.converters ) {
    7624                                 if( typeof key === "string" ) {
     7775                        for ( key in s.converters ) {
     7776                                if ( typeof key === "string" ) {
    76257777                                        converters[ key.toLowerCase() ] = s.converters[ key ];
    76267778                                }
     
    76337785
    76347786                // If current is auto dataType, update it to prev
    7635                 if( current === "*" ) {
     7787                if ( current === "*" ) {
    76367788                        current = prev;
    76377789                // If no auto and dataTypes are actually different
     
    76457797                        if ( !conv ) {
    76467798                                conv2 = undefined;
    7647                                 for( conv1 in converters ) {
     7799                                for ( conv1 in converters ) {
    76487800                                        tmp = conv1.split( " " );
    76497801                                        if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
     
    80848236
    80858237                if ( speed || speed === 0 ) {
    8086                         return this.animate( genFx("show", 3), speed, easing, callback);
     8238                        return this.animate( genFx("show", 3), speed, easing, callback );
    80878239
    80888240                } else {
    80898241                        for ( var i = 0, j = this.length; i < j; i++ ) {
    8090                                 elem = this[i];
     8242                                elem = this[ i ];
    80918243
    80928244                                if ( elem.style ) {
     
    81028254                                        // in a stylesheet to whatever the default browser style is
    81038255                                        // for such an element
    8104                                         if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
    8105                                                 jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
     8256                                        if ( display === "" && jQuery.css(elem, "display") === "none" ) {
     8257                                                jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
    81068258                                        }
    81078259                                }
     
    81118263                        // to avoid the constant reflow
    81128264                        for ( i = 0; i < j; i++ ) {
    8113                                 elem = this[i];
     8265                                elem = this[ i ];
    81148266
    81158267                                if ( elem.style ) {
     
    81178269
    81188270                                        if ( display === "" || display === "none" ) {
    8119                                                 elem.style.display = jQuery._data(elem, "olddisplay") || "";
     8271                                                elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
    81208272                                        }
    81218273                                }
     
    81318283
    81328284                } else {
    8133                         for ( var i = 0, j = this.length; i < j; i++ ) {
    8134                                 if ( this[i].style ) {
    8135                                         var display = jQuery.css( this[i], "display" );
    8136 
    8137                                         if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) {
    8138                                                 jQuery._data( this[i], "olddisplay", display );
     8285                        var elem, display,
     8286                                i = 0,
     8287                                j = this.length;
     8288
     8289                        for ( ; i < j; i++ ) {
     8290                                elem = this[i];
     8291                                if ( elem.style ) {
     8292                                        display = jQuery.css( elem, "display" );
     8293
     8294                                        if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
     8295                                                jQuery._data( elem, "olddisplay", display );
    81398296                                        }
    81408297                                }
     
    81818338
    81828339        animate: function( prop, speed, easing, callback ) {
    8183                 var optall = jQuery.speed(speed, easing, callback);
     8340                var optall = jQuery.speed( speed, easing, callback );
    81848341
    81858342                if ( jQuery.isEmptyObject( prop ) ) {
     
    81908347                prop = jQuery.extend( {}, prop );
    81918348
    8192                 return this[ optall.queue === false ? "each" : "queue" ](function() {
     8349                function doAnimation() {
    81938350                        // XXX 'this' does not always have a nodeName when running the
    81948351                        // test suite
     
    82018358                                isElement = this.nodeType === 1,
    82028359                                hidden = isElement && jQuery(this).is(":hidden"),
    8203                                 name, val, p,
    8204                                 display, e,
    8205                                 parts, start, end, unit;
     8360                                name, val, p, e,
     8361                                parts, start, end, unit,
     8362                                method;
    82068363
    82078364                        // will store per property easing and be used to determine when an animation is complete
     
    82398396
    82408397                                        // Set display property to inline-block for height/width
    8241                                         // animations on inline elements that are having width/height
    8242                                         // animated
     8398                                        // animations on inline elements that are having width/height animated
    82438399                                        if ( jQuery.css( this, "display" ) === "inline" &&
    82448400                                                        jQuery.css( this, "float" ) === "none" ) {
    8245                                                 if ( !jQuery.support.inlineBlockNeedsLayout ) {
     8401
     8402                                                // inline-level elements accept inline-block;
     8403                                                // block-level elements need to be inline with layout
     8404                                                if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
    82468405                                                        this.style.display = "inline-block";
    82478406
    82488407                                                } else {
    8249                                                         display = defaultDisplay( this.nodeName );
    8250 
    8251                                                         // inline-level elements accept inline-block;
    8252                                                         // block-level elements need to be inline with layout
    8253                                                         if ( display === "inline" ) {
    8254                                                                 this.style.display = "inline-block";
    8255 
    8256                                                         } else {
    8257                                                                 this.style.display = "inline";
    8258                                                                 this.style.zoom = 1;
    8259                                                         }
     8408                                                        this.style.zoom = 1;
    82608409                                                }
    82618410                                        }
     
    82718420                                val = prop[ p ];
    82728421
    8273                                 if ( rfxtypes.test(val) ) {
    8274                                         e[ val === "toggle" ? hidden ? "show" : "hide" : val ]();
     8422                                if ( rfxtypes.test( val ) ) {
     8423
     8424                                        // Tracks whether to show or hide based on private
     8425                                        // data attached to the element
     8426                                        method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
     8427                                        if ( method ) {
     8428                                                jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
     8429                                                e[ method ]();
     8430                                        } else {
     8431                                                e[ val ]();
     8432                                        }
    82758433
    82768434                                } else {
     
    82858443                                                if ( unit !== "px" ) {
    82868444                                                        jQuery.style( this, p, (end || 1) + unit);
    8287                                                         start = ((end || 1) / e.cur()) * start;
     8445                                                        start = ( (end || 1) / e.cur() ) * start;
    82888446                                                        jQuery.style( this, p, start + unit);
    82898447                                                }
     
    83048462                        // For JS strict compliance
    83058463                        return true;
    8306                 });
    8307         },
    8308 
    8309         stop: function( clearQueue, gotoEnd ) {
    8310                 if ( clearQueue ) {
    8311                         this.queue([]);
    8312                 }
    8313 
    8314                 this.each(function() {
    8315                         var timers = jQuery.timers,
    8316                                 i = timers.length;
     8464                }
     8465
     8466                return optall.queue === false ?
     8467                        this.each( doAnimation ) :
     8468                        this.queue( optall.queue, doAnimation );
     8469        },
     8470
     8471        stop: function( type, clearQueue, gotoEnd ) {
     8472                if ( typeof type !== "string" ) {
     8473                        gotoEnd = clearQueue;
     8474                        clearQueue = type;
     8475                        type = undefined;
     8476                }
     8477                if ( clearQueue && type !== false ) {
     8478                        this.queue( type || "fx", [] );
     8479                }
     8480
     8481                return this.each(function() {
     8482                        var index,
     8483                                hadTimers = false,
     8484                                timers = jQuery.timers,
     8485                                data = jQuery._data( this );
     8486
    83178487                        // clear marker counters if we know they won't be
    83188488                        if ( !gotoEnd ) {
    83198489                                jQuery._unmark( true, this );
    83208490                        }
    8321                         while ( i-- ) {
    8322                                 if ( timers[i].elem === this ) {
    8323                                         if (gotoEnd) {
     8491
     8492                        function stopQueue( elem, data, index ) {
     8493                                var hooks = data[ index ];
     8494                                jQuery.removeData( elem, index, true );
     8495                                hooks.stop( gotoEnd );
     8496                        }
     8497
     8498                        if ( type == null ) {
     8499                                for ( index in data ) {
     8500                                        if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
     8501                                                stopQueue( this, data, index );
     8502                                        }
     8503                                }
     8504                        } else if ( data[ index = type + ".run" ] && data[ index ].stop ){
     8505                                stopQueue( this, data, index );
     8506                        }
     8507
     8508                        for ( index = timers.length; index--; ) {
     8509                                if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
     8510                                        if ( gotoEnd ) {
     8511
    83248512                                                // force the next step to be the last
    8325                                                 timers[i](true);
    8326                                         }
    8327 
    8328                                         timers.splice(i, 1);
    8329                                 }
     8513                                                timers[ index ]( true );
     8514                                        } else {
     8515                                                timers[ index ].saveState();
     8516                                        }
     8517                                        hadTimers = true;
     8518                                        timers.splice( index, 1 );
     8519                                }
     8520                        }
     8521
     8522                        // start the next in the queue if the last step wasn't forced
     8523                        // timers currently will call their complete callbacks, which will dequeue
     8524                        // but only if they were gotoEnd
     8525                        if ( !( gotoEnd && hadTimers ) ) {
     8526                                jQuery.dequeue( this, type );
    83308527                        }
    83318528                });
    8332 
    8333                 // start the next in the queue if the last step wasn't forced
    8334                 if ( !gotoEnd ) {
    8335                         this.dequeue();
    8336                 }
    8337 
    8338                 return this;
    83398529        }
    83408530
     
    83558545        var obj = {};
    83568546
    8357         jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
     8547        jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
    83588548                obj[ this ] = type;
    83598549        });
     
    83648554// Generate shortcuts for custom animations
    83658555jQuery.each({
    8366         slideDown: genFx("show", 1),
    8367         slideUp: genFx("hide", 1),
    8368         slideToggle: genFx("toggle", 1),
     8556        slideDown: genFx( "show", 1 ),
     8557        slideUp: genFx( "hide", 1 ),
     8558        slideToggle: genFx( "toggle", 1 ),
    83698559        fadeIn: { opacity: "show" },
    83708560        fadeOut: { opacity: "hide" },
     
    83788568jQuery.extend({
    83798569        speed: function( speed, easing, fn ) {
    8380                 var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
     8570                var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
    83818571                        complete: fn || !fn && easing ||
    83828572                                jQuery.isFunction( speed ) && speed,
    83838573                        duration: speed,
    8384                         easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
     8574                        easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
    83858575                };
    83868576
    83878577                opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
    8388                         opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
     8578                        opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
     8579
     8580                // normalize opt.queue - true/undefined/null -> "fx"
     8581                if ( opt.queue == null || opt.queue === true ) {
     8582                        opt.queue = "fx";
     8583                }
    83898584
    83908585                // Queueing
    83918586                opt.old = opt.complete;
     8587
    83928588                opt.complete = function( noUnmark ) {
    83938589                        if ( jQuery.isFunction( opt.old ) ) {
     
    83958591                        }
    83968592
    8397                         if ( opt.queue !== false ) {
    8398                                 jQuery.dequeue( this );
     8593                        if ( opt.queue ) {
     8594                                jQuery.dequeue( this, opt.queue );
    83998595                        } else if ( noUnmark !== false ) {
    84008596                                jQuery._unmark( this );
     
    84108606                },
    84118607                swing: function( p, n, firstNum, diff ) {
    8412                         return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
     8608                        return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum;
    84138609                }
    84148610        },
     
    84338629                }
    84348630
    8435                 (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
     8631                ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
    84368632        },
    84378633
    84388634        // Get the current size
    84398635        cur: function() {
    8440                 if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
     8636                if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
    84418637                        return this.elem[ this.prop ];
    84428638                }
     
    84568652
    84578653                this.startTime = fxNow || createFxNow();
    8458                 this.start = from;
    84598654                this.end = to;
     8655                this.now = this.start = from;
     8656                this.pos = this.state = 0;
    84608657                this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
    8461                 this.now = this.start;
    8462                 this.pos = this.state = 0;
    84638658
    84648659                function t( gotoEnd ) {
    8465                         return self.step(gotoEnd);
    8466                 }
    8467 
     8660                        return self.step( gotoEnd );
     8661                }
     8662
     8663                t.queue = this.options.queue;
    84688664                t.elem = this.elem;
     8665                t.saveState = function() {
     8666                        if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
     8667                                jQuery._data( self.elem, "fxshow" + self.prop, self.start );
     8668                        }
     8669                };
    84698670
    84708671                if ( t() && jQuery.timers.push(t) && !timerId ) {
     
    84758676        // Simple 'show' function
    84768677        show: function() {
     8678                var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
     8679
    84778680                // Remember where we started, so that we can go back to it later
    8478                 this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
     8681                this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
    84798682                this.options.show = true;
    84808683
    84818684                // Begin the animation
    8482                 // Make sure that we start at a small width/height to avoid any
    8483                 // flash of content
    8484                 this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
     8685                // Make sure that we start at a small width/height to avoid any flash of content
     8686                if ( dataShow !== undefined ) {
     8687                        // This show is picking up where a previous hide or show left off
     8688                        this.custom( this.cur(), dataShow );
     8689                } else {
     8690                        this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
     8691                }
    84858692
    84868693                // Start by showing the element
     
    84918698        hide: function() {
    84928699                // Remember where we started, so that we can go back to it later
    8493                 this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
     8700                this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
    84948701                this.options.hide = true;
    84958702
    84968703                // Begin the animation
    8497                 this.custom(this.cur(), 0);
     8704                this.custom( this.cur(), 0 );
    84988705        },
    84998706
    85008707        // Each step of an animation
    85018708        step: function( gotoEnd ) {
    8502                 var t = fxNow || createFxNow(),
     8709                var p, n, complete,
     8710                        t = fxNow || createFxNow(),
    85038711                        done = true,
    85048712                        elem = this.elem,
    8505                         options = this.options,
    8506                         i, n;
     8713                        options = this.options;
    85078714
    85088715                if ( gotoEnd || t >= options.duration + this.startTime ) {
     
    85138720                        options.animatedProperties[ this.prop ] = true;
    85148721
    8515                         for ( i in options.animatedProperties ) {
    8516                                 if ( options.animatedProperties[i] !== true ) {
     8722                        for ( p in options.animatedProperties ) {
     8723                                if ( options.animatedProperties[ p ] !== true ) {
    85178724                                        done = false;
    85188725                                }
     
    85238730                                if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
    85248731
    8525                                         jQuery.each( [ "", "X", "Y" ], function (index, value) {
    8526                                                 elem.style[ "overflow" + value ] = options.overflow[index];
     8732                                        jQuery.each( [ "", "X", "Y" ], function( index, value ) {
     8733                                                elem.style[ "overflow" + value ] = options.overflow[ index ];
    85278734                                        });
    85288735                                }
     
    85308737                                // Hide the element if the "hide" operation was done
    85318738                                if ( options.hide ) {
    8532                                         jQuery(elem).hide();
     8739                                        jQuery( elem ).hide();
    85338740                                }
    85348741
    85358742                                // Reset the properties, if the item has been hidden or shown
    85368743                                if ( options.hide || options.show ) {
    8537                                         for ( var p in options.animatedProperties ) {
    8538                                                 jQuery.style( elem, p, options.orig[p] );
     8744                                        for ( p in options.animatedProperties ) {
     8745                                                jQuery.style( elem, p, options.orig[ p ] );
     8746                                                jQuery.removeData( elem, "fxshow" + p, true );
     8747                                                // Toggle data is no longer needed
     8748                                                jQuery.removeData( elem, "toggle" + p, true );
    85398749                                        }
    85408750                                }
    85418751
    85428752                                // Execute the complete function
    8543                                 options.complete.call( elem );
     8753                                // in the event that the complete function throws an exception
     8754                                // we must ensure it won't be called twice. #5684
     8755
     8756                                complete = options.complete;
     8757                                if ( complete ) {
     8758
     8759                                        options.complete = false;
     8760                                        complete.call( elem );
     8761                                }
    85448762                        }
    85458763
     
    85558773
    85568774                                // Perform the easing function, defaults to swing
    8557                                 this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, options.duration );
    8558                                 this.now = this.start + ((this.end - this.start) * this.pos);
     8775                                this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
     8776                                this.now = this.start + ( (this.end - this.start) * this.pos );
    85598777                        }
    85608778                        // Perform the next step of the animation
     
    85688786jQuery.extend( jQuery.fx, {
    85698787        tick: function() {
    8570                 for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) {
    8571                         if ( !timers[i]() ) {
    8572                                 timers.splice(i--, 1);
     8788                var timer,
     8789                        timers = jQuery.timers,
     8790                        i = 0;
     8791
     8792                for ( ; i < timers.length; i++ ) {
     8793                        timer = timers[ i ];
     8794                        // Checks the timer has not already been removed
     8795                        if ( !timer() && timers[ i ] === timer ) {
     8796                                timers.splice( i--, 1 );
    85738797                        }
    85748798                }
     
    86008824                _default: function( fx ) {
    86018825                        if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
    8602                                 fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
     8826                                fx.elem.style[ fx.prop ] = fx.now + fx.unit;
    86038827                        } else {
    86048828                                fx.elem[ fx.prop ] = fx.now;
     
    86068830                }
    86078831        }
     8832});
     8833
     8834// Adds width/height step functions
     8835// Do not set anything below 0
     8836jQuery.each([ "width", "height" ], function( i, prop ) {
     8837        jQuery.fx.step[ prop ] = function( fx ) {
     8838                jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
     8839        };
    86088840});
    86098841
     
    86248856                        elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
    86258857                        display = elem.css( "display" );
    8626 
    86278858                elem.remove();
    86288859
     
    86528883
    86538884                        display = jQuery.css( elem, "display" );
    8654 
    86558885                        body.removeChild( iframe );
    86568886                }
     
    87288958                        return jQuery.offset.bodyOffset( elem );
    87298959                }
    8730 
    8731                 jQuery.offset.initialize();
    87328960
    87338961                var computedStyle,
     
    87438971
    87448972                while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
    8745                         if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
     8973                        if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
    87468974                                break;
    87478975                        }
     
    87558983                                left += elem.offsetLeft;
    87568984
    8757                                 if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
     8985                                if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
    87588986                                        top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
    87598987                                        left += parseFloat( computedStyle.borderLeftWidth ) || 0;
     
    87648992                        }
    87658993
    8766                         if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
     8994                        if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
    87678995                                top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
    87688996                                left += parseFloat( computedStyle.borderLeftWidth ) || 0;
     
    87779005                }
    87789006
    8779                 if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
     9007                if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
    87809008                        top  += Math.max( docElem.scrollTop, body.scrollTop );
    87819009                        left += Math.max( docElem.scrollLeft, body.scrollLeft );
     
    87879015
    87889016jQuery.offset = {
    8789         initialize: function() {
    8790                 var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
    8791                         html = "<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>";
    8792 
    8793                 jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
    8794 
    8795                 container.innerHTML = html;
    8796                 body.insertBefore( container, body.firstChild );
    8797                 innerDiv = container.firstChild;
    8798                 checkDiv = innerDiv.firstChild;
    8799                 td = innerDiv.nextSibling.firstChild.firstChild;
    8800 
    8801                 this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
    8802                 this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
    8803 
    8804                 checkDiv.style.position = "fixed";
    8805                 checkDiv.style.top = "20px";
    8806 
    8807                 // safari subtracts parent border width here which is 5px
    8808                 this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
    8809                 checkDiv.style.position = checkDiv.style.top = "";
    8810 
    8811                 innerDiv.style.overflow = "hidden";
    8812                 innerDiv.style.position = "relative";
    8813 
    8814                 this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
    8815 
    8816                 this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
    8817 
    8818                 body.removeChild( container );
    8819                 jQuery.offset.initialize = jQuery.noop;
    8820         },
    88219017
    88229018        bodyOffset: function( body ) {
     
    88249020                        left = body.offsetLeft;
    88259021
    8826                 jQuery.offset.initialize();
    8827 
    8828                 if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
     9022                if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
    88299023                        top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
    88309024                        left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
     
    88469040                        curCSSTop = jQuery.css( elem, "top" ),
    88479041                        curCSSLeft = jQuery.css( elem, "left" ),
    8848                         calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
     9042                        calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
    88499043                        props = {}, curPosition = {}, curTop, curLeft;
    88509044
     
    88639057                }
    88649058
    8865                 if (options.top != null) {
    8866                         props.top = (options.top - curOffset.top) + curTop;
    8867                 }
    8868                 if (options.left != null) {
    8869                         props.left = (options.left - curOffset.left) + curLeft;
     9059                if ( options.top != null ) {
     9060                        props.top = ( options.top - curOffset.top ) + curTop;
     9061                }
     9062                if ( options.left != null ) {
     9063                        props.left = ( options.left - curOffset.left ) + curLeft;
    88709064                }
    88719065
     
    88809074
    88819075jQuery.fn.extend({
     9076
    88829077        position: function() {
    88839078                if ( !this[0] ) {
     
    89829177        jQuery.fn[ "inner" + name ] = function() {
    89839178                var elem = this[0];
    8984                 return elem && elem.style ?
     9179                return elem ?
     9180                        elem.style ?
    89859181                        parseFloat( jQuery.css( elem, type, "padding" ) ) :
     9182                        this[ type ]() :
    89869183                        null;
    89879184        };
     
    89909187        jQuery.fn[ "outer" + name ] = function( margin ) {
    89919188                var elem = this[0];
    8992                 return elem && elem.style ?
     9189                return elem ?
     9190                        elem.style ?
    89939191                        parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
     9192                        this[ type ]() :
    89949193                        null;
    89959194        };
     
    90319230                                ret = parseFloat( orig );
    90329231
    9033                         return jQuery.isNaN( ret ) ? orig : ret;
     9232                        return jQuery.isNumeric( ret ) ? ret : orig;
    90349233
    90359234                // Set the width or height on the element (default to pixels if value is unitless)
     
    90429241
    90439242
     9243
     9244
    90449245// Expose jQuery to the global object
    90459246window.jQuery = window.$ = jQuery;
    9046 })(window);
     9247
     9248// Expose jQuery as an AMD module, but only for AMD loaders that
     9249// understand the issues with loading multiple versions of jQuery
     9250// in a page that all might call define(). The loader will indicate
     9251// they have special allowances for multiple jQuery versions by
     9252// specifying define.amd.jQuery = true. Register as a named module,
     9253// since jQuery can be concatenated with other files that may use define,
     9254// but not use a proper concatenation script that understands anonymous
     9255// AMD modules. A named AMD is safest and most robust way to register.
     9256// Lowercase jquery is used because AMD module names are derived from
     9257// file names, and jQuery is normally delivered in a lowercase file name.
     9258// Do this after creating the global so that if an AMD module wants to call
     9259// noConflict to hide this version of jQuery, it will work.
     9260if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
     9261        define( "jquery", [], function () { return jQuery; } );
     9262}
     9263
     9264
     9265
     9266})( window );
  • trunk/themes/default/js/jquery.min.js

    r12525 r13052  
    1 /*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */
    2 (function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete
    3 t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},F=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?a.type:"",c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var K={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=S.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bb.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean
    4 (a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bv(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bv)return bv(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cr(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cq("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cq("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cr(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||co(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cs=/^t(?:able|d|h)$/i,ct=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cu(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cs.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<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>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
     1/*! jQuery v1.7.1 jquery.com | jquery.org/license */
     2(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
     3f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
     4{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
  • trunk/themes/default/template/index.tpl

    r12908 r13052  
    88                        <span class="pwg-icon pwg-icon-sort">&nbsp;</span><span class="pwg-button-text">{'Sort order'|@translate}</span>
    99                </a>
    10                 <div id="sortOrderBox" style="display:none; text-align:left" onclick="toggleSortOrderBox()">
     10                <div id="sortOrderBox" style="display:none; text-align:left" onclick="toggleSortOrderBox()" onmouseout="e=event.toElement||event.relatedTarget;if(e.parentNode!=this&amp;&amp;e!=this)toggleSortOrderBox()">
    1111                        {'Sort order'|@translate}:
    1212                        {foreach from=$image_orders item=image_order}<br>
     
    1919                </div>
    2020                {footer_script}{literal}
    21 function toggleSortOrderBox()
    22 {
     21function toggleSortOrderBox() {
    2322        var elt = document.getElementById("sortOrderBox"),
    2423                ePos = document.getElementById("sortOrderLink");
    25         if (elt.style.display==="none")
    26         {
     24        if (elt.style.display==="none") {
    2725                elt.style.position = "absolute";
    28                 elt.style.left = (ePos.offsetLeft) + "px";
    29                 elt.style.top = (ePos.offsetTop + ePos.offsetHeight) + "px";
     26                elt.style.left = ePos.offsetLeft+"px";
     27                elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
    3028                elt.style.display="";
    3129        }
     
    4139                        <span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo Sizes'|@translate}</span>
    4240                </a>
    43                 <div id="derivativeSwitchBox" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()">
     41                <div id="derivativeSwitchBox" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()" onmouseout="e=event.toElement||event.relatedTarget;if(e.parentNode!=this&amp;&amp;e!=this)toggleImageDerivativesBox()">
    4442                        {foreach from=$image_derivatives item=image_derivative name=deriv_loop}{if !$smarty.foreach.deriv_loop.first}<br>{/if}
    4543                        {if $image_derivative.SELECTED}
     
    5149                </div>
    5250                {footer_script}{literal}
    53 function toggleImageDerivativesBox()
    54 {
     51function toggleImageDerivativesBox() {
    5552        var elt = document.getElementById("derivativeSwitchBox"),
    5653                ePos = document.getElementById("derivativeChooseLink");
    57         if (elt.style.display==="none")
    58         {
     54        if (elt.style.display==="none") {
    5955                elt.style.position = "absolute";
    60                 elt.style.left = (ePos.offsetLeft) + "px";
    61                 elt.style.top = (ePos.offsetTop + ePos.offsetHeight) + "px";
     56                elt.style.left = ePos.offsetLeft+"px";
     57                elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
    6258                elt.style.display="";
    6359        }
Note: See TracChangeset for help on using the changeset viewer.