screw_server 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/Gemfile.run.lock +2 -2
  2. data/assets/vendor/jslint/jslint.js +1 -1
  3. data/assets/vendor/screw-unit/EXAMPLE.html +4 -4
  4. data/assets/vendor/screw-unit/example/models/man.js +1 -1
  5. data/assets/vendor/screw-unit/example/spec/models/cat_spec.js +5 -5
  6. data/assets/vendor/screw-unit/example/spec/models/man_spec.js +4 -4
  7. data/assets/vendor/screw-unit/example/spec/suite.html +4 -4
  8. data/assets/vendor/screw-unit/lib/jquery-1.2.6.js +4 -4
  9. data/assets/vendor/screw-unit/lib/jquery.print.js +1 -1
  10. data/assets/vendor/screw-unit/lib/screw.behaviors.js +12 -12
  11. data/assets/vendor/screw-unit/lib/screw.builder.js +1 -1
  12. data/assets/vendor/screw-unit/lib/screw.css +2 -2
  13. data/assets/vendor/screw-unit/lib/screw.events.js +2 -2
  14. data/assets/vendor/screw-unit/lib/screw.matchers.js +5 -5
  15. data/assets/vendor/screw-unit/spec/behaviors_spec.js +18 -18
  16. data/assets/vendor/screw-unit/spec/matchers_spec.js +20 -20
  17. data/assets/vendor/screw-unit/spec/print_spec.js +16 -16
  18. data/assets/vendor/smoke/lib/smoke.core.js +7 -7
  19. data/assets/vendor/smoke/lib/smoke.mock.js +6 -6
  20. data/assets/vendor/smoke/lib/smoke.stub.js +1 -1
  21. data/assets/vendor/smoke/spec/core_spec.js +14 -14
  22. data/assets/vendor/smoke/spec/mock_spec.js +46 -46
  23. data/assets/vendor/smoke/spec/screw_integration_spec.js +2 -2
  24. data/assets/vendor/smoke/spec/stub_spec.js +2 -2
  25. data/assets/vendor/smoke/spec/su/jquery-1.2.3.js +203 -203
  26. data/assets/vendor/smoke/spec/su/jquery.print.js +3 -3
  27. data/assets/vendor/smoke/spec/su/screw.behaviors.js +12 -12
  28. data/assets/vendor/smoke/spec/su/screw.events.js +1 -1
  29. data/assets/vendor/smoke/spec/su/screw.matchers.js +9 -9
  30. data/assets/vendor/smoke/spec/suite.html +1 -1
  31. data/bin/screw_server +3 -1
  32. data/bundler_version.rb +1 -0
  33. data/lib/screw_server/app.rb +12 -8
  34. data/lib/screw_server/base.rb +3 -3
  35. data/lib/screw_server/spec_file.rb +7 -4
  36. data/screw_server.gemspec +11 -3
  37. data/views/run_spec.haml +3 -2
  38. metadata +9 -8
@@ -1,11 +1,11 @@
1
1
  Screw.Unit(function() {
2
- describe("mocking", function() {
3
- describe("basics", function() {
2
+ describe("mocking", function() {
3
+ describe("basics", function() {
4
4
  it("allows stubbing directly on mock objects", function() {
5
5
  mockObj = mock().stub('bar').and_return('baz');
6
6
  expect(mockObj.bar()).to(equal, 'baz');
7
7
  });
8
-
8
+
9
9
  it("should check an exact call count", function() {
10
10
  var m = mock()
11
11
  m.should_receive('bar').exactly('twice');
@@ -33,7 +33,7 @@ Screw.Unit(function() {
33
33
 
34
34
  it("should fail when an expectation is called too many times", function() {
35
35
  var m = mock();
36
- m.should_receive('bar').exactly('once');
36
+ m.should_receive('bar').exactly('once');
37
37
  m.bar();
38
38
  m.bar();
39
39
  try {
@@ -56,19 +56,19 @@ Screw.Unit(function() {
56
56
  expect(e).to(equal, 'expected bar() to be called exactly 1 times but it got called 0 times');
57
57
  }
58
58
  });
59
-
59
+
60
60
  it("should not check arguments when with_arguments is not used", function() {
61
61
  var m = mock()
62
62
  m.should_receive('bar').exactly('once');
63
63
  m.bar(1);
64
64
  });
65
-
65
+
66
66
  it("should check a minimum call count", function() {
67
67
  var m = mock()
68
68
  m.should_receive('bar').at_least('once');
69
69
  m.bar();
70
70
  });
71
-
71
+
72
72
  it("should check a minimum call count when defined via must_receive shortcut", function() {
73
73
  var m = mock()
74
74
  m.must_receive('bar');
@@ -81,34 +81,34 @@ Screw.Unit(function() {
81
81
  m.bar();
82
82
  m.bar();
83
83
  });
84
-
84
+
85
85
  it("should allow return values directly from mocks",function() {
86
86
  var m = mock()
87
87
  m.should_receive('bar').exactly('once').and_return('hello');
88
88
  expect(m.bar()).to(equal, 'hello');
89
89
  });
90
90
  });
91
-
92
- describe("with argument conditions", function() {
91
+
92
+ describe("with argument conditions", function() {
93
93
  it("should only mock the exact method signature when with_arguments is used", function() {
94
94
  mockObj = mock()
95
95
  baz = {a:'a dummy obj'}
96
- mockObj.should_receive('foo').with_arguments('bar',baz).and_return('foobar');
96
+ mockObj.should_receive('foo').with_arguments('bar',baz).and_return('foobar');
97
97
  expect(mockObj.foo('bar',baz)).to(equal, 'foobar');
98
98
  });
99
-
99
+
100
100
  it("should throw an arguments mismatched error if the arguments aren't matched", function() {
101
101
  mockObj = mock()
102
- mockObj.should_receive('foo').with_arguments('bar').and_return('foobar');
103
- try {
104
- mockObj.foo('chicken');
105
- } catch(e) {
102
+ mockObj.should_receive('foo').with_arguments('bar').and_return('foobar');
103
+ try {
104
+ mockObj.foo('chicken');
105
+ } catch(e) {
106
106
  expect(e).to(equal, 'expected foo with ("bar") but received it with ("chicken")')
107
107
  }
108
108
  });
109
109
  it("should allow mocking multiple method signatures with different returns", function() {
110
110
  mockObj = mock()
111
- mockObj.should_receive('foo').with_arguments('bar').and_return('foobar');
111
+ mockObj.should_receive('foo').with_arguments('bar').and_return('foobar');
112
112
  mockObj.should_receive('foo').with_arguments('mouse').and_return('cheese');
113
113
  expect(mockObj.foo('mouse')).to(equal, 'cheese');
114
114
  expect(mockObj.foo('bar')).to(equal, 'foobar');
@@ -126,7 +126,7 @@ Screw.Unit(function() {
126
126
  expect(mockObj.foo("a", "lot", "of", "arguments")).to(equal, "bar");
127
127
  });
128
128
  });
129
-
129
+
130
130
  describe("with function execution", function() {
131
131
  it("should execute the function", function() {
132
132
  mockObj = mock();
@@ -212,41 +212,41 @@ Screw.Unit(function() {
212
212
  obj = { say: "hello", shout: function() { return this.say.toUpperCase(); } }
213
213
  mockObj = mock(obj);
214
214
  });
215
-
215
+
216
216
  it("should leave original properties intact", function() {
217
217
  expect(mockObj.say).to(equal,'hello');
218
218
  });
219
-
219
+
220
220
  it("should leave original functions intact", function() {
221
221
  expect(mockObj.shout()).to(equal,'HELLO');
222
222
  });
223
-
223
+
224
224
  it("should add methods to allow stubbing and mocking on the objects properties", function() {
225
225
  expect(mockObj.should_receive).to_not(equal,undefined);
226
226
  expect(mockObj.stub).to_not(equal,undefined);
227
227
  });
228
-
228
+
229
229
  it("shouldn't break Arrays", function() {
230
230
  mockObj = mock([0,1,2,3]);
231
231
  expect(mockObj[2]).to(equal,2);
232
232
  expect(mockObj.length).to(equal,4);
233
233
  });
234
-
234
+
235
235
  it("should place expectations on existing methods destructively", function() {
236
236
  myMock = mock({ say: "hello", shout: function() { throw "FAIL!" } });
237
237
  myMock.should_receive('shout').exactly('once');
238
238
  myMock.shout();
239
239
  });
240
240
  });
241
-
241
+
242
242
  describe("proper teardown of mocks on global variables", function(){
243
243
  var SomeGlobal = { say: "hello", shout: function() { return this.say.toUpperCase(); } };
244
-
244
+
245
245
  it("when mocked in one test...", function(){
246
246
  mock(SomeGlobal).should_receive("shout").and_return("some string");
247
247
  expect(SomeGlobal.shout()).to(equal, "some string");
248
248
  });
249
-
249
+
250
250
  it("should not affect a later test", function(){
251
251
  expect(SomeGlobal.shout()).to(equal, "HELLO");
252
252
  });
@@ -261,22 +261,22 @@ Screw.Unit(function() {
261
261
  expect(myMock.shout()).to(equal,'HELLO');
262
262
  });
263
263
  });
264
-
264
+
265
265
  describe("reseting mocks", function(){
266
266
  it("should remove all mocking data from an object", function(){
267
267
  var obj = { say: "hello", shout: function() { return this.say.toUpperCase(); } };
268
268
  mock(obj).should_receive("shout").and_return("some string");
269
-
269
+
270
270
  expect(obj._valuesBeforeMocking).to_not(equal, null);
271
271
  expect(obj._expectations).to_not(equal, null);
272
272
  expect(obj.stub).to_not(equal, null);
273
273
  expect(obj.should_receive).to_not(equal, null);
274
274
  expect(obj._checkExpectations).to_not(equal, null);
275
275
  expect(obj._resetMocks).to_not(equal, null);
276
-
276
+
277
277
  obj._resetMocks();
278
278
  Smoke.mocks = [];
279
-
279
+
280
280
  expect(obj._valuesBeforeMocking).to(equal, null);
281
281
  expect(obj._expectations).to(equal, null);
282
282
  expect(obj.stub).to(equal, null);
@@ -284,18 +284,18 @@ Screw.Unit(function() {
284
284
  expect(obj._checkExpectations).to(equal, null);
285
285
  expect(obj._resetMocks).to(equal, null);
286
286
  });
287
-
287
+
288
288
  it("should replace the original functionality to the object", function(){
289
289
  var obj = { say: "hello", shout: function() { return this.say.toUpperCase(); } };
290
290
  mock(obj).should_receive("shout").and_return("some string");
291
291
  expect(obj.shout()).to(equal, "some string");
292
-
292
+
293
293
  obj._resetMocks();
294
294
  Smoke.mocks = [];
295
-
295
+
296
296
  expect(obj.shout()).to(equal, "HELLO");
297
297
  });
298
-
298
+
299
299
  it("should also restore a stubbed properties", function() {
300
300
  var obj = { say: "hello" };
301
301
  mock(obj).stub("say").and_set_to("goodbye");
@@ -307,17 +307,17 @@ Screw.Unit(function() {
307
307
  expect(obj.say).to(equal, "hello");
308
308
  });
309
309
  });
310
-
310
+
311
311
  describe("anonymous functions", function() {
312
312
  before(function() {
313
313
  foo = function() { return 'bar' };
314
314
  mockObj = mock_function(foo);
315
315
  });
316
-
316
+
317
317
  it("should leave the original intact", function() {
318
318
  expect(foo()).to(equal,'bar');
319
319
  });
320
-
320
+
321
321
  it("should still execute the mock like the original", function() {
322
322
  expect(mockObj()).to(equal,'bar');
323
323
  });
@@ -330,13 +330,13 @@ Screw.Unit(function() {
330
330
  mockFn();
331
331
  expect(counter).to(equal, 1);
332
332
  });
333
-
333
+
334
334
  it("should still execute the mock like the original with arguments", function() {
335
335
  var a = function(x,y,z) { return x+y+z };
336
336
  aMock = mock_function(a)
337
337
  expect(aMock('a','b','c')).to(equal,'abc');
338
338
  });
339
-
339
+
340
340
  it("should allow expectations to be set as usual", function() {
341
341
  mockObj.should_receive('baz').exactly('once').and_return(1);
342
342
  mockObj.baz()
@@ -346,7 +346,7 @@ Screw.Unit(function() {
346
346
  mockObj.should_be_invoked();
347
347
  mockObj();
348
348
  });
349
-
349
+
350
350
  it("should allow expectation rules to be set", function() {
351
351
  mockObj.should_be_invoked().exactly('twice').with_arguments('a');
352
352
  mockObj('a');
@@ -375,14 +375,14 @@ Screw.Unit(function() {
375
375
  mockObj.should_be_invoked().and_return('bar');
376
376
  expect(mockObj('foo')).to(equal, 'bar');
377
377
  });
378
-
378
+
379
379
  it("should allow multiple return values to be set through the argument matchers", function() {
380
380
  mockObj.should_be_invoked().with_arguments('foo').and_return('bar');
381
381
  mockObj.should_be_invoked().with_arguments('bar').and_return('foo');
382
382
  expect(mockObj('foo')).to(equal, 'bar');
383
383
  expect(mockObj('bar')).to(equal, 'foo');
384
384
  });
385
-
385
+
386
386
  it("allows passing in a name for the function as a second argument to make error messages clearer", function() {
387
387
  mock_function(foo, 'foo').should_be_invoked().exactly('once');
388
388
  try {
@@ -394,7 +394,7 @@ Screw.Unit(function() {
394
394
  }
395
395
  });
396
396
  });
397
-
397
+
398
398
  describe("when array has been monkey-patched by js library not to be named here (grrr)", function() {
399
399
  before(function() {
400
400
  Array.prototype.remove = function() {
@@ -415,9 +415,9 @@ Screw.Unit(function() {
415
415
  });
416
416
  after(function() {
417
417
  delete(Array.prototype.remove);
418
- });
418
+ });
419
419
  });
420
-
420
+
421
421
  describe("an objects prototype", function() {
422
422
  it("should allow mocks to be carried through to individual objects", function() {
423
423
  Aobj = function() {};
@@ -426,6 +426,6 @@ Screw.Unit(function() {
426
426
  (new Aobj()).aFunction();
427
427
  (new Aobj()).aFunction();
428
428
  });
429
- });
429
+ });
430
430
  });
431
431
  });
@@ -3,12 +3,12 @@ Screw.Unit(function() {
3
3
  before(function() {
4
4
  foo = {bar: function(attribute){return 'hello'}, baz:'goodbye'};
5
5
  });
6
-
6
+
7
7
  it("should forward stub() calls to new Stub to allow stub().and_return()", function() {
8
8
  var myStub = stub(foo,'baz')
9
9
  expect(myStub.and_return).to_not(equal, undefined);
10
10
  });
11
-
11
+
12
12
  it("should forward mock() calls to new mock object to allow mock().should_receive()", function() {
13
13
  var myMock = mock(foo);
14
14
  expect(myMock.should_receive).to_not(equal,undefined)
@@ -3,12 +3,12 @@ Screw.Unit(function() {
3
3
  before(function() {
4
4
  foo = {bar: function(attribute){return 'hello'}, baz:'goodbye'};
5
5
  });
6
-
6
+
7
7
  it("should return the stubbed value of a property", function() {
8
8
  stub(foo,'baz').and_set_to('baz');
9
9
  expect(foo.baz).to(equal, 'baz');
10
10
  });
11
-
11
+
12
12
  it("should return the stubbed value of a function", function() {
13
13
  stub(foo,'bar').and_return('bar');
14
14
  expect(foo.bar()).to(equal, 'bar');
@@ -22,7 +22,7 @@ var jQuery = window.jQuery = function( selector, context ) {
22
22
  // Map over the $ in case of overwrite
23
23
  if ( window.$ )
24
24
  var _$ = window.$;
25
-
25
+
26
26
  // Map the jQuery namespace to the '$' one
27
27
  window.$ = jQuery;
28
28
 
@@ -99,7 +99,7 @@ jQuery.fn = jQuery.prototype = {
99
99
  // HANDLE: $(*)
100
100
  [ selector ] );
101
101
  },
102
-
102
+
103
103
  // The current version of jQuery being used
104
104
  jquery: "1.2.3",
105
105
 
@@ -107,7 +107,7 @@ jQuery.fn = jQuery.prototype = {
107
107
  size: function() {
108
108
  return this.length;
109
109
  },
110
-
110
+
111
111
  // The number of elements contained in the matched element set
112
112
  length: 0,
113
113
 
@@ -122,7 +122,7 @@ jQuery.fn = jQuery.prototype = {
122
122
  // Return just the object
123
123
  this[ num ];
124
124
  },
125
-
125
+
126
126
  // Take an array of elements and push it onto the stack
127
127
  // (returning the new matched element set)
128
128
  pushStack: function( elems ) {
@@ -135,7 +135,7 @@ jQuery.fn = jQuery.prototype = {
135
135
  // Return the newly-formed element set
136
136
  return ret;
137
137
  },
138
-
138
+
139
139
  // Force the current matched set of elements to become
140
140
  // the specified array of elements (destroying the stack in the process)
141
141
  // You should use pushStack() in order to do this, but maintain the stack
@@ -144,7 +144,7 @@ jQuery.fn = jQuery.prototype = {
144
144
  // is a super-fast way to populate an object with array-like properties
145
145
  this.length = 0;
146
146
  Array.prototype.push.apply( this, elems );
147
-
147
+
148
148
  return this;
149
149
  },
150
150
 
@@ -155,7 +155,7 @@ jQuery.fn = jQuery.prototype = {
155
155
  return jQuery.each( this, callback, args );
156
156
  },
157
157
 
158
- // Determine the position of an element within
158
+ // Determine the position of an element within
159
159
  // the matched set of elements
160
160
  index: function( elem ) {
161
161
  var ret = -1;
@@ -171,7 +171,7 @@ jQuery.fn = jQuery.prototype = {
171
171
 
172
172
  attr: function( name, value, type ) {
173
173
  var options = name;
174
-
174
+
175
175
  // Look for the case where we're accessing a style value
176
176
  if ( name.constructor == String )
177
177
  if ( value == undefined )
@@ -181,7 +181,7 @@ jQuery.fn = jQuery.prototype = {
181
181
  options = {};
182
182
  options[ name ] = value;
183
183
  }
184
-
184
+
185
185
  // Check to see if we're setting style values
186
186
  return this.each(function(i){
187
187
  // Set all the styles
@@ -264,7 +264,7 @@ jQuery.fn = jQuery.prototype = {
264
264
  this.insertBefore( elem, this.firstChild );
265
265
  });
266
266
  },
267
-
267
+
268
268
  before: function() {
269
269
  return this.domManip(arguments, false, false, function(elem){
270
270
  this.parentNode.insertBefore( elem, this );
@@ -299,8 +299,8 @@ jQuery.fn = jQuery.prototype = {
299
299
  // using cloneNode. Calling detachEvent on the
300
300
  // clone will also remove the events from the orignal
301
301
  // In order to get around this, we use innerHTML.
302
- // Unfortunately, this means some modifications to
303
- // attributes in IE that are actually only stored
302
+ // Unfortunately, this means some modifications to
303
+ // attributes in IE that are actually only stored
304
304
  // as properties will not be copied (such as the
305
305
  // the name attribute on an input).
306
306
  var clone = this.cloneNode(true),
@@ -318,7 +318,7 @@ jQuery.fn = jQuery.prototype = {
318
318
  if ( this[ expando ] != undefined )
319
319
  this[ expando ] = null;
320
320
  });
321
-
321
+
322
322
  // Copy the events from the original to the clone
323
323
  if ( events === true )
324
324
  this.find("*").andSelf().each(function(i){
@@ -360,9 +360,9 @@ jQuery.fn = jQuery.prototype = {
360
360
  },
361
361
 
362
362
  add: function( selector ) {
363
- return !selector ? this : this.pushStack( jQuery.merge(
363
+ return !selector ? this : this.pushStack( jQuery.merge(
364
364
  this.get(),
365
- selector.constructor == String ?
365
+ selector.constructor == String ?
366
366
  jQuery( selector ).get() :
367
367
  selector.length != undefined && (!selector.nodeName || jQuery.nodeName(selector, "form")) ?
368
368
  selector : [selector] ) );
@@ -377,7 +377,7 @@ jQuery.fn = jQuery.prototype = {
377
377
  hasClass: function( selector ) {
378
378
  return this.is( "." + selector );
379
379
  },
380
-
380
+
381
381
  val: function( value ) {
382
382
  if ( value == undefined ) {
383
383
 
@@ -390,7 +390,7 @@ jQuery.fn = jQuery.prototype = {
390
390
  values = [],
391
391
  options = elem.options,
392
392
  one = elem.type == "select-one";
393
-
393
+
394
394
  // Nothing was selected
395
395
  if ( index < 0 )
396
396
  return null;
@@ -402,18 +402,18 @@ jQuery.fn = jQuery.prototype = {
402
402
  if ( option.selected ) {
403
403
  // Get the specifc value for the option
404
404
  value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value;
405
-
405
+
406
406
  // We don't need an array for one selects
407
407
  if ( one )
408
408
  return value;
409
-
409
+
410
410
  // Multi-Selects return an array
411
411
  values.push( value );
412
412
  }
413
413
  }
414
-
414
+
415
415
  return values;
416
-
416
+
417
417
  // Everything else, we just grab the value
418
418
  } else
419
419
  return (this[0].value || "").replace(/\r/g, "");
@@ -448,7 +448,7 @@ jQuery.fn = jQuery.prototype = {
448
448
  this.value = value;
449
449
  });
450
450
  },
451
-
451
+
452
452
  html: function( value ) {
453
453
  return value == undefined ?
454
454
  (this.length ?
@@ -485,7 +485,7 @@ jQuery.fn = jQuery.prototype = {
485
485
 
486
486
  if ( value == null ) {
487
487
  var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
488
-
488
+
489
489
  if ( data == undefined && this.length )
490
490
  data = jQuery.data( this[0], key );
491
491
 
@@ -503,9 +503,9 @@ jQuery.fn = jQuery.prototype = {
503
503
  jQuery.removeData( this, key );
504
504
  });
505
505
  },
506
-
506
+
507
507
  domManip: function( args, table, reverse, callback ) {
508
- var clone = this.length > 1, elems;
508
+ var clone = this.length > 1, elems;
509
509
 
510
510
  return this.each(function(){
511
511
  if ( !elems ) {
@@ -625,10 +625,10 @@ jQuery.extend({
625
625
 
626
626
  // See test/unit/core.js for details concerning this function.
627
627
  isFunction: function( fn ) {
628
- return !!fn && typeof fn != "string" && !fn.nodeName &&
628
+ return !!fn && typeof fn != "string" && !fn.nodeName &&
629
629
  fn.constructor != Array && /function/i.test( fn + "" );
630
630
  },
631
-
631
+
632
632
  // check if an element is in a (or is an) XML document
633
633
  isXMLDoc: function( elem ) {
634
634
  return elem.documentElement && !elem.body ||
@@ -659,9 +659,9 @@ jQuery.extend({
659
659
  nodeName: function( elem, name ) {
660
660
  return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
661
661
  },
662
-
662
+
663
663
  cache: {},
664
-
664
+
665
665
  data: function( elem, name, data ) {
666
666
  elem = elem == window ?
667
667
  windowData :
@@ -670,24 +670,24 @@ jQuery.extend({
670
670
  var id = elem[ expando ];
671
671
 
672
672
  // Compute a unique ID for the element
673
- if ( !id )
673
+ if ( !id )
674
674
  id = elem[ expando ] = ++uuid;
675
675
 
676
676
  // Only generate the data cache if we're
677
677
  // trying to access or manipulate it
678
678
  if ( name && !jQuery.cache[ id ] )
679
679
  jQuery.cache[ id ] = {};
680
-
680
+
681
681
  // Prevent overriding the named cache with undefined values
682
682
  if ( data != undefined )
683
683
  jQuery.cache[ id ][ name ] = data;
684
-
685
- // Return the named cache data, or the ID for the element
684
+
685
+ // Return the named cache data, or the ID for the element
686
686
  return name ?
687
687
  jQuery.cache[ id ][ name ] :
688
688
  id;
689
689
  },
690
-
690
+
691
691
  removeData: function( elem, name ) {
692
692
  elem = elem == window ?
693
693
  windowData :
@@ -747,18 +747,18 @@ jQuery.extend({
747
747
  if ( callback.call( object[ name ], name, object[ name ] ) === false )
748
748
  break;
749
749
  } else
750
- for ( var i = 0, length = object.length, value = object[0];
750
+ for ( var i = 0, length = object.length, value = object[0];
751
751
  i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
752
752
  }
753
753
 
754
754
  return object;
755
755
  },
756
-
756
+
757
757
  prop: function( elem, value, type, i, name ) {
758
758
  // Handle executable functions
759
759
  if ( jQuery.isFunction( value ) )
760
760
  value = value.call( elem, i );
761
-
761
+
762
762
  // Handle passing in a number to a CSS property
763
763
  return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ?
764
764
  value + "px" :
@@ -779,7 +779,7 @@ jQuery.extend({
779
779
  if (elem.nodeType == 1)
780
780
  elem.className = classNames != undefined ?
781
781
  jQuery.grep(elem.className.split(/\s+/), function(className){
782
- return !jQuery.className.has( classNames, className );
782
+ return !jQuery.className.has( classNames, className );
783
783
  }).join(" ") :
784
784
  "";
785
785
  },
@@ -809,7 +809,7 @@ jQuery.extend({
809
809
  css: function( elem, name, force ) {
810
810
  if ( name == "width" || name == "height" ) {
811
811
  var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
812
-
812
+
813
813
  function getWH() {
814
814
  val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
815
815
  var padding = 0, border = 0;
@@ -819,15 +819,15 @@ jQuery.extend({
819
819
  });
820
820
  val -= Math.round(padding + border);
821
821
  }
822
-
822
+
823
823
  if ( jQuery(elem).is(":visible") )
824
824
  getWH();
825
825
  else
826
826
  jQuery.swap( elem, props, getWH );
827
-
827
+
828
828
  return Math.max(0, val);
829
829
  }
830
-
830
+
831
831
  return jQuery.curCSS( elem, name, force );
832
832
  },
833
833
 
@@ -857,7 +857,7 @@ jQuery.extend({
857
857
  elem.style.outline = "0 solid black";
858
858
  elem.style.outline = save;
859
859
  }
860
-
860
+
861
861
  // Make sure we're using the right name for getting the float value
862
862
  if ( name.match( /float/i ) )
863
863
  name = styleFloat;
@@ -940,12 +940,12 @@ jQuery.extend({
940
940
 
941
941
  return ret;
942
942
  },
943
-
943
+
944
944
  clean: function( elems, context ) {
945
945
  var ret = [];
946
946
  context = context || document;
947
947
  // !context.createElement fails in IE with an error but returns typeof 'object'
948
- if (typeof context.createElement == 'undefined')
948
+ if (typeof context.createElement == 'undefined')
949
949
  context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
950
950
 
951
951
  jQuery.each(elems, function(i, elem){
@@ -954,7 +954,7 @@ jQuery.extend({
954
954
 
955
955
  if ( elem.constructor == Number )
956
956
  elem = elem.toString();
957
-
957
+
958
958
  // Convert html string into DOM nodes
959
959
  if ( typeof elem == "string" ) {
960
960
  // Fix "XHTML"-style tags in all browsers
@@ -971,58 +971,58 @@ jQuery.extend({
971
971
  // option or optgroup
972
972
  !tags.indexOf("<opt") &&
973
973
  [ 1, "<select multiple='multiple'>", "</select>" ] ||
974
-
974
+
975
975
  !tags.indexOf("<leg") &&
976
976
  [ 1, "<fieldset>", "</fieldset>" ] ||
977
-
977
+
978
978
  tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
979
979
  [ 1, "<table>", "</table>" ] ||
980
-
980
+
981
981
  !tags.indexOf("<tr") &&
982
982
  [ 2, "<table><tbody>", "</tbody></table>" ] ||
983
-
983
+
984
984
  // <thead> matched above
985
985
  (!tags.indexOf("<td") || !tags.indexOf("<th")) &&
986
986
  [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
987
-
987
+
988
988
  !tags.indexOf("<col") &&
989
989
  [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
990
990
 
991
991
  // IE can't serialize <link> and <script> tags normally
992
992
  jQuery.browser.msie &&
993
993
  [ 1, "div<div>", "</div>" ] ||
994
-
994
+
995
995
  [ 0, "", "" ];
996
996
 
997
997
  // Go to html and back, then peel off extra wrappers
998
998
  div.innerHTML = wrap[1] + elem + wrap[2];
999
-
999
+
1000
1000
  // Move to the right depth
1001
1001
  while ( wrap[0]-- )
1002
1002
  div = div.lastChild;
1003
-
1003
+
1004
1004
  // Remove IE's autoinserted <tbody> from table fragments
1005
1005
  if ( jQuery.browser.msie ) {
1006
-
1006
+
1007
1007
  // String was a <table>, *may* have spurious <tbody>
1008
1008
  var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ?
1009
1009
  div.firstChild && div.firstChild.childNodes :
1010
-
1010
+
1011
1011
  // String was a bare <thead> or <tfoot>
1012
1012
  wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ?
1013
1013
  div.childNodes :
1014
1014
  [];
1015
-
1015
+
1016
1016
  for ( var j = tbody.length - 1; j >= 0 ; --j )
1017
1017
  if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
1018
1018
  tbody[ j ].parentNode.removeChild( tbody[ j ] );
1019
-
1020
- // IE completely kills leading whitespace when innerHTML is used
1021
- if ( /^\s/.test( elem ) )
1019
+
1020
+ // IE completely kills leading whitespace when innerHTML is used
1021
+ if ( /^\s/.test( elem ) )
1022
1022
  div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
1023
-
1023
+
1024
1024
  }
1025
-
1025
+
1026
1026
  elem = jQuery.makeArray( div.childNodes );
1027
1027
  }
1028
1028
 
@@ -1039,7 +1039,7 @@ jQuery.extend({
1039
1039
 
1040
1040
  return ret;
1041
1041
  },
1042
-
1042
+
1043
1043
  attr: function( elem, name, value ) {
1044
1044
  // don't set attributes on text and comment nodes
1045
1045
  if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
@@ -1053,7 +1053,7 @@ jQuery.extend({
1053
1053
  // Accessing the parent's selectedIndex property fixes it
1054
1054
  if ( name == "selected" && jQuery.browser.safari )
1055
1055
  elem.parentNode.selectedIndex;
1056
-
1056
+
1057
1057
  // Certain attributes only work when accessed via the old DOM 0 way
1058
1058
  if ( fix[ name ] ) {
1059
1059
  if ( value != undefined )
@@ -1079,7 +1079,7 @@ jQuery.extend({
1079
1079
  elem.setAttribute( name, "" + value );
1080
1080
  }
1081
1081
 
1082
- if ( jQuery.browser.msie && /href|src/.test( name ) && !jQuery.isXMLDoc( elem ) )
1082
+ if ( jQuery.browser.msie && /href|src/.test( name ) && !jQuery.isXMLDoc( elem ) )
1083
1083
  return elem.getAttribute( name, 2 );
1084
1084
 
1085
1085
  return elem.getAttribute( name );
@@ -1091,13 +1091,13 @@ jQuery.extend({
1091
1091
  if ( value != undefined ) {
1092
1092
  // IE has trouble with opacity if it does not have layout
1093
1093
  // Force it by setting the zoom level
1094
- elem.zoom = 1;
1095
-
1094
+ elem.zoom = 1;
1095
+
1096
1096
  // Set the alpha filter to set the opacity
1097
1097
  elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
1098
1098
  (parseFloat( value ).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
1099
1099
  }
1100
-
1100
+
1101
1101
  return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
1102
1102
  (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() :
1103
1103
  "";
@@ -1113,7 +1113,7 @@ jQuery.extend({
1113
1113
  return elem[ name ];
1114
1114
  }
1115
1115
  },
1116
-
1116
+
1117
1117
  trim: function( text ) {
1118
1118
  return (text || "").replace( /^\s+|\s+$/g, "" );
1119
1119
  },
@@ -1224,11 +1224,11 @@ jQuery.browser = {
1224
1224
  var styleFloat = jQuery.browser.msie ?
1225
1225
  "styleFloat" :
1226
1226
  "cssFloat";
1227
-
1227
+
1228
1228
  jQuery.extend({
1229
1229
  // Check to see if the W3C box model is being used
1230
1230
  boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
1231
-
1231
+
1232
1232
  props: {
1233
1233
  "for": "htmlFor",
1234
1234
  "class": "className",
@@ -1291,7 +1291,7 @@ jQuery.each({
1291
1291
  jQuery.each({
1292
1292
  removeAttr: function( name ) {
1293
1293
  jQuery.attr( this, name, "" );
1294
- if (this.nodeType == 1)
1294
+ if (this.nodeType == 1)
1295
1295
  this.removeAttribute( name );
1296
1296
  },
1297
1297
 
@@ -1322,7 +1322,7 @@ jQuery.each({
1322
1322
  empty: function() {
1323
1323
  // Remove element nodes and prevent memory leaks
1324
1324
  jQuery( ">*", this ).remove();
1325
-
1325
+
1326
1326
  // Remove any remaining nodes
1327
1327
  while ( this.firstChild )
1328
1328
  this.removeChild( this.firstChild );
@@ -1335,25 +1335,25 @@ jQuery.each({
1335
1335
 
1336
1336
  jQuery.each([ "Height", "Width" ], function(i, name){
1337
1337
  var type = name.toLowerCase();
1338
-
1338
+
1339
1339
  jQuery.fn[ type ] = function( size ) {
1340
1340
  // Get window width or height
1341
1341
  return this[0] == window ?
1342
1342
  // Opera reports document.body.client[Width/Height] properly in both quirks and standards
1343
- jQuery.browser.opera && document.body[ "client" + name ] ||
1344
-
1343
+ jQuery.browser.opera && document.body[ "client" + name ] ||
1344
+
1345
1345
  // Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths)
1346
1346
  jQuery.browser.safari && window[ "inner" + name ] ||
1347
-
1347
+
1348
1348
  // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
1349
1349
  document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] :
1350
-
1350
+
1351
1351
  // Get document width or height
1352
1352
  this[0] == document ?
1353
1353
  // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
1354
- Math.max(
1355
- Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]),
1356
- Math.max(document.body["offset" + name], document.documentElement["offset" + name])
1354
+ Math.max(
1355
+ Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]),
1356
+ Math.max(document.body["offset" + name], document.documentElement["offset" + name])
1357
1357
  ) :
1358
1358
 
1359
1359
  // Get or set width or height on the element
@@ -1432,7 +1432,7 @@ jQuery.extend({
1432
1432
  animated: function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}
1433
1433
  }
1434
1434
  },
1435
-
1435
+
1436
1436
  // The regular expressions that power the parsing engine
1437
1437
  parse: [
1438
1438
  // Match: [@value='test'], [@foo]
@@ -1518,12 +1518,12 @@ jQuery.extend({
1518
1518
  var id = jQuery.data(n);
1519
1519
 
1520
1520
  if ( m == "~" && merge[id] ) break;
1521
-
1521
+
1522
1522
  if (!nodeName || n.nodeName.toUpperCase() == nodeName ) {
1523
1523
  if ( m == "~" ) merge[id] = true;
1524
1524
  r.push( n );
1525
1525
  }
1526
-
1526
+
1527
1527
  if ( m == "+" ) break;
1528
1528
  }
1529
1529
  }
@@ -1557,7 +1557,7 @@ jQuery.extend({
1557
1557
  // Optimize for the case nodeName#idName
1558
1558
  var re2 = quickID;
1559
1559
  var m = re2.exec(t);
1560
-
1560
+
1561
1561
  // Re-organize the results, so that they're consistent
1562
1562
  if ( m ) {
1563
1563
  m = [ 0, m[2], m[3], m[1] ];
@@ -1577,7 +1577,7 @@ jQuery.extend({
1577
1577
  if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
1578
1578
  // Optimization for HTML document case
1579
1579
  var oid = elem.getElementById(m[2]);
1580
-
1580
+
1581
1581
  // Do a quick check for the existence of the actual ID attribute
1582
1582
  // to avoid selecting by the name attribute in IE
1583
1583
  // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
@@ -1699,10 +1699,10 @@ jQuery.extend({
1699
1699
 
1700
1700
  else if ( m[1] == "[" ) {
1701
1701
  var tmp = [], type = m[3];
1702
-
1702
+
1703
1703
  for ( var i = 0, rl = r.length; i < rl; i++ ) {
1704
1704
  var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
1705
-
1705
+
1706
1706
  if ( z == null || /href|src|selected/.test(m[2]) )
1707
1707
  z = jQuery.attr(a,m[2]) || '';
1708
1708
 
@@ -1714,7 +1714,7 @@ jQuery.extend({
1714
1714
  (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
1715
1715
  tmp.push( a );
1716
1716
  }
1717
-
1717
+
1718
1718
  r = tmp;
1719
1719
 
1720
1720
  // We can get a speed boost by handling nth-child here
@@ -1726,7 +1726,7 @@ jQuery.extend({
1726
1726
  !/\D/.test(m[3]) && "0n+" + m[3] || m[3]),
1727
1727
  // calculate the numbers (first)n+(last) including if they are negative
1728
1728
  first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0;
1729
-
1729
+
1730
1730
  // loop through all the elements left in the jQuery object
1731
1731
  for ( var i = 0, rl = r.length; i < rl; i++ ) {
1732
1732
  var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
@@ -1786,7 +1786,7 @@ jQuery.extend({
1786
1786
  }
1787
1787
  return matched;
1788
1788
  },
1789
-
1789
+
1790
1790
  nth: function(cur,result,dir,elem){
1791
1791
  result = result || 1;
1792
1792
  var num = 0;
@@ -1797,7 +1797,7 @@ jQuery.extend({
1797
1797
 
1798
1798
  return cur;
1799
1799
  },
1800
-
1800
+
1801
1801
  sibling: function( n, elem ) {
1802
1802
  var r = [];
1803
1803
 
@@ -1812,7 +1812,7 @@ jQuery.extend({
1812
1812
 
1813
1813
  /*
1814
1814
  * A number of helper functions used for managing events.
1815
- * Many of the ideas behind this code orignated from
1815
+ * Many of the ideas behind this code orignated from
1816
1816
  * Dean Edwards' addEvent library.
1817
1817
  */
1818
1818
  jQuery.event = {
@@ -1831,22 +1831,22 @@ jQuery.event = {
1831
1831
  // Make sure that the function being executed has a unique ID
1832
1832
  if ( !handler.guid )
1833
1833
  handler.guid = this.guid++;
1834
-
1835
- // if data is passed, bind to handler
1836
- if( data != undefined ) {
1837
- // Create temporary function pointer to original handler
1838
- var fn = handler;
1839
-
1840
- // Create unique handler function, wrapped around original handler
1841
- handler = function() {
1842
- // Pass arguments and context to original handler
1843
- return fn.apply(this, arguments);
1834
+
1835
+ // if data is passed, bind to handler
1836
+ if( data != undefined ) {
1837
+ // Create temporary function pointer to original handler
1838
+ var fn = handler;
1839
+
1840
+ // Create unique handler function, wrapped around original handler
1841
+ handler = function() {
1842
+ // Pass arguments and context to original handler
1843
+ return fn.apply(this, arguments);
1844
1844
  };
1845
1845
 
1846
- // Store data in unique handler
1846
+ // Store data in unique handler
1847
1847
  handler.data = data;
1848
1848
 
1849
- // Set the guid of unique handler to the same of original handler, so it can be removed
1849
+ // Set the guid of unique handler to the same of original handler, so it can be removed
1850
1850
  handler.guid = fn.guid;
1851
1851
  }
1852
1852
 
@@ -1860,16 +1860,16 @@ jQuery.event = {
1860
1860
  // an event is called after a page has unload
1861
1861
  if ( typeof jQuery == "undefined" || jQuery.event.triggered )
1862
1862
  return val;
1863
-
1863
+
1864
1864
  val = jQuery.event.handle.apply(arguments.callee.elem, arguments);
1865
-
1865
+
1866
1866
  return val;
1867
1867
  });
1868
1868
  // Add elem as a property of the handle function
1869
1869
  // This is to prevent a memory leak with non-native
1870
1870
  // event in IE.
1871
1871
  handle.elem = elem;
1872
-
1872
+
1873
1873
  // Handle multiple events seperated by a space
1874
1874
  // jQuery(...).bind("mouseover mouseout", fn);
1875
1875
  jQuery.each(types.split(/\s+/), function(index, type) {
@@ -1884,7 +1884,7 @@ jQuery.event = {
1884
1884
  // Init the event handler queue
1885
1885
  if (!handlers) {
1886
1886
  handlers = events[type] = {};
1887
-
1887
+
1888
1888
  // Check for a special event handler
1889
1889
  // Only use addEventListener/attachEvent if the special
1890
1890
  // events handler returns false
@@ -1903,7 +1903,7 @@ jQuery.event = {
1903
1903
  // Keep track of which events have been used, for global triggering
1904
1904
  jQuery.event.global[type] = true;
1905
1905
  });
1906
-
1906
+
1907
1907
  // Nullify elem to prevent memory leaks in IE
1908
1908
  elem = null;
1909
1909
  },
@@ -1930,19 +1930,19 @@ jQuery.event = {
1930
1930
  handler = types.handler;
1931
1931
  types = types.type;
1932
1932
  }
1933
-
1933
+
1934
1934
  // Handle multiple events seperated by a space
1935
1935
  // jQuery(...).unbind("mouseover mouseout", fn);
1936
1936
  jQuery.each(types.split(/\s+/), function(index, type){
1937
1937
  // Namespaced event handlers
1938
1938
  var parts = type.split(".");
1939
1939
  type = parts[0];
1940
-
1940
+
1941
1941
  if ( events[type] ) {
1942
1942
  // remove the given handler for the given type
1943
1943
  if ( handler )
1944
1944
  delete events[type][handler.guid];
1945
-
1945
+
1946
1946
  // remove all handlers for the given type
1947
1947
  else
1948
1948
  for ( handler in events[type] )
@@ -2001,7 +2001,7 @@ jQuery.event = {
2001
2001
  var val, ret, fn = jQuery.isFunction( elem[ type ] || null ),
2002
2002
  // Check to see if we need to provide a fake event, or not
2003
2003
  event = !data[0] || !data[0].preventDefault;
2004
-
2004
+
2005
2005
  // Pass along a fake event
2006
2006
  if ( event )
2007
2007
  data.unshift( this.fix({ type: type, target: elem }) );
@@ -2052,7 +2052,7 @@ jQuery.event = {
2052
2052
  var val;
2053
2053
 
2054
2054
  // Empty object is for triggered events with no data
2055
- event = jQuery.event.fix( event || window.event || {} );
2055
+ event = jQuery.event.fix( event || window.event || {} );
2056
2056
 
2057
2057
  // Namespaced event handlers
2058
2058
  var parts = event.type.split(".");
@@ -2091,12 +2091,12 @@ jQuery.event = {
2091
2091
  },
2092
2092
 
2093
2093
  fix: function(event) {
2094
- // store a copy of the original event object
2094
+ // store a copy of the original event object
2095
2095
  // and clone to set read-only properties
2096
2096
  var originalEvent = event;
2097
2097
  event = jQuery.extend({}, originalEvent);
2098
-
2099
- // add preventDefault and stopPropagation since
2098
+
2099
+ // add preventDefault and stopPropagation since
2100
2100
  // they will not work on the clone
2101
2101
  event.preventDefault = function() {
2102
2102
  // if preventDefault exists run it on the original event
@@ -2112,11 +2112,11 @@ jQuery.event = {
2112
2112
  // otherwise set the cancelBubble property of the original event to true (IE)
2113
2113
  originalEvent.cancelBubble = true;
2114
2114
  };
2115
-
2115
+
2116
2116
  // Fix target property, if necessary
2117
2117
  if ( !event.target )
2118
2118
  event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
2119
-
2119
+
2120
2120
  // check if target is a textnode (safari)
2121
2121
  if ( event.target.nodeType == 3 )
2122
2122
  event.target = originalEvent.target.parentNode;
@@ -2131,11 +2131,11 @@ jQuery.event = {
2131
2131
  event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
2132
2132
  event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
2133
2133
  }
2134
-
2134
+
2135
2135
  // Add which for key events
2136
2136
  if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
2137
2137
  event.which = event.charCode || event.keyCode;
2138
-
2138
+
2139
2139
  // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
2140
2140
  if ( !event.metaKey && event.ctrlKey )
2141
2141
  event.metaKey = event.ctrlKey;
@@ -2144,10 +2144,10 @@ jQuery.event = {
2144
2144
  // Note: button is not normalized, so don't use it
2145
2145
  if ( !event.which && event.button )
2146
2146
  event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
2147
-
2147
+
2148
2148
  return event;
2149
2149
  },
2150
-
2150
+
2151
2151
  special: {
2152
2152
  ready: {
2153
2153
  setup: function() {
@@ -2155,23 +2155,23 @@ jQuery.event = {
2155
2155
  bindReady();
2156
2156
  return;
2157
2157
  },
2158
-
2158
+
2159
2159
  teardown: function() { return; }
2160
2160
  },
2161
-
2161
+
2162
2162
  mouseenter: {
2163
2163
  setup: function() {
2164
2164
  if ( jQuery.browser.msie ) return false;
2165
2165
  jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler);
2166
2166
  return true;
2167
2167
  },
2168
-
2168
+
2169
2169
  teardown: function() {
2170
2170
  if ( jQuery.browser.msie ) return false;
2171
2171
  jQuery(this).unbind("mouseover", jQuery.event.special.mouseenter.handler);
2172
2172
  return true;
2173
2173
  },
2174
-
2174
+
2175
2175
  handler: function(event) {
2176
2176
  // If we actually just moused on to a sub-element, ignore it
2177
2177
  if ( withinElement(event, this) ) return true;
@@ -2180,20 +2180,20 @@ jQuery.event = {
2180
2180
  return jQuery.event.handle.apply(this, arguments);
2181
2181
  }
2182
2182
  },
2183
-
2183
+
2184
2184
  mouseleave: {
2185
2185
  setup: function() {
2186
2186
  if ( jQuery.browser.msie ) return false;
2187
2187
  jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler);
2188
2188
  return true;
2189
2189
  },
2190
-
2190
+
2191
2191
  teardown: function() {
2192
2192
  if ( jQuery.browser.msie ) return false;
2193
2193
  jQuery(this).unbind("mouseout", jQuery.event.special.mouseleave.handler);
2194
2194
  return true;
2195
2195
  },
2196
-
2196
+
2197
2197
  handler: function(event) {
2198
2198
  // If we actually just moused on to a sub-element, ignore it
2199
2199
  if ( withinElement(event, this) ) return true;
@@ -2211,7 +2211,7 @@ jQuery.fn.extend({
2211
2211
  jQuery.event.add( this, type, fn || data, fn && data );
2212
2212
  });
2213
2213
  },
2214
-
2214
+
2215
2215
  one: function( type, data, fn ) {
2216
2216
  return this.each(function(){
2217
2217
  jQuery.event.add( this, type, function(event) {
@@ -2246,10 +2246,10 @@ jQuery.fn.extend({
2246
2246
  return this.click(function(event) {
2247
2247
  // Figure out which function to execute
2248
2248
  this.lastToggle = 0 == this.lastToggle ? 1 : 0;
2249
-
2249
+
2250
2250
  // Make sure that clicks stop
2251
2251
  event.preventDefault();
2252
-
2252
+
2253
2253
  // and execute the function
2254
2254
  return args[this.lastToggle].apply( this, arguments ) || false;
2255
2255
  });
@@ -2258,7 +2258,7 @@ jQuery.fn.extend({
2258
2258
  hover: function(fnOver, fnOut) {
2259
2259
  return this.bind('mouseenter', fnOver).bind('mouseleave', fnOut);
2260
2260
  },
2261
-
2261
+
2262
2262
  ready: function(fn) {
2263
2263
  // Attach the listeners
2264
2264
  bindReady();
@@ -2267,12 +2267,12 @@ jQuery.fn.extend({
2267
2267
  if ( jQuery.isReady )
2268
2268
  // Execute the function immediately
2269
2269
  fn.call( document, jQuery );
2270
-
2270
+
2271
2271
  // Otherwise, remember the function for later
2272
2272
  else
2273
2273
  // Add the function to the wait list
2274
2274
  jQuery.readyList.push( function() { return fn.call(this, jQuery); } );
2275
-
2275
+
2276
2276
  return this;
2277
2277
  }
2278
2278
  });
@@ -2286,18 +2286,18 @@ jQuery.extend({
2286
2286
  if ( !jQuery.isReady ) {
2287
2287
  // Remember that the DOM is ready
2288
2288
  jQuery.isReady = true;
2289
-
2289
+
2290
2290
  // If there are functions bound, to execute
2291
2291
  if ( jQuery.readyList ) {
2292
2292
  // Execute all of them
2293
2293
  jQuery.each( jQuery.readyList, function(){
2294
2294
  this.apply( document );
2295
2295
  });
2296
-
2296
+
2297
2297
  // Reset the list of functions
2298
2298
  jQuery.readyList = null;
2299
2299
  }
2300
-
2300
+
2301
2301
  // Trigger any bound ready events
2302
2302
  jQuery(document).triggerHandler("ready");
2303
2303
  }
@@ -2314,7 +2314,7 @@ function bindReady(){
2314
2314
  if ( document.addEventListener && !jQuery.browser.opera)
2315
2315
  // Use the handy event callback
2316
2316
  document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
2317
-
2317
+
2318
2318
  // If IE is used and is not in a frame
2319
2319
  // Continually check to see if the document is ready
2320
2320
  if ( jQuery.browser.msie && window == top ) (function(){
@@ -2367,9 +2367,9 @@ function bindReady(){
2367
2367
  }
2368
2368
 
2369
2369
  jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
2370
- "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
2370
+ "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
2371
2371
  "submit,keydown,keypress,keyup,error").split(","), function(i, name){
2372
-
2372
+
2373
2373
  // Handle event binding
2374
2374
  jQuery.fn[name] = function(fn){
2375
2375
  return fn ? this.bind(name, fn) : this.trigger(name);
@@ -2463,8 +2463,8 @@ jQuery.fn.extend({
2463
2463
  jQuery.makeArray(this.elements) : this;
2464
2464
  })
2465
2465
  .filter(function(){
2466
- return this.name && !this.disabled &&
2467
- (this.checked || /select|textarea/i.test(this.nodeName) ||
2466
+ return this.name && !this.disabled &&
2467
+ (this.checked || /select|textarea/i.test(this.nodeName) ||
2468
2468
  /text|hidden|password/i.test(this.type));
2469
2469
  })
2470
2470
  .map(function(i, elem){
@@ -2495,7 +2495,7 @@ jQuery.extend({
2495
2495
  callback = data;
2496
2496
  data = null;
2497
2497
  }
2498
-
2498
+
2499
2499
  return jQuery.ajax({
2500
2500
  type: "GET",
2501
2501
  url: url,
@@ -2551,7 +2551,7 @@ jQuery.extend({
2551
2551
  _default: "*/*"
2552
2552
  }
2553
2553
  },
2554
-
2554
+
2555
2555
  // Last-Modified header cache for next request
2556
2556
  lastModified: {},
2557
2557
 
@@ -2640,7 +2640,7 @@ jQuery.extend({
2640
2640
 
2641
2641
  // Attach handlers for all browsers
2642
2642
  script.onload = script.onreadystatechange = function(){
2643
- if ( !done && (!this.readyState ||
2643
+ if ( !done && (!this.readyState ||
2644
2644
  this.readyState == "load" || this.readyState == "complete") ) {
2645
2645
  done = true;
2646
2646
  success();
@@ -2688,7 +2688,7 @@ jQuery.extend({
2688
2688
  // Allow custom headers/mimetypes
2689
2689
  if ( s.beforeSend )
2690
2690
  s.beforeSend(xml);
2691
-
2691
+
2692
2692
  if ( s.global )
2693
2693
  jQuery.event.trigger("ajaxSend", [xml, s]);
2694
2694
 
@@ -2697,13 +2697,13 @@ jQuery.extend({
2697
2697
  // The transfer is complete and the data is available, or the request timed out
2698
2698
  if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
2699
2699
  requestDone = true;
2700
-
2700
+
2701
2701
  // clear poll interval
2702
2702
  if (ival) {
2703
2703
  clearInterval(ival);
2704
2704
  ival = null;
2705
2705
  }
2706
-
2706
+
2707
2707
  status = isTimeout == "timeout" && "timeout" ||
2708
2708
  !jQuery.httpSuccess( xml ) && "error" ||
2709
2709
  s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
@@ -2726,13 +2726,13 @@ jQuery.extend({
2726
2726
  try {
2727
2727
  modRes = xml.getResponseHeader("Last-Modified");
2728
2728
  } catch(e) {} // swallow exception thrown by FF if header is not available
2729
-
2729
+
2730
2730
  if ( s.ifModified && modRes )
2731
2731
  jQuery.lastModified[s.url] = modRes;
2732
2732
 
2733
2733
  // JSONP handles its own success callback
2734
2734
  if ( !jsonp )
2735
- success();
2735
+ success();
2736
2736
  } else
2737
2737
  jQuery.handleError(s, xml, status);
2738
2738
 
@@ -2744,10 +2744,10 @@ jQuery.extend({
2744
2744
  xml = null;
2745
2745
  }
2746
2746
  };
2747
-
2747
+
2748
2748
  if ( s.async ) {
2749
2749
  // don't attach the handler to the request, just poll it instead
2750
- var ival = setInterval(onreadystatechange, 13);
2750
+ var ival = setInterval(onreadystatechange, 13);
2751
2751
 
2752
2752
  // Timeout checker
2753
2753
  if ( s.timeout > 0 )
@@ -2756,20 +2756,20 @@ jQuery.extend({
2756
2756
  if ( xml ) {
2757
2757
  // Cancel the request
2758
2758
  xml.abort();
2759
-
2759
+
2760
2760
  if( !requestDone )
2761
2761
  onreadystatechange( "timeout" );
2762
2762
  }
2763
2763
  }, s.timeout);
2764
2764
  }
2765
-
2765
+
2766
2766
  // Send the data
2767
2767
  try {
2768
2768
  xml.send(s.data);
2769
2769
  } catch(e) {
2770
2770
  jQuery.handleError(s, xml, null, e);
2771
2771
  }
2772
-
2772
+
2773
2773
  // firefox 1.5 doesn't fire statechange for sync requests
2774
2774
  if ( !s.async )
2775
2775
  onreadystatechange();
@@ -2797,7 +2797,7 @@ jQuery.extend({
2797
2797
  if ( s.global && ! --jQuery.active )
2798
2798
  jQuery.event.trigger( "ajaxStop" );
2799
2799
  }
2800
-
2800
+
2801
2801
  // return XMLHttpRequest to allow aborting the request etc.
2802
2802
  return xml;
2803
2803
  },
@@ -2892,7 +2892,7 @@ jQuery.fn.extend({
2892
2892
  this.animate({
2893
2893
  height: "show", width: "show", opacity: "show"
2894
2894
  }, speed, callback) :
2895
-
2895
+
2896
2896
  this.filter(":hidden").each(function(){
2897
2897
  this.style.display = this.oldblock || "";
2898
2898
  if ( jQuery.css(this,"display") == "none" ) {
@@ -2905,13 +2905,13 @@ jQuery.fn.extend({
2905
2905
  }
2906
2906
  }).end();
2907
2907
  },
2908
-
2908
+
2909
2909
  hide: function(speed,callback){
2910
2910
  return speed ?
2911
2911
  this.animate({
2912
2912
  height: "hide", width: "hide", opacity: "hide"
2913
2913
  }, speed, callback) :
2914
-
2914
+
2915
2915
  this.filter(":visible").each(function(){
2916
2916
  this.oldblock = this.oldblock || jQuery.css(this,"display");
2917
2917
  this.style.display = "none";
@@ -2920,7 +2920,7 @@ jQuery.fn.extend({
2920
2920
 
2921
2921
  // Save the old toggle function
2922
2922
  _toggle: jQuery.fn.toggle,
2923
-
2923
+
2924
2924
  toggle: function( fn, fn2 ){
2925
2925
  return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
2926
2926
  this._toggle( fn, fn2 ) :
@@ -2932,11 +2932,11 @@ jQuery.fn.extend({
2932
2932
  jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
2933
2933
  });
2934
2934
  },
2935
-
2935
+
2936
2936
  slideDown: function(speed,callback){
2937
2937
  return this.animate({height: "show"}, speed, callback);
2938
2938
  },
2939
-
2939
+
2940
2940
  slideUp: function(speed,callback){
2941
2941
  return this.animate({height: "hide"}, speed, callback);
2942
2942
  },
@@ -2944,19 +2944,19 @@ jQuery.fn.extend({
2944
2944
  slideToggle: function(speed, callback){
2945
2945
  return this.animate({height: "toggle"}, speed, callback);
2946
2946
  },
2947
-
2947
+
2948
2948
  fadeIn: function(speed, callback){
2949
2949
  return this.animate({opacity: "show"}, speed, callback);
2950
2950
  },
2951
-
2951
+
2952
2952
  fadeOut: function(speed, callback){
2953
2953
  return this.animate({opacity: "hide"}, speed, callback);
2954
2954
  },
2955
-
2955
+
2956
2956
  fadeTo: function(speed,to,callback){
2957
2957
  return this.animate({opacity: to}, speed, callback);
2958
2958
  },
2959
-
2959
+
2960
2960
  animate: function( prop, speed, easing, callback ) {
2961
2961
  var optall = jQuery.speed(speed, easing, callback);
2962
2962
 
@@ -2966,7 +2966,7 @@ jQuery.fn.extend({
2966
2966
 
2967
2967
  var opt = jQuery.extend({}, optall);
2968
2968
  var hidden = jQuery(this).is(":hidden"), self = this;
2969
-
2969
+
2970
2970
  for ( var p in prop ) {
2971
2971
  if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
2972
2972
  return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
@@ -2984,7 +2984,7 @@ jQuery.fn.extend({
2984
2984
  this.style.overflow = "hidden";
2985
2985
 
2986
2986
  opt.curAnim = jQuery.extend({}, prop);
2987
-
2987
+
2988
2988
  jQuery.each( prop, function(name, val){
2989
2989
  var e = new jQuery.fx( self, opt, name );
2990
2990
 
@@ -3019,7 +3019,7 @@ jQuery.fn.extend({
3019
3019
  return true;
3020
3020
  });
3021
3021
  },
3022
-
3022
+
3023
3023
  queue: function(type, fn){
3024
3024
  if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) {
3025
3025
  fn = type;
@@ -3034,7 +3034,7 @@ jQuery.fn.extend({
3034
3034
  queue(this, type, fn);
3035
3035
  else {
3036
3036
  queue(this, type).push( fn );
3037
-
3037
+
3038
3038
  if ( queue(this, type).length == 1 )
3039
3039
  fn.apply(this);
3040
3040
  }
@@ -3076,7 +3076,7 @@ var queue = function( elem, type, array ) {
3076
3076
  var q = jQuery.data( elem, type + "queue" );
3077
3077
 
3078
3078
  if ( !q || array )
3079
- q = jQuery.data( elem, type + "queue",
3079
+ q = jQuery.data( elem, type + "queue",
3080
3080
  array ? jQuery.makeArray(array) : [] );
3081
3081
 
3082
3082
  return q;
@@ -3096,19 +3096,19 @@ jQuery.fn.dequeue = function(type){
3096
3096
  };
3097
3097
 
3098
3098
  jQuery.extend({
3099
-
3099
+
3100
3100
  speed: function(speed, easing, fn) {
3101
3101
  var opt = speed && speed.constructor == Object ? speed : {
3102
- complete: fn || !fn && easing ||
3102
+ complete: fn || !fn && easing ||
3103
3103
  jQuery.isFunction( speed ) && speed,
3104
3104
  duration: speed,
3105
3105
  easing: fn && easing || easing && easing.constructor != Function && easing
3106
3106
  };
3107
3107
 
3108
- opt.duration = (opt.duration && opt.duration.constructor == Number ?
3109
- opt.duration :
3108
+ opt.duration = (opt.duration && opt.duration.constructor == Number ?
3109
+ opt.duration :
3110
3110
  { slow: 600, fast: 200 }[opt.duration]) || 400;
3111
-
3111
+
3112
3112
  // Queueing
3113
3113
  opt.old = opt.complete;
3114
3114
  opt.complete = function(){
@@ -3117,10 +3117,10 @@ jQuery.extend({
3117
3117
  if ( jQuery.isFunction( opt.old ) )
3118
3118
  opt.old.apply( this );
3119
3119
  };
3120
-
3120
+
3121
3121
  return opt;
3122
3122
  },
3123
-
3123
+
3124
3124
  easing: {
3125
3125
  linear: function( p, n, firstNum, diff ) {
3126
3126
  return firstNum + diff * p;
@@ -3129,7 +3129,7 @@ jQuery.extend({
3129
3129
  return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
3130
3130
  }
3131
3131
  },
3132
-
3132
+
3133
3133
  timers: [],
3134
3134
  timerId: null,
3135
3135
 
@@ -3189,7 +3189,7 @@ jQuery.fx.prototype = {
3189
3189
  if ( jQuery.timerId == null ) {
3190
3190
  jQuery.timerId = setInterval(function(){
3191
3191
  var timers = jQuery.timers;
3192
-
3192
+
3193
3193
  for ( var i = 0; i < timers.length; i++ )
3194
3194
  if ( !timers[i]() )
3195
3195
  timers.splice(i--, 1);
@@ -3215,7 +3215,7 @@ jQuery.fx.prototype = {
3215
3215
  // flash of content
3216
3216
  if ( this.prop == "width" || this.prop == "height" )
3217
3217
  this.elem.style[this.prop] = "1px";
3218
-
3218
+
3219
3219
  // Start by showing the element
3220
3220
  jQuery(this.elem).show();
3221
3221
  },
@@ -3250,7 +3250,7 @@ jQuery.fx.prototype = {
3250
3250
  if ( this.options.display != null ) {
3251
3251
  // Reset the overflow
3252
3252
  this.elem.style.overflow = this.options.overflow;
3253
-
3253
+
3254
3254
  // Reset the display
3255
3255
  this.elem.style.display = this.options.display;
3256
3256
  if ( jQuery.css(this.elem, "display") == "none" )
@@ -3312,23 +3312,23 @@ jQuery.fx.step = {
3312
3312
  // http://jquery.com/plugins/project/dimensions
3313
3313
  jQuery.fn.offset = function() {
3314
3314
  var left = 0, top = 0, elem = this[0], results;
3315
-
3315
+
3316
3316
  if ( elem ) with ( jQuery.browser ) {
3317
- var parent = elem.parentNode,
3317
+ var parent = elem.parentNode,
3318
3318
  offsetChild = elem,
3319
- offsetParent = elem.offsetParent,
3319
+ offsetParent = elem.offsetParent,
3320
3320
  doc = elem.ownerDocument,
3321
3321
  safari2 = safari && parseInt(version) < 522 && !/adobeair/i.test(userAgent),
3322
3322
  fixed = jQuery.css(elem, "position") == "fixed";
3323
-
3323
+
3324
3324
  // Use getBoundingClientRect if available
3325
3325
  if ( elem.getBoundingClientRect ) {
3326
3326
  var box = elem.getBoundingClientRect();
3327
-
3327
+
3328
3328
  // Add the document scroll offsets
3329
3329
  add(box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
3330
3330
  box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop));
3331
-
3331
+
3332
3332
  // IE adds the HTML element's border, by default it is medium which is 2px
3333
3333
  // IE 6 and 7 quirks mode the border width is overwritable by the following css html { border: 0; }
3334
3334
  // IE 7 standards mode, the border is always 2px
@@ -3336,54 +3336,54 @@ jQuery.fn.offset = function() {
3336
3336
  // However, in IE6 and 7 quirks mode the clientLeft and clientTop properties are not updated when overwriting it via CSS
3337
3337
  // Therefore this method will be off by 2px in IE while in quirksmode
3338
3338
  add( -doc.documentElement.clientLeft, -doc.documentElement.clientTop );
3339
-
3339
+
3340
3340
  // Otherwise loop through the offsetParents and parentNodes
3341
3341
  } else {
3342
-
3342
+
3343
3343
  // Initial element offsets
3344
3344
  add( elem.offsetLeft, elem.offsetTop );
3345
-
3345
+
3346
3346
  // Get parent offsets
3347
3347
  while ( offsetParent ) {
3348
3348
  // Add offsetParent offsets
3349
3349
  add( offsetParent.offsetLeft, offsetParent.offsetTop );
3350
-
3350
+
3351
3351
  // Mozilla and Safari > 2 does not include the border on offset parents
3352
3352
  // However Mozilla adds the border for table or table cells
3353
3353
  if ( mozilla && !/^t(able|d|h)$/i.test(offsetParent.tagName) || safari && !safari2 )
3354
3354
  border( offsetParent );
3355
-
3355
+
3356
3356
  // Add the document scroll offsets if position is fixed on any offsetParent
3357
3357
  if ( !fixed && jQuery.css(offsetParent, "position") == "fixed" )
3358
3358
  fixed = true;
3359
-
3359
+
3360
3360
  // Set offsetChild to previous offsetParent unless it is the body element
3361
3361
  offsetChild = /^body$/i.test(offsetParent.tagName) ? offsetChild : offsetParent;
3362
3362
  // Get next offsetParent
3363
3363
  offsetParent = offsetParent.offsetParent;
3364
3364
  }
3365
-
3365
+
3366
3366
  // Get parent scroll offsets
3367
3367
  while ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
3368
3368
  // Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug
3369
3369
  if ( !/^inline|table.*$/i.test(jQuery.css(parent, "display")) )
3370
3370
  // Subtract parent scroll offsets
3371
3371
  add( -parent.scrollLeft, -parent.scrollTop );
3372
-
3372
+
3373
3373
  // Mozilla does not add the border for a parent that has overflow != visible
3374
3374
  if ( mozilla && jQuery.css(parent, "overflow") != "visible" )
3375
3375
  border( parent );
3376
-
3376
+
3377
3377
  // Get next parent
3378
3378
  parent = parent.parentNode;
3379
3379
  }
3380
-
3380
+
3381
3381
  // Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild
3382
3382
  // Mozilla doubles body offsets with a non-absolutely positioned offsetChild
3383
- if ( (safari2 && (fixed || jQuery.css(offsetChild, "position") == "absolute")) ||
3383
+ if ( (safari2 && (fixed || jQuery.css(offsetChild, "position") == "absolute")) ||
3384
3384
  (mozilla && jQuery.css(offsetChild, "position") != "absolute") )
3385
3385
  add( -doc.body.offsetLeft, -doc.body.offsetTop );
3386
-
3386
+
3387
3387
  // Add the document scroll offsets if position is fixed
3388
3388
  if ( fixed )
3389
3389
  add(Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),