· 9 years ago · Jan 21, 2017, 07:58 PM
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html xmlns:fb="http://ogp.me/ns/fb#">
3
4<head>
5 <script type="text/javascript">
6 try {
7 if(self.location.href != top.location.href) {
8 top.location = self.location;
9 }
10 } catch ( ex ) {
11 // if we cannot access the top.location.href property then we are not in the top-frame, so reload till we are
12 top.location = self.location;
13 }
14 </script>
15
16 <meta name="description" content="" >
17<meta name="keywords" content="" >
18<meta name="robots" content="INDEX, FOLLOW" >
19<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
20<meta http-equiv="Content-Language" content="en-US" ><title>برو رول بلي - Pro Roleplay</title>
21 <!--OpenGraph Protocol-->
22 <meta property="og:title" content="Pro RP" />
23 <meta property="og:type" content="website" />
24 <meta property="og:url" content="http://www.Pro-rp.net" />
25 <meta property="og:image" content="http://enjin.host/profile/images/avatar/avatar.png" />
26 <meta property="og:description" content="" />
27 <meta property="og:locale" content="en_US" />
28 <meta property="og:site_name" content="d7craft" />
29
30
31
32
33
34
35
36 <link href="/" rel="canonical" >
37<link href="http://enjin.host/201701191220/themes/core/js/library/markitup/skins/enjin/style.css" media="screen" rel="stylesheet" type="text/css" >
38<link href="http://enjin.host/201701191220/themes/core/css/bbcode.css" media="screen" rel="stylesheet" type="text/css" >
39<link href="http://enjin.host/201701191220/themes/core/css/styles.css" media="screen" rel="stylesheet" type="text/css" >
40<link href="http://enjin.host/201701191220/themes/v2/css/system/user_tray.css" media="screen" rel="stylesheet" type="text/css" >
41<link href="http://enjin.host/201701191220/admin/theme/css/teamspeak/tree.css" media="screen" rel="stylesheet" type="text/css" >
42<link href="http://enjin.host/201701191220/themes/core/css/modules/mumble.css" media="screen" rel="stylesheet" type="text/css" >
43<link href="http://enjin.host/201701191220/platform/react.css" media="screen" rel="stylesheet" type="text/css" >
44<link href="http://www.d7craft.net/assets/201701191220/merged/default_fonts.css" media="screen" rel="stylesheet" type="text/css" >
45<link href="http://www.d7craft.net/assets/201701191220/themes/core/css/theme.php?theme=562507&cache=201701191220-1435973209" media="screen" rel="stylesheet" type="text/css" >
46<link href="http://enjin.host/201701191220/themes/core/css/widthbugfix.css" media="screen" rel="stylesheet" type="text/css" > <style type="text/css" media="screen">
47<!--
48
49-->
50</style>
51<style type="text/css" media="screen">
52<!--
53a.tag-regular,span.tag-regular{} a.tag-admin,span.tag-admin{} a.tag-untagged,span.tag-untagged{} a.tag-banned,span.tag-banned{} a.tag-online,span.tag-online{} a.tag-ts3online,span.tag-ts3online{} a.tag-warned,span.tag-warned{} a.tag-punished,span.tag-punished{}
54-->
55</style> <script type="text/javascript" src="http://enjin.host/201701191220/merged/default_layout.js"></script>
56<script type="text/javascript" src="http://enjin.host/201701191220/themes/core/js/core.js"></script>
57<script type="text/javascript" src="http://enjin.host/201701191220/themes/core/js/library/markitup/jquery.markitup.js"></script>
58<script type="text/javascript" src="http://enjin.host/201701191220/themes/core/js/library/markitup/sets/bbcode/set.js"></script>
59<script type="text/javascript" src="http://enjin.host/201701191220/themes/core/js/modules/html.js"></script>
60<script type="text/javascript" src="http://enjin.host/201701191220/themes/core/js/library/jstorage.js"></script>
61<script type="text/javascript">
62 //<!--
63
64 var current_session_user_id = 0;
65 var current_session_csrf_token = "";
66 Enjin_Core.site_id = 1370491;
67
68 //-->
69</script>
70 <!-- Universal Google Analytics -->
71 <script>
72 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
73 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
74 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
75 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
76
77 // enjin tracking
78 ga('create', 'UA-6028401-5', 'auto');
79 ga('send', 'pageview');
80
81 // custom website tracking
82 </script>
83
84</head>
85
86<body class="
87 light-theme fixed"
88 data-dnsme-update-flag="">
89
90
91
92
93
94
95<div class="body-wrap-2"><div class="body-wrap-3">
96
97
98
99<div id="page">
100 <div class="page-outer-left"><!-- --></div>
101 <div class="page-outer-right"><!-- --></div>
102 <div id="page-wrap">
103 <div class="fixed_height_elem" id="above-site"><!-- --></div>
104 <div id="site-body">
105
106 <div class="fixed_height_elem"><table class="section-collection"><tr class="top">
107 <td class="section-border"><div class="decorator-box"></div></td>
108 <td id="section-header"
109 class="section-holder section-width-large"
110 style=""
111 data-width="1030"
112 >
113 <div class="section">
114<div id='enjin-bar'>
115
116 <div class='right'>
117
118
119 <div class='left'>
120
121
122
123
124 <!-- Social -->
125 <div id='enjin-bar-likes'>
126
127 <!-- Enjin forums / All other websites -->
128
129 <!-- Site likes -->
130
131 </div>
132
133 </div>
134</div> <div class=" container_spacer last">
135 <div class="left"><!-- --></div>
136 <div class="right"><!-- --></div>
137 <div class="middle"><!-- --></div>
138 </div>
139 <div class='clearing'><!-- --></div>
140 </div><!-- .section -->
141 </td>
142 <td class="section-border"><div class="decorator-box"></div></td>
143 </tr>
144</table><!-- .section-collection -->
145</div><!-- -->
146 <div class=""><table class="section-collection"><tr class="top">
147 <td class="section-border"><div class="decorator-box"></div></td>
148 <td id="section-main"
149 class="section-holder section-width-large"
150 style=""
151 data-width="1030"
152 >
153 <div class="section"> <div class="fixed_height_elem container_spacer first">
154 <div class="left"><!-- --></div>
155 <div class="right"><!-- --></div>
156 </div><div class='clearing'><!-- --></div>
157
158
159 <div class="container with-header with-footer first" data-container-id="50805018" data-start-collapsed="0">
160
161 <div class="fixed_height_elem container_header">
162 <div class="left"></div>
163 <div class="right"></div>
164 <div class="title">
165 <span class="mask">
166 <div class="text">
167 <div class="header_text_text">
168
169 </div>
170 </div>
171 </span>
172 </div><!-- .title -->
173 </div>
174
175 <div class="container_body">
176
177 <div class="container_left"><!-- --></div>
178 <div class="container_right"><!-- --></div>
179 <div class="container_left_top"><!-- --></div>
180 <div class="container_right_top"><!-- --></div>
181 <div class="container_left_bottom"><!-- --></div>
182 <div class="container_right_bottom"><!-- --></div>
183
184 <div class="container_content container-minimized" style="display: none;" >
185 Container minimized. <a href="javascript:;">Expand</a>
186 </div>
187 <div class="container_content container-maximized" >
188 <div class="container_inner_l"></div><div class="container_inner_r"></div><div class="container_inner_tl"></div><div class="container_inner_tr"></div><div class="container_inner_bl"></div><div class="container_inner_br"></div> <table class="container_table">
189 <tr class="container_table_row">
190 <td class="container_column leftmost rightmost" style="width: 100%">
191 <div class="module module_first module_last">
192 <div class="module_content">
193 <div class="module_content_wrap">
194 <div class='m_html' ><style type="text/css"></style><script type="text/javascript"></script> </script>
195
196</head>
197
198<body class="
199 dark-theme fixed"
200 data-dnsme-update-flag="">
201
202
203
204
205
206
207<div class="body-wrap-2"><div class="body-wrap-3">
208
209
210
211<div id="page">
212 <div class="page-outer-left"><!-- --></div>
213 <div class="page-outer-right"><!-- --></div>
214 <div id="page-wrap">
215 <div class="fixed_height_elem" id="above-site"><!-- --></div>
216 <div id="site-body">
217
218 <div class="fixed_height_elem"><table class="section-collection"><tr class="top">
219 <td class="section-border"><div class="decorator-box"></div></td>
220 <td id="section-header"
221 class="section-holder section-width-large"
222 style=""
223 data-width="1030"
224 >
225 <div class="section">
226<div id='enjin-bar'>
227
228 <div class='right'>
229
230
231 <div class='left'>
232
233 <!-- Voice -->
234 <a class='site-ts3-icon' href="ts3server://voice.extremefusiongaming.net"><!-- --></a>
235 <!-- Site info -->
236
237 <!-- Admin dropdown / Upgrade site -->
238
239 <!-- Social -->
240 <div id='enjin-bar-likes'>
241
242 <!-- Enjin forums / All other websites -->
243 <a href="https://twitter.com/https://twitter.com/efgp" class="twitter-follow-button" data-show-count="true"></a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
244
245 <!-- Site likes -->
246
247 </div>
248
249 </div>
250</div> <div class=" container_spacer last">
251 <div class="left"><!-- --></div>
252 <div class="right"><!-- --></div>
253 <div class="middle"><!-- --></div>
254 </div>
255 <div class='clearing'><!-- --></div>
256 </div><!-- .section -->
257 </td>
258 <td class="section-border"><div class="decorator-box"></div></td>
259 </tr>
260</table><!-- .section-collection -->
261</div><!-- -->
262 <div class=""><table class="section-collection"><tr class="top">
263 <td class="section-border"><div class="decorator-box"></div></td>
264 <td id="section-main"
265 class="section-holder section-width-large"
266 style=""
267 data-width="1030"
268 >
269 <div class="section"> <div class="fixed_height_elem container_spacer first">
270 <div class="left"><!-- --></div>
271 <div class="right"><!-- --></div>
272 </div><div class='clearing'><!-- --></div>
273
274
275
276 <div class="fixed_height_elem container_spacer">
277 <div class="left"><!-- --></div>
278 <div class="right"><!-- --></div>
279 </div><div class='clearing'><!-- --></div>
280
281 <div class="special_container last"><div class='m_html' ><style type="text/css">/*! Flickity v1.1.1
282http://flickity.metafizzy.co
283---------------------------------------------- */
284.flickity-enabled{position:relative}.flickity-enabled:focus{outline:0}.flickity-viewport{overflow:hidden;position:relative;height:100%}.flickity-slider{position:absolute;width:100%;height:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:-webkit-grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:-webkit-grabbing;cursor:grabbing}.flickity-prev-next-button{position:absolute;top:50%;width:44px;height:44px;border:none;border-radius:50%;background:#fff;background:hsla(0,0%,100%,.75);cursor:pointer;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.flickity-prev-next-button:hover{background:#fff}.flickity-prev-next-button:focus{outline:0;box-shadow:0 0 0 5px #09F}.flickity-prev-next-button:active{filter:alpha(opacity=60);opacity:.6}.flickity-prev-next-button.previous{left:10px}.flickity-prev-next-button.next{right:10px}.flickity-rtl .flickity-prev-next-button.previous{left:auto;right:10px}.flickity-rtl .flickity-prev-next-button.next{right:auto;left:10px}.flickity-prev-next-button:disabled{filter:alpha(opacity=30);opacity:.3;cursor:auto}.flickity-prev-next-button svg{position:absolute;left:20%;top:20%;width:60%;height:60%}.flickity-prev-next-button .arrow{fill:#333}.flickity-prev-next-button.no-svg{color:#333;font-size:26px}.flickity-page-dots{position:absolute;width:100%;bottom:-25px;padding:0;margin:0;list-style:none;text-align:center;line-height:1}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;width:10px;height:10px;margin:0 8px;background:#333;border-radius:50%;filter:alpha(opacity=25);opacity:.25;cursor:pointer}.flickity-page-dots .dot.is-selected{filter:alpha(opacity=100);opacity:1}
285
286/* Production */
287body
288{
289 position:relative;
290 background-image:none;
291}
292body::before
293{
294 width:100%;
295 height:1081px;
296 display:block;
297 position:absolute;
298 content:'';
299 left:0;
300 top:0;
301 background-image:url(http://assets-cloud.enjin.com/themes/1408639438_background_6.jpg);
302 background-position:top center;
303 background-repeat:no-repeat;
304 z-index:-1;
305 opacity:0.7;
306}
307#page-wrap
308{
309 background-image:none;
310}
311#enjin-bar a
312{
313 color: #FFF;
314}
315
316div.header
317{
318 margin-top:163px;
319 /*padding-bottom:66px;*/
320 margin-bottom:80px;
321 width:100%;
322 float:left;
323 text-align:center;
324}
325div.header h1
326{
327 font-family:Calibri;
328 font-weight:normal;
329 font-size:60px;
330 line-height:normal;
331 color:#FFF;
332 cursor:default;
333}
334div.header h2
335{
336 font-family:Calibri;
337 font-weight:normal;
338 font-size:17px;
339 line-height:normal;
340 color:#FFF;
341 cursor:default;
342}
343div.headerButtons
344{
345 margin-top:59px;
346 width:100%;
347 height:100%;
348 float:left;
349}
350div.headerButtons a#headerJoin, div.headerButtons a#headerContact
351{
352 line-height:54px;
353 width:160px;
354 height:54px;
355 font-family:Calibri;
356 font-weight:bold;
357 font-size:17px;
358 color:#FFF;
359 cursor:pointer;
360 border-radius:2px;
361 text-decoration:none;
362 display:inline-block;
363}
364div.headerButtons a#headerJoin
365{
366 margin-left:-20px;
367 vertical-align:top;
368 background:#26A6D7;
369 background:linear-gradient(to right, #5EBEE3, #26A6D7);
370}
371div.headerButtons div#headerContactContainer
372{
373 margin-left:40px;
374 width:160px;
375 display:inline-block;
376}
377
378div.headerButtons a#headerContact
379{
380 margin-bottom:8px;
381 width:156px;
382 height:50px;
383 border-color:#EEE;
384 border-width:2px;
385 border-style:solid;
386}
387div#headerContactContainer a#headerTeamSpeak
388{
389 font-family:Calibri;
390 font-weight:lighter;
391 font-size:13px;
392 line-height:normal;
393 color:#FFF;
394 text-decoration:underline;
395}
396div.headerIntroduction
397{
398 margin-top:57px;
399 float:left;
400 width:100%;
401}
402div.headerIntroduction p
403{
404 width:720px;
405 font-family:Calibri;
406 font-weight:normal;
407 font-size:15px;
408 line-height:normal;
409 color:#FFF;
410 display:inline-block;
411 cursor:default;
412}
413div.headerArrow
414{
415 float:left;
416 width:100%;
417 margin-top:40px;
418 text-align:center;
419}
420div.headerArrow svg
421{
422 width:25px;
423 height:25px;
424 cursor:pointer;
425 display:inline-block;
426 transform:rotate(90deg);
427 -webkit-transform:rotate(90deg);
428 fill:#FFF;
429}
430
431div.slider
432{
433 float:left;
434 margin-bottom:59px;
435 width:100%;
436 height:200px;
437 box-sizing: border-box;
438 padding: 0 80px;
439}
440.gallery
441{
442 width:100%;
443}
444.gallery-cell
445{
446 float:left;
447 width:33.3%;
448 text-align:center;
449 display:table;
450 height:100%;
451}
452.gallery-cell div
453{
454 display:table-cell;
455 vertical-align:middle;
456}
457.flickity-prev-next-button.next
458{
459 right:-45px;
460}
461.flickity-prev-next-button.previous
462{
463 left:-45px;
464}
465.flickity-prev-next-button, .flickity-prev-next-button:hover
466{
467 background:transparent;
468}
469.flickity-prev-next-button .arrow, .flickity-prev-next-button .arrow:hover
470{
471 fill:#FFF;
472}
473.flickity-prev-next-button:active
474{
475 opacity:1;
476}
477.flickity-prev-next-button:disabled:active
478{
479 opacity:0.3;
480}
481
482div.detail
483{
484 margin-bottom:65px;
485 float:left;
486 width:100%;
487}
488div.detailColumn
489{
490 float:left;
491 margin-left:20px;
492 width:481px;
493}
494div.detailItem
495{
496 float:left;
497 clear:both;
498 margin-bottom:32px;
499}
500div.detailItem h1
501{
502 margin-bottom:16px;
503 font-family:Calibri;
504 font-weight:bold;
505 font-size:20px;
506 line-height:normal;
507 color:#FFF;
508 cursor:default;
509}
510div.detailItem p
511{
512 font-family:Calibri;
513 font-weight:normal;
514 font-size:14px;
515 line-height:normal;
516 color:#FFF;
517 cursor:default;
518}
519div.detailItem p a
520{
521 text-decoration:underline;
522 color:#A5DFFF;
523}
524
525div.footer
526{
527 margin-bottom:40px;
528 float:left;
529 width:100%;
530}
531div.footer h1
532{
533 margin-bottom:15px;
534 font-family:Calibri;
535 font-weight:normal;
536 font-size:36px;
537 line-height:normal;
538 color:#FFF;
539 cursor:default;
540 text-align:center;
541}
542div.footerGetInvolved
543{
544 float:left;
545 width:100%;
546 text-align:center;
547}
548div.footerGetInvolved p
549{
550 width:720px;
551 font-family:Calibri;
552 font-weight:normal;
553 font-size:15px;
554 line-height:normal;
555 color:#FFF;
556 display:inline-block;
557 cursor:default;
558}
559div.footerGetInvolved p a
560{
561 text-decoration:underline;
562 color:#A5DFFF;
563}</style><script type="text/javascript"></script><script src="https://unpkg.com/flickity@2/dist/flickity.pkgd.min.js"></script>
564
565
566
567
568<script type="text/javascript" src="http://enjin.host/201701191220/platform/react.js"></script>
569
570</body>
571
572</html></div> </div>
573 </div><!-- module_content -->
574
575
576
577 </div><!-- .module --> </td>
578 </tr>
579 </table>
580 </div><!-- .container_content -->
581 </div><!-- .container_body -->
582
583 <div class="fixed_height_elem container_footer">
584 <div class="left"><!-- --></div>
585 <div class="right"><!-- --></div>
586 </div>
587
588 </div><!-- .container -->
589
590
591
592 <div class="fixed_height_elem container_spacer">
593 <div class="left"><!-- --></div>
594 <div class="right"><!-- --></div>
595 </div><div class='clearing'><!-- --></div>
596
597
598 <div class="container with-header with-footer last" data-container-id="50720687" data-start-collapsed="0">
599
600 <div class="fixed_height_elem container_header">
601 <div class="left"></div>
602 <div class="right"></div>
603 <div class="title">
604 <span class="mask">
605 <div class="text">
606 <div class="header_text_text">
607
608 </div>
609 </div>
610 </span>
611 </div><!-- .title -->
612 </div>
613
614 <div class="container_body">
615
616 <div class="container_left"><!-- --></div>
617 <div class="container_right"><!-- --></div>
618 <div class="container_left_top"><!-- --></div>
619 <div class="container_right_top"><!-- --></div>
620 <div class="container_left_bottom"><!-- --></div>
621 <div class="container_right_bottom"><!-- --></div>
622
623 <div class="container_content container-minimized" style="display: none;" >
624 Container minimized. <a href="javascript:;">Expand</a>
625 </div>
626 <div class="container_content container-maximized" >
627 <div class="container_inner_l"></div><div class="container_inner_r"></div><div class="container_inner_tl"></div><div class="container_inner_tr"></div><div class="container_inner_bl"></div><div class="container_inner_br"></div> <table class="container_table">
628 <tr class="container_table_row">
629 <td class="container_column leftmost rightmost" style="width: 100%">
630 <div class="module module_first module_last">
631 <div class="module_content">
632 <div class="module_content_wrap">
633 <div class='m_html' ><style type="text/css"></style><script type="text/javascript"></script> </script>
634
635</head>
636
637<body class="
638 dark-theme fixed"
639 data-dnsme-update-flag="">
640
641
642
643
644
645
646<div class="body-wrap-2"><div class="body-wrap-3">
647
648
649
650<div id="page">
651 <div class="page-outer-left"><!-- --></div>
652 <div class="page-outer-right"><!-- --></div>
653 <div id="page-wrap">
654 <div class="fixed_height_elem" id="above-site"><!-- --></div>
655 <div id="site-body">
656
657 <div class="fixed_height_elem"><table class="section-collection"><tr class="top">
658 <td class="section-border"><div class="decorator-box"></div></td>
659 <td id="section-header"
660 class="section-holder section-width-large"
661 style=""
662 data-width="1030"
663 >
664 <div class="section">
665<div id='enjin-bar'>
666
667 <div class='right'>
668
669
670 <!-- Login / Register -->
671 <a href="/login" rel="nofollow">Login</a>
672 <span class='divider'>|</span><a href='/login/do/register' rel='nofollow'>Register</a>
673
674
675 </div>
676
677 <div class='left'>
678
679 <!-- Site name -->
680 <a href='/'></a>
681
682 <!-- Voice -->
683
684 <!-- Site info -->
685 <span class='divider'>|</span><a href='/page/207770'>Site Info</a>
686 <!-- Admin dropdown / Upgrade site -->
687
688 <!-- Social -->
689 <div id='enjin-bar-likes'>
690
691 <!-- Enjin forums / All other websites -->
692 <span class="fb-like-site"><fb:like href="http://www.facebook.com/" send="false" layout="button_count" width="100" show_faces="false"></fb:like></span><span class="gplus-like-site"><g:plusone size="medium" href=""></g:plusone></span><a href="https://twitter.com/d7craft" class="twitter-follow-button" data-show-count="true"></a><a href="" class="twitter-share-button twitter-like-site" data-url=""></a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
693
694 <!-- Site likes -->
695
696 </div>
697
698 </div>
699</div> <div class=" container_spacer last">
700 <div class="left"><!-- --></div>
701 <div class="right"><!-- --></div>
702 <div class="middle"><!-- --></div>
703 </div>
704 <div class='clearing'><!-- --></div>
705 </div><!-- .section -->
706 </td>
707 <td class="section-border"><div class="decorator-box"></div></td>
708 </tr>
709</table><!-- .section-collection -->
710</div><!-- -->
711 <div class=""><table class="section-collection"><tr class="top">
712 <td class="section-border"><div class="decorator-box"></div></td>
713 <td id="section-main"
714 class="section-holder section-width-large"
715 style=""
716 data-width="1030"
717 >
718 <div class="section"> <div class="fixed_height_elem container_spacer first">
719 <div class="left"><!-- --></div>
720 <div class="right"><!-- --></div>
721 </div><div class='clearing'><!-- --></div>
722
723 <div class="special_container first last"><div class='m_html' style='padding: 0px; margin-bottom: -1px;'><style type="text/css">@charset "utf-8";
724@import url(http://fonts.googleapis.com/css?family=Lato:300,400,700);
725
726@font-face {
727 font-family: 'codropsicons';
728 src:url('../fonts/codropsicons/codropsicons.eot');
729 src:url('../fonts/codropsicons/codropsicons.eot?#iefix') format('embedded-opentype'),
730 url('../fonts/codropsicons/codropsicons.woff') format('woff'),
731 url('../fonts/codropsicons/codropsicons.ttf') format('truetype'),
732 url('../fonts/codropsicons/codropsicons.svg#codropsicons') format('svg');
733 font-weight: normal;
734 font-style: normal;
735}
736
737*, *:after, *:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
738body, html { font-size: 15px; padding: 0; margin: 0; height: 100%;}
739
740/* Clearfix hack */
741.clearfix:before, .clearfix:after { content: " "; display: table; }
742.clearfix:after { clear: both; }
743
744body {
745 font-family: 'Lato', sans-serif;
746 color: #89867e;
747 background: #29333a;
748}
749
750a {
751 color: #333;
752 text-decoration: none;
753}
754
755a:hover {
756 color: #fff;
757}
758
759form, .section-header:hover>div {
760 display: none;
761}
762
763.section-header:hover>form {
764 display: none;
765}
766
767form, .enjin-bar:hover>div {
768 display: none;
769}
770
771.enjin-bar:hover>form {
772 display: none;
773}
774
775#enjin-bar .left {display: none;}
776#enjin-bar .right {display: none;}
777#page-footer .left {display: none;}
778#enjin-tray {display: none;}
779#buttons {display: none;}
780#enjin-tray-messaging {display: none;}
781#site-announcements {display: none;}
782#announcement-popup {display: none;}
783#announcement-canvas-separator {display: none;}
784
785.main {
786 max-width: 1200px;
787 height: 100%;
788 margin: 0 auto;
789 position: fixed;
790}
791
792
793.logo {
794 background-image: url("http://up1.mrkzgulf.com/d.php?o=1475171639562.png");
795 position: fixed;
796 top: 61%;
797 left: 75%;
798 width: 123px;
799 height: 120px;
800 margin-left: -388px;
801 margin-top: -290px;
802 z-index: 200;
803}
804
805.container {
806 position: fixed;
807
808 min-width: 100%;
809 height: 100%;
810 overflow: visible;
811 z-index: 50;
812 -webkit-transition: all .6s ease-in-out;
813 -moz-transition: all .6s ease-in-out;
814 -o-transition: all .6s ease-in-out;
815 -ms-transition: all .6s ease-in-out;
816 transition: all .6s ease-in-out;
817 width: 100%;
818}
819
820.containerhover {
821 background: 0;
822 -webkit-transition: all .6s ease-in-out .2s;
823 -moz-transition: all .6s ease-in-out .2s;
824 -o-transition: all .6s ease-in-out .2s;
825 -ms-transition: all .6s ease-in-out .2s;
826 transition: all .6s ease-in-out .2s;
827}
828
829.containerdots {
830 background-image: url("http://files.enjin.com/207770/directimg/dots.png");
831 position: fixed;
832 top: 0;
833 left: 0;
834 min-width: 100%;
835 height: 100%;
836 overflow: visible;
837 z-index: 40;
838}
839
840.containerbg {
841 position: fixed;
842 top: 0;
843 left: 0;
844 min-width: 100%;
845 height: 100%;
846 overflow: visible;
847 z-index: 30;
848}
849
850.hoverbackground {
851 background-position: center top;
852 opacity: 0.0;
853 filter: alpha(opacity=0); /* For IE8 and earlier */
854 position: fixed;
855 top: 0;
856 left: 0;
857 min-width: 100%;
858 height: 100%;
859 overflow: visible;
860 z-index: 30;
861 -webkit-transition: all .6s ease-in-out, background-position .1s ease-in .6s;
862 -moz-transition: all .6s ease-in-out, background-position .1s ease-in .6s;
863 -o-transition: all .6s ease-in-out, background-position .1s ease-in .6s;
864 -ms-transition: all .6s ease-in-out, background-position .1s ease-in .6s;
865 transition: all .6s ease-in-out, background-position .1s ease-in .6s;
866}
867
868.hoverbackground1 {
869 background-image: url("https://arma3.com/assets/img/wallpapers/apex/1/Arma-3-Apex_wallpaper_1920x1200.jpg");
870}
871
872.hoverbackground2 {
873 background: center top url("https://arma3.com/assets/img/wallpapers/apex/1/Arma-3-Apex_wallpaper_1920x1200.jpg");
874}
875
876.hoverbackground3 {
877 background: center top url("http://www.dayztv.com/wp-content/uploads/2014/01/dayz-standalone-wallpaper-1.jpg");
878}
879
880.hoverbackground4 {
881 background: center top url("https://analogaddiction.files.wordpress.com/2013/12/arma-3-screenshot-wy-55-hellcat.jpg");
882}
883
884.hoverbackground5 {
885 background: center top url("http://www.dayztv.com/wp-content/uploads/2014/01/dayz-standalone-wallpaper-1.jpg");
886}
887
888.hoverbackground6 {
889 background: center top url("https://analogaddiction.files.wordpress.com/2013/12/arma-3-screenshot-wy-55-hellcat.jpg");
890}
891
892.hoverbackgroundEasterEgg {
893 background: center top url("http://www.dayztv.com/wp-content/uploads/2014/01/dayz-standalone-wallpaper-1.jpg");
894}
895
896
897.hoverbackground1h {
898 background-position: center bottom;
899 opacity: 1.0;
900 filter: alpha(opacity=100); /* For IE8 and earlier */
901 -webkit-transition: all .6s ease-in-out, background-position 4s ease-out;
902 -moz-transition: all .6s ease-in-out, background-position 4s ease-out;
903 -o-transition: all .6s ease-in-out, background-position 4s ease-out;
904 -ms-transition: all .6s ease-in-out, background-position 4s ease-out;
905 transition: all .6s ease-in-out, background-position 4s ease-out;
906}
907
908.hoverbackground2h {
909 background-position: center bottom;
910 opacity: 1.0;
911 filter: alpha(opacity=100); /* For IE8 and earlier */
912 -webkit-transition: all .6s ease-in-out, background-position 4s ease-out;
913 -moz-transition: all .6s ease-in-out, background-position 4s ease-out;
914 -o-transition: all .6s ease-in-out, background-position 4s ease-out;
915 -ms-transition: all .6s ease-in-out, background-position 4s ease-out;
916 transition: all .6s ease-in-out, background-position 4s ease-out;
917}
918
919.hoverbackground3h {
920 background-position: center bottom;
921 opacity: 1.0;
922 filter: alpha(opacity=100); /* For IE8 and earlier */
923 -webkit-transition: all .6s ease-in-out, background-position 4s ease-out;
924 -moz-transition: all .6s ease-in-out, background-position 4s ease-out;
925 -o-transition: all .6s ease-in-out, background-position 4s ease-out;
926 -ms-transition: all .6s ease-in-out, background-position 4s ease-out;
927 transition: all .6s ease-in-out, background-position 4s ease-out;
928}
929.hoverbackground4h {
930 background-position: center bottom;
931 opacity: 1.0;
932 filter: alpha(opacity=100); /* For IE8 and earlier */
933 -webkit-transition: all .6s ease-in-out, background-position 4s ease-out;
934 -moz-transition: all .6s ease-in-out, background-position 4s ease-out;
935 -o-transition: all .6s ease-in-out, background-position 4s ease-out;
936 -ms-transition: all .6s ease-in-out, background-position 4s ease-out;
937 transition: all .6s ease-in-out, background-position 4s ease-out;
938}
939.hoverbackground5h {
940 background-position: center bottom;
941 opacity: 1.0;
942 filter: alpha(opacity=100); /* For IE8 and earlier */
943 -webkit-transition: all .6s ease-in-out, background-position 4s ease-out;
944 -moz-transition: all .6s ease-in-out, background-position 4s ease-out;
945 -o-transition: all .6s ease-in-out, background-position 4s ease-out;
946 -ms-transition: all .6s ease-in-out, background-position 4s ease-out;
947 transition: all .6s ease-in-out, background-position 4s ease-out;
948}
949.hoverbackground6h {
950 background-position: center bottom;
951 opacity: 1.0;
952 filter: alpha(opacity=100); /* For IE8 and earlier */
953 -webkit-transition: all .6s ease-in-out, background-position 4s ease-out;
954 -moz-transition: all .6s ease-in-out, background-position 4s ease-out;
955 -o-transition: all .6s ease-in-out, background-position 4s ease-out;
956 -ms-transition: all .6s ease-in-out, background-position 4s ease-out;
957 transition: all .6s ease-in-out, background-position 4s ease-out;
958}
959
960.hoverbackgroundEasterEggh {
961 background-position: center bottom;
962 overflow: hidden;
963 opacity: 1.0;
964 filter: alpha(opacity=100); /* For IE8 and earlier */
965 -webkit-transition: all .6s ease-in-out, background-position 4s ease-out;
966 -moz-transition: all .6s ease-in-out, background-position 4s ease-out;
967 -o-transition: all .6s ease-in-out, background-position 4s ease-out;
968 -ms-transition: all .6s ease-in-out, background-position 4s ease-out;
969 transition: all .6s ease-in-out, background-position 4s ease-out;
970}
971/* ---------------------------------------- NAV ---------------------------------------- */
972
973.nav {
974 align: center;
975 z-index: 100;
976 position: fixed;
977 top: 51%;
978 left: 16.5%;
979}
980
981.nav2 {
982 z-index: 100;
983 font-family: 'Lato', sans-serif;
984 font-weight: 300;
985 position: fixed;
986 top: 61%;
987 left: -25%;
988 right: 0%;
989 margin: 0 auto;
990 text-align: center;
991 word-wrap:normal;
992}
993
994.nav3 {
995 z-index: 100;
996 font-family: 'Lato', sans-serif;
997 font-weight: 300;
998 position: fixed;
999 top: 61%;
1000 left: 0%;
1001 right: 0%;
1002 margin: 0 auto;
1003 text-align: center;
1004 word-wrap:normal;
1005}
1006
1007.nav4 {
1008 z-index: 100;
1009 font-family: 'Lato', sans-serif;
1010 font-weight: 300;
1011 position: fixed;
1012 top: 61%;
1013 left: 25%;
1014 right: 0%;
1015 margin: 0 auto;
1016 text-align: center;
1017 word-wrap:normal;
1018}
1019
1020.nav5 {
1021 z-index: 100;
1022 font-family: 'Lato', sans-serif;
1023 font-weight: 300;
1024 position: fixed;
1025 top: 61%;
1026 left: 38%;
1027 right: 0%;
1028 margin: 0 auto;
1029 text-align: center;
1030 word-wrap:normal;
1031}
1032
1033.nav ul {
1034 align: center;
1035 max-width: 1200px;
1036 height: 100%;
1037 margin: 0;
1038 padding: 0;
1039 list-style: none;
1040 font-size: 20px;
1041 font-weight: 800;
1042 text-shadow: 2px 3px 0px rgba(0,0,0,0.33);
1043}
1044
1045.nav li {
1046 float:left ;
1047 width: 16.66666666666667%;
1048 max-width: 200px;
1049 height: 100%;
1050 text-align: center;
1051}
1052
1053.nav li span {
1054 display: block;
1055}
1056
1057.nav a {
1058 display: block;
1059 width: auto;
1060 color: rgba(239, 239, 239, .9);
1061 vertical-align: bottom;
1062 padding-left: 1px;
1063 padding-top: 40px;
1064 padding-bottom: 40px;
1065 margin-top: -40px;
1066 letter-spacing: 1px;
1067 text-decoration: none;
1068 -webkit-transition: padding-left .4s ease, letter-spacing .4s ease;
1069 -moz-transition: padding-left .2s ease, letter-spacing .2s ease;
1070 -o-transition: padding-left .2s ease, letter-spacing .2s ease;
1071 -ms-transition: padding-left .2s ease, letter-spacing .2s ease;
1072 transition: padding-left .2s ease, letter-spacing .2s ease;
1073}
1074
1075.nav i{
1076 /* Make the font smoother for Chrome */
1077 -webkit-transform: translate3d(0, 0, 0);
1078 -moz-transform: translate3d(0, 0, 0);
1079 -o-transform: translate3d(0, 0, 0);
1080 -ms-transform: translate3d(0, 0, 0);
1081 transform: translate3d(0, 0, 0);
1082}
1083
1084/* ---------------------------------------- NAV LINK HOVER ---------------------------------------- */
1085
1086.nav li a:hover,
1087.nav li a:active{
1088 color: rgba(249, 249, 249, .9);
1089 padding-left: 6px;
1090 letter-spacing: 6px;
1091 -webkit-transition: padding-left .2s ease, letter-spacing .2s ease;
1092 -moz-transition: padding-left .2s ease, letter-spacing .2s ease;
1093 -o-transition: padding-left .2s ease, letter-spacing .2s ease;
1094 -ms-transition: padding-left .2s ease, letter-spacing .2s ease;
1095 transition: padding-left .2s ease, letter-spacing .2s ease;
1096}
1097
1098/* ---------------------------------------- NAV BG ---------------------------------------- */
1099
1100.sub {
1101 position: relative;
1102 max-width: 1200px;
1103 height: 100%;
1104 left: 0;
1105 z-index: 90;
1106}
1107
1108.navbg {
1109 top: 0;
1110 left: 0;
1111 height: 100%;
1112 align: center;
1113 z-index: 100;
1114 position: relative;
1115 top: 8%;
1116 left: 16.5%;
1117}
1118
1119.navbg ul {
1120 position: relative;
1121 line-height: 0%;
1122 max-width: 1200px;
1123 height: 100%;
1124 margin: 0;
1125 padding: 0;
1126 list-style: none;
1127
1128}
1129
1130.navbg li {
1131 position: fixed;
1132 top: 0;
1133 width: 16.66666666666667%;
1134 max-width: 200px;
1135 height: 100%;
1136 text-align: center;
1137}
1138
1139/* ---------------------------------------- NAV Hover ---------------------------------------- */
1140
1141.navbgs1 {
1142 position: relative;
1143 left: 100%;
1144 top: 0;
1145 margin: 0 auto;
1146 height: 100%;
1147 width: 0px;
1148 opacity: 0.0;
1149 filter: alpha(opacity=0); /* For IE8 and earlier */
1150 -moz-box-sizing: border-box;
1151 -webkit-box-sizing: border-box;
1152 box-sizing: border-box;
1153 border-left: 0px solid rgba(47,127,225,1);
1154 border-right: 0px solid rgba(47,127,225,1);
1155 background: rgb(42,86,142); /* Old browsers */
1156 background: -moz-linear-gradient(-45deg, rgba(54,142,42,1) 0%, rgba(71,225,47,1) 52%, rgba(62,201,42,1) 52%, rgba(73,225,51,1) 100%); /* FF3.6+ */
1157 background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(54,142,42,1)), color-stop(52%,rgba(71,225,47,1)), color-stop(52%,rgba(62,201,42,1)), color-stop(100%,rgba(73,225,51,1))); /* Chrome,Safari4+ */
1158 background: -webkit-linear-gradient(-45deg, rgba(54,142,42,1) 0%,rgba(71,225,47,1) 52%,rgba(62,201,42,1) 52%,rgba(73,225,51,1) 100%); /* Chrome10+,Safari5.1+ */
1159 background: -o-linear-gradient(-45deg, rgba(54,142,42,1) 0%,rgba(71,225,47,1) 52%,rgba(62,201,42,1) 52%,rgba(73,225,51,1) 100%); /* Opera 11.10+ */
1160 background: -ms-linear-gradient(-45deg, rgba(54,142,42,1) 0%,rgba(71,225,47,1) 52%,rgba(62,201,42,1) 52%,rgba(73,225,51,1) 100%); /* IE10+ */
1161 background: linear-gradient(135deg, rgba(54,142,42,1) 0%,rgba(71,225,47,1) 52%,rgba(62,201,42,1) 52%,rgba(73,225,51,1) 100%); /* W3C */
1162 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2a568e', endColorstr='#3381e1',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
1163 -webkit-transition: all .4s ease-in-out;
1164 -moz-transition: all .4s ease-in-out;
1165 -o-transition: all .4s ease-in-out;
1166 -ms-transition: all .4s ease-in-out;
1167 transition: all .4s ease-in-out;
1168}
1169.navbgs1h {
1170 opacity: 0.9;
1171 filter: alpha(opacity=9); /* For IE8 and earlier */
1172 width: 100%;
1173 border-left: 4px solid rgba(0,0,0,0.25);
1174 border-right: 4px solid rgba(0,0,0,0.25);
1175 -webkit-transition: all .4s ease-in-out;
1176 -moz-transition: all .4s ease-in-out;
1177 -o-transition: all .4s ease-in-out;
1178 -ms-transition: all .4s ease-in-out;
1179 transition: all .4s ease-in-out;
1180}
1181
1182.navbgs2 {
1183 position: fixed;
1184 top: 0;
1185 left: 31%;
1186 margin: 0 auto;
1187 height: 100%;
1188 width: 0px;
1189 opacity: 0.0;
1190 filter: alpha(opacity=0); /* For IE8 and earlier */
1191 -moz-box-sizing: border-box;
1192 -webkit-box-sizing: border-box;
1193 box-sizing: border-box;
1194 border-left: 0px solid rgba(47,127,225,1);
1195 border-right: 0px solid rgba(47,127,225,1);
1196 background: rgb(42,86,142); /* Old browsers */
1197 background: -moz-linear-gradient(-45deg, rgba(42,86,142,1) 0%, rgba(47,127,225,1) 52%, rgba(42,113,201,1) 52%, rgba(51,129,225,1) 100%); /* FF3.6+ */
1198 background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(42,86,142,1)), color-stop(52%,rgba(47,127,225,1)), color-stop(52%,rgba(42,113,201,1)), color-stop(100%,rgba(51,129,225,1))); /* Chrome,Safari4+ */
1199 background: -webkit-linear-gradient(-45deg, rgba(42,86,142,1) 0%,rgba(47,127,225,1) 52%,rgba(42,113,201,1) 52%,rgba(51,129,225,1) 100%); /* Chrome10+,Safari5.1+ */
1200 background: -o-linear-gradient(-45deg, rgba(42,86,142,1) 0%,rgba(47,127,225,1) 52%,rgba(42,113,201,1) 52%,rgba(51,129,225,1) 100%); /* Opera 11.10+ */
1201 background: -ms-linear-gradient(-45deg, rgba(42,86,142,1) 0%,rgba(47,127,225,1) 52%,rgba(42,113,201,1) 52%,rgba(51,129,225,1) 100%); /* IE10+ */
1202 background: linear-gradient(135deg, rgba(42,86,142,1) 0%,rgba(47,127,225,1) 52%,rgba(42,113,201,1) 52%,rgba(51,129,225,1) 100%); /* W3C */
1203 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2a568e', endColorstr='#3381e1',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
1204 -webkit-transition: all .4s ease-in-out;
1205 -moz-transition: all .4s ease-in-out;
1206 -o-transition: all .4s ease-in-out;
1207 -ms-transition: all .4s ease-in-out;
1208 transition: all .4s ease-in-out;
1209
1210}
1211
1212.navbgs2h {
1213 position: fixed;
1214 opacity: 0.9;
1215 filter: alpha(opacity=9); /* For IE8 and earlier */
1216 left: 31.5%;
1217 width: 12%;
1218 border-left: 4px solid rgba(0,0,0,0.25);
1219 border-right: 4px solid rgba(0,0,0,0.25);
1220 -webkit-transition: all .4s ease-in-out;
1221 -moz-transition: all .4s ease-in-out;
1222 -o-transition: all .4s ease-in-out;
1223 -ms-transition: all .4s ease-in-out;
1224 transition: all .4s ease-in-out;
1225}
1226
1227.navbgs3 {
1228 position: fixed;
1229 top: 0;
1230 left: 45%;
1231 margin: 0 auto;
1232 height: 100%;
1233 width: 0px;
1234 opacity: 0.0;
1235 filter: alpha(opacity=0); /* For IE8 and earlier */
1236 -moz-box-sizing: border-box;
1237 -webkit-box-sizing: border-box;
1238 box-sizing: border-box;
1239 border-left: 0px solid rgba(47,127,225,1);
1240 border-right: 0px solid rgba(47,127,225,1);
1241 background: rgb(54,142,42); /* Old browsers */
1242 background: -moz-linear-gradient(-45deg, rgba(225,0,30,1) 0%, rgba(242,113,35,1) 52%, rgba(233,109,30,1) 52%, rgba(244,113,39,1) 100%); /* FF3.6+ */
1243 background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(225,0,30,1)), color-stop(52%,rgba(242,113,35,1)), color-stop(52%,rgba(233,109,30,1)), color-stop(100%,rgba(244,113,39,1,1))); /* Chrome,Safari4+ */
1244 background: -webkit-linear-gradient(-45deg, rgba(225,0,30,1) 0%,rgba(242,113,35,1) 52%,rgba(233,109,30,1) 52%,rgba(244,113,39,1) 100%); /* Chrome10+,Safari5.1+ */
1245 background: -o-linear-gradient(-45deg, rgba(225,0,30,1) 0%,rgba(242,113,35,1) 52%,rgba(233,109,30,1) 52%,rgba(244,113,39,1) 100%); /* Opera 11.10+ */
1246 background: -ms-linear-gradient(-45deg, rgba(225,0,30,1) 0%,rgba(242,113,35,1) 52%,rgba(233,109,30,1) 52%,rgba(244,113,39,1) 100%); /* IE10+ */
1247 background: linear-gradient(135deg, rgba(225,0,30,1) 0%,rgba(242,113,35,1) 52%,rgba(233,109,30,1) 52%,rgba(244,113,39,1) 100%); /* W3C */
1248 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#368e2a', endColorstr='#49e133',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
1249 -webkit-transition: all .4s ease-in-out;
1250 -moz-transition: all .4s ease-in-out;
1251 -o-transition: all .4s ease-in-out;
1252 -ms-transition: all .4s ease-in-out;
1253 transition: all .4s ease-in-out;
1254}
1255.navbgs3h {
1256 position: fixed;
1257 left: 44%;
1258 opacity: 0.9;
1259 filter: alpha(opacity=9); /* For IE8 and earlier */
1260 width: 12%;
1261 border-left: 4px solid rgba(0,0,0,0.25);
1262 border-right: 4px solid rgba(0,0,0,0.25);
1263 -webkit-transition: all .4s ease-in-out;
1264 -moz-transition: all .4s ease-in-out;
1265 -o-transition: all .4s ease-in-out;
1266 -ms-transition: all .4s ease-in-out;
1267 transition: all .4s ease-in-out;
1268}
1269
1270.navbgs4 {
1271 position: fixed;
1272 left: 57%;
1273 top: 0;
1274 margin: 0 auto;
1275 height: 100%;
1276 width: 0px;
1277 opacity: 0.0;
1278 filter: alpha(opacity=0); /* For IE8 and earlier */
1279 -moz-box-sizing: border-box;
1280 -webkit-box-sizing: border-box;
1281 box-sizing: border-box;
1282 border-left: 0px solid rgba(47,127,225,1);
1283 border-right: 0px solid rgba(47,127,225,1);
1284 background: rgb(54,142,42); /* Old browsers */
1285 background: -moz-linear-gradient(-45deg, rgba(254,142,42,1) 0%, rgba(271,225,47,1) 52%, rgba(262,201,42,1) 52%, rgba(273,225,51,1) 100%); /* FF3.6+ */
1286 background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(254,142,42,1)), color-stop(52%,rgba(271,225,47,1)), color-stop(52%,rgba(262,201,42,1)), color-stop(100%,rgba(273,225,51,1))); /* Chrome,Safari4+ */
1287 background: -webkit-linear-gradient(-45deg, rgba(254,142,42,1) 0%,rgba(271,225,47,1) 52%,rgba(262,201,42,1) 52%,rgba(273,225,51,1) 100%); /* Chrome10+,Safari5.1+ */
1288 background: -o-linear-gradient(-45deg, rgba(254,142,42,1) 0%,rgba(271,225,47,1) 52%,rgba(262,201,42,1) 52%,rgba(273,225,51,1) 100%); /* Opera 11.10+ */
1289 background: -ms-linear-gradient(-45deg, rgba(254,142,42,1) 0%,rgba(271,225,47,1) 52%,rgba(262,201,42,1) 52%,rgba(273,225,51,1) 100%); /* IE10+ */
1290 background: linear-gradient(135deg, rgba(254,142,42,1) 0%,rgba(271,225,47,1) 52%,rgba(262,201,42,1) 52%,rgba(273,225,51,1) 100%); /* W3C */
1291 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#368e2a', endColorstr='#49e133',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
1292 -webkit-transition: all .4s ease-in-out;
1293 -moz-transition: all .4s ease-in-out;
1294 -o-transition: all .4s ease-in-out;
1295 -ms-transition: all .4s ease-in-out;
1296 transition: all .4s ease-in-out;
1297}
1298.navbgs4h {
1299 position: fixed;
1300 left: 56.5%;
1301 opacity: 0.9;
1302 filter: alpha(opacity=9); /* For IE8 and earlier */
1303 width: 12%;
1304 border-left: 4px solid rgba(0,0,0,0.25);
1305 border-right: 4px solid rgba(0,0,0,0.25);
1306 -webkit-transition: all .4s ease-in-out;
1307 -moz-transition: all .4s ease-in-out;
1308 -o-transition: all .4s ease-in-out;
1309 -ms-transition: all .4s ease-in-out;
1310 transition: all .4s ease-in-out;
1311}
1312
1313.navbgs5 {
1314 position: fixed;
1315 left: 70%;
1316 top: 0;
1317 margin: 0 auto;
1318 height: 100%;
1319 width: 0px;
1320 opacity: 0.0;
1321 filter: alpha(opacity=0); /* For IE8 and earlier */
1322 -moz-box-sizing: border-box;
1323 -webkit-box-sizing: border-box;
1324 box-sizing: border-box;
1325 border-left: 0px solid rgba(47,127,225,1);
1326 border-right: 0px solid rgba(47,127,225,1);
1327 background: rgb(54,142,42); /* Old browsers */
1328 background: -moz-linear-gradient(-45deg, rgba(242,86,142,1) 0%, rgba(247,127,225,1) 52%, rgba(242,113,201,1) 52%, rgba(251,129,225,1) 100%); /* FF3.6+ */
1329 background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(242,86,142,1)), color-stop(52%,rgba(247,127,225,1)), color-stop(52%,rgba(242,113,201,1)), color-stop(100%,rgba(251,129,225,1))); /* Chrome,Safari4+ */
1330 background: -webkit-linear-gradient(-45deg, rgba(242,86,142,1) 0%,rgba(247,127,225,1) 52%,rgba(242,113,201,1) 52%,rgba(251,129,225,1) 100%); /* Chrome10+,Safari5.1+ */
1331 background: -o-linear-gradient(-45deg, rgba(242,86,142,1) 0%,rgba(247,127,225,1) 52%,rgba(242,113,201,1) 52%,rgba(251,129,225,1) 100%); /* Opera 11.10+ */
1332 background: -ms-linear-gradient(-45deg, rgba(242,86,142,1) 0%,rgba(247,127,225,1) 52%,rgba(242,113,201,1) 52%,rgba(251,129,225,1) 100%); /* IE10+ */
1333 background: linear-gradient(135deg, rgba(242,86,142,1) 0%,rgba(247,127,225,1) 52%,rgba(242,113,201,1) 52%,rgba(251,129,225,1) 100%); /* W3C */
1334 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#368e2a', endColorstr='#49e133',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
1335 -webkit-transition: all .4s ease-in-out;
1336 -moz-transition: all .4s ease-in-out;
1337 -o-transition: all .4s ease-in-out;
1338 -ms-transition: all .4s ease-in-out;
1339 transition: all .4s ease-in-out;
1340}
1341.navbgs5h {
1342 position: fixed;
1343 left: 63%;
1344 opacity: 0.9;
1345 filter: alpha(opacity=9); /* For IE8 and earlier */
1346 width: 12%;
1347 border-left: 4px solid rgba(0,0,0,0.25);
1348 border-right: 4px solid rgba(0,0,0,0.25);
1349 -webkit-transition: all .4s ease-in-out;
1350 -moz-transition: all .4s ease-in-out;
1351 -o-transition: all .4s ease-in-out;
1352 -ms-transition: all .4s ease-in-out;
1353 transition: all .4s ease-in-out;
1354}
1355
1356.navbgs6 {
1357 position: relative;
1358 top: 0;
1359 margin: 0 auto;
1360 height: 100%;
1361 width: 0px;
1362 opacity: 0.0;
1363 filter: alpha(opacity=0); /* For IE8 and earlier */
1364 -moz-box-sizing: border-box;
1365 -webkit-box-sizing: border-box;
1366 box-sizing: border-box;
1367 border-left: 0px solid rgba(47,127,225,1);
1368 border-right: 0px solid rgba(47,127,225,1);
1369 background: rgb(42,86,142); /* Old browsers */
1370 background: -moz-linear-gradient(-45deg, rgba(42,186,142,1) 0%, rgba(47,227,225,1) 52%, rgba(42,213,201,1) 52%, rgba(51,229,225,1) 100%); /* FF3.6+ */
1371 background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(42,186,142,1)), color-stop(52%,rgba(47,227,225,1)), color-stop(52%,rgba(42,213,201,1)), color-stop(100%,rgba(51,229,225,1))); /* Chrome,Safari4+ */
1372 background: -webkit-linear-gradient(-45deg, rgba(42,186,142,1) 0%,rgba(47,227,225,1) 52%,rgba(42,213,201,1) 52%,rgba(51,229,225,1) 100%); /* Chrome10+,Safari5.1+ */
1373 background: -o-linear-gradient(-45deg, rgba(42,186,142,1) 0%,rgba(47,227,225,1) 52%,rgba(42,213,201,1) 52%,rgba(51,229,225,1) 100%); /* Opera 11.10+ */
1374 background: -ms-linear-gradient(-45deg, rgba(42,186,142,1) 0%,rgba(47,227,225,1) 52%,rgba(42,213,201,1) 52%,rgba(51,229,225,1) 100%); /* IE10+ */
1375 background: linear-gradient(135deg, rgba(42,186,142,1) 0%,rgba(47,227,225,1) 52%,rgba(42,213,201,1) 52%,rgba(51,229,225,1) 100%); /* W3C */
1376 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2a568e', endColorstr='#3381e1',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
1377 -webkit-transition: all .4s ease-in-out;
1378 -moz-transition: all .4s ease-in-out;
1379 -o-transition: all .4s ease-in-out;
1380 -ms-transition: all .4s ease-in-out;
1381 transition: all .4s ease-in-out;
1382}
1383.navbgs6h {
1384 opacity: 0.9;
1385 filter: alpha(opacity=9); /* For IE8 and earlier */
1386 width: 100%;
1387 border-left: 4px solid rgba(0,0,0,0.25);
1388 border-right: 4px solid rgba(0,0,0,0.25);
1389 -webkit-transition: all .4s ease-in-out;
1390 -moz-transition: all .4s ease-in-out;
1391 -o-transition: all .4s ease-in-out;
1392 -ms-transition: all .4s ease-in-out;
1393 transition: all .4s ease-in-out;
1394}
1395
1396
1397.navEasterEgg{
1398 width: 14%;
1399 margin-left: 43%;
1400 font-family: inherit;
1401}
1402
1403
1404.social {
1405 text-align: center;
1406 color: white !important;
1407 z-index: 100;
1408}
1409
1410.social a {
1411 color: white !important;
1412 font-size: 25pt;
1413 display: inline-block;
1414 margin: 0px 0px;
1415}
1416
1417.social a p {
1418 font-size: 9pt;
1419 margin-top: -2px;
1420 font-family: 'Open Sans', sans-serif;
1421}
1422.social {
1423 margin-top: 10%;
1424}
1425.social a {
1426 text-decoration: none;
1427}
1428.social {
1429 position: fixed;
1430 bottom: 0;
1431 left: 0;0:b;
1432 background: rgba(0, 0, 0, 0.12);
1433 right: 0;
1434 padding: 10px;
1435 padding-top: 15px !important;
1436}
1437.social a {
1438 opacity: 0.7;
1439}
1440
1441.social:hover a {
1442 opacity: 1;
1443}
1444p.copyright {
1445 font-size: 9pt;
1446 margin-top: 5px !important;
1447 border-top: 2px solid rgba(195, 228, 220, 0.08);
1448 display: block;
1449 max-width: 300px;
1450 padding-top: 5px;
1451 margin: 0 auto;
1452}
1453
1454p.copyright {
1455 font-family: 'Open Sans', sans-serif;
1456 opacity: 1;
1457 text-transform: uppercase;
1458}
1459.social a:hover {
1460 color: #1299BC !important;
1461}
1462
1463/* Remove the blue Webkit background when element is tapped */
1464
1465a, button {
1466 -webkit-tap-highlight-color: rgba(0,0,0,0);
1467}/* CSS Document */
1468
1469
1470
1471/* Start of Snow Effect*/
1472#snowflakeContainer {
1473 position: absolute;
1474 left: 0px;
1475 top: 0px;
1476}
1477.snowflake {
1478 padding-left: 15px;
1479 font-family: Cambria, Georgia, serif;
1480 font-size: 14px;
1481 line-height: 24px;
1482 color: #FFFFFF;
1483 user-select: none;
1484 z-index: 1000;
1485}
1486.snowflake:hover {
1487 cursor: default;
1488}
1489/* End of Snow Effect */</style><script type="text/javascript">/*!
1490 * jQuery JavaScript Library v1.10.1
1491 * http://jquery.com/
1492 *
1493 * Includes Sizzle.js
1494 * http://sizzlejs.com/
1495 *
1496 * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
1497 * Released under the MIT license
1498 * http://jquery.org/license
1499 *
1500 * Date: 2013-05-30T21:49Z
1501 */
1502(function( window, undefined ) {
1503
1504// Can't do this because several apps including ASP.NET trace
1505// the stack via arguments.caller.callee and Firefox dies if
1506// you try to trace through "use strict" call chains. (#13335)
1507// Support: Firefox 18+
1508//"use strict";
1509var
1510 // The deferred used on DOM ready
1511 readyList,
1512
1513 // A central reference to the root jQuery(document)
1514 rootjQuery,
1515
1516 // Support: IE<10
1517 // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
1518 core_strundefined = typeof undefined,
1519
1520 // Use the correct document accordingly with window argument (sandbox)
1521 location = window.location,
1522 document = window.document,
1523 docElem = document.documentElement,
1524
1525 // Map over jQuery in case of overwrite
1526 _jQuery = window.jQuery,
1527
1528 // Map over the $ in case of overwrite
1529 _$ = window.$,
1530
1531 // [[Class]] -> type pairs
1532 class2type = {},
1533
1534 // List of deleted data cache ids, so we can reuse them
1535 core_deletedIds = [],
1536
1537 core_version = "1.10.1",
1538
1539 // Save a reference to some core methods
1540 core_concat = core_deletedIds.concat,
1541 core_push = core_deletedIds.push,
1542 core_slice = core_deletedIds.slice,
1543 core_indexOf = core_deletedIds.indexOf,
1544 core_toString = class2type.toString,
1545 core_hasOwn = class2type.hasOwnProperty,
1546 core_trim = core_version.trim,
1547
1548 // Define a local copy of jQuery
1549 jQuery = function( selector, context ) {
1550 // The jQuery object is actually just the init constructor 'enhanced'
1551 return new jQuery.fn.init( selector, context, rootjQuery );
1552 },
1553
1554 // Used for matching numbers
1555 core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
1556
1557 // Used for splitting on whitespace
1558 core_rnotwhite = /\S+/g,
1559
1560 // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
1561 rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
1562
1563 // A simple way to check for HTML strings
1564 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
1565 // Strict HTML recognition (#11290: must start with <)
1566 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
1567
1568 // Match a standalone tag
1569 rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
1570
1571 // JSON RegExp
1572 rvalidchars = /^[\],:{}\s]*$/,
1573 rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
1574 rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
1575 rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
1576
1577 // Matches dashed string for camelizing
1578 rmsPrefix = /^-ms-/,
1579 rdashAlpha = /-([\da-z])/gi,
1580
1581 // Used by jQuery.camelCase as callback to replace()
1582 fcamelCase = function( all, letter ) {
1583 return letter.toUpperCase();
1584 },
1585
1586 // The ready event handler
1587 completed = function( event ) {
1588
1589 // readyState === "complete" is good enough for us to call the dom ready in oldIE
1590 if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
1591 detach();
1592 jQuery.ready();
1593 }
1594 },
1595 // Clean-up method for dom ready events
1596 detach = function() {
1597 if ( document.addEventListener ) {
1598 document.removeEventListener( "DOMContentLoaded", completed, false );
1599 window.removeEventListener( "load", completed, false );
1600
1601 } else {
1602 document.detachEvent( "onreadystatechange", completed );
1603 window.detachEvent( "onload", completed );
1604 }
1605 };
1606
1607jQuery.fn = jQuery.prototype = {
1608 // The current version of jQuery being used
1609 jquery: core_version,
1610
1611 constructor: jQuery,
1612 init: function( selector, context, rootjQuery ) {
1613 var match, elem;
1614
1615 // HANDLE: $(""), $(null), $(undefined), $(false)
1616 if ( !selector ) {
1617 return this;
1618 }
1619
1620 // Handle HTML strings
1621 if ( typeof selector === "string" ) {
1622 if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
1623 // Assume that strings that start and end with <> are HTML and skip the regex check
1624 match = [ null, selector, null ];
1625
1626 } else {
1627 match = rquickExpr.exec( selector );
1628 }
1629
1630 // Match html or make sure no context is specified for #id
1631 if ( match && (match[1] || !context) ) {
1632
1633 // HANDLE: $(html) -> $(array)
1634 if ( match[1] ) {
1635 context = context instanceof jQuery ? context[0] : context;
1636
1637 // scripts is true for back-compat
1638 jQuery.merge( this, jQuery.parseHTML(
1639 match[1],
1640 context && context.nodeType ? context.ownerDocument || context : document,
1641 true
1642 ) );
1643
1644 // HANDLE: $(html, props)
1645 if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
1646 for ( match in context ) {
1647 // Properties of context are called as methods if possible
1648 if ( jQuery.isFunction( this[ match ] ) ) {
1649 this[ match ]( context[ match ] );
1650
1651 // ...and otherwise set as attributes
1652 } else {
1653 this.attr( match, context[ match ] );
1654 }
1655 }
1656 }
1657
1658 return this;
1659
1660 // HANDLE: $(#id)
1661 } else {
1662 elem = document.getElementById( match[2] );
1663
1664 // Check parentNode to catch when Blackberry 4.6 returns
1665 // nodes that are no longer in the document #6963
1666 if ( elem && elem.parentNode ) {
1667 // Handle the case where IE and Opera return items
1668 // by name instead of ID
1669 if ( elem.id !== match[2] ) {
1670 return rootjQuery.find( selector );
1671 }
1672
1673 // Otherwise, we inject the element directly into the jQuery object
1674 this.length = 1;
1675 this[0] = elem;
1676 }
1677
1678 this.context = document;
1679 this.selector = selector;
1680 return this;
1681 }
1682
1683 // HANDLE: $(expr, $(...))
1684 } else if ( !context || context.jquery ) {
1685 return ( context || rootjQuery ).find( selector );
1686
1687 // HANDLE: $(expr, context)
1688 // (which is just equivalent to: $(context).find(expr)
1689 } else {
1690 return this.constructor( context ).find( selector );
1691 }
1692
1693 // HANDLE: $(DOMElement)
1694 } else if ( selector.nodeType ) {
1695 this.context = this[0] = selector;
1696 this.length = 1;
1697 return this;
1698
1699 // HANDLE: $(function)
1700 // Shortcut for document ready
1701 } else if ( jQuery.isFunction( selector ) ) {
1702 return rootjQuery.ready( selector );
1703 }
1704
1705 if ( selector.selector !== undefined ) {
1706 this.selector = selector.selector;
1707 this.context = selector.context;
1708 }
1709
1710 return jQuery.makeArray( selector, this );
1711 },
1712
1713 // Start with an empty selector
1714 selector: "",
1715
1716 // The default length of a jQuery object is 0
1717 length: 0,
1718
1719 toArray: function() {
1720 return core_slice.call( this );
1721 },
1722
1723 // Get the Nth element in the matched element set OR
1724 // Get the whole matched element set as a clean array
1725 get: function( num ) {
1726 return num == null ?
1727
1728 // Return a 'clean' array
1729 this.toArray() :
1730
1731 // Return just the object
1732 ( num < 0 ? this[ this.length + num ] : this[ num ] );
1733 },
1734
1735 // Take an array of elements and push it onto the stack
1736 // (returning the new matched element set)
1737 pushStack: function( elems ) {
1738
1739 // Build a new jQuery matched element set
1740 var ret = jQuery.merge( this.constructor(), elems );
1741
1742 // Add the old object onto the stack (as a reference)
1743 ret.prevObject = this;
1744 ret.context = this.context;
1745
1746 // Return the newly-formed element set
1747 return ret;
1748 },
1749
1750 // Execute a callback for every element in the matched set.
1751 // (You can seed the arguments with an array of args, but this is
1752 // only used internally.)
1753 each: function( callback, args ) {
1754 return jQuery.each( this, callback, args );
1755 },
1756
1757 ready: function( fn ) {
1758 // Add the callback
1759 jQuery.ready.promise().done( fn );
1760
1761 return this;
1762 },
1763
1764 slice: function() {
1765 return this.pushStack( core_slice.apply( this, arguments ) );
1766 },
1767
1768 first: function() {
1769 return this.eq( 0 );
1770 },
1771
1772 last: function() {
1773 return this.eq( -1 );
1774 },
1775
1776 eq: function( i ) {
1777 var len = this.length,
1778 j = +i + ( i < 0 ? len : 0 );
1779 return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
1780 },
1781
1782 map: function( callback ) {
1783 return this.pushStack( jQuery.map(this, function( elem, i ) {
1784 return callback.call( elem, i, elem );
1785 }));
1786 },
1787
1788 end: function() {
1789 return this.prevObject || this.constructor(null);
1790 },
1791
1792 // For internal use only.
1793 // Behaves like an Array's method, not like a jQuery method.
1794 push: core_push,
1795 sort: [].sort,
1796 splice: [].splice
1797};
1798
1799// Give the init function the jQuery prototype for later instantiation
1800jQuery.fn.init.prototype = jQuery.fn;
1801
1802jQuery.extend = jQuery.fn.extend = function() {
1803 var src, copyIsArray, copy, name, options, clone,
1804 target = arguments[0] || {},
1805 i = 1,
1806 length = arguments.length,
1807 deep = false;
1808
1809 // Handle a deep copy situation
1810 if ( typeof target === "boolean" ) {
1811 deep = target;
1812 target = arguments[1] || {};
1813 // skip the boolean and the target
1814 i = 2;
1815 }
1816
1817 // Handle case when target is a string or something (possible in deep copy)
1818 if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
1819 target = {};
1820 }
1821
1822 // extend jQuery itself if only one argument is passed
1823 if ( length === i ) {
1824 target = this;
1825 --i;
1826 }
1827
1828 for ( ; i < length; i++ ) {
1829 // Only deal with non-null/undefined values
1830 if ( (options = arguments[ i ]) != null ) {
1831 // Extend the base object
1832 for ( name in options ) {
1833 src = target[ name ];
1834 copy = options[ name ];
1835
1836 // Prevent never-ending loop
1837 if ( target === copy ) {
1838 continue;
1839 }
1840
1841 // Recurse if we're merging plain objects or arrays
1842 if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
1843 if ( copyIsArray ) {
1844 copyIsArray = false;
1845 clone = src && jQuery.isArray(src) ? src : [];
1846
1847 } else {
1848 clone = src && jQuery.isPlainObject(src) ? src : {};
1849 }
1850
1851 // Never move original objects, clone them
1852 target[ name ] = jQuery.extend( deep, clone, copy );
1853
1854 // Don't bring in undefined values
1855 } else if ( copy !== undefined ) {
1856 target[ name ] = copy;
1857 }
1858 }
1859 }
1860 }
1861
1862 // Return the modified object
1863 return target;
1864};
1865
1866jQuery.extend({
1867 // Unique for each copy of jQuery on the page
1868 // Non-digits removed to match rinlinejQuery
1869 expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
1870
1871 noConflict: function( deep ) {
1872 if ( window.$ === jQuery ) {
1873 window.$ = _$;
1874 }
1875
1876 if ( deep && window.jQuery === jQuery ) {
1877 window.jQuery = _jQuery;
1878 }
1879
1880 return jQuery;
1881 },
1882
1883 // Is the DOM ready to be used? Set to true once it occurs.
1884 isReady: false,
1885
1886 // A counter to track how many items to wait for before
1887 // the ready event fires. See #6781
1888 readyWait: 1,
1889
1890 // Hold (or release) the ready event
1891 holdReady: function( hold ) {
1892 if ( hold ) {
1893 jQuery.readyWait++;
1894 } else {
1895 jQuery.ready( true );
1896 }
1897 },
1898
1899 // Handle when the DOM is ready
1900 ready: function( wait ) {
1901
1902 // Abort if there are pending holds or we're already ready
1903 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
1904 return;
1905 }
1906
1907 // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
1908 if ( !document.body ) {
1909 return setTimeout( jQuery.ready );
1910 }
1911
1912 // Remember that the DOM is ready
1913 jQuery.isReady = true;
1914
1915 // If a normal DOM Ready event fired, decrement, and wait if need be
1916 if ( wait !== true && --jQuery.readyWait > 0 ) {
1917 return;
1918 }
1919
1920 // If there are functions bound, to execute
1921 readyList.resolveWith( document, [ jQuery ] );
1922
1923 // Trigger any bound ready events
1924 if ( jQuery.fn.trigger ) {
1925 jQuery( document ).trigger("ready").off("ready");
1926 }
1927 },
1928
1929 // See test/unit/core.js for details concerning isFunction.
1930 // Since version 1.3, DOM methods and functions like alert
1931 // aren't supported. They return false on IE (#2968).
1932 isFunction: function( obj ) {
1933 return jQuery.type(obj) === "function";
1934 },
1935
1936 isArray: Array.isArray || function( obj ) {
1937 return jQuery.type(obj) === "array";
1938 },
1939
1940 isWindow: function( obj ) {
1941 /* jshint eqeqeq: false */
1942 return obj != null && obj == obj.window;
1943 },
1944
1945 isNumeric: function( obj ) {
1946 return !isNaN( parseFloat(obj) ) && isFinite( obj );
1947 },
1948
1949 type: function( obj ) {
1950 if ( obj == null ) {
1951 return String( obj );
1952 }
1953 return typeof obj === "object" || typeof obj === "function" ?
1954 class2type[ core_toString.call(obj) ] || "object" :
1955 typeof obj;
1956 },
1957
1958 isPlainObject: function( obj ) {
1959 var key;
1960
1961 // Must be an Object.
1962 // Because of IE, we also have to check the presence of the constructor property.
1963 // Make sure that DOM nodes and window objects don't pass through, as well
1964 if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
1965 return false;
1966 }
1967
1968 try {
1969 // Not own constructor property must be Object
1970 if ( obj.constructor &&
1971 !core_hasOwn.call(obj, "constructor") &&
1972 !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
1973 return false;
1974 }
1975 } catch ( e ) {
1976 // IE8,9 Will throw exceptions on certain host objects #9897
1977 return false;
1978 }
1979
1980 // Support: IE<9
1981 // Handle iteration over inherited properties before own properties.
1982 if ( jQuery.support.ownLast ) {
1983 for ( key in obj ) {
1984 return core_hasOwn.call( obj, key );
1985 }
1986 }
1987
1988 // Own properties are enumerated firstly, so to speed up,
1989 // if last one is own, then all properties are own.
1990 for ( key in obj ) {}
1991
1992 return key === undefined || core_hasOwn.call( obj, key );
1993 },
1994
1995 isEmptyObject: function( obj ) {
1996 var name;
1997 for ( name in obj ) {
1998 return false;
1999 }
2000 return true;
2001 },
2002
2003 error: function( msg ) {
2004 throw new Error( msg );
2005 },
2006
2007 // data: string of html
2008 // context (optional): If specified, the fragment will be created in this context, defaults to document
2009 // keepScripts (optional): If true, will include scripts passed in the html string
2010 parseHTML: function( data, context, keepScripts ) {
2011 if ( !data || typeof data !== "string" ) {
2012 return null;
2013 }
2014 if ( typeof context === "boolean" ) {
2015 keepScripts = context;
2016 context = false;
2017 }
2018 context = context || document;
2019
2020 var parsed = rsingleTag.exec( data ),
2021 scripts = !keepScripts && [];
2022
2023 // Single tag
2024 if ( parsed ) {
2025 return [ context.createElement( parsed[1] ) ];
2026 }
2027
2028 parsed = jQuery.buildFragment( [ data ], context, scripts );
2029 if ( scripts ) {
2030 jQuery( scripts ).remove();
2031 }
2032 return jQuery.merge( [], parsed.childNodes );
2033 },
2034
2035 parseJSON: function( data ) {
2036 // Attempt to parse using the native JSON parser first
2037 if ( window.JSON && window.JSON.parse ) {
2038 return window.JSON.parse( data );
2039 }
2040
2041 if ( data === null ) {
2042 return data;
2043 }
2044
2045 if ( typeof data === "string" ) {
2046
2047 // Make sure leading/trailing whitespace is removed (IE can't handle it)
2048 data = jQuery.trim( data );
2049
2050 if ( data ) {
2051 // Make sure the incoming data is actual JSON
2052 // Logic borrowed from http://json.org/json2.js
2053 if ( rvalidchars.test( data.replace( rvalidescape, "@" )
2054 .replace( rvalidtokens, "]" )
2055 .replace( rvalidbraces, "")) ) {
2056
2057 return ( new Function( "return " + data ) )();
2058 }
2059 }
2060 }
2061
2062 jQuery.error( "Invalid JSON: " + data );
2063 },
2064
2065 // Cross-browser xml parsing
2066 parseXML: function( data ) {
2067 var xml, tmp;
2068 if ( !data || typeof data !== "string" ) {
2069 return null;
2070 }
2071 try {
2072 if ( window.DOMParser ) { // Standard
2073 tmp = new DOMParser();
2074 xml = tmp.parseFromString( data , "text/xml" );
2075 } else { // IE
2076 xml = new ActiveXObject( "Microsoft.XMLDOM" );
2077 xml.async = "false";
2078 xml.loadXML( data );
2079 }
2080 } catch( e ) {
2081 xml = undefined;
2082 }
2083 if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
2084 jQuery.error( "Invalid XML: " + data );
2085 }
2086 return xml;
2087 },
2088
2089 noop: function() {},
2090
2091 // Evaluates a script in a global context
2092 // Workarounds based on findings by Jim Driscoll
2093 // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
2094 globalEval: function( data ) {
2095 if ( data && jQuery.trim( data ) ) {
2096 // We use execScript on Internet Explorer
2097 // We use an anonymous function so that context is window
2098 // rather than jQuery in Firefox
2099 ( window.execScript || function( data ) {
2100 window[ "eval" ].call( window, data );
2101 } )( data );
2102 }
2103 },
2104
2105 // Convert dashed to camelCase; used by the css and data modules
2106 // Microsoft forgot to hump their vendor prefix (#9572)
2107 camelCase: function( string ) {
2108 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
2109 },
2110
2111 nodeName: function( elem, name ) {
2112 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
2113 },
2114
2115 // args is for internal usage only
2116 each: function( obj, callback, args ) {
2117 var value,
2118 i = 0,
2119 length = obj.length,
2120 isArray = isArraylike( obj );
2121
2122 if ( args ) {
2123 if ( isArray ) {
2124 for ( ; i < length; i++ ) {
2125 value = callback.apply( obj[ i ], args );
2126
2127 if ( value === false ) {
2128 break;
2129 }
2130 }
2131 } else {
2132 for ( i in obj ) {
2133 value = callback.apply( obj[ i ], args );
2134
2135 if ( value === false ) {
2136 break;
2137 }
2138 }
2139 }
2140
2141 // A special, fast, case for the most common use of each
2142 } else {
2143 if ( isArray ) {
2144 for ( ; i < length; i++ ) {
2145 value = callback.call( obj[ i ], i, obj[ i ] );
2146
2147 if ( value === false ) {
2148 break;
2149 }
2150 }
2151 } else {
2152 for ( i in obj ) {
2153 value = callback.call( obj[ i ], i, obj[ i ] );
2154
2155 if ( value === false ) {
2156 break;
2157 }
2158 }
2159 }
2160 }
2161
2162 return obj;
2163 },
2164
2165 // Use native String.trim function wherever possible
2166 trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
2167 function( text ) {
2168 return text == null ?
2169 "" :
2170 core_trim.call( text );
2171 } :
2172
2173 // Otherwise use our own trimming functionality
2174 function( text ) {
2175 return text == null ?
2176 "" :
2177 ( text + "" ).replace( rtrim, "" );
2178 },
2179
2180 // results is for internal usage only
2181 makeArray: function( arr, results ) {
2182 var ret = results || [];
2183
2184 if ( arr != null ) {
2185 if ( isArraylike( Object(arr) ) ) {
2186 jQuery.merge( ret,
2187 typeof arr === "string" ?
2188 [ arr ] : arr
2189 );
2190 } else {
2191 core_push.call( ret, arr );
2192 }
2193 }
2194
2195 return ret;
2196 },
2197
2198 inArray: function( elem, arr, i ) {
2199 var len;
2200
2201 if ( arr ) {
2202 if ( core_indexOf ) {
2203 return core_indexOf.call( arr, elem, i );
2204 }
2205
2206 len = arr.length;
2207 i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
2208
2209 for ( ; i < len; i++ ) {
2210 // Skip accessing in sparse arrays
2211 if ( i in arr && arr[ i ] === elem ) {
2212 return i;
2213 }
2214 }
2215 }
2216
2217 return -1;
2218 },
2219
2220 merge: function( first, second ) {
2221 var l = second.length,
2222 i = first.length,
2223 j = 0;
2224
2225 if ( typeof l === "number" ) {
2226 for ( ; j < l; j++ ) {
2227 first[ i++ ] = second[ j ];
2228 }
2229 } else {
2230 while ( second[j] !== undefined ) {
2231 first[ i++ ] = second[ j++ ];
2232 }
2233 }
2234
2235 first.length = i;
2236
2237 return first;
2238 },
2239
2240 grep: function( elems, callback, inv ) {
2241 var retVal,
2242 ret = [],
2243 i = 0,
2244 length = elems.length;
2245 inv = !!inv;
2246
2247 // Go through the array, only saving the items
2248 // that pass the validator function
2249 for ( ; i < length; i++ ) {
2250 retVal = !!callback( elems[ i ], i );
2251 if ( inv !== retVal ) {
2252 ret.push( elems[ i ] );
2253 }
2254 }
2255
2256 return ret;
2257 },
2258
2259 // arg is for internal usage only
2260 map: function( elems, callback, arg ) {
2261 var value,
2262 i = 0,
2263 length = elems.length,
2264 isArray = isArraylike( elems ),
2265 ret = [];
2266
2267 // Go through the array, translating each of the items to their
2268 if ( isArray ) {
2269 for ( ; i < length; i++ ) {
2270 value = callback( elems[ i ], i, arg );
2271
2272 if ( value != null ) {
2273 ret[ ret.length ] = value;
2274 }
2275 }
2276
2277 // Go through every key on the object,
2278 } else {
2279 for ( i in elems ) {
2280 value = callback( elems[ i ], i, arg );
2281
2282 if ( value != null ) {
2283 ret[ ret.length ] = value;
2284 }
2285 }
2286 }
2287
2288 // Flatten any nested arrays
2289 return core_concat.apply( [], ret );
2290 },
2291
2292 // A global GUID counter for objects
2293 guid: 1,
2294
2295 // Bind a function to a context, optionally partially applying any
2296 // arguments.
2297 proxy: function( fn, context ) {
2298 var args, proxy, tmp;
2299
2300 if ( typeof context === "string" ) {
2301 tmp = fn[ context ];
2302 context = fn;
2303 fn = tmp;
2304 }
2305
2306 // Quick check to determine if target is callable, in the spec
2307 // this throws a TypeError, but we will just return undefined.
2308 if ( !jQuery.isFunction( fn ) ) {
2309 return undefined;
2310 }
2311
2312 // Simulated bind
2313 args = core_slice.call( arguments, 2 );
2314 proxy = function() {
2315 return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
2316 };
2317
2318 // Set the guid of unique handler to the same of original handler, so it can be removed
2319 proxy.guid = fn.guid = fn.guid || jQuery.guid++;
2320
2321 return proxy;
2322 },
2323
2324 // Multifunctional method to get and set values of a collection
2325 // The value/s can optionally be executed if it's a function
2326 access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
2327 var i = 0,
2328 length = elems.length,
2329 bulk = key == null;
2330
2331 // Sets many values
2332 if ( jQuery.type( key ) === "object" ) {
2333 chainable = true;
2334 for ( i in key ) {
2335 jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
2336 }
2337
2338 // Sets one value
2339 } else if ( value !== undefined ) {
2340 chainable = true;
2341
2342 if ( !jQuery.isFunction( value ) ) {
2343 raw = true;
2344 }
2345
2346 if ( bulk ) {
2347 // Bulk operations run against the entire set
2348 if ( raw ) {
2349 fn.call( elems, value );
2350 fn = null;
2351
2352 // ...except when executing function values
2353 } else {
2354 bulk = fn;
2355 fn = function( elem, key, value ) {
2356 return bulk.call( jQuery( elem ), value );
2357 };
2358 }
2359 }
2360
2361 if ( fn ) {
2362 for ( ; i < length; i++ ) {
2363 fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
2364 }
2365 }
2366 }
2367
2368 return chainable ?
2369 elems :
2370
2371 // Gets
2372 bulk ?
2373 fn.call( elems ) :
2374 length ? fn( elems[0], key ) : emptyGet;
2375 },
2376
2377 now: function() {
2378 return ( new Date() ).getTime();
2379 },
2380
2381 // A method for quickly swapping in/out CSS properties to get correct calculations.
2382 // Note: this method belongs to the css module but it's needed here for the support module.
2383 // If support gets modularized, this method should be moved back to the css module.
2384 swap: function( elem, options, callback, args ) {
2385 var ret, name,
2386 old = {};
2387
2388 // Remember the old values, and insert the new ones
2389 for ( name in options ) {
2390 old[ name ] = elem.style[ name ];
2391 elem.style[ name ] = options[ name ];
2392 }
2393
2394 ret = callback.apply( elem, args || [] );
2395
2396 // Revert the old values
2397 for ( name in options ) {
2398 elem.style[ name ] = old[ name ];
2399 }
2400
2401 return ret;
2402 }
2403});
2404
2405jQuery.ready.promise = function( obj ) {
2406 if ( !readyList ) {
2407
2408 readyList = jQuery.Deferred();
2409
2410 // Catch cases where $(document).ready() is called after the browser event has already occurred.
2411 // we once tried to use readyState "interactive" here, but it caused issues like the one
2412 // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
2413 if ( document.readyState === "complete" ) {
2414 // Handle it asynchronously to allow scripts the opportunity to delay ready
2415 setTimeout( jQuery.ready );
2416
2417 // Standards-based browsers support DOMContentLoaded
2418 } else if ( document.addEventListener ) {
2419 // Use the handy event callback
2420 document.addEventListener( "DOMContentLoaded", completed, false );
2421
2422 // A fallback to window.onload, that will always work
2423 window.addEventListener( "load", completed, false );
2424
2425 // If IE event model is used
2426 } else {
2427 // Ensure firing before onload, maybe late but safe also for iframes
2428 document.attachEvent( "onreadystatechange", completed );
2429
2430 // A fallback to window.onload, that will always work
2431 window.attachEvent( "onload", completed );
2432
2433 // If IE and not a frame
2434 // continually check to see if the document is ready
2435 var top = false;
2436
2437 try {
2438 top = window.frameElement == null && document.documentElement;
2439 } catch(e) {}
2440
2441 if ( top && top.doScroll ) {
2442 (function doScrollCheck() {
2443 if ( !jQuery.isReady ) {
2444
2445 try {
2446 // Use the trick by Diego Perini
2447 // http://javascript.nwbox.com/IEContentLoaded/
2448 top.doScroll("left");
2449 } catch(e) {
2450 return setTimeout( doScrollCheck, 50 );
2451 }
2452
2453 // detach all dom ready events
2454 detach();
2455
2456 // and execute any waiting functions
2457 jQuery.ready();
2458 }
2459 })();
2460 }
2461 }
2462 }
2463 return readyList.promise( obj );
2464};
2465
2466// Populate the class2type map
2467jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
2468 class2type[ "[object " + name + "]" ] = name.toLowerCase();
2469});
2470
2471function isArraylike( obj ) {
2472 var length = obj.length,
2473 type = jQuery.type( obj );
2474
2475 if ( jQuery.isWindow( obj ) ) {
2476 return false;
2477 }
2478
2479 if ( obj.nodeType === 1 && length ) {
2480 return true;
2481 }
2482
2483 return type === "array" || type !== "function" &&
2484 ( length === 0 ||
2485 typeof length === "number" && length > 0 && ( length - 1 ) in obj );
2486}
2487
2488// All jQuery objects should point back to these
2489rootjQuery = jQuery(document);
2490/*!
2491 * Sizzle CSS Selector Engine v1.9.4-pre
2492 * http://sizzlejs.com/
2493 *
2494 * Copyright 2013 jQuery Foundation, Inc. and other contributors
2495 * Released under the MIT license
2496 * http://jquery.org/license
2497 *
2498 * Date: 2013-05-27
2499 */
2500(function( window, undefined ) {
2501
2502var i,
2503 support,
2504 cachedruns,
2505 Expr,
2506 getText,
2507 isXML,
2508 compile,
2509 outermostContext,
2510 sortInput,
2511
2512 // Local document vars
2513 setDocument,
2514 document,
2515 docElem,
2516 documentIsHTML,
2517 rbuggyQSA,
2518 rbuggyMatches,
2519 matches,
2520 contains,
2521
2522 // Instance-specific data
2523 expando = "sizzle" + -(new Date()),
2524 preferredDoc = window.document,
2525 dirruns = 0,
2526 done = 0,
2527 classCache = createCache(),
2528 tokenCache = createCache(),
2529 compilerCache = createCache(),
2530 hasDuplicate = false,
2531 sortOrder = function() { return 0; },
2532
2533 // General-purpose constants
2534 strundefined = typeof undefined,
2535 MAX_NEGATIVE = 1 << 31,
2536
2537 // Instance methods
2538 hasOwn = ({}).hasOwnProperty,
2539 arr = [],
2540 pop = arr.pop,
2541 push_native = arr.push,
2542 push = arr.push,
2543 slice = arr.slice,
2544 // Use a stripped-down indexOf if we can't use a native one
2545 indexOf = arr.indexOf || function( elem ) {
2546 var i = 0,
2547 len = this.length;
2548 for ( ; i < len; i++ ) {
2549 if ( this[i] === elem ) {
2550 return i;
2551 }
2552 }
2553 return -1;
2554 },
2555
2556 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
2557
2558 // Regular expressions
2559
2560 // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
2561 whitespace = "[\\x20\\t\\r\\n\\f]",
2562 // http://www.w3.org/TR/css3-syntax/#characters
2563 characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
2564
2565 // Loosely modeled on CSS identifier characters
2566 // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
2567 // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
2568 identifier = characterEncoding.replace( "w", "w#" ),
2569
2570 // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
2571 attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
2572 "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
2573
2574 // Prefer arguments quoted,
2575 // then not containing pseudos/brackets,
2576 // then attribute selectors/non-parenthetical expressions,
2577 // then anything else
2578 // These preferences are here to reduce the number of selectors
2579 // needing tokenize in the PSEUDO preFilter
2580 pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
2581
2582 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
2583 rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
2584
2585 rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
2586 rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
2587
2588 rsibling = new RegExp( whitespace + "*[+~]" ),
2589 rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
2590
2591 rpseudo = new RegExp( pseudos ),
2592 ridentifier = new RegExp( "^" + identifier + "$" ),
2593
2594 matchExpr = {
2595 "ID": new RegExp( "^#(" + characterEncoding + ")" ),
2596 "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
2597 "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
2598 "ATTR": new RegExp( "^" + attributes ),
2599 "PSEUDO": new RegExp( "^" + pseudos ),
2600 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
2601 "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
2602 "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
2603 "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
2604 // For use in libraries implementing .is()
2605 // We use this for POS matching in `select`
2606 "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
2607 whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
2608 },
2609
2610 rnative = /^[^{]+\{\s*\[native \w/,
2611
2612 // Easily-parseable/retrievable ID or TAG or CLASS selectors
2613 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
2614
2615 rinputs = /^(?:input|select|textarea|button)$/i,
2616 rheader = /^h\d$/i,
2617
2618 rescape = /'|\\/g,
2619
2620 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
2621 runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
2622 funescape = function( _, escaped, escapedWhitespace ) {
2623 var high = "0x" + escaped - 0x10000;
2624 // NaN means non-codepoint
2625 // Support: Firefox
2626 // Workaround erroneous numeric interpretation of +"0x"
2627 return high !== high || escapedWhitespace ?
2628 escaped :
2629 // BMP codepoint
2630 high < 0 ?
2631 String.fromCharCode( high + 0x10000 ) :
2632 // Supplemental Plane codepoint (surrogate pair)
2633 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
2634 };
2635
2636// Optimize for push.apply( _, NodeList )
2637try {
2638 push.apply(
2639 (arr = slice.call( preferredDoc.childNodes )),
2640 preferredDoc.childNodes
2641 );
2642 // Support: Android<4.0
2643 // Detect silently failing push.apply
2644 arr[ preferredDoc.childNodes.length ].nodeType;
2645} catch ( e ) {
2646 push = { apply: arr.length ?
2647
2648 // Leverage slice if possible
2649 function( target, els ) {
2650 push_native.apply( target, slice.call(els) );
2651 } :
2652
2653 // Support: IE<9
2654 // Otherwise append directly
2655 function( target, els ) {
2656 var j = target.length,
2657 i = 0;
2658 // Can't trust NodeList.length
2659 while ( (target[j++] = els[i++]) ) {}
2660 target.length = j - 1;
2661 }
2662 };
2663}
2664
2665function Sizzle( selector, context, results, seed ) {
2666 var match, elem, m, nodeType,
2667 // QSA vars
2668 i, groups, old, nid, newContext, newSelector;
2669
2670 if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
2671 setDocument( context );
2672 }
2673
2674 context = context || document;
2675 results = results || [];
2676
2677 if ( !selector || typeof selector !== "string" ) {
2678 return results;
2679 }
2680
2681 if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
2682 return [];
2683 }
2684
2685 if ( documentIsHTML && !seed ) {
2686
2687 // Shortcuts
2688 if ( (match = rquickExpr.exec( selector )) ) {
2689 // Speed-up: Sizzle("#ID")
2690 if ( (m = match[1]) ) {
2691 if ( nodeType === 9 ) {
2692 elem = context.getElementById( m );
2693 // Check parentNode to catch when Blackberry 4.6 returns
2694 // nodes that are no longer in the document #6963
2695 if ( elem && elem.parentNode ) {
2696 // Handle the case where IE, Opera, and Webkit return items
2697 // by name instead of ID
2698 if ( elem.id === m ) {
2699 results.push( elem );
2700 return results;
2701 }
2702 } else {
2703 return results;
2704 }
2705 } else {
2706 // Context is not a document
2707 if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
2708 contains( context, elem ) && elem.id === m ) {
2709 results.push( elem );
2710 return results;
2711 }
2712 }
2713
2714 // Speed-up: Sizzle("TAG")
2715 } else if ( match[2] ) {
2716 push.apply( results, context.getElementsByTagName( selector ) );
2717 return results;
2718
2719 // Speed-up: Sizzle(".CLASS")
2720 } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
2721 push.apply( results, context.getElementsByClassName( m ) );
2722 return results;
2723 }
2724 }
2725
2726 // QSA path
2727 if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
2728 nid = old = expando;
2729 newContext = context;
2730 newSelector = nodeType === 9 && selector;
2731
2732 // qSA works strangely on Element-rooted queries
2733 // We can work around this by specifying an extra ID on the root
2734 // and working up from there (Thanks to Andrew Dupont for the technique)
2735 // IE 8 doesn't work on object elements
2736 if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
2737 groups = tokenize( selector );
2738
2739 if ( (old = context.getAttribute("id")) ) {
2740 nid = old.replace( rescape, "\\$&" );
2741 } else {
2742 context.setAttribute( "id", nid );
2743 }
2744 nid = "[id='" + nid + "'] ";
2745
2746 i = groups.length;
2747 while ( i-- ) {
2748 groups[i] = nid + toSelector( groups[i] );
2749 }
2750 newContext = rsibling.test( selector ) && context.parentNode || context;
2751 newSelector = groups.join(",");
2752 }
2753
2754 if ( newSelector ) {
2755 try {
2756 push.apply( results,
2757 newContext.querySelectorAll( newSelector )
2758 );
2759 return results;
2760 } catch(qsaError) {
2761 } finally {
2762 if ( !old ) {
2763 context.removeAttribute("id");
2764 }
2765 }
2766 }
2767 }
2768 }
2769
2770 // All others
2771 return select( selector.replace( rtrim, "$1" ), context, results, seed );
2772}
2773
2774/**
2775 * For feature detection
2776 * @param {Function} fn The function to test for native support
2777 */
2778function isNative( fn ) {
2779 return rnative.test( fn + "" );
2780}
2781
2782/**
2783 * Create key-value caches of limited size
2784 * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
2785 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
2786 * deleting the oldest entry
2787 */
2788function createCache() {
2789 var keys = [];
2790
2791 function cache( key, value ) {
2792 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
2793 if ( keys.push( key += " " ) > Expr.cacheLength ) {
2794 // Only keep the most recent entries
2795 delete cache[ keys.shift() ];
2796 }
2797 return (cache[ key ] = value);
2798 }
2799 return cache;
2800}
2801
2802/**
2803 * Mark a function for special use by Sizzle
2804 * @param {Function} fn The function to mark
2805 */
2806function markFunction( fn ) {
2807 fn[ expando ] = true;
2808 return fn;
2809}
2810
2811/**
2812 * Support testing using an element
2813 * @param {Function} fn Passed the created div and expects a boolean result
2814 */
2815function assert( fn ) {
2816 var div = document.createElement("div");
2817
2818 try {
2819 return !!fn( div );
2820 } catch (e) {
2821 return false;
2822 } finally {
2823 // Remove from its parent by default
2824 if ( div.parentNode ) {
2825 div.parentNode.removeChild( div );
2826 }
2827 // release memory in IE
2828 div = null;
2829 }
2830}
2831
2832/**
2833 * Adds the same handler for all of the specified attrs
2834 * @param {String} attrs Pipe-separated list of attributes
2835 * @param {Function} handler The method that will be applied if the test fails
2836 * @param {Boolean} test The result of a test. If true, null will be set as the handler in leiu of the specified handler
2837 */
2838function addHandle( attrs, handler, test ) {
2839 attrs = attrs.split("|");
2840 var current,
2841 i = attrs.length,
2842 setHandle = test ? null : handler;
2843
2844 while ( i-- ) {
2845 // Don't override a user's handler
2846 if ( !(current = Expr.attrHandle[ attrs[i] ]) || current === handler ) {
2847 Expr.attrHandle[ attrs[i] ] = setHandle;
2848 }
2849 }
2850}
2851
2852/**
2853 * Fetches boolean attributes by node
2854 * @param {Element} elem
2855 * @param {String} name
2856 */
2857function boolHandler( elem, name ) {
2858 // XML does not need to be checked as this will not be assigned for XML documents
2859 var val = elem.getAttributeNode( name );
2860 return val && val.specified ?
2861 val.value :
2862 elem[ name ] === true ? name.toLowerCase() : null;
2863}
2864
2865/**
2866 * Fetches attributes without interpolation
2867 * http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2868 * @param {Element} elem
2869 * @param {String} name
2870 */
2871function interpolationHandler( elem, name ) {
2872 // XML does not need to be checked as this will not be assigned for XML documents
2873 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
2874}
2875
2876/**
2877 * Uses defaultValue to retrieve value in IE6/7
2878 * @param {Element} elem
2879 * @param {String} name
2880 */
2881function valueHandler( elem ) {
2882 // Ignore the value *property* on inputs by using defaultValue
2883 // Fallback to Sizzle.attr by returning undefined where appropriate
2884 // XML does not need to be checked as this will not be assigned for XML documents
2885 if ( elem.nodeName.toLowerCase() === "input" ) {
2886 return elem.defaultValue;
2887 }
2888}
2889
2890/**
2891 * Checks document order of two siblings
2892 * @param {Element} a
2893 * @param {Element} b
2894 * @returns Returns -1 if a precedes b, 1 if a follows b
2895 */
2896function siblingCheck( a, b ) {
2897 var cur = b && a,
2898 diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
2899 ( ~b.sourceIndex || MAX_NEGATIVE ) -
2900 ( ~a.sourceIndex || MAX_NEGATIVE );
2901
2902 // Use IE sourceIndex if available on both nodes
2903 if ( diff ) {
2904 return diff;
2905 }
2906
2907 // Check if b follows a
2908 if ( cur ) {
2909 while ( (cur = cur.nextSibling) ) {
2910 if ( cur === b ) {
2911 return -1;
2912 }
2913 }
2914 }
2915
2916 return a ? 1 : -1;
2917}
2918
2919/**
2920 * Returns a function to use in pseudos for input types
2921 * @param {String} type
2922 */
2923function createInputPseudo( type ) {
2924 return function( elem ) {
2925 var name = elem.nodeName.toLowerCase();
2926 return name === "input" && elem.type === type;
2927 };
2928}
2929
2930/**
2931 * Returns a function to use in pseudos for buttons
2932 * @param {String} type
2933 */
2934function createButtonPseudo( type ) {
2935 return function( elem ) {
2936 var name = elem.nodeName.toLowerCase();
2937 return (name === "input" || name === "button") && elem.type === type;
2938 };
2939}
2940
2941/**
2942 * Returns a function to use in pseudos for positionals
2943 * @param {Function} fn
2944 */
2945function createPositionalPseudo( fn ) {
2946 return markFunction(function( argument ) {
2947 argument = +argument;
2948 return markFunction(function( seed, matches ) {
2949 var j,
2950 matchIndexes = fn( [], seed.length, argument ),
2951 i = matchIndexes.length;
2952
2953 // Match elements found at the specified indexes
2954 while ( i-- ) {
2955 if ( seed[ (j = matchIndexes[i]) ] ) {
2956 seed[j] = !(matches[j] = seed[j]);
2957 }
2958 }
2959 });
2960 });
2961}
2962
2963/**
2964 * Detect xml
2965 * @param {Element|Object} elem An element or a document
2966 */
2967isXML = Sizzle.isXML = function( elem ) {
2968 // documentElement is verified for cases where it doesn't yet exist
2969 // (such as loading iframes in IE - #4833)
2970 var documentElement = elem && (elem.ownerDocument || elem).documentElement;
2971 return documentElement ? documentElement.nodeName !== "HTML" : false;
2972};
2973
2974// Expose support vars for convenience
2975support = Sizzle.support = {};
2976
2977/**
2978 * Sets document-related variables once based on the current document
2979 * @param {Element|Object} [doc] An element or document object to use to set the document
2980 * @returns {Object} Returns the current document
2981 */
2982setDocument = Sizzle.setDocument = function( node ) {
2983 var doc = node ? node.ownerDocument || node : preferredDoc,
2984 parent = doc.parentWindow;
2985
2986 // If no document and documentElement is available, return
2987 if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
2988 return document;
2989 }
2990
2991 // Set our document
2992 document = doc;
2993 docElem = doc.documentElement;
2994
2995 // Support tests
2996 documentIsHTML = !isXML( doc );
2997
2998 // Support: IE>8
2999 // If iframe document is assigned to "document" variable and if iframe has been reloaded,
3000 // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
3001 if ( parent && parent.frameElement ) {
3002 parent.attachEvent( "onbeforeunload", function() {
3003 setDocument();
3004 });
3005 }
3006
3007 /* Attributes
3008 ---------------------------------------------------------------------- */
3009
3010 // Support: IE<8
3011 // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
3012 support.attributes = assert(function( div ) {
3013
3014 // Support: IE<8
3015 // Prevent attribute/property "interpolation"
3016 div.innerHTML = "<a href='#'></a>";
3017 addHandle( "type|href|height|width", interpolationHandler, div.firstChild.getAttribute("href") === "#" );
3018
3019 // Support: IE<9
3020 // Use getAttributeNode to fetch booleans when getAttribute lies
3021 addHandle( booleans, boolHandler, div.getAttribute("disabled") == null );
3022
3023 div.className = "i";
3024 return !div.getAttribute("className");
3025 });
3026
3027 // Support: IE<9
3028 // Retrieving value should defer to defaultValue
3029 support.input = assert(function( div ) {
3030 div.innerHTML = "<input>";
3031 div.firstChild.setAttribute( "value", "" );
3032 return div.firstChild.getAttribute( "value" ) === "";
3033 });
3034
3035 // IE6/7 still return empty string for value,
3036 // but are actually retrieving the property
3037 addHandle( "value", valueHandler, support.attributes && support.input );
3038
3039 /* getElement(s)By*
3040 ---------------------------------------------------------------------- */
3041
3042 // Check if getElementsByTagName("*") returns only elements
3043 support.getElementsByTagName = assert(function( div ) {
3044 div.appendChild( doc.createComment("") );
3045 return !div.getElementsByTagName("*").length;
3046 });
3047
3048 // Check if getElementsByClassName can be trusted
3049 support.getElementsByClassName = assert(function( div ) {
3050 div.innerHTML = "<div class='a'></div><div class='a i'></div>";
3051
3052 // Support: Safari<4
3053 // Catch class over-caching
3054 div.firstChild.className = "i";
3055 // Support: Opera<10
3056 // Catch gEBCN failure to find non-leading classes
3057 return div.getElementsByClassName("i").length === 2;
3058 });
3059
3060 // Support: IE<10
3061 // Check if getElementById returns elements by name
3062 // The broken getElementById methods don't pick up programatically-set names,
3063 // so use a roundabout getElementsByName test
3064 support.getById = assert(function( div ) {
3065 docElem.appendChild( div ).id = expando;
3066 return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
3067 });
3068
3069 // ID find and filter
3070 if ( support.getById ) {
3071 Expr.find["ID"] = function( id, context ) {
3072 if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
3073 var m = context.getElementById( id );
3074 // Check parentNode to catch when Blackberry 4.6 returns
3075 // nodes that are no longer in the document #6963
3076 return m && m.parentNode ? [m] : [];
3077 }
3078 };
3079 Expr.filter["ID"] = function( id ) {
3080 var attrId = id.replace( runescape, funescape );
3081 return function( elem ) {
3082 return elem.getAttribute("id") === attrId;
3083 };
3084 };
3085 } else {
3086 // Support: IE6/7
3087 // getElementById is not reliable as a find shortcut
3088 delete Expr.find["ID"];
3089
3090 Expr.filter["ID"] = function( id ) {
3091 var attrId = id.replace( runescape, funescape );
3092 return function( elem ) {
3093 var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
3094 return node && node.value === attrId;
3095 };
3096 };
3097 }
3098
3099 // Tag
3100 Expr.find["TAG"] = support.getElementsByTagName ?
3101 function( tag, context ) {
3102 if ( typeof context.getElementsByTagName !== strundefined ) {
3103 return context.getElementsByTagName( tag );
3104 }
3105 } :
3106 function( tag, context ) {
3107 var elem,
3108 tmp = [],
3109 i = 0,
3110 results = context.getElementsByTagName( tag );
3111
3112 // Filter out possible comments
3113 if ( tag === "*" ) {
3114 while ( (elem = results[i++]) ) {
3115 if ( elem.nodeType === 1 ) {
3116 tmp.push( elem );
3117 }
3118 }
3119
3120 return tmp;
3121 }
3122 return results;
3123 };
3124
3125 // Class
3126 Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
3127 if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
3128 return context.getElementsByClassName( className );
3129 }
3130 };
3131
3132 /* QSA/matchesSelector
3133 ---------------------------------------------------------------------- */
3134
3135 // QSA and matchesSelector support
3136
3137 // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
3138 rbuggyMatches = [];
3139
3140 // qSa(:focus) reports false when true (Chrome 21)
3141 // We allow this because of a bug in IE8/9 that throws an error
3142 // whenever `document.activeElement` is accessed on an iframe
3143 // So, we allow :focus to pass through QSA all the time to avoid the IE error
3144 // See http://bugs.jquery.com/ticket/13378
3145 rbuggyQSA = [];
3146
3147 if ( (support.qsa = isNative(doc.querySelectorAll)) ) {
3148 // Build QSA regex
3149 // Regex strategy adopted from Diego Perini
3150 assert(function( div ) {
3151 // Select is set to empty string on purpose
3152 // This is to test IE's treatment of not explicitly
3153 // setting a boolean content attribute,
3154 // since its presence should be enough
3155 // http://bugs.jquery.com/ticket/12359
3156 div.innerHTML = "<select><option selected=''></option></select>";
3157
3158 // Support: IE8
3159 // Boolean attributes and "value" are not treated correctly
3160 if ( !div.querySelectorAll("[selected]").length ) {
3161 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
3162 }
3163
3164 // Webkit/Opera - :checked should return selected option elements
3165 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
3166 // IE8 throws error here and will not see later tests
3167 if ( !div.querySelectorAll(":checked").length ) {
3168 rbuggyQSA.push(":checked");
3169 }
3170 });
3171
3172 assert(function( div ) {
3173
3174 // Support: Opera 10-12/IE8
3175 // ^= $= *= and empty values
3176 // Should not select anything
3177 // Support: Windows 8 Native Apps
3178 // The type attribute is restricted during .innerHTML assignment
3179 var input = doc.createElement("input");
3180 input.setAttribute( "type", "hidden" );
3181 div.appendChild( input ).setAttribute( "t", "" );
3182
3183 if ( div.querySelectorAll("[t^='']").length ) {
3184 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
3185 }
3186
3187 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
3188 // IE8 throws error here and will not see later tests
3189 if ( !div.querySelectorAll(":enabled").length ) {
3190 rbuggyQSA.push( ":enabled", ":disabled" );
3191 }
3192
3193 // Opera 10-11 does not throw on post-comma invalid pseudos
3194 div.querySelectorAll("*,:x");
3195 rbuggyQSA.push(",.*:");
3196 });
3197 }
3198
3199 if ( (support.matchesSelector = isNative( (matches = docElem.webkitMatchesSelector ||
3200 docElem.mozMatchesSelector ||
3201 docElem.oMatchesSelector ||
3202 docElem.msMatchesSelector) )) ) {
3203
3204 assert(function( div ) {
3205 // Check to see if it's possible to do matchesSelector
3206 // on a disconnected node (IE 9)
3207 support.disconnectedMatch = matches.call( div, "div" );
3208
3209 // This should fail with an exception
3210 // Gecko does not error, returns false instead
3211 matches.call( div, "[s!='']:x" );
3212 rbuggyMatches.push( "!=", pseudos );
3213 });
3214 }
3215
3216 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
3217 rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
3218
3219 /* Contains
3220 ---------------------------------------------------------------------- */
3221
3222 // Element contains another
3223 // Purposefully does not implement inclusive descendent
3224 // As in, an element does not contain itself
3225 contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
3226 function( a, b ) {
3227 var adown = a.nodeType === 9 ? a.documentElement : a,
3228 bup = b && b.parentNode;
3229 return a === bup || !!( bup && bup.nodeType === 1 && (
3230 adown.contains ?
3231 adown.contains( bup ) :
3232 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
3233 ));
3234 } :
3235 function( a, b ) {
3236 if ( b ) {
3237 while ( (b = b.parentNode) ) {
3238 if ( b === a ) {
3239 return true;
3240 }
3241 }
3242 }
3243 return false;
3244 };
3245
3246 /* Sorting
3247 ---------------------------------------------------------------------- */
3248
3249 // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
3250 // Detached nodes confoundingly follow *each other*
3251 support.sortDetached = assert(function( div1 ) {
3252 // Should return 1, but returns 4 (following)
3253 return div1.compareDocumentPosition( doc.createElement("div") ) & 1;
3254 });
3255
3256 // Document order sorting
3257 sortOrder = docElem.compareDocumentPosition ?
3258 function( a, b ) {
3259
3260 // Flag for duplicate removal
3261 if ( a === b ) {
3262 hasDuplicate = true;
3263 return 0;
3264 }
3265
3266 var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
3267
3268 if ( compare ) {
3269 // Disconnected nodes
3270 if ( compare & 1 ||
3271 (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
3272
3273 // Choose the first element that is related to our preferred document
3274 if ( a === doc || contains(preferredDoc, a) ) {
3275 return -1;
3276 }
3277 if ( b === doc || contains(preferredDoc, b) ) {
3278 return 1;
3279 }
3280
3281 // Maintain original order
3282 return sortInput ?
3283 ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
3284 0;
3285 }
3286
3287 return compare & 4 ? -1 : 1;
3288 }
3289
3290 // Not directly comparable, sort on existence of method
3291 return a.compareDocumentPosition ? -1 : 1;
3292 } :
3293 function( a, b ) {
3294 var cur,
3295 i = 0,
3296 aup = a.parentNode,
3297 bup = b.parentNode,
3298 ap = [ a ],
3299 bp = [ b ];
3300
3301 // Exit early if the nodes are identical
3302 if ( a === b ) {
3303 hasDuplicate = true;
3304 return 0;
3305
3306 // Parentless nodes are either documents or disconnected
3307 } else if ( !aup || !bup ) {
3308 return a === doc ? -1 :
3309 b === doc ? 1 :
3310 aup ? -1 :
3311 bup ? 1 :
3312 sortInput ?
3313 ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
3314 0;
3315
3316 // If the nodes are siblings, we can do a quick check
3317 } else if ( aup === bup ) {
3318 return siblingCheck( a, b );
3319 }
3320
3321 // Otherwise we need full lists of their ancestors for comparison
3322 cur = a;
3323 while ( (cur = cur.parentNode) ) {
3324 ap.unshift( cur );
3325 }
3326 cur = b;
3327 while ( (cur = cur.parentNode) ) {
3328 bp.unshift( cur );
3329 }
3330
3331 // Walk down the tree looking for a discrepancy
3332 while ( ap[i] === bp[i] ) {
3333 i++;
3334 }
3335
3336 return i ?
3337 // Do a sibling check if the nodes have a common ancestor
3338 siblingCheck( ap[i], bp[i] ) :
3339
3340 // Otherwise nodes in our document sort first
3341 ap[i] === preferredDoc ? -1 :
3342 bp[i] === preferredDoc ? 1 :
3343 0;
3344 };
3345
3346 return doc;
3347};
3348
3349Sizzle.matches = function( expr, elements ) {
3350 return Sizzle( expr, null, null, elements );
3351};
3352
3353Sizzle.matchesSelector = function( elem, expr ) {
3354 // Set document vars if needed
3355 if ( ( elem.ownerDocument || elem ) !== document ) {
3356 setDocument( elem );
3357 }
3358
3359 // Make sure that attribute selectors are quoted
3360 expr = expr.replace( rattributeQuotes, "='$1']" );
3361
3362 if ( support.matchesSelector && documentIsHTML &&
3363 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
3364 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
3365
3366 try {
3367 var ret = matches.call( elem, expr );
3368
3369 // IE 9's matchesSelector returns false on disconnected nodes
3370 if ( ret || support.disconnectedMatch ||
3371 // As well, disconnected nodes are said to be in a document
3372 // fragment in IE 9
3373 elem.document && elem.document.nodeType !== 11 ) {
3374 return ret;
3375 }
3376 } catch(e) {}
3377 }
3378
3379 return Sizzle( expr, document, null, [elem] ).length > 0;
3380};
3381
3382Sizzle.contains = function( context, elem ) {
3383 // Set document vars if needed
3384 if ( ( context.ownerDocument || context ) !== document ) {
3385 setDocument( context );
3386 }
3387 return contains( context, elem );
3388};
3389
3390Sizzle.attr = function( elem, name ) {
3391 // Set document vars if needed
3392 if ( ( elem.ownerDocument || elem ) !== document ) {
3393 setDocument( elem );
3394 }
3395
3396 var fn = Expr.attrHandle[ name.toLowerCase() ],
3397 // Don't get fooled by Object.prototype properties (jQuery #13807)
3398 val = ( fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
3399 fn( elem, name, !documentIsHTML ) :
3400 undefined );
3401
3402 return val === undefined ?
3403 support.attributes || !documentIsHTML ?
3404 elem.getAttribute( name ) :
3405 (val = elem.getAttributeNode(name)) && val.specified ?
3406 val.value :
3407 null :
3408 val;
3409};
3410
3411Sizzle.error = function( msg ) {
3412 throw new Error( "Syntax error, unrecognized expression: " + msg );
3413};
3414
3415/**
3416 * Document sorting and removing duplicates
3417 * @param {ArrayLike} results
3418 */
3419Sizzle.uniqueSort = function( results ) {
3420 var elem,
3421 duplicates = [],
3422 j = 0,
3423 i = 0;
3424
3425 // Unless we *know* we can detect duplicates, assume their presence
3426 hasDuplicate = !support.detectDuplicates;
3427 sortInput = !support.sortStable && results.slice( 0 );
3428 results.sort( sortOrder );
3429
3430 if ( hasDuplicate ) {
3431 while ( (elem = results[i++]) ) {
3432 if ( elem === results[ i ] ) {
3433 j = duplicates.push( i );
3434 }
3435 }
3436 while ( j-- ) {
3437 results.splice( duplicates[ j ], 1 );
3438 }
3439 }
3440
3441 return results;
3442};
3443
3444/**
3445 * Utility function for retrieving the text value of an array of DOM nodes
3446 * @param {Array|Element} elem
3447 */
3448getText = Sizzle.getText = function( elem ) {
3449 var node,
3450 ret = "",
3451 i = 0,
3452 nodeType = elem.nodeType;
3453
3454 if ( !nodeType ) {
3455 // If no nodeType, this is expected to be an array
3456 for ( ; (node = elem[i]); i++ ) {
3457 // Do not traverse comment nodes
3458 ret += getText( node );
3459 }
3460 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
3461 // Use textContent for elements
3462 // innerText usage removed for consistency of new lines (see #11153)
3463 if ( typeof elem.textContent === "string" ) {
3464 return elem.textContent;
3465 } else {
3466 // Traverse its children
3467 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
3468 ret += getText( elem );
3469 }
3470 }
3471 } else if ( nodeType === 3 || nodeType === 4 ) {
3472 return elem.nodeValue;
3473 }
3474 // Do not include comment or processing instruction nodes
3475
3476 return ret;
3477};
3478
3479Expr = Sizzle.selectors = {
3480
3481 // Can be adjusted by the user
3482 cacheLength: 50,
3483
3484 createPseudo: markFunction,
3485
3486 match: matchExpr,
3487
3488 attrHandle: {},
3489
3490 find: {},
3491
3492 relative: {
3493 ">": { dir: "parentNode", first: true },
3494 " ": { dir: "parentNode" },
3495 "+": { dir: "previousSibling", first: true },
3496 "~": { dir: "previousSibling" }
3497 },
3498
3499 preFilter: {
3500 "ATTR": function( match ) {
3501 match[1] = match[1].replace( runescape, funescape );
3502
3503 // Move the given value to match[3] whether quoted or unquoted
3504 match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
3505
3506 if ( match[2] === "~=" ) {
3507 match[3] = " " + match[3] + " ";
3508 }
3509
3510 return match.slice( 0, 4 );
3511 },
3512
3513 "CHILD": function( match ) {
3514 /* matches from matchExpr["CHILD"]
3515 1 type (only|nth|...)
3516 2 what (child|of-type)
3517 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
3518 4 xn-component of xn+y argument ([+-]?\d*n|)
3519 5 sign of xn-component
3520 6 x of xn-component
3521 7 sign of y-component
3522 8 y of y-component
3523 */
3524 match[1] = match[1].toLowerCase();
3525
3526 if ( match[1].slice( 0, 3 ) === "nth" ) {
3527 // nth-* requires argument
3528 if ( !match[3] ) {
3529 Sizzle.error( match[0] );
3530 }
3531
3532 // numeric x and y parameters for Expr.filter.CHILD
3533 // remember that false/true cast respectively to 0/1
3534 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
3535 match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
3536
3537 // other types prohibit arguments
3538 } else if ( match[3] ) {
3539 Sizzle.error( match[0] );
3540 }
3541
3542 return match;
3543 },
3544
3545 "PSEUDO": function( match ) {
3546 var excess,
3547 unquoted = !match[5] && match[2];
3548
3549 if ( matchExpr["CHILD"].test( match[0] ) ) {
3550 return null;
3551 }
3552
3553 // Accept quoted arguments as-is
3554 if ( match[3] && match[4] !== undefined ) {
3555 match[2] = match[4];
3556
3557 // Strip excess characters from unquoted arguments
3558 } else if ( unquoted && rpseudo.test( unquoted ) &&
3559 // Get excess from tokenize (recursively)
3560 (excess = tokenize( unquoted, true )) &&
3561 // advance to the next closing parenthesis
3562 (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
3563
3564 // excess is a negative index
3565 match[0] = match[0].slice( 0, excess );
3566 match[2] = unquoted.slice( 0, excess );
3567 }
3568
3569 // Return only captures needed by the pseudo filter method (type and argument)
3570 return match.slice( 0, 3 );
3571 }
3572 },
3573
3574 filter: {
3575
3576 "TAG": function( nodeNameSelector ) {
3577 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
3578 return nodeNameSelector === "*" ?
3579 function() { return true; } :
3580 function( elem ) {
3581 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
3582 };
3583 },
3584
3585 "CLASS": function( className ) {
3586 var pattern = classCache[ className + " " ];
3587
3588 return pattern ||
3589 (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
3590 classCache( className, function( elem ) {
3591 return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
3592 });
3593 },
3594
3595 "ATTR": function( name, operator, check ) {
3596 return function( elem ) {
3597 var result = Sizzle.attr( elem, name );
3598
3599 if ( result == null ) {
3600 return operator === "!=";
3601 }
3602 if ( !operator ) {
3603 return true;
3604 }
3605
3606 result += "";
3607
3608 return operator === "=" ? result === check :
3609 operator === "!=" ? result !== check :
3610 operator === "^=" ? check && result.indexOf( check ) === 0 :
3611 operator === "*=" ? check && result.indexOf( check ) > -1 :
3612 operator === "$=" ? check && result.slice( -check.length ) === check :
3613 operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
3614 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
3615 false;
3616 };
3617 },
3618
3619 "CHILD": function( type, what, argument, first, last ) {
3620 var simple = type.slice( 0, 3 ) !== "nth",
3621 forward = type.slice( -4 ) !== "last",
3622 ofType = what === "of-type";
3623
3624 return first === 1 && last === 0 ?
3625
3626 // Shortcut for :nth-*(n)
3627 function( elem ) {
3628 return !!elem.parentNode;
3629 } :
3630
3631 function( elem, context, xml ) {
3632 var cache, outerCache, node, diff, nodeIndex, start,
3633 dir = simple !== forward ? "nextSibling" : "previousSibling",
3634 parent = elem.parentNode,
3635 name = ofType && elem.nodeName.toLowerCase(),
3636 useCache = !xml && !ofType;
3637
3638 if ( parent ) {
3639
3640 // :(first|last|only)-(child|of-type)
3641 if ( simple ) {
3642 while ( dir ) {
3643 node = elem;
3644 while ( (node = node[ dir ]) ) {
3645 if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
3646 return false;
3647 }
3648 }
3649 // Reverse direction for :only-* (if we haven't yet done so)
3650 start = dir = type === "only" && !start && "nextSibling";
3651 }
3652 return true;
3653 }
3654
3655 start = [ forward ? parent.firstChild : parent.lastChild ];
3656
3657 // non-xml :nth-child(...) stores cache data on `parent`
3658 if ( forward && useCache ) {
3659 // Seek `elem` from a previously-cached index
3660 outerCache = parent[ expando ] || (parent[ expando ] = {});
3661 cache = outerCache[ type ] || [];
3662 nodeIndex = cache[0] === dirruns && cache[1];
3663 diff = cache[0] === dirruns && cache[2];
3664 node = nodeIndex && parent.childNodes[ nodeIndex ];
3665
3666 while ( (node = ++nodeIndex && node && node[ dir ] ||
3667
3668 // Fallback to seeking `elem` from the start
3669 (diff = nodeIndex = 0) || start.pop()) ) {
3670
3671 // When found, cache indexes on `parent` and break
3672 if ( node.nodeType === 1 && ++diff && node === elem ) {
3673 outerCache[ type ] = [ dirruns, nodeIndex, diff ];
3674 break;
3675 }
3676 }
3677
3678 // Use previously-cached element index if available
3679 } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
3680 diff = cache[1];
3681
3682 // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
3683 } else {
3684 // Use the same loop as above to seek `elem` from the start
3685 while ( (node = ++nodeIndex && node && node[ dir ] ||
3686 (diff = nodeIndex = 0) || start.pop()) ) {
3687
3688 if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
3689 // Cache the index of each encountered element
3690 if ( useCache ) {
3691 (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
3692 }
3693
3694 if ( node === elem ) {
3695 break;
3696 }
3697 }
3698 }
3699 }
3700
3701 // Incorporate the offset, then check against cycle size
3702 diff -= last;
3703 return diff === first || ( diff % first === 0 && diff / first >= 0 );
3704 }
3705 };
3706 },
3707
3708 "PSEUDO": function( pseudo, argument ) {
3709 // pseudo-class names are case-insensitive
3710 // http://www.w3.org/TR/selectors/#pseudo-classes
3711 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
3712 // Remember that setFilters inherits from pseudos
3713 var args,
3714 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
3715 Sizzle.error( "unsupported pseudo: " + pseudo );
3716
3717 // The user may use createPseudo to indicate that
3718 // arguments are needed to create the filter function
3719 // just as Sizzle does
3720 if ( fn[ expando ] ) {
3721 return fn( argument );
3722 }
3723
3724 // But maintain support for old signatures
3725 if ( fn.length > 1 ) {
3726 args = [ pseudo, pseudo, "", argument ];
3727 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
3728 markFunction(function( seed, matches ) {
3729 var idx,
3730 matched = fn( seed, argument ),
3731 i = matched.length;
3732 while ( i-- ) {
3733 idx = indexOf.call( seed, matched[i] );
3734 seed[ idx ] = !( matches[ idx ] = matched[i] );
3735 }
3736 }) :
3737 function( elem ) {
3738 return fn( elem, 0, args );
3739 };
3740 }
3741
3742 return fn;
3743 }
3744 },
3745
3746 pseudos: {
3747 // Potentially complex pseudos
3748 "not": markFunction(function( selector ) {
3749 // Trim the selector passed to compile
3750 // to avoid treating leading and trailing
3751 // spaces as combinators
3752 var input = [],
3753 results = [],
3754 matcher = compile( selector.replace( rtrim, "$1" ) );
3755
3756 return matcher[ expando ] ?
3757 markFunction(function( seed, matches, context, xml ) {
3758 var elem,
3759 unmatched = matcher( seed, null, xml, [] ),
3760 i = seed.length;
3761
3762 // Match elements unmatched by `matcher`
3763 while ( i-- ) {
3764 if ( (elem = unmatched[i]) ) {
3765 seed[i] = !(matches[i] = elem);
3766 }
3767 }
3768 }) :
3769 function( elem, context, xml ) {
3770 input[0] = elem;
3771 matcher( input, null, xml, results );
3772 return !results.pop();
3773 };
3774 }),
3775
3776 "has": markFunction(function( selector ) {
3777 return function( elem ) {
3778 return Sizzle( selector, elem ).length > 0;
3779 };
3780 }),
3781
3782 "contains": markFunction(function( text ) {
3783 return function( elem ) {
3784 return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
3785 };
3786 }),
3787
3788 // "Whether an element is represented by a :lang() selector
3789 // is based solely on the element's language value
3790 // being equal to the identifier C,
3791 // or beginning with the identifier C immediately followed by "-".
3792 // The matching of C against the element's language value is performed case-insensitively.
3793 // The identifier C does not have to be a valid language name."
3794 // http://www.w3.org/TR/selectors/#lang-pseudo
3795 "lang": markFunction( function( lang ) {
3796 // lang value must be a valid identifier
3797 if ( !ridentifier.test(lang || "") ) {
3798 Sizzle.error( "unsupported lang: " + lang );
3799 }
3800 lang = lang.replace( runescape, funescape ).toLowerCase();
3801 return function( elem ) {
3802 var elemLang;
3803 do {
3804 if ( (elemLang = documentIsHTML ?
3805 elem.lang :
3806 elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
3807
3808 elemLang = elemLang.toLowerCase();
3809 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
3810 }
3811 } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
3812 return false;
3813 };
3814 }),
3815
3816 // Miscellaneous
3817 "target": function( elem ) {
3818 var hash = window.location && window.location.hash;
3819 return hash && hash.slice( 1 ) === elem.id;
3820 },
3821
3822 "root": function( elem ) {
3823 return elem === docElem;
3824 },
3825
3826 "focus": function( elem ) {
3827 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
3828 },
3829
3830 // Boolean properties
3831 "enabled": function( elem ) {
3832 return elem.disabled === false;
3833 },
3834
3835 "disabled": function( elem ) {
3836 return elem.disabled === true;
3837 },
3838
3839 "checked": function( elem ) {
3840 // In CSS3, :checked should return both checked and selected elements
3841 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
3842 var nodeName = elem.nodeName.toLowerCase();
3843 return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
3844 },
3845
3846 "selected": function( elem ) {
3847 // Accessing this property makes selected-by-default
3848 // options in Safari work properly
3849 if ( elem.parentNode ) {
3850 elem.parentNode.selectedIndex;
3851 }
3852
3853 return elem.selected === true;
3854 },
3855
3856 // Contents
3857 "empty": function( elem ) {
3858 // http://www.w3.org/TR/selectors/#empty-pseudo
3859 // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
3860 // not comment, processing instructions, or others
3861 // Thanks to Diego Perini for the nodeName shortcut
3862 // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
3863 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
3864 if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
3865 return false;
3866 }
3867 }
3868 return true;
3869 },
3870
3871 "parent": function( elem ) {
3872 return !Expr.pseudos["empty"]( elem );
3873 },
3874
3875 // Element/input types
3876 "header": function( elem ) {
3877 return rheader.test( elem.nodeName );
3878 },
3879
3880 "input": function( elem ) {
3881 return rinputs.test( elem.nodeName );
3882 },
3883
3884 "button": function( elem ) {
3885 var name = elem.nodeName.toLowerCase();
3886 return name === "input" && elem.type === "button" || name === "button";
3887 },
3888
3889 "text": function( elem ) {
3890 var attr;
3891 // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
3892 // use getAttribute instead to test this case
3893 return elem.nodeName.toLowerCase() === "input" &&
3894 elem.type === "text" &&
3895 ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
3896 },
3897
3898 // Position-in-collection
3899 "first": createPositionalPseudo(function() {
3900 return [ 0 ];
3901 }),
3902
3903 "last": createPositionalPseudo(function( matchIndexes, length ) {
3904 return [ length - 1 ];
3905 }),
3906
3907 "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
3908 return [ argument < 0 ? argument + length : argument ];
3909 }),
3910
3911 "even": createPositionalPseudo(function( matchIndexes, length ) {
3912 var i = 0;
3913 for ( ; i < length; i += 2 ) {
3914 matchIndexes.push( i );
3915 }
3916 return matchIndexes;
3917 }),
3918
3919 "odd": createPositionalPseudo(function( matchIndexes, length ) {
3920 var i = 1;
3921 for ( ; i < length; i += 2 ) {
3922 matchIndexes.push( i );
3923 }
3924 return matchIndexes;
3925 }),
3926
3927 "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
3928 var i = argument < 0 ? argument + length : argument;
3929 for ( ; --i >= 0; ) {
3930 matchIndexes.push( i );
3931 }
3932 return matchIndexes;
3933 }),
3934
3935 "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
3936 var i = argument < 0 ? argument + length : argument;
3937 for ( ; ++i < length; ) {
3938 matchIndexes.push( i );
3939 }
3940 return matchIndexes;
3941 })
3942 }
3943};
3944
3945// Add button/input type pseudos
3946for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
3947 Expr.pseudos[ i ] = createInputPseudo( i );
3948}
3949for ( i in { submit: true, reset: true } ) {
3950 Expr.pseudos[ i ] = createButtonPseudo( i );
3951}
3952
3953function tokenize( selector, parseOnly ) {
3954 var matched, match, tokens, type,
3955 soFar, groups, preFilters,
3956 cached = tokenCache[ selector + " " ];
3957
3958 if ( cached ) {
3959 return parseOnly ? 0 : cached.slice( 0 );
3960 }
3961
3962 soFar = selector;
3963 groups = [];
3964 preFilters = Expr.preFilter;
3965
3966 while ( soFar ) {
3967
3968 // Comma and first run
3969 if ( !matched || (match = rcomma.exec( soFar )) ) {
3970 if ( match ) {
3971 // Don't consume trailing commas as valid
3972 soFar = soFar.slice( match[0].length ) || soFar;
3973 }
3974 groups.push( tokens = [] );
3975 }
3976
3977 matched = false;
3978
3979 // Combinators
3980 if ( (match = rcombinators.exec( soFar )) ) {
3981 matched = match.shift();
3982 tokens.push({
3983 value: matched,
3984 // Cast descendant combinators to space
3985 type: match[0].replace( rtrim, " " )
3986 });
3987 soFar = soFar.slice( matched.length );
3988 }
3989
3990 // Filters
3991 for ( type in Expr.filter ) {
3992 if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
3993 (match = preFilters[ type ]( match ))) ) {
3994 matched = match.shift();
3995 tokens.push({
3996 value: matched,
3997 type: type,
3998 matches: match
3999 });
4000 soFar = soFar.slice( matched.length );
4001 }
4002 }
4003
4004 if ( !matched ) {
4005 break;
4006 }
4007 }
4008
4009 // Return the length of the invalid excess
4010 // if we're just parsing
4011 // Otherwise, throw an error or return tokens
4012 return parseOnly ?
4013 soFar.length :
4014 soFar ?
4015 Sizzle.error( selector ) :
4016 // Cache the tokens
4017 tokenCache( selector, groups ).slice( 0 );
4018}
4019
4020function toSelector( tokens ) {
4021 var i = 0,
4022 len = tokens.length,
4023 selector = "";
4024 for ( ; i < len; i++ ) {
4025 selector += tokens[i].value;
4026 }
4027 return selector;
4028}
4029
4030function addCombinator( matcher, combinator, base ) {
4031 var dir = combinator.dir,
4032 checkNonElements = base && dir === "parentNode",
4033 doneName = done++;
4034
4035 return combinator.first ?
4036 // Check against closest ancestor/preceding element
4037 function( elem, context, xml ) {
4038 while ( (elem = elem[ dir ]) ) {
4039 if ( elem.nodeType === 1 || checkNonElements ) {
4040 return matcher( elem, context, xml );
4041 }
4042 }
4043 } :
4044
4045 // Check against all ancestor/preceding elements
4046 function( elem, context, xml ) {
4047 var data, cache, outerCache,
4048 dirkey = dirruns + " " + doneName;
4049
4050 // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
4051 if ( xml ) {
4052 while ( (elem = elem[ dir ]) ) {
4053 if ( elem.nodeType === 1 || checkNonElements ) {
4054 if ( matcher( elem, context, xml ) ) {
4055 return true;
4056 }
4057 }
4058 }
4059 } else {
4060 while ( (elem = elem[ dir ]) ) {
4061 if ( elem.nodeType === 1 || checkNonElements ) {
4062 outerCache = elem[ expando ] || (elem[ expando ] = {});
4063 if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
4064 if ( (data = cache[1]) === true || data === cachedruns ) {
4065 return data === true;
4066 }
4067 } else {
4068 cache = outerCache[ dir ] = [ dirkey ];
4069 cache[1] = matcher( elem, context, xml ) || cachedruns;
4070 if ( cache[1] === true ) {
4071 return true;
4072 }
4073 }
4074 }
4075 }
4076 }
4077 };
4078}
4079
4080function elementMatcher( matchers ) {
4081 return matchers.length > 1 ?
4082 function( elem, context, xml ) {
4083 var i = matchers.length;
4084 while ( i-- ) {
4085 if ( !matchers[i]( elem, context, xml ) ) {
4086 return false;
4087 }
4088 }
4089 return true;
4090 } :
4091 matchers[0];
4092}
4093
4094function condense( unmatched, map, filter, context, xml ) {
4095 var elem,
4096 newUnmatched = [],
4097 i = 0,
4098 len = unmatched.length,
4099 mapped = map != null;
4100
4101 for ( ; i < len; i++ ) {
4102 if ( (elem = unmatched[i]) ) {
4103 if ( !filter || filter( elem, context, xml ) ) {
4104 newUnmatched.push( elem );
4105 if ( mapped ) {
4106 map.push( i );
4107 }
4108 }
4109 }
4110 }
4111
4112 return newUnmatched;
4113}
4114
4115function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
4116 if ( postFilter && !postFilter[ expando ] ) {
4117 postFilter = setMatcher( postFilter );
4118 }
4119 if ( postFinder && !postFinder[ expando ] ) {
4120 postFinder = setMatcher( postFinder, postSelector );
4121 }
4122 return markFunction(function( seed, results, context, xml ) {
4123 var temp, i, elem,
4124 preMap = [],
4125 postMap = [],
4126 preexisting = results.length,
4127
4128 // Get initial elements from seed or context
4129 elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
4130
4131 // Prefilter to get matcher input, preserving a map for seed-results synchronization
4132 matcherIn = preFilter && ( seed || !selector ) ?
4133 condense( elems, preMap, preFilter, context, xml ) :
4134 elems,
4135
4136 matcherOut = matcher ?
4137 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
4138 postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
4139
4140 // ...intermediate processing is necessary
4141 [] :
4142
4143 // ...otherwise use results directly
4144 results :
4145 matcherIn;
4146
4147 // Find primary matches
4148 if ( matcher ) {
4149 matcher( matcherIn, matcherOut, context, xml );
4150 }
4151
4152 // Apply postFilter
4153 if ( postFilter ) {
4154 temp = condense( matcherOut, postMap );
4155 postFilter( temp, [], context, xml );
4156
4157 // Un-match failing elements by moving them back to matcherIn
4158 i = temp.length;
4159 while ( i-- ) {
4160 if ( (elem = temp[i]) ) {
4161 matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
4162 }
4163 }
4164 }
4165
4166 if ( seed ) {
4167 if ( postFinder || preFilter ) {
4168 if ( postFinder ) {
4169 // Get the final matcherOut by condensing this intermediate into postFinder contexts
4170 temp = [];
4171 i = matcherOut.length;
4172 while ( i-- ) {
4173 if ( (elem = matcherOut[i]) ) {
4174 // Restore matcherIn since elem is not yet a final match
4175 temp.push( (matcherIn[i] = elem) );
4176 }
4177 }
4178 postFinder( null, (matcherOut = []), temp, xml );
4179 }
4180
4181 // Move matched elements from seed to results to keep them synchronized
4182 i = matcherOut.length;
4183 while ( i-- ) {
4184 if ( (elem = matcherOut[i]) &&
4185 (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
4186
4187 seed[temp] = !(results[temp] = elem);
4188 }
4189 }
4190 }
4191
4192 // Add elements to results, through postFinder if defined
4193 } else {
4194 matcherOut = condense(
4195 matcherOut === results ?
4196 matcherOut.splice( preexisting, matcherOut.length ) :
4197 matcherOut
4198 );
4199 if ( postFinder ) {
4200 postFinder( null, results, matcherOut, xml );
4201 } else {
4202 push.apply( results, matcherOut );
4203 }
4204 }
4205 });
4206}
4207
4208function matcherFromTokens( tokens ) {
4209 var checkContext, matcher, j,
4210 len = tokens.length,
4211 leadingRelative = Expr.relative[ tokens[0].type ],
4212 implicitRelative = leadingRelative || Expr.relative[" "],
4213 i = leadingRelative ? 1 : 0,
4214
4215 // The foundational matcher ensures that elements are reachable from top-level context(s)
4216 matchContext = addCombinator( function( elem ) {
4217 return elem === checkContext;
4218 }, implicitRelative, true ),
4219 matchAnyContext = addCombinator( function( elem ) {
4220 return indexOf.call( checkContext, elem ) > -1;
4221 }, implicitRelative, true ),
4222 matchers = [ function( elem, context, xml ) {
4223 return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
4224 (checkContext = context).nodeType ?
4225 matchContext( elem, context, xml ) :
4226 matchAnyContext( elem, context, xml ) );
4227 } ];
4228
4229 for ( ; i < len; i++ ) {
4230 if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
4231 matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
4232 } else {
4233 matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
4234
4235 // Return special upon seeing a positional matcher
4236 if ( matcher[ expando ] ) {
4237 // Find the next relative operator (if any) for proper handling
4238 j = ++i;
4239 for ( ; j < len; j++ ) {
4240 if ( Expr.relative[ tokens[j].type ] ) {
4241 break;
4242 }
4243 }
4244 return setMatcher(
4245 i > 1 && elementMatcher( matchers ),
4246 i > 1 && toSelector(
4247 // If the preceding token was a descendant combinator, insert an implicit any-element `*`
4248 tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
4249 ).replace( rtrim, "$1" ),
4250 matcher,
4251 i < j && matcherFromTokens( tokens.slice( i, j ) ),
4252 j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
4253 j < len && toSelector( tokens )
4254 );
4255 }
4256 matchers.push( matcher );
4257 }
4258 }
4259
4260 return elementMatcher( matchers );
4261}
4262
4263function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
4264 // A counter to specify which element is currently being matched
4265 var matcherCachedRuns = 0,
4266 bySet = setMatchers.length > 0,
4267 byElement = elementMatchers.length > 0,
4268 superMatcher = function( seed, context, xml, results, expandContext ) {
4269 var elem, j, matcher,
4270 setMatched = [],
4271 matchedCount = 0,
4272 i = "0",
4273 unmatched = seed && [],
4274 outermost = expandContext != null,
4275 contextBackup = outermostContext,
4276 // We must always have either seed elements or context
4277 elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
4278 // Use integer dirruns iff this is the outermost matcher
4279 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
4280
4281 if ( outermost ) {
4282 outermostContext = context !== document && context;
4283 cachedruns = matcherCachedRuns;
4284 }
4285
4286 // Add elements passing elementMatchers directly to results
4287 // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
4288 for ( ; (elem = elems[i]) != null; i++ ) {
4289 if ( byElement && elem ) {
4290 j = 0;
4291 while ( (matcher = elementMatchers[j++]) ) {
4292 if ( matcher( elem, context, xml ) ) {
4293 results.push( elem );
4294 break;
4295 }
4296 }
4297 if ( outermost ) {
4298 dirruns = dirrunsUnique;
4299 cachedruns = ++matcherCachedRuns;
4300 }
4301 }
4302
4303 // Track unmatched elements for set filters
4304 if ( bySet ) {
4305 // They will have gone through all possible matchers
4306 if ( (elem = !matcher && elem) ) {
4307 matchedCount--;
4308 }
4309
4310 // Lengthen the array for every element, matched or not
4311 if ( seed ) {
4312 unmatched.push( elem );
4313 }
4314 }
4315 }
4316
4317 // Apply set filters to unmatched elements
4318 matchedCount += i;
4319 if ( bySet && i !== matchedCount ) {
4320 j = 0;
4321 while ( (matcher = setMatchers[j++]) ) {
4322 matcher( unmatched, setMatched, context, xml );
4323 }
4324
4325 if ( seed ) {
4326 // Reintegrate element matches to eliminate the need for sorting
4327 if ( matchedCount > 0 ) {
4328 while ( i-- ) {
4329 if ( !(unmatched[i] || setMatched[i]) ) {
4330 setMatched[i] = pop.call( results );
4331 }
4332 }
4333 }
4334
4335 // Discard index placeholder values to get only actual matches
4336 setMatched = condense( setMatched );
4337 }
4338
4339 // Add matches to results
4340 push.apply( results, setMatched );
4341
4342 // Seedless set matches succeeding multiple successful matchers stipulate sorting
4343 if ( outermost && !seed && setMatched.length > 0 &&
4344 ( matchedCount + setMatchers.length ) > 1 ) {
4345
4346 Sizzle.uniqueSort( results );
4347 }
4348 }
4349
4350 // Override manipulation of globals by nested matchers
4351 if ( outermost ) {
4352 dirruns = dirrunsUnique;
4353 outermostContext = contextBackup;
4354 }
4355
4356 return unmatched;
4357 };
4358
4359 return bySet ?
4360 markFunction( superMatcher ) :
4361 superMatcher;
4362}
4363
4364compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
4365 var i,
4366 setMatchers = [],
4367 elementMatchers = [],
4368 cached = compilerCache[ selector + " " ];
4369
4370 if ( !cached ) {
4371 // Generate a function of recursive functions that can be used to check each element
4372 if ( !group ) {
4373 group = tokenize( selector );
4374 }
4375 i = group.length;
4376 while ( i-- ) {
4377 cached = matcherFromTokens( group[i] );
4378 if ( cached[ expando ] ) {
4379 setMatchers.push( cached );
4380 } else {
4381 elementMatchers.push( cached );
4382 }
4383 }
4384
4385 // Cache the compiled function
4386 cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
4387 }
4388 return cached;
4389};
4390
4391function multipleContexts( selector, contexts, results ) {
4392 var i = 0,
4393 len = contexts.length;
4394 for ( ; i < len; i++ ) {
4395 Sizzle( selector, contexts[i], results );
4396 }
4397 return results;
4398}
4399
4400function select( selector, context, results, seed ) {
4401 var i, tokens, token, type, find,
4402 match = tokenize( selector );
4403
4404 if ( !seed ) {
4405 // Try to minimize operations if there is only one group
4406 if ( match.length === 1 ) {
4407
4408 // Take a shortcut and set the context if the root selector is an ID
4409 tokens = match[0] = match[0].slice( 0 );
4410 if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
4411 support.getById && context.nodeType === 9 && documentIsHTML &&
4412 Expr.relative[ tokens[1].type ] ) {
4413
4414 context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
4415 if ( !context ) {
4416 return results;
4417 }
4418 selector = selector.slice( tokens.shift().value.length );
4419 }
4420
4421 // Fetch a seed set for right-to-left matching
4422 i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
4423 while ( i-- ) {
4424 token = tokens[i];
4425
4426 // Abort if we hit a combinator
4427 if ( Expr.relative[ (type = token.type) ] ) {
4428 break;
4429 }
4430 if ( (find = Expr.find[ type ]) ) {
4431 // Search, expanding context for leading sibling combinators
4432 if ( (seed = find(
4433 token.matches[0].replace( runescape, funescape ),
4434 rsibling.test( tokens[0].type ) && context.parentNode || context
4435 )) ) {
4436
4437 // If seed is empty or no tokens remain, we can return early
4438 tokens.splice( i, 1 );
4439 selector = seed.length && toSelector( tokens );
4440 if ( !selector ) {
4441 push.apply( results, seed );
4442 return results;
4443 }
4444
4445 break;
4446 }
4447 }
4448 }
4449 }
4450 }
4451
4452 // Compile and execute a filtering function
4453 // Provide `match` to avoid retokenization if we modified the selector above
4454 compile( selector, match )(
4455 seed,
4456 context,
4457 !documentIsHTML,
4458 results,
4459 rsibling.test( selector )
4460 );
4461 return results;
4462}
4463
4464// Deprecated
4465Expr.pseudos["nth"] = Expr.pseudos["eq"];
4466
4467// Easy API for creating new setFilters
4468function setFilters() {}
4469setFilters.prototype = Expr.filters = Expr.pseudos;
4470Expr.setFilters = new setFilters();
4471
4472// One-time assignments
4473
4474// Sort stability
4475support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
4476
4477// Initialize against the default document
4478setDocument();
4479
4480// Support: Chrome<<14
4481// Always assume duplicates if they aren't passed to the comparison function
4482[0, 0].sort( sortOrder );
4483support.detectDuplicates = hasDuplicate;
4484
4485jQuery.find = Sizzle;
4486jQuery.expr = Sizzle.selectors;
4487jQuery.expr[":"] = jQuery.expr.pseudos;
4488jQuery.unique = Sizzle.uniqueSort;
4489jQuery.text = Sizzle.getText;
4490jQuery.isXMLDoc = Sizzle.isXML;
4491jQuery.contains = Sizzle.contains;
4492
4493
4494})( window );
4495// String to Object options format cache
4496var optionsCache = {};
4497
4498// Convert String-formatted options into Object-formatted ones and store in cache
4499function createOptions( options ) {
4500 var object = optionsCache[ options ] = {};
4501 jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
4502 object[ flag ] = true;
4503 });
4504 return object;
4505}
4506
4507/*
4508 * Create a callback list using the following parameters:
4509 *
4510 * options: an optional list of space-separated options that will change how
4511 * the callback list behaves or a more traditional option object
4512 *
4513 * By default a callback list will act like an event callback list and can be
4514 * "fired" multiple times.
4515 *
4516 * Possible options:
4517 *
4518 * once: will ensure the callback list can only be fired once (like a Deferred)
4519 *
4520 * memory: will keep track of previous values and will call any callback added
4521 * after the list has been fired right away with the latest "memorized"
4522 * values (like a Deferred)
4523 *
4524 * unique: will ensure a callback can only be added once (no duplicate in the list)
4525 *
4526 * stopOnFalse: interrupt callings when a callback returns false
4527 *
4528 */
4529jQuery.Callbacks = function( options ) {
4530
4531 // Convert options from String-formatted to Object-formatted if needed
4532 // (we check in cache first)
4533 options = typeof options === "string" ?
4534 ( optionsCache[ options ] || createOptions( options ) ) :
4535 jQuery.extend( {}, options );
4536
4537 var // Flag to know if list is currently firing
4538 firing,
4539 // Last fire value (for non-forgettable lists)
4540 memory,
4541 // Flag to know if list was already fired
4542 fired,
4543 // End of the loop when firing
4544 firingLength,
4545 // Index of currently firing callback (modified by remove if needed)
4546 firingIndex,
4547 // First callback to fire (used internally by add and fireWith)
4548 firingStart,
4549 // Actual callback list
4550 list = [],
4551 // Stack of fire calls for repeatable lists
4552 stack = !options.once && [],
4553 // Fire callbacks
4554 fire = function( data ) {
4555 memory = options.memory && data;
4556 fired = true;
4557 firingIndex = firingStart || 0;
4558 firingStart = 0;
4559 firingLength = list.length;
4560 firing = true;
4561 for ( ; list && firingIndex < firingLength; firingIndex++ ) {
4562 if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
4563 memory = false; // To prevent further calls using add
4564 break;
4565 }
4566 }
4567 firing = false;
4568 if ( list ) {
4569 if ( stack ) {
4570 if ( stack.length ) {
4571 fire( stack.shift() );
4572 }
4573 } else if ( memory ) {
4574 list = [];
4575 } else {
4576 self.disable();
4577 }
4578 }
4579 },
4580 // Actual Callbacks object
4581 self = {
4582 // Add a callback or a collection of callbacks to the list
4583 add: function() {
4584 if ( list ) {
4585 // First, we save the current length
4586 var start = list.length;
4587 (function add( args ) {
4588 jQuery.each( args, function( _, arg ) {
4589 var type = jQuery.type( arg );
4590 if ( type === "function" ) {
4591 if ( !options.unique || !self.has( arg ) ) {
4592 list.push( arg );
4593 }
4594 } else if ( arg && arg.length && type !== "string" ) {
4595 // Inspect recursively
4596 add( arg );
4597 }
4598 });
4599 })( arguments );
4600 // Do we need to add the callbacks to the
4601 // current firing batch?
4602 if ( firing ) {
4603 firingLength = list.length;
4604 // With memory, if we're not firing then
4605 // we should call right away
4606 } else if ( memory ) {
4607 firingStart = start;
4608 fire( memory );
4609 }
4610 }
4611 return this;
4612 },
4613 // Remove a callback from the list
4614 remove: function() {
4615 if ( list ) {
4616 jQuery.each( arguments, function( _, arg ) {
4617 var index;
4618 while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
4619 list.splice( index, 1 );
4620 // Handle firing indexes
4621 if ( firing ) {
4622 if ( index <= firingLength ) {
4623 firingLength--;
4624 }
4625 if ( index <= firingIndex ) {
4626 firingIndex--;
4627 }
4628 }
4629 }
4630 });
4631 }
4632 return this;
4633 },
4634 // Check if a given callback is in the list.
4635 // If no argument is given, return whether or not list has callbacks attached.
4636 has: function( fn ) {
4637 return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
4638 },
4639 // Remove all callbacks from the list
4640 empty: function() {
4641 list = [];
4642 firingLength = 0;
4643 return this;
4644 },
4645 // Have the list do nothing anymore
4646 disable: function() {
4647 list = stack = memory = undefined;
4648 return this;
4649 },
4650 // Is it disabled?
4651 disabled: function() {
4652 return !list;
4653 },
4654 // Lock the list in its current state
4655 lock: function() {
4656 stack = undefined;
4657 if ( !memory ) {
4658 self.disable();
4659 }
4660 return this;
4661 },
4662 // Is it locked?
4663 locked: function() {
4664 return !stack;
4665 },
4666 // Call all callbacks with the given context and arguments
4667 fireWith: function( context, args ) {
4668 args = args || [];
4669 args = [ context, args.slice ? args.slice() : args ];
4670 if ( list && ( !fired || stack ) ) {
4671 if ( firing ) {
4672 stack.push( args );
4673 } else {
4674 fire( args );
4675 }
4676 }
4677 return this;
4678 },
4679 // Call all the callbacks with the given arguments
4680 fire: function() {
4681 self.fireWith( this, arguments );
4682 return this;
4683 },
4684 // To know if the callbacks have already been called at least once
4685 fired: function() {
4686 return !!fired;
4687 }
4688 };
4689
4690 return self;
4691};
4692jQuery.extend({
4693
4694 Deferred: function( func ) {
4695 var tuples = [
4696 // action, add listener, listener list, final state
4697 [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
4698 [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
4699 [ "notify", "progress", jQuery.Callbacks("memory") ]
4700 ],
4701 state = "pending",
4702 promise = {
4703 state: function() {
4704 return state;
4705 },
4706 always: function() {
4707 deferred.done( arguments ).fail( arguments );
4708 return this;
4709 },
4710 then: function( /* fnDone, fnFail, fnProgress */ ) {
4711 var fns = arguments;
4712 return jQuery.Deferred(function( newDefer ) {
4713 jQuery.each( tuples, function( i, tuple ) {
4714 var action = tuple[ 0 ],
4715 fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
4716 // deferred[ done | fail | progress ] for forwarding actions to newDefer
4717 deferred[ tuple[1] ](function() {
4718 var returned = fn && fn.apply( this, arguments );
4719 if ( returned && jQuery.isFunction( returned.promise ) ) {
4720 returned.promise()
4721 .done( newDefer.resolve )
4722 .fail( newDefer.reject )
4723 .progress( newDefer.notify );
4724 } else {
4725 newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
4726 }
4727 });
4728 });
4729 fns = null;
4730 }).promise();
4731 },
4732 // Get a promise for this deferred
4733 // If obj is provided, the promise aspect is added to the object
4734 promise: function( obj ) {
4735 return obj != null ? jQuery.extend( obj, promise ) : promise;
4736 }
4737 },
4738 deferred = {};
4739
4740 // Keep pipe for back-compat
4741 promise.pipe = promise.then;
4742
4743 // Add list-specific methods
4744 jQuery.each( tuples, function( i, tuple ) {
4745 var list = tuple[ 2 ],
4746 stateString = tuple[ 3 ];
4747
4748 // promise[ done | fail | progress ] = list.add
4749 promise[ tuple[1] ] = list.add;
4750
4751 // Handle state
4752 if ( stateString ) {
4753 list.add(function() {
4754 // state = [ resolved | rejected ]
4755 state = stateString;
4756
4757 // [ reject_list | resolve_list ].disable; progress_list.lock
4758 }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
4759 }
4760
4761 // deferred[ resolve | reject | notify ]
4762 deferred[ tuple[0] ] = function() {
4763 deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
4764 return this;
4765 };
4766 deferred[ tuple[0] + "With" ] = list.fireWith;
4767 });
4768
4769 // Make the deferred a promise
4770 promise.promise( deferred );
4771
4772 // Call given func if any
4773 if ( func ) {
4774 func.call( deferred, deferred );
4775 }
4776
4777 // All done!
4778 return deferred;
4779 },
4780
4781 // Deferred helper
4782 when: function( subordinate /* , ..., subordinateN */ ) {
4783 var i = 0,
4784 resolveValues = core_slice.call( arguments ),
4785 length = resolveValues.length,
4786
4787 // the count of uncompleted subordinates
4788 remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
4789
4790 // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
4791 deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
4792
4793 // Update function for both resolve and progress values
4794 updateFunc = function( i, contexts, values ) {
4795 return function( value ) {
4796 contexts[ i ] = this;
4797 values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
4798 if( values === progressValues ) {
4799 deferred.notifyWith( contexts, values );
4800 } else if ( !( --remaining ) ) {
4801 deferred.resolveWith( contexts, values );
4802 }
4803 };
4804 },
4805
4806 progressValues, progressContexts, resolveContexts;
4807
4808 // add listeners to Deferred subordinates; treat others as resolved
4809 if ( length > 1 ) {
4810 progressValues = new Array( length );
4811 progressContexts = new Array( length );
4812 resolveContexts = new Array( length );
4813 for ( ; i < length; i++ ) {
4814 if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
4815 resolveValues[ i ].promise()
4816 .done( updateFunc( i, resolveContexts, resolveValues ) )
4817 .fail( deferred.reject )
4818 .progress( updateFunc( i, progressContexts, progressValues ) );
4819 } else {
4820 --remaining;
4821 }
4822 }
4823 }
4824
4825 // if we're not waiting on anything, resolve the master
4826 if ( !remaining ) {
4827 deferred.resolveWith( resolveContexts, resolveValues );
4828 }
4829
4830 return deferred.promise();
4831 }
4832});
4833jQuery.support = (function( support ) {
4834
4835 var all, a, input, select, fragment, opt, eventName, isSupported, i,
4836 div = document.createElement("div");
4837
4838 // Setup
4839 div.setAttribute( "className", "t" );
4840 div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
4841
4842 // Finish early in limited (non-browser) environments
4843 all = div.getElementsByTagName("*") || [];
4844 a = div.getElementsByTagName("a")[ 0 ];
4845 if ( !a || !a.style || !all.length ) {
4846 return support;
4847 }
4848
4849 // First batch of tests
4850 select = document.createElement("select");
4851 opt = select.appendChild( document.createElement("option") );
4852 input = div.getElementsByTagName("input")[ 0 ];
4853
4854 a.style.cssText = "top:1px;float:left;opacity:.5";
4855
4856 // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
4857 support.getSetAttribute = div.className !== "t";
4858
4859 // IE strips leading whitespace when .innerHTML is used
4860 support.leadingWhitespace = div.firstChild.nodeType === 3;
4861
4862 // Make sure that tbody elements aren't automatically inserted
4863 // IE will insert them into empty tables
4864 support.tbody = !div.getElementsByTagName("tbody").length;
4865
4866 // Make sure that link elements get serialized correctly by innerHTML
4867 // This requires a wrapper element in IE
4868 support.htmlSerialize = !!div.getElementsByTagName("link").length;
4869
4870 // Get the style information from getAttribute
4871 // (IE uses .cssText instead)
4872 support.style = /top/.test( a.getAttribute("style") );
4873
4874 // Make sure that URLs aren't manipulated
4875 // (IE normalizes it by default)
4876 support.hrefNormalized = a.getAttribute("href") === "/a";
4877
4878 // Make sure that element opacity exists
4879 // (IE uses filter instead)
4880 // Use a regex to work around a WebKit issue. See #5145
4881 support.opacity = /^0.5/.test( a.style.opacity );
4882
4883 // Verify style float existence
4884 // (IE uses styleFloat instead of cssFloat)
4885 support.cssFloat = !!a.style.cssFloat;
4886
4887 // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
4888 support.checkOn = !!input.value;
4889
4890 // Make sure that a selected-by-default option has a working selected property.
4891 // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
4892 support.optSelected = opt.selected;
4893
4894 // Tests for enctype support on a form (#6743)
4895 support.enctype = !!document.createElement("form").enctype;
4896
4897 // Makes sure cloning an html5 element does not cause problems
4898 // Where outerHTML is undefined, this still works
4899 support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";
4900
4901 // Will be defined later
4902 support.inlineBlockNeedsLayout = false;
4903 support.shrinkWrapBlocks = false;
4904 support.pixelPosition = false;
4905 support.deleteExpando = true;
4906 support.noCloneEvent = true;
4907 support.reliableMarginRight = true;
4908 support.boxSizingReliable = true;
4909
4910 // Make sure checked status is properly cloned
4911 input.checked = true;
4912 support.noCloneChecked = input.cloneNode( true ).checked;
4913
4914 // Make sure that the options inside disabled selects aren't marked as disabled
4915 // (WebKit marks them as disabled)
4916 select.disabled = true;
4917 support.optDisabled = !opt.disabled;
4918
4919 // Support: IE<9
4920 try {
4921 delete div.test;
4922 } catch( e ) {
4923 support.deleteExpando = false;
4924 }
4925
4926 // Check if we can trust getAttribute("value")
4927 input = document.createElement("input");
4928 input.setAttribute( "value", "" );
4929 support.input = input.getAttribute( "value" ) === "";
4930
4931 // Check if an input maintains its value after becoming a radio
4932 input.value = "t";
4933 input.setAttribute( "type", "radio" );
4934 support.radioValue = input.value === "t";
4935
4936 // #11217 - WebKit loses check when the name is after the checked attribute
4937 input.setAttribute( "checked", "t" );
4938 input.setAttribute( "name", "t" );
4939
4940 fragment = document.createDocumentFragment();
4941 fragment.appendChild( input );
4942
4943 // Check if a disconnected checkbox will retain its checked
4944 // value of true after appended to the DOM (IE6/7)
4945 support.appendChecked = input.checked;
4946
4947 // WebKit doesn't clone checked state correctly in fragments
4948 support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
4949
4950 // Support: IE<9
4951 // Opera does not clone events (and typeof div.attachEvent === undefined).
4952 // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
4953 if ( div.attachEvent ) {
4954 div.attachEvent( "onclick", function() {
4955 support.noCloneEvent = false;
4956 });
4957
4958 div.cloneNode( true ).click();
4959 }
4960
4961 // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
4962 // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
4963 for ( i in { submit: true, change: true, focusin: true }) {
4964 div.setAttribute( eventName = "on" + i, "t" );
4965
4966 support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
4967 }
4968
4969 div.style.backgroundClip = "content-box";
4970 div.cloneNode( true ).style.backgroundClip = "";
4971 support.clearCloneStyle = div.style.backgroundClip === "content-box";
4972
4973 // Support: IE<9
4974 // Iteration over object's inherited properties before its own.
4975 for ( i in jQuery( support ) ) {
4976 break;
4977 }
4978 support.ownLast = i !== "0";
4979
4980 // Run tests that need a body at doc ready
4981 jQuery(function() {
4982 var container, marginDiv, tds,
4983 divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
4984 body = document.getElementsByTagName("body")[0];
4985
4986 if ( !body ) {
4987 // Return for frameset docs that don't have a body
4988 return;
4989 }
4990
4991 container = document.createElement("div");
4992 container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
4993
4994 body.appendChild( container ).appendChild( div );
4995
4996 // Support: IE8
4997 // Check if table cells still have offsetWidth/Height when they are set
4998 // to display:none and there are still other visible table cells in a
4999 // table row; if so, offsetWidth/Height are not reliable for use when
5000 // determining if an element has been hidden directly using
5001 // display:none (it is still safe to use offsets if a parent element is
5002 // hidden; don safety goggles and see bug #4512 for more information).
5003 div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
5004 tds = div.getElementsByTagName("td");
5005 tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
5006 isSupported = ( tds[ 0 ].offsetHeight === 0 );
5007
5008 tds[ 0 ].style.display = "";
5009 tds[ 1 ].style.display = "none";
5010
5011 // Support: IE8
5012 // Check if empty table cells still have offsetWidth/Height
5013 support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
5014
5015 // Check box-sizing and margin behavior.
5016 div.innerHTML = "";
5017 div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
5018
5019 // Workaround failing boxSizing test due to offsetWidth returning wrong value
5020 // with some non-1 values of body zoom, ticket #13543
5021 jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
5022 support.boxSizing = div.offsetWidth === 4;
5023 });
5024
5025 // Use window.getComputedStyle because jsdom on node.js will break without it.
5026 if ( window.getComputedStyle ) {
5027 support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
5028 support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
5029
5030 // Check if div with explicit width and no margin-right incorrectly
5031 // gets computed margin-right based on width of container. (#3333)
5032 // Fails in WebKit before Feb 2011 nightlies
5033 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
5034 marginDiv = div.appendChild( document.createElement("div") );
5035 marginDiv.style.cssText = div.style.cssText = divReset;
5036 marginDiv.style.marginRight = marginDiv.style.width = "0";
5037 div.style.width = "1px";
5038
5039 support.reliableMarginRight =
5040 !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
5041 }
5042
5043 if ( typeof div.style.zoom !== core_strundefined ) {
5044 // Support: IE<8
5045 // Check if natively block-level elements act like inline-block
5046 // elements when setting their display to 'inline' and giving
5047 // them layout
5048 div.innerHTML = "";
5049 div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
5050 support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
5051
5052 // Support: IE6
5053 // Check if elements with layout shrink-wrap their children
5054 div.style.display = "block";
5055 div.innerHTML = "<div></div>";
5056 div.firstChild.style.width = "5px";
5057 support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
5058
5059 if ( support.inlineBlockNeedsLayout ) {
5060 // Prevent IE 6 from affecting layout for positioned elements #11048
5061 // Prevent IE from shrinking the body in IE 7 mode #12869
5062 // Support: IE<8
5063 body.style.zoom = 1;
5064 }
5065 }
5066
5067 body.removeChild( container );
5068
5069 // Null elements to avoid leaks in IE
5070 container = div = tds = marginDiv = null;
5071 });
5072
5073 // Null elements to avoid leaks in IE
5074 all = select = fragment = opt = a = input = null;
5075
5076 return support;
5077})({});
5078
5079var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
5080 rmultiDash = /([A-Z])/g;
5081
5082function internalData( elem, name, data, pvt /* Internal Use Only */ ){
5083 if ( !jQuery.acceptData( elem ) ) {
5084 return;
5085 }
5086
5087 var ret, thisCache,
5088 internalKey = jQuery.expando,
5089
5090 // We have to handle DOM nodes and JS objects differently because IE6-7
5091 // can't GC object references properly across the DOM-JS boundary
5092 isNode = elem.nodeType,
5093
5094 // Only DOM nodes need the global jQuery cache; JS object data is
5095 // attached directly to the object so GC can occur automatically
5096 cache = isNode ? jQuery.cache : elem,
5097
5098 // Only defining an ID for JS objects if its cache already exists allows
5099 // the code to shortcut on the same path as a DOM node with no cache
5100 id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
5101
5102 // Avoid doing any more work than we need to when trying to get data on an
5103 // object that has no data at all
5104 if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
5105 return;
5106 }
5107
5108 if ( !id ) {
5109 // Only DOM nodes need a new unique ID for each element since their data
5110 // ends up in the global cache
5111 if ( isNode ) {
5112 id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;
5113 } else {
5114 id = internalKey;
5115 }
5116 }
5117
5118 if ( !cache[ id ] ) {
5119 // Avoid exposing jQuery metadata on plain JS objects when the object
5120 // is serialized using JSON.stringify
5121 cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
5122 }
5123
5124 // An object can be passed to jQuery.data instead of a key/value pair; this gets
5125 // shallow copied over onto the existing cache
5126 if ( typeof name === "object" || typeof name === "function" ) {
5127 if ( pvt ) {
5128 cache[ id ] = jQuery.extend( cache[ id ], name );
5129 } else {
5130 cache[ id ].data = jQuery.extend( cache[ id ].data, name );
5131 }
5132 }
5133
5134 thisCache = cache[ id ];
5135
5136 // jQuery data() is stored in a separate object inside the object's internal data
5137 // cache in order to avoid key collisions between internal data and user-defined
5138 // data.
5139 if ( !pvt ) {
5140 if ( !thisCache.data ) {
5141 thisCache.data = {};
5142 }
5143
5144 thisCache = thisCache.data;
5145 }
5146
5147 if ( data !== undefined ) {
5148 thisCache[ jQuery.camelCase( name ) ] = data;
5149 }
5150
5151 // Check for both converted-to-camel and non-converted data property names
5152 // If a data property was specified
5153 if ( typeof name === "string" ) {
5154
5155 // First Try to find as-is property data
5156 ret = thisCache[ name ];
5157
5158 // Test for null|undefined property data
5159 if ( ret == null ) {
5160
5161 // Try to find the camelCased property
5162 ret = thisCache[ jQuery.camelCase( name ) ];
5163 }
5164 } else {
5165 ret = thisCache;
5166 }
5167
5168 return ret;
5169}
5170
5171function internalRemoveData( elem, name, pvt ) {
5172 if ( !jQuery.acceptData( elem ) ) {
5173 return;
5174 }
5175
5176 var thisCache, i,
5177 isNode = elem.nodeType,
5178
5179 // See jQuery.data for more information
5180 cache = isNode ? jQuery.cache : elem,
5181 id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
5182
5183 // If there is already no cache entry for this object, there is no
5184 // purpose in continuing
5185 if ( !cache[ id ] ) {
5186 return;
5187 }
5188
5189 if ( name ) {
5190
5191 thisCache = pvt ? cache[ id ] : cache[ id ].data;
5192
5193 if ( thisCache ) {
5194
5195 // Support array or space separated string names for data keys
5196 if ( !jQuery.isArray( name ) ) {
5197
5198 // try the string as a key before any manipulation
5199 if ( name in thisCache ) {
5200 name = [ name ];
5201 } else {
5202
5203 // split the camel cased version by spaces unless a key with the spaces exists
5204 name = jQuery.camelCase( name );
5205 if ( name in thisCache ) {
5206 name = [ name ];
5207 } else {
5208 name = name.split(" ");
5209 }
5210 }
5211 } else {
5212 // If "name" is an array of keys...
5213 // When data is initially created, via ("key", "val") signature,
5214 // keys will be converted to camelCase.
5215 // Since there is no way to tell _how_ a key was added, remove
5216 // both plain key and camelCase key. #12786
5217 // This will only penalize the array argument path.
5218 name = name.concat( jQuery.map( name, jQuery.camelCase ) );
5219 }
5220
5221 i = name.length;
5222 while ( i-- ) {
5223 delete thisCache[ name[i] ];
5224 }
5225
5226 // If there is no data left in the cache, we want to continue
5227 // and let the cache object itself get destroyed
5228 if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
5229 return;
5230 }
5231 }
5232 }
5233
5234 // See jQuery.data for more information
5235 if ( !pvt ) {
5236 delete cache[ id ].data;
5237
5238 // Don't destroy the parent cache unless the internal data object
5239 // had been the only thing left in it
5240 if ( !isEmptyDataObject( cache[ id ] ) ) {
5241 return;
5242 }
5243 }
5244
5245 // Destroy the cache
5246 if ( isNode ) {
5247 jQuery.cleanData( [ elem ], true );
5248
5249 // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
5250 /* jshint eqeqeq: false */
5251 } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
5252 /* jshint eqeqeq: true */
5253 delete cache[ id ];
5254
5255 // When all else fails, null
5256 } else {
5257 cache[ id ] = null;
5258 }
5259}
5260
5261jQuery.extend({
5262 cache: {},
5263
5264 // The following elements throw uncatchable exceptions if you
5265 // attempt to add expando properties to them.
5266 noData: {
5267 "applet": true,
5268 "embed": true,
5269 // Ban all objects except for Flash (which handle expandos)
5270 "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
5271 },
5272
5273 hasData: function( elem ) {
5274 elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
5275 return !!elem && !isEmptyDataObject( elem );
5276 },
5277
5278 data: function( elem, name, data ) {
5279 return internalData( elem, name, data );
5280 },
5281
5282 removeData: function( elem, name ) {
5283 return internalRemoveData( elem, name );
5284 },
5285
5286 // For internal use only.
5287 _data: function( elem, name, data ) {
5288 return internalData( elem, name, data, true );
5289 },
5290
5291 _removeData: function( elem, name ) {
5292 return internalRemoveData( elem, name, true );
5293 },
5294
5295 // A method for determining if a DOM node can handle the data expando
5296 acceptData: function( elem ) {
5297 // Do not set data on non-element because it will not be cleared (#8335).
5298 if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
5299 return false;
5300 }
5301
5302 var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
5303
5304 // nodes accept data unless otherwise specified; rejection can be conditional
5305 return !noData || noData !== true && elem.getAttribute("classid") === noData;
5306 }
5307});
5308
5309jQuery.fn.extend({
5310 data: function( key, value ) {
5311 var attrs, name,
5312 data = null,
5313 i = 0,
5314 elem = this[0];
5315
5316 // Special expections of .data basically thwart jQuery.access,
5317 // so implement the relevant behavior ourselves
5318
5319 // Gets all values
5320 if ( key === undefined ) {
5321 if ( this.length ) {
5322 data = jQuery.data( elem );
5323
5324 if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
5325 attrs = elem.attributes;
5326 for ( ; i < attrs.length; i++ ) {
5327 name = attrs[i].name;
5328
5329 if ( name.indexOf("data-") === 0 ) {
5330 name = jQuery.camelCase( name.slice(5) );
5331
5332 dataAttr( elem, name, data[ name ] );
5333 }
5334 }
5335 jQuery._data( elem, "parsedAttrs", true );
5336 }
5337 }
5338
5339 return data;
5340 }
5341
5342 // Sets multiple values
5343 if ( typeof key === "object" ) {
5344 return this.each(function() {
5345 jQuery.data( this, key );
5346 });
5347 }
5348
5349 return arguments.length > 1 ?
5350
5351 // Sets one value
5352 this.each(function() {
5353 jQuery.data( this, key, value );
5354 }) :
5355
5356 // Gets one value
5357 // Try to fetch any internally stored data first
5358 elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
5359 },
5360
5361 removeData: function( key ) {
5362 return this.each(function() {
5363 jQuery.removeData( this, key );
5364 });
5365 }
5366});
5367
5368function dataAttr( elem, key, data ) {
5369 // If nothing was found internally, try to fetch any
5370 // data from the HTML5 data-* attribute
5371 if ( data === undefined && elem.nodeType === 1 ) {
5372
5373 var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
5374
5375 data = elem.getAttribute( name );
5376
5377 if ( typeof data === "string" ) {
5378 try {
5379 data = data === "true" ? true :
5380 data === "false" ? false :
5381 data === "null" ? null :
5382 // Only convert to a number if it doesn't change the string
5383 +data + "" === data ? +data :
5384 rbrace.test( data ) ? jQuery.parseJSON( data ) :
5385 data;
5386 } catch( e ) {}
5387
5388 // Make sure we set the data so it isn't changed later
5389 jQuery.data( elem, key, data );
5390
5391 } else {
5392 data = undefined;
5393 }
5394 }
5395
5396 return data;
5397}
5398
5399// checks a cache object for emptiness
5400function isEmptyDataObject( obj ) {
5401 var name;
5402 for ( name in obj ) {
5403
5404 // if the public data object is empty, the private is still empty
5405 if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
5406 continue;
5407 }
5408 if ( name !== "toJSON" ) {
5409 return false;
5410 }
5411 }
5412
5413 return true;
5414}
5415jQuery.extend({
5416 queue: function( elem, type, data ) {
5417 var queue;
5418
5419 if ( elem ) {
5420 type = ( type || "fx" ) + "queue";
5421 queue = jQuery._data( elem, type );
5422
5423 // Speed up dequeue by getting out quickly if this is just a lookup
5424 if ( data ) {
5425 if ( !queue || jQuery.isArray(data) ) {
5426 queue = jQuery._data( elem, type, jQuery.makeArray(data) );
5427 } else {
5428 queue.push( data );
5429 }
5430 }
5431 return queue || [];
5432 }
5433 },
5434
5435 dequeue: function( elem, type ) {
5436 type = type || "fx";
5437
5438 var queue = jQuery.queue( elem, type ),
5439 startLength = queue.length,
5440 fn = queue.shift(),
5441 hooks = jQuery._queueHooks( elem, type ),
5442 next = function() {
5443 jQuery.dequeue( elem, type );
5444 };
5445
5446 // If the fx queue is dequeued, always remove the progress sentinel
5447 if ( fn === "inprogress" ) {
5448 fn = queue.shift();
5449 startLength--;
5450 }
5451
5452 if ( fn ) {
5453
5454 // Add a progress sentinel to prevent the fx queue from being
5455 // automatically dequeued
5456 if ( type === "fx" ) {
5457 queue.unshift( "inprogress" );
5458 }
5459
5460 // clear up the last queue stop function
5461 delete hooks.stop;
5462 fn.call( elem, next, hooks );
5463 }
5464
5465 if ( !startLength && hooks ) {
5466 hooks.empty.fire();
5467 }
5468 },
5469
5470 // not intended for public consumption - generates a queueHooks object, or returns the current one
5471 _queueHooks: function( elem, type ) {
5472 var key = type + "queueHooks";
5473 return jQuery._data( elem, key ) || jQuery._data( elem, key, {
5474 empty: jQuery.Callbacks("once memory").add(function() {
5475 jQuery._removeData( elem, type + "queue" );
5476 jQuery._removeData( elem, key );
5477 })
5478 });
5479 }
5480});
5481
5482jQuery.fn.extend({
5483 queue: function( type, data ) {
5484 var setter = 2;
5485
5486 if ( typeof type !== "string" ) {
5487 data = type;
5488 type = "fx";
5489 setter--;
5490 }
5491
5492 if ( arguments.length < setter ) {
5493 return jQuery.queue( this[0], type );
5494 }
5495
5496 return data === undefined ?
5497 this :
5498 this.each(function() {
5499 var queue = jQuery.queue( this, type, data );
5500
5501 // ensure a hooks for this queue
5502 jQuery._queueHooks( this, type );
5503
5504 if ( type === "fx" && queue[0] !== "inprogress" ) {
5505 jQuery.dequeue( this, type );
5506 }
5507 });
5508 },
5509 dequeue: function( type ) {
5510 return this.each(function() {
5511 jQuery.dequeue( this, type );
5512 });
5513 },
5514 // Based off of the plugin by Clint Helfers, with permission.
5515 // http://blindsignals.com/index.php/2009/07/jquery-delay/
5516 delay: function( time, type ) {
5517 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
5518 type = type || "fx";
5519
5520 return this.queue( type, function( next, hooks ) {
5521 var timeout = setTimeout( next, time );
5522 hooks.stop = function() {
5523 clearTimeout( timeout );
5524 };
5525 });
5526 },
5527 clearQueue: function( type ) {
5528 return this.queue( type || "fx", [] );
5529 },
5530 // Get a promise resolved when queues of a certain type
5531 // are emptied (fx is the type by default)
5532 promise: function( type, obj ) {
5533 var tmp,
5534 count = 1,
5535 defer = jQuery.Deferred(),
5536 elements = this,
5537 i = this.length,
5538 resolve = function() {
5539 if ( !( --count ) ) {
5540 defer.resolveWith( elements, [ elements ] );
5541 }
5542 };
5543
5544 if ( typeof type !== "string" ) {
5545 obj = type;
5546 type = undefined;
5547 }
5548 type = type || "fx";
5549
5550 while( i-- ) {
5551 tmp = jQuery._data( elements[ i ], type + "queueHooks" );
5552 if ( tmp && tmp.empty ) {
5553 count++;
5554 tmp.empty.add( resolve );
5555 }
5556 }
5557 resolve();
5558 return defer.promise( obj );
5559 }
5560});
5561var nodeHook, boolHook,
5562 rclass = /[\t\r\n\f]/g,
5563 rreturn = /\r/g,
5564 rfocusable = /^(?:input|select|textarea|button|object)$/i,
5565 rclickable = /^(?:a|area)$/i,
5566 ruseDefault = /^(?:checked|selected)$/i,
5567 getSetAttribute = jQuery.support.getSetAttribute,
5568 getSetInput = jQuery.support.input;
5569
5570jQuery.fn.extend({
5571 attr: function( name, value ) {
5572 return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
5573 },
5574
5575 removeAttr: function( name ) {
5576 return this.each(function() {
5577 jQuery.removeAttr( this, name );
5578 });
5579 },
5580
5581 prop: function( name, value ) {
5582 return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
5583 },
5584
5585 removeProp: function( name ) {
5586 name = jQuery.propFix[ name ] || name;
5587 return this.each(function() {
5588 // try/catch handles cases where IE balks (such as removing a property on window)
5589 try {
5590 this[ name ] = undefined;
5591 delete this[ name ];
5592 } catch( e ) {}
5593 });
5594 },
5595
5596 addClass: function( value ) {
5597 var classes, elem, cur, clazz, j,
5598 i = 0,
5599 len = this.length,
5600 proceed = typeof value === "string" && value;
5601
5602 if ( jQuery.isFunction( value ) ) {
5603 return this.each(function( j ) {
5604 jQuery( this ).addClass( value.call( this, j, this.className ) );
5605 });
5606 }
5607
5608 if ( proceed ) {
5609 // The disjunction here is for better compressibility (see removeClass)
5610 classes = ( value || "" ).match( core_rnotwhite ) || [];
5611
5612 for ( ; i < len; i++ ) {
5613 elem = this[ i ];
5614 cur = elem.nodeType === 1 && ( elem.className ?
5615 ( " " + elem.className + " " ).replace( rclass, " " ) :
5616 " "
5617 );
5618
5619 if ( cur ) {
5620 j = 0;
5621 while ( (clazz = classes[j++]) ) {
5622 if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
5623 cur += clazz + " ";
5624 }
5625 }
5626 elem.className = jQuery.trim( cur );
5627
5628 }
5629 }
5630 }
5631
5632 return this;
5633 },
5634
5635 removeClass: function( value ) {
5636 var classes, elem, cur, clazz, j,
5637 i = 0,
5638 len = this.length,
5639 proceed = arguments.length === 0 || typeof value === "string" && value;
5640
5641 if ( jQuery.isFunction( value ) ) {
5642 return this.each(function( j ) {
5643 jQuery( this ).removeClass( value.call( this, j, this.className ) );
5644 });
5645 }
5646 if ( proceed ) {
5647 classes = ( value || "" ).match( core_rnotwhite ) || [];
5648
5649 for ( ; i < len; i++ ) {
5650 elem = this[ i ];
5651 // This expression is here for better compressibility (see addClass)
5652 cur = elem.nodeType === 1 && ( elem.className ?
5653 ( " " + elem.className + " " ).replace( rclass, " " ) :
5654 ""
5655 );
5656
5657 if ( cur ) {
5658 j = 0;
5659 while ( (clazz = classes[j++]) ) {
5660 // Remove *all* instances
5661 while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
5662 cur = cur.replace( " " + clazz + " ", " " );
5663 }
5664 }
5665 elem.className = value ? jQuery.trim( cur ) : "";
5666 }
5667 }
5668 }
5669
5670 return this;
5671 },
5672
5673 toggleClass: function( value, stateVal ) {
5674 var type = typeof value,
5675 isBool = typeof stateVal === "boolean";
5676
5677 if ( jQuery.isFunction( value ) ) {
5678 return this.each(function( i ) {
5679 jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
5680 });
5681 }
5682
5683 return this.each(function() {
5684 if ( type === "string" ) {
5685 // toggle individual class names
5686 var className,
5687 i = 0,
5688 self = jQuery( this ),
5689 state = stateVal,
5690 classNames = value.match( core_rnotwhite ) || [];
5691
5692 while ( (className = classNames[ i++ ]) ) {
5693 // check each className given, space separated list
5694 state = isBool ? state : !self.hasClass( className );
5695 self[ state ? "addClass" : "removeClass" ]( className );
5696 }
5697
5698 // Toggle whole class name
5699 } else if ( type === core_strundefined || type === "boolean" ) {
5700 if ( this.className ) {
5701 // store className if set
5702 jQuery._data( this, "__className__", this.className );
5703 }
5704
5705 // If the element has a class name or if we're passed "false",
5706 // then remove the whole classname (if there was one, the above saved it).
5707 // Otherwise bring back whatever was previously saved (if anything),
5708 // falling back to the empty string if nothing was stored.
5709 this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
5710 }
5711 });
5712 },
5713
5714 hasClass: function( selector ) {
5715 var className = " " + selector + " ",
5716 i = 0,
5717 l = this.length;
5718 for ( ; i < l; i++ ) {
5719 if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
5720 return true;
5721 }
5722 }
5723
5724 return false;
5725 },
5726
5727 val: function( value ) {
5728 var ret, hooks, isFunction,
5729 elem = this[0];
5730
5731 if ( !arguments.length ) {
5732 if ( elem ) {
5733 hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
5734
5735 if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
5736 return ret;
5737 }
5738
5739 ret = elem.value;
5740
5741 return typeof ret === "string" ?
5742 // handle most common string cases
5743 ret.replace(rreturn, "") :
5744 // handle cases where value is null/undef or number
5745 ret == null ? "" : ret;
5746 }
5747
5748 return;
5749 }
5750
5751 isFunction = jQuery.isFunction( value );
5752
5753 return this.each(function( i ) {
5754 var val;
5755
5756 if ( this.nodeType !== 1 ) {
5757 return;
5758 }
5759
5760 if ( isFunction ) {
5761 val = value.call( this, i, jQuery( this ).val() );
5762 } else {
5763 val = value;
5764 }
5765
5766 // Treat null/undefined as ""; convert numbers to string
5767 if ( val == null ) {
5768 val = "";
5769 } else if ( typeof val === "number" ) {
5770 val += "";
5771 } else if ( jQuery.isArray( val ) ) {
5772 val = jQuery.map(val, function ( value ) {
5773 return value == null ? "" : value + "";
5774 });
5775 }
5776
5777 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
5778
5779 // If set returns undefined, fall back to normal setting
5780 if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
5781 this.value = val;
5782 }
5783 });
5784 }
5785});
5786
5787jQuery.extend({
5788 valHooks: {
5789 option: {
5790 get: function( elem ) {
5791 // Use proper attribute retrieval(#6932, #12072)
5792 var val = jQuery.find.attr( elem, "value" );
5793 return val != null ?
5794 val :
5795 elem.text;
5796 }
5797 },
5798 select: {
5799 get: function( elem ) {
5800 var value, option,
5801 options = elem.options,
5802 index = elem.selectedIndex,
5803 one = elem.type === "select-one" || index < 0,
5804 values = one ? null : [],
5805 max = one ? index + 1 : options.length,
5806 i = index < 0 ?
5807 max :
5808 one ? index : 0;
5809
5810 // Loop through all the selected options
5811 for ( ; i < max; i++ ) {
5812 option = options[ i ];
5813
5814 // oldIE doesn't update selected after form reset (#2551)
5815 if ( ( option.selected || i === index ) &&
5816 // Don't return options that are disabled or in a disabled optgroup
5817 ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
5818 ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
5819
5820 // Get the specific value for the option
5821 value = jQuery( option ).val();
5822
5823 // We don't need an array for one selects
5824 if ( one ) {
5825 return value;
5826 }
5827
5828 // Multi-Selects return an array
5829 values.push( value );
5830 }
5831 }
5832
5833 return values;
5834 },
5835
5836 set: function( elem, value ) {
5837 var optionSet, option,
5838 options = elem.options,
5839 values = jQuery.makeArray( value ),
5840 i = options.length;
5841
5842 while ( i-- ) {
5843 option = options[ i ];
5844 if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
5845 optionSet = true;
5846 }
5847 }
5848
5849 // force browsers to behave consistently when non-matching value is set
5850 if ( !optionSet ) {
5851 elem.selectedIndex = -1;
5852 }
5853 return values;
5854 }
5855 }
5856 },
5857
5858 attr: function( elem, name, value ) {
5859 var hooks, ret,
5860 nType = elem.nodeType;
5861
5862 // don't get/set attributes on text, comment and attribute nodes
5863 if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
5864 return;
5865 }
5866
5867 // Fallback to prop when attributes are not supported
5868 if ( typeof elem.getAttribute === core_strundefined ) {
5869 return jQuery.prop( elem, name, value );
5870 }
5871
5872 // All attributes are lowercase
5873 // Grab necessary hook if one is defined
5874 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
5875 name = name.toLowerCase();
5876 hooks = jQuery.attrHooks[ name ] ||
5877 ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
5878 }
5879
5880 if ( value !== undefined ) {
5881
5882 if ( value === null ) {
5883 jQuery.removeAttr( elem, name );
5884
5885 } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
5886 return ret;
5887
5888 } else {
5889 elem.setAttribute( name, value + "" );
5890 return value;
5891 }
5892
5893 } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
5894 return ret;
5895
5896 } else {
5897 ret = jQuery.find.attr( elem, name );
5898
5899 // Non-existent attributes return null, we normalize to undefined
5900 return ret == null ?
5901 undefined :
5902 ret;
5903 }
5904 },
5905
5906 removeAttr: function( elem, value ) {
5907 var name, propName,
5908 i = 0,
5909 attrNames = value && value.match( core_rnotwhite );
5910
5911 if ( attrNames && elem.nodeType === 1 ) {
5912 while ( (name = attrNames[i++]) ) {
5913 propName = jQuery.propFix[ name ] || name;
5914
5915 // Boolean attributes get special treatment (#10870)
5916 if ( jQuery.expr.match.bool.test( name ) ) {
5917 // Set corresponding property to false
5918 if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
5919 elem[ propName ] = false;
5920 // Support: IE<9
5921 // Also clear defaultChecked/defaultSelected (if appropriate)
5922 } else {
5923 elem[ jQuery.camelCase( "default-" + name ) ] =
5924 elem[ propName ] = false;
5925 }
5926
5927 // See #9699 for explanation of this approach (setting first, then removal)
5928 } else {
5929 jQuery.attr( elem, name, "" );
5930 }
5931
5932 elem.removeAttribute( getSetAttribute ? name : propName );
5933 }
5934 }
5935 },
5936
5937 attrHooks: {
5938 type: {
5939 set: function( elem, value ) {
5940 if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
5941 // Setting the type on a radio button after the value resets the value in IE6-9
5942 // Reset value to default in case type is set after value during creation
5943 var val = elem.value;
5944 elem.setAttribute( "type", value );
5945 if ( val ) {
5946 elem.value = val;
5947 }
5948 return value;
5949 }
5950 }
5951 }
5952 },
5953
5954 propFix: {
5955 "for": "htmlFor",
5956 "class": "className"
5957 },
5958
5959 prop: function( elem, name, value ) {
5960 var ret, hooks, notxml,
5961 nType = elem.nodeType;
5962
5963 // don't get/set properties on text, comment and attribute nodes
5964 if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
5965 return;
5966 }
5967
5968 notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
5969
5970 if ( notxml ) {
5971 // Fix name and attach hooks
5972 name = jQuery.propFix[ name ] || name;
5973 hooks = jQuery.propHooks[ name ];
5974 }
5975
5976 if ( value !== undefined ) {
5977 return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
5978 ret :
5979 ( elem[ name ] = value );
5980
5981 } else {
5982 return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
5983 ret :
5984 elem[ name ];
5985 }
5986 },
5987
5988 propHooks: {
5989 tabIndex: {
5990 get: function( elem ) {
5991 // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
5992 // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
5993 // Use proper attribute retrieval(#12072)
5994 var tabindex = jQuery.find.attr( elem, "tabindex" );
5995
5996 return tabindex ?
5997 parseInt( tabindex, 10 ) :
5998 rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
5999 0 :
6000 -1;
6001 }
6002 }
6003 }
6004});
6005
6006// Hooks for boolean attributes
6007boolHook = {
6008 set: function( elem, value, name ) {
6009 if ( value === false ) {
6010 // Remove boolean attributes when set to false
6011 jQuery.removeAttr( elem, name );
6012 } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
6013 // IE<8 needs the *property* name
6014 elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
6015
6016 // Use defaultChecked and defaultSelected for oldIE
6017 } else {
6018 elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
6019 }
6020
6021 return name;
6022 }
6023};
6024jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
6025 var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
6026
6027 jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
6028 function( elem, name, isXML ) {
6029 var fn = jQuery.expr.attrHandle[ name ],
6030 ret = isXML ?
6031 undefined :
6032 /* jshint eqeqeq: false */
6033 (jQuery.expr.attrHandle[ name ] = undefined) !=
6034 getter( elem, name, isXML ) ?
6035
6036 name.toLowerCase() :
6037 null;
6038 jQuery.expr.attrHandle[ name ] = fn;
6039 return ret;
6040 } :
6041 function( elem, name, isXML ) {
6042 return isXML ?
6043 undefined :
6044 elem[ jQuery.camelCase( "default-" + name ) ] ?
6045 name.toLowerCase() :
6046 null;
6047 };
6048});
6049
6050// fix oldIE attroperties
6051if ( !getSetInput || !getSetAttribute ) {
6052 jQuery.attrHooks.value = {
6053 set: function( elem, value, name ) {
6054 if ( jQuery.nodeName( elem, "input" ) ) {
6055 // Does not return so that setAttribute is also used
6056 elem.defaultValue = value;
6057 } else {
6058 // Use nodeHook if defined (#1954); otherwise setAttribute is fine
6059 return nodeHook && nodeHook.set( elem, value, name );
6060 }
6061 }
6062 };
6063}
6064
6065// IE6/7 do not support getting/setting some attributes with get/setAttribute
6066if ( !getSetAttribute ) {
6067
6068 // Use this for any attribute in IE6/7
6069 // This fixes almost every IE6/7 issue
6070 nodeHook = {
6071 set: function( elem, value, name ) {
6072 // Set the existing or create a new attribute node
6073 var ret = elem.getAttributeNode( name );
6074 if ( !ret ) {
6075 elem.setAttributeNode(
6076 (ret = elem.ownerDocument.createAttribute( name ))
6077 );
6078 }
6079
6080 ret.value = value += "";
6081
6082 // Break association with cloned elements by also using setAttribute (#9646)
6083 return name === "value" || value === elem.getAttribute( name ) ?
6084 value :
6085 undefined;
6086 }
6087 };
6088 jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
6089 // Some attributes are constructed with empty-string values when not defined
6090 function( elem, name, isXML ) {
6091 var ret;
6092 return isXML ?
6093 undefined :
6094 (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
6095 ret.value :
6096 null;
6097 };
6098 jQuery.valHooks.button = {
6099 get: function( elem, name ) {
6100 var ret = elem.getAttributeNode( name );
6101 return ret && ret.specified ?
6102 ret.value :
6103 undefined;
6104 },
6105 set: nodeHook.set
6106 };
6107
6108 // Set contenteditable to false on removals(#10429)
6109 // Setting to empty string throws an error as an invalid value
6110 jQuery.attrHooks.contenteditable = {
6111 set: function( elem, value, name ) {
6112 nodeHook.set( elem, value === "" ? false : value, name );
6113 }
6114 };
6115
6116 // Set width and height to auto instead of 0 on empty string( Bug #8150 )
6117 // This is for removals
6118 jQuery.each([ "width", "height" ], function( i, name ) {
6119 jQuery.attrHooks[ name ] = {
6120 set: function( elem, value ) {
6121 if ( value === "" ) {
6122 elem.setAttribute( name, "auto" );
6123 return value;
6124 }
6125 }
6126 };
6127 });
6128}
6129
6130
6131// Some attributes require a special call on IE
6132// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
6133if ( !jQuery.support.hrefNormalized ) {
6134 // href/src property should get the full normalized URL (#10299/#12915)
6135 jQuery.each([ "href", "src" ], function( i, name ) {
6136 jQuery.propHooks[ name ] = {
6137 get: function( elem ) {
6138 return elem.getAttribute( name, 4 );
6139 }
6140 };
6141 });
6142}
6143
6144if ( !jQuery.support.style ) {
6145 jQuery.attrHooks.style = {
6146 get: function( elem ) {
6147 // Return undefined in the case of empty string
6148 // Note: IE uppercases css property names, but if we were to .toLowerCase()
6149 // .cssText, that would destroy case senstitivity in URL's, like in "background"
6150 return elem.style.cssText || undefined;
6151 },
6152 set: function( elem, value ) {
6153 return ( elem.style.cssText = value + "" );
6154 }
6155 };
6156}
6157
6158// Safari mis-reports the default selected property of an option
6159// Accessing the parent's selectedIndex property fixes it
6160if ( !jQuery.support.optSelected ) {
6161 jQuery.propHooks.selected = {
6162 get: function( elem ) {
6163 var parent = elem.parentNode;
6164
6165 if ( parent ) {
6166 parent.selectedIndex;
6167
6168 // Make sure that it also works with optgroups, see #5701
6169 if ( parent.parentNode ) {
6170 parent.parentNode.selectedIndex;
6171 }
6172 }
6173 return null;
6174 }
6175 };
6176}
6177
6178jQuery.each([
6179 "tabIndex",
6180 "readOnly",
6181 "maxLength",
6182 "cellSpacing",
6183 "cellPadding",
6184 "rowSpan",
6185 "colSpan",
6186 "useMap",
6187 "frameBorder",
6188 "contentEditable"
6189], function() {
6190 jQuery.propFix[ this.toLowerCase() ] = this;
6191});
6192
6193// IE6/7 call enctype encoding
6194if ( !jQuery.support.enctype ) {
6195 jQuery.propFix.enctype = "encoding";
6196}
6197
6198// Radios and checkboxes getter/setter
6199jQuery.each([ "radio", "checkbox" ], function() {
6200 jQuery.valHooks[ this ] = {
6201 set: function( elem, value ) {
6202 if ( jQuery.isArray( value ) ) {
6203 return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
6204 }
6205 }
6206 };
6207 if ( !jQuery.support.checkOn ) {
6208 jQuery.valHooks[ this ].get = function( elem ) {
6209 // Support: Webkit
6210 // "" is returned instead of "on" if a value isn't specified
6211 return elem.getAttribute("value") === null ? "on" : elem.value;
6212 };
6213 }
6214});
6215var rformElems = /^(?:input|select|textarea)$/i,
6216 rkeyEvent = /^key/,
6217 rmouseEvent = /^(?:mouse|contextmenu)|click/,
6218 rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
6219 rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
6220
6221function returnTrue() {
6222 return true;
6223}
6224
6225function returnFalse() {
6226 return false;
6227}
6228
6229function safeActiveElement() {
6230 try {
6231 return document.activeElement;
6232 } catch ( err ) { }
6233}
6234
6235/*
6236 * Helper functions for managing events -- not part of the public interface.
6237 * Props to Dean Edwards' addEvent library for many of the ideas.
6238 */
6239jQuery.event = {
6240
6241 global: {},
6242
6243 add: function( elem, types, handler, data, selector ) {
6244 var tmp, events, t, handleObjIn,
6245 special, eventHandle, handleObj,
6246 handlers, type, namespaces, origType,
6247 elemData = jQuery._data( elem );
6248
6249 // Don't attach events to noData or text/comment nodes (but allow plain objects)
6250 if ( !elemData ) {
6251 return;
6252 }
6253
6254 // Caller can pass in an object of custom data in lieu of the handler
6255 if ( handler.handler ) {
6256 handleObjIn = handler;
6257 handler = handleObjIn.handler;
6258 selector = handleObjIn.selector;
6259 }
6260
6261 // Make sure that the handler has a unique ID, used to find/remove it later
6262 if ( !handler.guid ) {
6263 handler.guid = jQuery.guid++;
6264 }
6265
6266 // Init the element's event structure and main handler, if this is the first
6267 if ( !(events = elemData.events) ) {
6268 events = elemData.events = {};
6269 }
6270 if ( !(eventHandle = elemData.handle) ) {
6271 eventHandle = elemData.handle = function( e ) {
6272 // Discard the second event of a jQuery.event.trigger() and
6273 // when an event is called after a page has unloaded
6274 return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
6275 jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
6276 undefined;
6277 };
6278 // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
6279 eventHandle.elem = elem;
6280 }
6281
6282 // Handle multiple events separated by a space
6283 types = ( types || "" ).match( core_rnotwhite ) || [""];
6284 t = types.length;
6285 while ( t-- ) {
6286 tmp = rtypenamespace.exec( types[t] ) || [];
6287 type = origType = tmp[1];
6288 namespaces = ( tmp[2] || "" ).split( "." ).sort();
6289
6290 // There *must* be a type, no attaching namespace-only handlers
6291 if ( !type ) {
6292 continue;
6293 }
6294
6295 // If event changes its type, use the special event handlers for the changed type
6296 special = jQuery.event.special[ type ] || {};
6297
6298 // If selector defined, determine special event api type, otherwise given type
6299 type = ( selector ? special.delegateType : special.bindType ) || type;
6300
6301 // Update special based on newly reset type
6302 special = jQuery.event.special[ type ] || {};
6303
6304 // handleObj is passed to all event handlers
6305 handleObj = jQuery.extend({
6306 type: type,
6307 origType: origType,
6308 data: data,
6309 handler: handler,
6310 guid: handler.guid,
6311 selector: selector,
6312 needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
6313 namespace: namespaces.join(".")
6314 }, handleObjIn );
6315
6316 // Init the event handler queue if we're the first
6317 if ( !(handlers = events[ type ]) ) {
6318 handlers = events[ type ] = [];
6319 handlers.delegateCount = 0;
6320
6321 // Only use addEventListener/attachEvent if the special events handler returns false
6322 if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
6323 // Bind the global event handler to the element
6324 if ( elem.addEventListener ) {
6325 elem.addEventListener( type, eventHandle, false );
6326
6327 } else if ( elem.attachEvent ) {
6328 elem.attachEvent( "on" + type, eventHandle );
6329 }
6330 }
6331 }
6332
6333 if ( special.add ) {
6334 special.add.call( elem, handleObj );
6335
6336 if ( !handleObj.handler.guid ) {
6337 handleObj.handler.guid = handler.guid;
6338 }
6339 }
6340
6341 // Add to the element's handler list, delegates in front
6342 if ( selector ) {
6343 handlers.splice( handlers.delegateCount++, 0, handleObj );
6344 } else {
6345 handlers.push( handleObj );
6346 }
6347
6348 // Keep track of which events have ever been used, for event optimization
6349 jQuery.event.global[ type ] = true;
6350 }
6351
6352 // Nullify elem to prevent memory leaks in IE
6353 elem = null;
6354 },
6355
6356 // Detach an event or set of events from an element
6357 remove: function( elem, types, handler, selector, mappedTypes ) {
6358 var j, handleObj, tmp,
6359 origCount, t, events,
6360 special, handlers, type,
6361 namespaces, origType,
6362 elemData = jQuery.hasData( elem ) && jQuery._data( elem );
6363
6364 if ( !elemData || !(events = elemData.events) ) {
6365 return;
6366 }
6367
6368 // Once for each type.namespace in types; type may be omitted
6369 types = ( types || "" ).match( core_rnotwhite ) || [""];
6370 t = types.length;
6371 while ( t-- ) {
6372 tmp = rtypenamespace.exec( types[t] ) || [];
6373 type = origType = tmp[1];
6374 namespaces = ( tmp[2] || "" ).split( "." ).sort();
6375
6376 // Unbind all events (on this namespace, if provided) for the element
6377 if ( !type ) {
6378 for ( type in events ) {
6379 jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
6380 }
6381 continue;
6382 }
6383
6384 special = jQuery.event.special[ type ] || {};
6385 type = ( selector ? special.delegateType : special.bindType ) || type;
6386 handlers = events[ type ] || [];
6387 tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
6388
6389 // Remove matching events
6390 origCount = j = handlers.length;
6391 while ( j-- ) {
6392 handleObj = handlers[ j ];
6393
6394 if ( ( mappedTypes || origType === handleObj.origType ) &&
6395 ( !handler || handler.guid === handleObj.guid ) &&
6396 ( !tmp || tmp.test( handleObj.namespace ) ) &&
6397 ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
6398 handlers.splice( j, 1 );
6399
6400 if ( handleObj.selector ) {
6401 handlers.delegateCount--;
6402 }
6403 if ( special.remove ) {
6404 special.remove.call( elem, handleObj );
6405 }
6406 }
6407 }
6408
6409 // Remove generic event handler if we removed something and no more handlers exist
6410 // (avoids potential for endless recursion during removal of special event handlers)
6411 if ( origCount && !handlers.length ) {
6412 if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
6413 jQuery.removeEvent( elem, type, elemData.handle );
6414 }
6415
6416 delete events[ type ];
6417 }
6418 }
6419
6420 // Remove the expando if it's no longer used
6421 if ( jQuery.isEmptyObject( events ) ) {
6422 delete elemData.handle;
6423
6424 // removeData also checks for emptiness and clears the expando if empty
6425 // so use it instead of delete
6426 jQuery._removeData( elem, "events" );
6427 }
6428 },
6429
6430 trigger: function( event, data, elem, onlyHandlers ) {
6431 var handle, ontype, cur,
6432 bubbleType, special, tmp, i,
6433 eventPath = [ elem || document ],
6434 type = core_hasOwn.call( event, "type" ) ? event.type : event,
6435 namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
6436
6437 cur = tmp = elem = elem || document;
6438
6439 // Don't do events on text and comment nodes
6440 if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
6441 return;
6442 }
6443
6444 // focus/blur morphs to focusin/out; ensure we're not firing them right now
6445 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
6446 return;
6447 }
6448
6449 if ( type.indexOf(".") >= 0 ) {
6450 // Namespaced trigger; create a regexp to match event type in handle()
6451 namespaces = type.split(".");
6452 type = namespaces.shift();
6453 namespaces.sort();
6454 }
6455 ontype = type.indexOf(":") < 0 && "on" + type;
6456
6457 // Caller can pass in a jQuery.Event object, Object, or just an event type string
6458 event = event[ jQuery.expando ] ?
6459 event :
6460 new jQuery.Event( type, typeof event === "object" && event );
6461
6462 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
6463 event.isTrigger = onlyHandlers ? 2 : 3;
6464 event.namespace = namespaces.join(".");
6465 event.namespace_re = event.namespace ?
6466 new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
6467 null;
6468
6469 // Clean up the event in case it is being reused
6470 event.result = undefined;
6471 if ( !event.target ) {
6472 event.target = elem;
6473 }
6474
6475 // Clone any incoming data and prepend the event, creating the handler arg list
6476 data = data == null ?
6477 [ event ] :
6478 jQuery.makeArray( data, [ event ] );
6479
6480 // Allow special events to draw outside the lines
6481 special = jQuery.event.special[ type ] || {};
6482 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
6483 return;
6484 }
6485
6486 // Determine event propagation path in advance, per W3C events spec (#9951)
6487 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
6488 if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
6489
6490 bubbleType = special.delegateType || type;
6491 if ( !rfocusMorph.test( bubbleType + type ) ) {
6492 cur = cur.parentNode;
6493 }
6494 for ( ; cur; cur = cur.parentNode ) {
6495 eventPath.push( cur );
6496 tmp = cur;
6497 }
6498
6499 // Only add window if we got to document (e.g., not plain obj or detached DOM)
6500 if ( tmp === (elem.ownerDocument || document) ) {
6501 eventPath.push( tmp.defaultView || tmp.parentWindow || window );
6502 }
6503 }
6504
6505 // Fire handlers on the event path
6506 i = 0;
6507 while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
6508
6509 event.type = i > 1 ?
6510 bubbleType :
6511 special.bindType || type;
6512
6513 // jQuery handler
6514 handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
6515 if ( handle ) {
6516 handle.apply( cur, data );
6517 }
6518
6519 // Native handler
6520 handle = ontype && cur[ ontype ];
6521 if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
6522 event.preventDefault();
6523 }
6524 }
6525 event.type = type;
6526
6527 // If nobody prevented the default action, do it now
6528 if ( !onlyHandlers && !event.isDefaultPrevented() ) {
6529
6530 if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
6531 jQuery.acceptData( elem ) ) {
6532
6533 // Call a native DOM method on the target with the same name name as the event.
6534 // Can't use an .isFunction() check here because IE6/7 fails that test.
6535 // Don't do default actions on window, that's where global variables be (#6170)
6536 if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
6537
6538 // Don't re-trigger an onFOO event when we call its FOO() method
6539 tmp = elem[ ontype ];
6540
6541 if ( tmp ) {
6542 elem[ ontype ] = null;
6543 }
6544
6545 // Prevent re-triggering of the same event, since we already bubbled it above
6546 jQuery.event.triggered = type;
6547 try {
6548 elem[ type ]();
6549 } catch ( e ) {
6550 // IE<9 dies on focus/blur to hidden element (#1486,#12518)
6551 // only reproducible on winXP IE8 native, not IE9 in IE8 mode
6552 }
6553 jQuery.event.triggered = undefined;
6554
6555 if ( tmp ) {
6556 elem[ ontype ] = tmp;
6557 }
6558 }
6559 }
6560 }
6561
6562 return event.result;
6563 },
6564
6565 dispatch: function( event ) {
6566
6567 // Make a writable jQuery.Event from the native event object
6568 event = jQuery.event.fix( event );
6569
6570 var i, ret, handleObj, matched, j,
6571 handlerQueue = [],
6572 args = core_slice.call( arguments ),
6573 handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
6574 special = jQuery.event.special[ event.type ] || {};
6575
6576 // Use the fix-ed jQuery.Event rather than the (read-only) native event
6577 args[0] = event;
6578 event.delegateTarget = this;
6579
6580 // Call the preDispatch hook for the mapped type, and let it bail if desired
6581 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
6582 return;
6583 }
6584
6585 // Determine handlers
6586 handlerQueue = jQuery.event.handlers.call( this, event, handlers );
6587
6588 // Run delegates first; they may want to stop propagation beneath us
6589 i = 0;
6590 while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
6591 event.currentTarget = matched.elem;
6592
6593 j = 0;
6594 while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
6595
6596 // Triggered event must either 1) have no namespace, or
6597 // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
6598 if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
6599
6600 event.handleObj = handleObj;
6601 event.data = handleObj.data;
6602
6603 ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
6604 .apply( matched.elem, args );
6605
6606 if ( ret !== undefined ) {
6607 if ( (event.result = ret) === false ) {
6608 event.preventDefault();
6609 event.stopPropagation();
6610 }
6611 }
6612 }
6613 }
6614 }
6615
6616 // Call the postDispatch hook for the mapped type
6617 if ( special.postDispatch ) {
6618 special.postDispatch.call( this, event );
6619 }
6620
6621 return event.result;
6622 },
6623
6624 handlers: function( event, handlers ) {
6625 var sel, handleObj, matches, i,
6626 handlerQueue = [],
6627 delegateCount = handlers.delegateCount,
6628 cur = event.target;
6629
6630 // Find delegate handlers
6631 // Black-hole SVG <use> instance trees (#13180)
6632 // Avoid non-left-click bubbling in Firefox (#3861)
6633 if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
6634
6635 /* jshint eqeqeq: false */
6636 for ( ; cur != this; cur = cur.parentNode || this ) {
6637 /* jshint eqeqeq: true */
6638
6639 // Don't check non-elements (#13208)
6640 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
6641 if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
6642 matches = [];
6643 for ( i = 0; i < delegateCount; i++ ) {
6644 handleObj = handlers[ i ];
6645
6646 // Don't conflict with Object.prototype properties (#13203)
6647 sel = handleObj.selector + " ";
6648
6649 if ( matches[ sel ] === undefined ) {
6650 matches[ sel ] = handleObj.needsContext ?
6651 jQuery( sel, this ).index( cur ) >= 0 :
6652 jQuery.find( sel, this, null, [ cur ] ).length;
6653 }
6654 if ( matches[ sel ] ) {
6655 matches.push( handleObj );
6656 }
6657 }
6658 if ( matches.length ) {
6659 handlerQueue.push({ elem: cur, handlers: matches });
6660 }
6661 }
6662 }
6663 }
6664
6665 // Add the remaining (directly-bound) handlers
6666 if ( delegateCount < handlers.length ) {
6667 handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
6668 }
6669
6670 return handlerQueue;
6671 },
6672
6673 fix: function( event ) {
6674 if ( event[ jQuery.expando ] ) {
6675 return event;
6676 }
6677
6678 // Create a writable copy of the event object and normalize some properties
6679 var i, prop, copy,
6680 type = event.type,
6681 originalEvent = event,
6682 fixHook = this.fixHooks[ type ];
6683
6684 if ( !fixHook ) {
6685 this.fixHooks[ type ] = fixHook =
6686 rmouseEvent.test( type ) ? this.mouseHooks :
6687 rkeyEvent.test( type ) ? this.keyHooks :
6688 {};
6689 }
6690 copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
6691
6692 event = new jQuery.Event( originalEvent );
6693
6694 i = copy.length;
6695 while ( i-- ) {
6696 prop = copy[ i ];
6697 event[ prop ] = originalEvent[ prop ];
6698 }
6699
6700 // Support: IE<9
6701 // Fix target property (#1925)
6702 if ( !event.target ) {
6703 event.target = originalEvent.srcElement || document;
6704 }
6705
6706 // Support: Chrome 23+, Safari?
6707 // Target should not be a text node (#504, #13143)
6708 if ( event.target.nodeType === 3 ) {
6709 event.target = event.target.parentNode;
6710 }
6711
6712 // Support: IE<9
6713 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
6714 event.metaKey = !!event.metaKey;
6715
6716 return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
6717 },
6718
6719 // Includes some event props shared by KeyEvent and MouseEvent
6720 props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
6721
6722 fixHooks: {},
6723
6724 keyHooks: {
6725 props: "char charCode key keyCode".split(" "),
6726 filter: function( event, original ) {
6727
6728 // Add which for key events
6729 if ( event.which == null ) {
6730 event.which = original.charCode != null ? original.charCode : original.keyCode;
6731 }
6732
6733 return event;
6734 }
6735 },
6736
6737 mouseHooks: {
6738 props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
6739 filter: function( event, original ) {
6740 var body, eventDoc, doc,
6741 button = original.button,
6742 fromElement = original.fromElement;
6743
6744 // Calculate pageX/Y if missing and clientX/Y available
6745 if ( event.pageX == null && original.clientX != null ) {
6746 eventDoc = event.target.ownerDocument || document;
6747 doc = eventDoc.documentElement;
6748 body = eventDoc.body;
6749
6750 event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
6751 event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
6752 }
6753
6754 // Add relatedTarget, if necessary
6755 if ( !event.relatedTarget && fromElement ) {
6756 event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
6757 }
6758
6759 // Add which for click: 1 === left; 2 === middle; 3 === right
6760 // Note: button is not normalized, so don't use it
6761 if ( !event.which && button !== undefined ) {
6762 event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
6763 }
6764
6765 return event;
6766 }
6767 },
6768
6769 special: {
6770 load: {
6771 // Prevent triggered image.load events from bubbling to window.load
6772 noBubble: true
6773 },
6774 focus: {
6775 // Fire native event if possible so blur/focus sequence is correct
6776 trigger: function() {
6777 if ( this !== safeActiveElement() && this.focus ) {
6778 try {
6779 this.focus();
6780 return false;
6781 } catch ( e ) {
6782 // Support: IE<9
6783 // If we error on focus to hidden element (#1486, #12518),
6784 // let .trigger() run the handlers
6785 }
6786 }
6787 },
6788 delegateType: "focusin"
6789 },
6790 blur: {
6791 trigger: function() {
6792 if ( this === safeActiveElement() && this.blur ) {
6793 this.blur();
6794 return false;
6795 }
6796 },
6797 delegateType: "focusout"
6798 },
6799 click: {
6800 // For checkbox, fire native event so checked state will be right
6801 trigger: function() {
6802 if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
6803 this.click();
6804 return false;
6805 }
6806 },
6807
6808 // For cross-browser consistency, don't fire native .click() on links
6809 _default: function( event ) {
6810 return jQuery.nodeName( event.target, "a" );
6811 }
6812 },
6813
6814 beforeunload: {
6815 postDispatch: function( event ) {
6816
6817 // Even when returnValue equals to undefined Firefox will still show alert
6818 if ( event.result !== undefined ) {
6819 event.originalEvent.returnValue = event.result;
6820 }
6821 }
6822 }
6823 },
6824
6825 simulate: function( type, elem, event, bubble ) {
6826 // Piggyback on a donor event to simulate a different one.
6827 // Fake originalEvent to avoid donor's stopPropagation, but if the
6828 // simulated event prevents default then we do the same on the donor.
6829 var e = jQuery.extend(
6830 new jQuery.Event(),
6831 event,
6832 {
6833 type: type,
6834 isSimulated: true,
6835 originalEvent: {}
6836 }
6837 );
6838 if ( bubble ) {
6839 jQuery.event.trigger( e, null, elem );
6840 } else {
6841 jQuery.event.dispatch.call( elem, e );
6842 }
6843 if ( e.isDefaultPrevented() ) {
6844 event.preventDefault();
6845 }
6846 }
6847};
6848
6849jQuery.removeEvent = document.removeEventListener ?
6850 function( elem, type, handle ) {
6851 if ( elem.removeEventListener ) {
6852 elem.removeEventListener( type, handle, false );
6853 }
6854 } :
6855 function( elem, type, handle ) {
6856 var name = "on" + type;
6857
6858 if ( elem.detachEvent ) {
6859
6860 // #8545, #7054, preventing memory leaks for custom events in IE6-8
6861 // detachEvent needed property on element, by name of that event, to properly expose it to GC
6862 if ( typeof elem[ name ] === core_strundefined ) {
6863 elem[ name ] = null;
6864 }
6865
6866 elem.detachEvent( name, handle );
6867 }
6868 };
6869
6870jQuery.Event = function( src, props ) {
6871 // Allow instantiation without the 'new' keyword
6872 if ( !(this instanceof jQuery.Event) ) {
6873 return new jQuery.Event( src, props );
6874 }
6875
6876 // Event object
6877 if ( src && src.type ) {
6878 this.originalEvent = src;
6879 this.type = src.type;
6880
6881 // Events bubbling up the document may have been marked as prevented
6882 // by a handler lower down the tree; reflect the correct value.
6883 this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
6884 src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
6885
6886 // Event type
6887 } else {
6888 this.type = src;
6889 }
6890
6891 // Put explicitly provided properties onto the event object
6892 if ( props ) {
6893 jQuery.extend( this, props );
6894 }
6895
6896 // Create a timestamp if incoming event doesn't have one
6897 this.timeStamp = src && src.timeStamp || jQuery.now();
6898
6899 // Mark it as fixed
6900 this[ jQuery.expando ] = true;
6901};
6902
6903// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
6904// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
6905jQuery.Event.prototype = {
6906 isDefaultPrevented: returnFalse,
6907 isPropagationStopped: returnFalse,
6908 isImmediatePropagationStopped: returnFalse,
6909
6910 preventDefault: function() {
6911 var e = this.originalEvent;
6912
6913 this.isDefaultPrevented = returnTrue;
6914 if ( !e ) {
6915 return;
6916 }
6917
6918 // If preventDefault exists, run it on the original event
6919 if ( e.preventDefault ) {
6920 e.preventDefault();
6921
6922 // Support: IE
6923 // Otherwise set the returnValue property of the original event to false
6924 } else {
6925 e.returnValue = false;
6926 }
6927 },
6928 stopPropagation: function() {
6929 var e = this.originalEvent;
6930
6931 this.isPropagationStopped = returnTrue;
6932 if ( !e ) {
6933 return;
6934 }
6935 // If stopPropagation exists, run it on the original event
6936 if ( e.stopPropagation ) {
6937 e.stopPropagation();
6938 }
6939
6940 // Support: IE
6941 // Set the cancelBubble property of the original event to true
6942 e.cancelBubble = true;
6943 },
6944 stopImmediatePropagation: function() {
6945 this.isImmediatePropagationStopped = returnTrue;
6946 this.stopPropagation();
6947 }
6948};
6949
6950// Create mouseenter/leave events using mouseover/out and event-time checks
6951jQuery.each({
6952 mouseenter: "mouseover",
6953 mouseleave: "mouseout"
6954}, function( orig, fix ) {
6955 jQuery.event.special[ orig ] = {
6956 delegateType: fix,
6957 bindType: fix,
6958
6959 handle: function( event ) {
6960 var ret,
6961 target = this,
6962 related = event.relatedTarget,
6963 handleObj = event.handleObj;
6964
6965 // For mousenter/leave call the handler if related is outside the target.
6966 // NB: No relatedTarget if the mouse left/entered the browser window
6967 if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
6968 event.type = handleObj.origType;
6969 ret = handleObj.handler.apply( this, arguments );
6970 event.type = fix;
6971 }
6972 return ret;
6973 }
6974 };
6975});
6976
6977// IE submit delegation
6978if ( !jQuery.support.submitBubbles ) {
6979
6980 jQuery.event.special.submit = {
6981 setup: function() {
6982 // Only need this for delegated form submit events
6983 if ( jQuery.nodeName( this, "form" ) ) {
6984 return false;
6985 }
6986
6987 // Lazy-add a submit handler when a descendant form may potentially be submitted
6988 jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
6989 // Node name check avoids a VML-related crash in IE (#9807)
6990 var elem = e.target,
6991 form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
6992 if ( form && !jQuery._data( form, "submitBubbles" ) ) {
6993 jQuery.event.add( form, "submit._submit", function( event ) {
6994 event._submit_bubble = true;
6995 });
6996 jQuery._data( form, "submitBubbles", true );
6997 }
6998 });
6999 // return undefined since we don't need an event listener
7000 },
7001
7002 postDispatch: function( event ) {
7003 // If form was submitted by the user, bubble the event up the tree
7004 if ( event._submit_bubble ) {
7005 delete event._submit_bubble;
7006 if ( this.parentNode && !event.isTrigger ) {
7007 jQuery.event.simulate( "submit", this.parentNode, event, true );
7008 }
7009 }
7010 },
7011
7012 teardown: function() {
7013 // Only need this for delegated form submit events
7014 if ( jQuery.nodeName( this, "form" ) ) {
7015 return false;
7016 }
7017
7018 // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
7019 jQuery.event.remove( this, "._submit" );
7020 }
7021 };
7022}
7023
7024// IE change delegation and checkbox/radio fix
7025if ( !jQuery.support.changeBubbles ) {
7026
7027 jQuery.event.special.change = {
7028
7029 setup: function() {
7030
7031 if ( rformElems.test( this.nodeName ) ) {
7032 // IE doesn't fire change on a check/radio until blur; trigger it on click
7033 // after a propertychange. Eat the blur-change in special.change.handle.
7034 // This still fires onchange a second time for check/radio after blur.
7035 if ( this.type === "checkbox" || this.type === "radio" ) {
7036 jQuery.event.add( this, "propertychange._change", function( event ) {
7037 if ( event.originalEvent.propertyName === "checked" ) {
7038 this._just_changed = true;
7039 }
7040 });
7041 jQuery.event.add( this, "click._change", function( event ) {
7042 if ( this._just_changed && !event.isTrigger ) {
7043 this._just_changed = false;
7044 }
7045 // Allow triggered, simulated change events (#11500)
7046 jQuery.event.simulate( "change", this, event, true );
7047 });
7048 }
7049 return false;
7050 }
7051 // Delegated event; lazy-add a change handler on descendant inputs
7052 jQuery.event.add( this, "beforeactivate._change", function( e ) {
7053 var elem = e.target;
7054
7055 if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
7056 jQuery.event.add( elem, "change._change", function( event ) {
7057 if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
7058 jQuery.event.simulate( "change", this.parentNode, event, true );
7059 }
7060 });
7061 jQuery._data( elem, "changeBubbles", true );
7062 }
7063 });
7064 },
7065
7066 handle: function( event ) {
7067 var elem = event.target;
7068
7069 // Swallow native change events from checkbox/radio, we already triggered them above
7070 if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
7071 return event.handleObj.handler.apply( this, arguments );
7072 }
7073 },
7074
7075 teardown: function() {
7076 jQuery.event.remove( this, "._change" );
7077
7078 return !rformElems.test( this.nodeName );
7079 }
7080 };
7081}
7082
7083// Create "bubbling" focus and blur events
7084if ( !jQuery.support.focusinBubbles ) {
7085 jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
7086
7087 // Attach a single capturing handler while someone wants focusin/focusout
7088 var attaches = 0,
7089 handler = function( event ) {
7090 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
7091 };
7092
7093 jQuery.event.special[ fix ] = {
7094 setup: function() {
7095 if ( attaches++ === 0 ) {
7096 document.addEventListener( orig, handler, true );
7097 }
7098 },
7099 teardown: function() {
7100 if ( --attaches === 0 ) {
7101 document.removeEventListener( orig, handler, true );
7102 }
7103 }
7104 };
7105 });
7106}
7107
7108jQuery.fn.extend({
7109
7110 on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
7111 var type, origFn;
7112
7113 // Types can be a map of types/handlers
7114 if ( typeof types === "object" ) {
7115 // ( types-Object, selector, data )
7116 if ( typeof selector !== "string" ) {
7117 // ( types-Object, data )
7118 data = data || selector;
7119 selector = undefined;
7120 }
7121 for ( type in types ) {
7122 this.on( type, selector, data, types[ type ], one );
7123 }
7124 return this;
7125 }
7126
7127 if ( data == null && fn == null ) {
7128 // ( types, fn )
7129 fn = selector;
7130 data = selector = undefined;
7131 } else if ( fn == null ) {
7132 if ( typeof selector === "string" ) {
7133 // ( types, selector, fn )
7134 fn = data;
7135 data = undefined;
7136 } else {
7137 // ( types, data, fn )
7138 fn = data;
7139 data = selector;
7140 selector = undefined;
7141 }
7142 }
7143 if ( fn === false ) {
7144 fn = returnFalse;
7145 } else if ( !fn ) {
7146 return this;
7147 }
7148
7149 if ( one === 1 ) {
7150 origFn = fn;
7151 fn = function( event ) {
7152 // Can use an empty set, since event contains the info
7153 jQuery().off( event );
7154 return origFn.apply( this, arguments );
7155 };
7156 // Use same guid so caller can remove using origFn
7157 fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
7158 }
7159 return this.each( function() {
7160 jQuery.event.add( this, types, fn, data, selector );
7161 });
7162 },
7163 one: function( types, selector, data, fn ) {
7164 return this.on( types, selector, data, fn, 1 );
7165 },
7166 off: function( types, selector, fn ) {
7167 var handleObj, type;
7168 if ( types && types.preventDefault && types.handleObj ) {
7169 // ( event ) dispatched jQuery.Event
7170 handleObj = types.handleObj;
7171 jQuery( types.delegateTarget ).off(
7172 handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
7173 handleObj.selector,
7174 handleObj.handler
7175 );
7176 return this;
7177 }
7178 if ( typeof types === "object" ) {
7179 // ( types-object [, selector] )
7180 for ( type in types ) {
7181 this.off( type, selector, types[ type ] );
7182 }
7183 return this;
7184 }
7185 if ( selector === false || typeof selector === "function" ) {
7186 // ( types [, fn] )
7187 fn = selector;
7188 selector = undefined;
7189 }
7190 if ( fn === false ) {
7191 fn = returnFalse;
7192 }
7193 return this.each(function() {
7194 jQuery.event.remove( this, types, fn, selector );
7195 });
7196 },
7197
7198 trigger: function( type, data ) {
7199 return this.each(function() {
7200 jQuery.event.trigger( type, data, this );
7201 });
7202 },
7203 triggerHandler: function( type, data ) {
7204 var elem = this[0];
7205 if ( elem ) {
7206 return jQuery.event.trigger( type, data, elem, true );
7207 }
7208 }
7209});
7210var isSimple = /^.[^:#\[\.,]*$/,
7211 rparentsprev = /^(?:parents|prev(?:Until|All))/,
7212 rneedsContext = jQuery.expr.match.needsContext,
7213 // methods guaranteed to produce a unique set when starting from a unique set
7214 guaranteedUnique = {
7215 children: true,
7216 contents: true,
7217 next: true,
7218 prev: true
7219 };
7220
7221jQuery.fn.extend({
7222 find: function( selector ) {
7223 var i,
7224 ret = [],
7225 self = this,
7226 len = self.length;
7227
7228 if ( typeof selector !== "string" ) {
7229 return this.pushStack( jQuery( selector ).filter(function() {
7230 for ( i = 0; i < len; i++ ) {
7231 if ( jQuery.contains( self[ i ], this ) ) {
7232 return true;
7233 }
7234 }
7235 }) );
7236 }
7237
7238 for ( i = 0; i < len; i++ ) {
7239 jQuery.find( selector, self[ i ], ret );
7240 }
7241
7242 // Needed because $( selector, context ) becomes $( context ).find( selector )
7243 ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
7244 ret.selector = this.selector ? this.selector + " " + selector : selector;
7245 return ret;
7246 },
7247
7248 has: function( target ) {
7249 var i,
7250 targets = jQuery( target, this ),
7251 len = targets.length;
7252
7253 return this.filter(function() {
7254 for ( i = 0; i < len; i++ ) {
7255 if ( jQuery.contains( this, targets[i] ) ) {
7256 return true;
7257 }
7258 }
7259 });
7260 },
7261
7262 not: function( selector ) {
7263 return this.pushStack( winnow(this, selector || [], true) );
7264 },
7265
7266 filter: function( selector ) {
7267 return this.pushStack( winnow(this, selector || [], false) );
7268 },
7269
7270 is: function( selector ) {
7271 return !!winnow(
7272 this,
7273
7274 // If this is a positional/relative selector, check membership in the returned set
7275 // so $("p:first").is("p:last") won't return true for a doc with two "p".
7276 typeof selector === "string" && rneedsContext.test( selector ) ?
7277 jQuery( selector ) :
7278 selector || [],
7279 false
7280 ).length;
7281 },
7282
7283 closest: function( selectors, context ) {
7284 var cur,
7285 i = 0,
7286 l = this.length,
7287 ret = [],
7288 pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
7289 jQuery( selectors, context || this.context ) :
7290 0;
7291
7292 for ( ; i < l; i++ ) {
7293 for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
7294 // Always skip document fragments
7295 if ( cur.nodeType < 11 && (pos ?
7296 pos.index(cur) > -1 :
7297
7298 // Don't pass non-elements to Sizzle
7299 cur.nodeType === 1 &&
7300 jQuery.find.matchesSelector(cur, selectors)) ) {
7301
7302 cur = ret.push( cur );
7303 break;
7304 }
7305 }
7306 }
7307
7308 return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
7309 },
7310
7311 // Determine the position of an element within
7312 // the matched set of elements
7313 index: function( elem ) {
7314
7315 // No argument, return index in parent
7316 if ( !elem ) {
7317 return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
7318 }
7319
7320 // index in selector
7321 if ( typeof elem === "string" ) {
7322 return jQuery.inArray( this[0], jQuery( elem ) );
7323 }
7324
7325 // Locate the position of the desired element
7326 return jQuery.inArray(
7327 // If it receives a jQuery object, the first element is used
7328 elem.jquery ? elem[0] : elem, this );
7329 },
7330
7331 add: function( selector, context ) {
7332 var set = typeof selector === "string" ?
7333 jQuery( selector, context ) :
7334 jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
7335 all = jQuery.merge( this.get(), set );
7336
7337 return this.pushStack( jQuery.unique(all) );
7338 },
7339
7340 addBack: function( selector ) {
7341 return this.add( selector == null ?
7342 this.prevObject : this.prevObject.filter(selector)
7343 );
7344 }
7345});
7346
7347function sibling( cur, dir ) {
7348 do {
7349 cur = cur[ dir ];
7350 } while ( cur && cur.nodeType !== 1 );
7351
7352 return cur;
7353}
7354
7355jQuery.each({
7356 parent: function( elem ) {
7357 var parent = elem.parentNode;
7358 return parent && parent.nodeType !== 11 ? parent : null;
7359 },
7360 parents: function( elem ) {
7361 return jQuery.dir( elem, "parentNode" );
7362 },
7363 parentsUntil: function( elem, i, until ) {
7364 return jQuery.dir( elem, "parentNode", until );
7365 },
7366 next: function( elem ) {
7367 return sibling( elem, "nextSibling" );
7368 },
7369 prev: function( elem ) {
7370 return sibling( elem, "previousSibling" );
7371 },
7372 nextAll: function( elem ) {
7373 return jQuery.dir( elem, "nextSibling" );
7374 },
7375 prevAll: function( elem ) {
7376 return jQuery.dir( elem, "previousSibling" );
7377 },
7378 nextUntil: function( elem, i, until ) {
7379 return jQuery.dir( elem, "nextSibling", until );
7380 },
7381 prevUntil: function( elem, i, until ) {
7382 return jQuery.dir( elem, "previousSibling", until );
7383 },
7384 siblings: function( elem ) {
7385 return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
7386 },
7387 children: function( elem ) {
7388 return jQuery.sibling( elem.firstChild );
7389 },
7390 contents: function( elem ) {
7391 return jQuery.nodeName( elem, "iframe" ) ?
7392 elem.contentDocument || elem.contentWindow.document :
7393 jQuery.merge( [], elem.childNodes );
7394 }
7395}, function( name, fn ) {
7396 jQuery.fn[ name ] = function( until, selector ) {
7397 var ret = jQuery.map( this, fn, until );
7398
7399 if ( name.slice( -5 ) !== "Until" ) {
7400 selector = until;
7401 }
7402
7403 if ( selector && typeof selector === "string" ) {
7404 ret = jQuery.filter( selector, ret );
7405 }
7406
7407 if ( this.length > 1 ) {
7408 // Remove duplicates
7409 if ( !guaranteedUnique[ name ] ) {
7410 ret = jQuery.unique( ret );
7411 }
7412
7413 // Reverse order for parents* and prev-derivatives
7414 if ( rparentsprev.test( name ) ) {
7415 ret = ret.reverse();
7416 }
7417 }
7418
7419 return this.pushStack( ret );
7420 };
7421});
7422
7423jQuery.extend({
7424 filter: function( expr, elems, not ) {
7425 var elem = elems[ 0 ];
7426
7427 if ( not ) {
7428 expr = ":not(" + expr + ")";
7429 }
7430
7431 return elems.length === 1 && elem.nodeType === 1 ?
7432 jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
7433 jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
7434 return elem.nodeType === 1;
7435 }));
7436 },
7437
7438 dir: function( elem, dir, until ) {
7439 var matched = [],
7440 cur = elem[ dir ];
7441
7442 while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
7443 if ( cur.nodeType === 1 ) {
7444 matched.push( cur );
7445 }
7446 cur = cur[dir];
7447 }
7448 return matched;
7449 },
7450
7451 sibling: function( n, elem ) {
7452 var r = [];
7453
7454 for ( ; n; n = n.nextSibling ) {
7455 if ( n.nodeType === 1 && n !== elem ) {
7456 r.push( n );
7457 }
7458 }
7459
7460 return r;
7461 }
7462});
7463
7464// Implement the identical functionality for filter and not
7465function winnow( elements, qualifier, not ) {
7466 if ( jQuery.isFunction( qualifier ) ) {
7467 return jQuery.grep( elements, function( elem, i ) {
7468 /* jshint -W018 */
7469 return !!qualifier.call( elem, i, elem ) !== not;
7470 });
7471
7472 }
7473
7474 if ( qualifier.nodeType ) {
7475 return jQuery.grep( elements, function( elem ) {
7476 return ( elem === qualifier ) !== not;
7477 });
7478
7479 }
7480
7481 if ( typeof qualifier === "string" ) {
7482 if ( isSimple.test( qualifier ) ) {
7483 return jQuery.filter( qualifier, elements, not );
7484 }
7485
7486 qualifier = jQuery.filter( qualifier, elements );
7487 }
7488
7489 return jQuery.grep( elements, function( elem ) {
7490 return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
7491 });
7492}
7493function createSafeFragment( document ) {
7494 var list = nodeNames.split( "|" ),
7495 safeFrag = document.createDocumentFragment();
7496
7497 if ( safeFrag.createElement ) {
7498 while ( list.length ) {
7499 safeFrag.createElement(
7500 list.pop()
7501 );
7502 }
7503 }
7504 return safeFrag;
7505}
7506
7507var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
7508 "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
7509 rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
7510 rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
7511 rleadingWhitespace = /^\s+/,
7512 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
7513 rtagName = /<([\w:]+)/,
7514 rtbody = /<tbody/i,
7515 rhtml = /<|&#?\w+;/,
7516 rnoInnerhtml = /<(?:script|style|link)/i,
7517 manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
7518 // checked="checked" or checked
7519 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
7520 rscriptType = /^$|\/(?:java|ecma)script/i,
7521 rscriptTypeMasked = /^true\/(.*)/,
7522 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
7523
7524 // We have to close these tags to support XHTML (#13200)
7525 wrapMap = {
7526 option: [ 1, "<select multiple='multiple'>", "</select>" ],
7527 legend: [ 1, "<fieldset>", "</fieldset>" ],
7528 area: [ 1, "<map>", "</map>" ],
7529 param: [ 1, "<object>", "</object>" ],
7530 thead: [ 1, "<table>", "</table>" ],
7531 tr: [ 2, "<table><tbody>", "</tbody></table>" ],
7532 col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
7533 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
7534
7535 // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
7536 // unless wrapped in a div with non-breaking characters in front of it.
7537 _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
7538 },
7539 safeFragment = createSafeFragment( document ),
7540 fragmentDiv = safeFragment.appendChild( document.createElement("div") );
7541
7542wrapMap.optgroup = wrapMap.option;
7543wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
7544wrapMap.th = wrapMap.td;
7545
7546jQuery.fn.extend({
7547 text: function( value ) {
7548 return jQuery.access( this, function( value ) {
7549 return value === undefined ?
7550 jQuery.text( this ) :
7551 this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
7552 }, null, value, arguments.length );
7553 },
7554
7555 append: function() {
7556 return this.domManip( arguments, function( elem ) {
7557 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
7558 var target = manipulationTarget( this, elem );
7559 target.appendChild( elem );
7560 }
7561 });
7562 },
7563
7564 prepend: function() {
7565 return this.domManip( arguments, function( elem ) {
7566 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
7567 var target = manipulationTarget( this, elem );
7568 target.insertBefore( elem, target.firstChild );
7569 }
7570 });
7571 },
7572
7573 before: function() {
7574 return this.domManip( arguments, function( elem ) {
7575 if ( this.parentNode ) {
7576 this.parentNode.insertBefore( elem, this );
7577 }
7578 });
7579 },
7580
7581 after: function() {
7582 return this.domManip( arguments, function( elem ) {
7583 if ( this.parentNode ) {
7584 this.parentNode.insertBefore( elem, this.nextSibling );
7585 }
7586 });
7587 },
7588
7589 // keepData is for internal use only--do not document
7590 remove: function( selector, keepData ) {
7591 var elem,
7592 elems = selector ? jQuery.filter( selector, this ) : this,
7593 i = 0;
7594
7595 for ( ; (elem = elems[i]) != null; i++ ) {
7596
7597 if ( !keepData && elem.nodeType === 1 ) {
7598 jQuery.cleanData( getAll( elem ) );
7599 }
7600
7601 if ( elem.parentNode ) {
7602 if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
7603 setGlobalEval( getAll( elem, "script" ) );
7604 }
7605 elem.parentNode.removeChild( elem );
7606 }
7607 }
7608
7609 return this;
7610 },
7611
7612 empty: function() {
7613 var elem,
7614 i = 0;
7615
7616 for ( ; (elem = this[i]) != null; i++ ) {
7617 // Remove element nodes and prevent memory leaks
7618 if ( elem.nodeType === 1 ) {
7619 jQuery.cleanData( getAll( elem, false ) );
7620 }
7621
7622 // Remove any remaining nodes
7623 while ( elem.firstChild ) {
7624 elem.removeChild( elem.firstChild );
7625 }
7626
7627 // If this is a select, ensure that it displays empty (#12336)
7628 // Support: IE<9
7629 if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
7630 elem.options.length = 0;
7631 }
7632 }
7633
7634 return this;
7635 },
7636
7637 clone: function( dataAndEvents, deepDataAndEvents ) {
7638 dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
7639 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
7640
7641 return this.map( function () {
7642 return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
7643 });
7644 },
7645
7646 html: function( value ) {
7647 return jQuery.access( this, function( value ) {
7648 var elem = this[0] || {},
7649 i = 0,
7650 l = this.length;
7651
7652 if ( value === undefined ) {
7653 return elem.nodeType === 1 ?
7654 elem.innerHTML.replace( rinlinejQuery, "" ) :
7655 undefined;
7656 }
7657
7658 // See if we can take a shortcut and just use innerHTML
7659 if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
7660 ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
7661 ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
7662 !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
7663
7664 value = value.replace( rxhtmlTag, "<$1></$2>" );
7665
7666 try {
7667 for (; i < l; i++ ) {
7668 // Remove element nodes and prevent memory leaks
7669 elem = this[i] || {};
7670 if ( elem.nodeType === 1 ) {
7671 jQuery.cleanData( getAll( elem, false ) );
7672 elem.innerHTML = value;
7673 }
7674 }
7675
7676 elem = 0;
7677
7678 // If using innerHTML throws an exception, use the fallback method
7679 } catch(e) {}
7680 }
7681
7682 if ( elem ) {
7683 this.empty().append( value );
7684 }
7685 }, null, value, arguments.length );
7686 },
7687
7688 replaceWith: function() {
7689 var
7690 // Snapshot the DOM in case .domManip sweeps something relevant into its fragment
7691 args = jQuery.map( this, function( elem ) {
7692 return [ elem.nextSibling, elem.parentNode ];
7693 }),
7694 i = 0;
7695
7696 // Make the changes, replacing each context element with the new content
7697 this.domManip( arguments, function( elem ) {
7698 var next = args[ i++ ],
7699 parent = args[ i++ ];
7700
7701 if ( parent ) {
7702 // Don't use the snapshot next if it has moved (#13810)
7703 if ( next && next.parentNode !== parent ) {
7704 next = this.nextSibling;
7705 }
7706 jQuery( this ).remove();
7707 parent.insertBefore( elem, next );
7708 }
7709 // Allow new content to include elements from the context set
7710 }, true );
7711
7712 // Force removal if there was no new content (e.g., from empty arguments)
7713 return i ? this : this.remove();
7714 },
7715
7716 detach: function( selector ) {
7717 return this.remove( selector, true );
7718 },
7719
7720 domManip: function( args, callback, allowIntersection ) {
7721
7722 // Flatten any nested arrays
7723 args = core_concat.apply( [], args );
7724
7725 var first, node, hasScripts,
7726 scripts, doc, fragment,
7727 i = 0,
7728 l = this.length,
7729 set = this,
7730 iNoClone = l - 1,
7731 value = args[0],
7732 isFunction = jQuery.isFunction( value );
7733
7734 // We can't cloneNode fragments that contain checked, in WebKit
7735 if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
7736 return this.each(function( index ) {
7737 var self = set.eq( index );
7738 if ( isFunction ) {
7739 args[0] = value.call( this, index, self.html() );
7740 }
7741 self.domManip( args, callback, allowIntersection );
7742 });
7743 }
7744
7745 if ( l ) {
7746 fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
7747 first = fragment.firstChild;
7748
7749 if ( fragment.childNodes.length === 1 ) {
7750 fragment = first;
7751 }
7752
7753 if ( first ) {
7754 scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
7755 hasScripts = scripts.length;
7756
7757 // Use the original fragment for the last item instead of the first because it can end up
7758 // being emptied incorrectly in certain situations (#8070).
7759 for ( ; i < l; i++ ) {
7760 node = fragment;
7761
7762 if ( i !== iNoClone ) {
7763 node = jQuery.clone( node, true, true );
7764
7765 // Keep references to cloned scripts for later restoration
7766 if ( hasScripts ) {
7767 jQuery.merge( scripts, getAll( node, "script" ) );
7768 }
7769 }
7770
7771 callback.call( this[i], node, i );
7772 }
7773
7774 if ( hasScripts ) {
7775 doc = scripts[ scripts.length - 1 ].ownerDocument;
7776
7777 // Reenable scripts
7778 jQuery.map( scripts, restoreScript );
7779
7780 // Evaluate executable scripts on first document insertion
7781 for ( i = 0; i < hasScripts; i++ ) {
7782 node = scripts[ i ];
7783 if ( rscriptType.test( node.type || "" ) &&
7784 !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
7785
7786 if ( node.src ) {
7787 // Hope ajax is available...
7788 jQuery._evalUrl( node.src );
7789 } else {
7790 jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
7791 }
7792 }
7793 }
7794 }
7795
7796 // Fix #11809: Avoid leaking memory
7797 fragment = first = null;
7798 }
7799 }
7800
7801 return this;
7802 }
7803});
7804
7805// Support: IE<8
7806// Manipulating tables requires a tbody
7807function manipulationTarget( elem, content ) {
7808 return jQuery.nodeName( elem, "table" ) &&
7809 jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
7810
7811 elem.getElementsByTagName("tbody")[0] ||
7812 elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
7813 elem;
7814}
7815
7816// Replace/restore the type attribute of script elements for safe DOM manipulation
7817function disableScript( elem ) {
7818 elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
7819 return elem;
7820}
7821function restoreScript( elem ) {
7822 var match = rscriptTypeMasked.exec( elem.type );
7823 if ( match ) {
7824 elem.type = match[1];
7825 } else {
7826 elem.removeAttribute("type");
7827 }
7828 return elem;
7829}
7830
7831// Mark scripts as having already been evaluated
7832function setGlobalEval( elems, refElements ) {
7833 var elem,
7834 i = 0;
7835 for ( ; (elem = elems[i]) != null; i++ ) {
7836 jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
7837 }
7838}
7839
7840function cloneCopyEvent( src, dest ) {
7841
7842 if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
7843 return;
7844 }
7845
7846 var type, i, l,
7847 oldData = jQuery._data( src ),
7848 curData = jQuery._data( dest, oldData ),
7849 events = oldData.events;
7850
7851 if ( events ) {
7852 delete curData.handle;
7853 curData.events = {};
7854
7855 for ( type in events ) {
7856 for ( i = 0, l = events[ type ].length; i < l; i++ ) {
7857 jQuery.event.add( dest, type, events[ type ][ i ] );
7858 }
7859 }
7860 }
7861
7862 // make the cloned public data object a copy from the original
7863 if ( curData.data ) {
7864 curData.data = jQuery.extend( {}, curData.data );
7865 }
7866}
7867
7868function fixCloneNodeIssues( src, dest ) {
7869 var nodeName, e, data;
7870
7871 // We do not need to do anything for non-Elements
7872 if ( dest.nodeType !== 1 ) {
7873 return;
7874 }
7875
7876 nodeName = dest.nodeName.toLowerCase();
7877
7878 // IE6-8 copies events bound via attachEvent when using cloneNode.
7879 if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
7880 data = jQuery._data( dest );
7881
7882 for ( e in data.events ) {
7883 jQuery.removeEvent( dest, e, data.handle );
7884 }
7885
7886 // Event data gets referenced instead of copied if the expando gets copied too
7887 dest.removeAttribute( jQuery.expando );
7888 }
7889
7890 // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
7891 if ( nodeName === "script" && dest.text !== src.text ) {
7892 disableScript( dest ).text = src.text;
7893 restoreScript( dest );
7894
7895 // IE6-10 improperly clones children of object elements using classid.
7896 // IE10 throws NoModificationAllowedError if parent is null, #12132.
7897 } else if ( nodeName === "object" ) {
7898 if ( dest.parentNode ) {
7899 dest.outerHTML = src.outerHTML;
7900 }
7901
7902 // This path appears unavoidable for IE9. When cloning an object
7903 // element in IE9, the outerHTML strategy above is not sufficient.
7904 // If the src has innerHTML and the destination does not,
7905 // copy the src.innerHTML into the dest.innerHTML. #10324
7906 if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
7907 dest.innerHTML = src.innerHTML;
7908 }
7909
7910 } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
7911 // IE6-8 fails to persist the checked state of a cloned checkbox
7912 // or radio button. Worse, IE6-7 fail to give the cloned element
7913 // a checked appearance if the defaultChecked value isn't also set
7914
7915 dest.defaultChecked = dest.checked = src.checked;
7916
7917 // IE6-7 get confused and end up setting the value of a cloned
7918 // checkbox/radio button to an empty string instead of "on"
7919 if ( dest.value !== src.value ) {
7920 dest.value = src.value;
7921 }
7922
7923 // IE6-8 fails to return the selected option to the default selected
7924 // state when cloning options
7925 } else if ( nodeName === "option" ) {
7926 dest.defaultSelected = dest.selected = src.defaultSelected;
7927
7928 // IE6-8 fails to set the defaultValue to the correct value when
7929 // cloning other types of input fields
7930 } else if ( nodeName === "input" || nodeName === "textarea" ) {
7931 dest.defaultValue = src.defaultValue;
7932 }
7933}
7934
7935jQuery.each({
7936 appendTo: "append",
7937 prependTo: "prepend",
7938 insertBefore: "before",
7939 insertAfter: "after",
7940 replaceAll: "replaceWith"
7941}, function( name, original ) {
7942 jQuery.fn[ name ] = function( selector ) {
7943 var elems,
7944 i = 0,
7945 ret = [],
7946 insert = jQuery( selector ),
7947 last = insert.length - 1;
7948
7949 for ( ; i <= last; i++ ) {
7950 elems = i === last ? this : this.clone(true);
7951 jQuery( insert[i] )[ original ]( elems );
7952
7953 // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
7954 core_push.apply( ret, elems.get() );
7955 }
7956
7957 return this.pushStack( ret );
7958 };
7959});
7960
7961function getAll( context, tag ) {
7962 var elems, elem,
7963 i = 0,
7964 found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
7965 typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
7966 undefined;
7967
7968 if ( !found ) {
7969 for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
7970 if ( !tag || jQuery.nodeName( elem, tag ) ) {
7971 found.push( elem );
7972 } else {
7973 jQuery.merge( found, getAll( elem, tag ) );
7974 }
7975 }
7976 }
7977
7978 return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
7979 jQuery.merge( [ context ], found ) :
7980 found;
7981}
7982
7983// Used in buildFragment, fixes the defaultChecked property
7984function fixDefaultChecked( elem ) {
7985 if ( manipulation_rcheckableType.test( elem.type ) ) {
7986 elem.defaultChecked = elem.checked;
7987 }
7988}
7989
7990jQuery.extend({
7991 clone: function( elem, dataAndEvents, deepDataAndEvents ) {
7992 var destElements, node, clone, i, srcElements,
7993 inPage = jQuery.contains( elem.ownerDocument, elem );
7994
7995 if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
7996 clone = elem.cloneNode( true );
7997
7998 // IE<=8 does not properly clone detached, unknown element nodes
7999 } else {
8000 fragmentDiv.innerHTML = elem.outerHTML;
8001 fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
8002 }
8003
8004 if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
8005 (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
8006
8007 // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
8008 destElements = getAll( clone );
8009 srcElements = getAll( elem );
8010
8011 // Fix all IE cloning issues
8012 for ( i = 0; (node = srcElements[i]) != null; ++i ) {
8013 // Ensure that the destination node is not null; Fixes #9587
8014 if ( destElements[i] ) {
8015 fixCloneNodeIssues( node, destElements[i] );
8016 }
8017 }
8018 }
8019
8020 // Copy the events from the original to the clone
8021 if ( dataAndEvents ) {
8022 if ( deepDataAndEvents ) {
8023 srcElements = srcElements || getAll( elem );
8024 destElements = destElements || getAll( clone );
8025
8026 for ( i = 0; (node = srcElements[i]) != null; i++ ) {
8027 cloneCopyEvent( node, destElements[i] );
8028 }
8029 } else {
8030 cloneCopyEvent( elem, clone );
8031 }
8032 }
8033
8034 // Preserve script evaluation history
8035 destElements = getAll( clone, "script" );
8036 if ( destElements.length > 0 ) {
8037 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
8038 }
8039
8040 destElements = srcElements = node = null;
8041
8042 // Return the cloned set
8043 return clone;
8044 },
8045
8046 buildFragment: function( elems, context, scripts, selection ) {
8047 var j, elem, contains,
8048 tmp, tag, tbody, wrap,
8049 l = elems.length,
8050
8051 // Ensure a safe fragment
8052 safe = createSafeFragment( context ),
8053
8054 nodes = [],
8055 i = 0;
8056
8057 for ( ; i < l; i++ ) {
8058 elem = elems[ i ];
8059
8060 if ( elem || elem === 0 ) {
8061
8062 // Add nodes directly
8063 if ( jQuery.type( elem ) === "object" ) {
8064 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
8065
8066 // Convert non-html into a text node
8067 } else if ( !rhtml.test( elem ) ) {
8068 nodes.push( context.createTextNode( elem ) );
8069
8070 // Convert html into DOM nodes
8071 } else {
8072 tmp = tmp || safe.appendChild( context.createElement("div") );
8073
8074 // Deserialize a standard representation
8075 tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
8076 wrap = wrapMap[ tag ] || wrapMap._default;
8077
8078 tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
8079
8080 // Descend through wrappers to the right content
8081 j = wrap[0];
8082 while ( j-- ) {
8083 tmp = tmp.lastChild;
8084 }
8085
8086 // Manually add leading whitespace removed by IE
8087 if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
8088 nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
8089 }
8090
8091 // Remove IE's autoinserted <tbody> from table fragments
8092 if ( !jQuery.support.tbody ) {
8093
8094 // String was a <table>, *may* have spurious <tbody>
8095 elem = tag === "table" && !rtbody.test( elem ) ?
8096 tmp.firstChild :
8097
8098 // String was a bare <thead> or <tfoot>
8099 wrap[1] === "<table>" && !rtbody.test( elem ) ?
8100 tmp :
8101 0;
8102
8103 j = elem && elem.childNodes.length;
8104 while ( j-- ) {
8105 if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
8106 elem.removeChild( tbody );
8107 }
8108 }
8109 }
8110
8111 jQuery.merge( nodes, tmp.childNodes );
8112
8113 // Fix #12392 for WebKit and IE > 9
8114 tmp.textContent = "";
8115
8116 // Fix #12392 for oldIE
8117 while ( tmp.firstChild ) {
8118 tmp.removeChild( tmp.firstChild );
8119 }
8120
8121 // Remember the top-level container for proper cleanup
8122 tmp = safe.lastChild;
8123 }
8124 }
8125 }
8126
8127 // Fix #11356: Clear elements from fragment
8128 if ( tmp ) {
8129 safe.removeChild( tmp );
8130 }
8131
8132 // Reset defaultChecked for any radios and checkboxes
8133 // about to be appended to the DOM in IE 6/7 (#8060)
8134 if ( !jQuery.support.appendChecked ) {
8135 jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
8136 }
8137
8138 i = 0;
8139 while ( (elem = nodes[ i++ ]) ) {
8140
8141 // #4087 - If origin and destination elements are the same, and this is
8142 // that element, do not do anything
8143 if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
8144 continue;
8145 }
8146
8147 contains = jQuery.contains( elem.ownerDocument, elem );
8148
8149 // Append to fragment
8150 tmp = getAll( safe.appendChild( elem ), "script" );
8151
8152 // Preserve script evaluation history
8153 if ( contains ) {
8154 setGlobalEval( tmp );
8155 }
8156
8157 // Capture executables
8158 if ( scripts ) {
8159 j = 0;
8160 while ( (elem = tmp[ j++ ]) ) {
8161 if ( rscriptType.test( elem.type || "" ) ) {
8162 scripts.push( elem );
8163 }
8164 }
8165 }
8166 }
8167
8168 tmp = null;
8169
8170 return safe;
8171 },
8172
8173 cleanData: function( elems, /* internal */ acceptData ) {
8174 var elem, type, id, data,
8175 i = 0,
8176 internalKey = jQuery.expando,
8177 cache = jQuery.cache,
8178 deleteExpando = jQuery.support.deleteExpando,
8179 special = jQuery.event.special;
8180
8181 for ( ; (elem = elems[i]) != null; i++ ) {
8182
8183 if ( acceptData || jQuery.acceptData( elem ) ) {
8184
8185 id = elem[ internalKey ];
8186 data = id && cache[ id ];
8187
8188 if ( data ) {
8189 if ( data.events ) {
8190 for ( type in data.events ) {
8191 if ( special[ type ] ) {
8192 jQuery.event.remove( elem, type );
8193
8194 // This is a shortcut to avoid jQuery.event.remove's overhead
8195 } else {
8196 jQuery.removeEvent( elem, type, data.handle );
8197 }
8198 }
8199 }
8200
8201 // Remove cache only if it was not already removed by jQuery.event.remove
8202 if ( cache[ id ] ) {
8203
8204 delete cache[ id ];
8205
8206 // IE does not allow us to delete expando properties from nodes,
8207 // nor does it have a removeAttribute function on Document nodes;
8208 // we must handle all of these cases
8209 if ( deleteExpando ) {
8210 delete elem[ internalKey ];
8211
8212 } else if ( typeof elem.removeAttribute !== core_strundefined ) {
8213 elem.removeAttribute( internalKey );
8214
8215 } else {
8216 elem[ internalKey ] = null;
8217 }
8218
8219 core_deletedIds.push( id );
8220 }
8221 }
8222 }
8223 }
8224 },
8225
8226 _evalUrl: function( url ) {
8227 return jQuery.ajax({
8228 url: url,
8229 type: "GET",
8230 dataType: "script",
8231 async: false,
8232 global: false,
8233 "throws": true
8234 });
8235 }
8236});
8237jQuery.fn.extend({
8238 wrapAll: function( html ) {
8239 if ( jQuery.isFunction( html ) ) {
8240 return this.each(function(i) {
8241 jQuery(this).wrapAll( html.call(this, i) );
8242 });
8243 }
8244
8245 if ( this[0] ) {
8246 // The elements to wrap the target around
8247 var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
8248
8249 if ( this[0].parentNode ) {
8250 wrap.insertBefore( this[0] );
8251 }
8252
8253 wrap.map(function() {
8254 var elem = this;
8255
8256 while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
8257 elem = elem.firstChild;
8258 }
8259
8260 return elem;
8261 }).append( this );
8262 }
8263
8264 return this;
8265 },
8266
8267 wrapInner: function( html ) {
8268 if ( jQuery.isFunction( html ) ) {
8269 return this.each(function(i) {
8270 jQuery(this).wrapInner( html.call(this, i) );
8271 });
8272 }
8273
8274 return this.each(function() {
8275 var self = jQuery( this ),
8276 contents = self.contents();
8277
8278 if ( contents.length ) {
8279 contents.wrapAll( html );
8280
8281 } else {
8282 self.append( html );
8283 }
8284 });
8285 },
8286
8287 wrap: function( html ) {
8288 var isFunction = jQuery.isFunction( html );
8289
8290 return this.each(function(i) {
8291 jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
8292 });
8293 },
8294
8295 unwrap: function() {
8296 return this.parent().each(function() {
8297 if ( !jQuery.nodeName( this, "body" ) ) {
8298 jQuery( this ).replaceWith( this.childNodes );
8299 }
8300 }).end();
8301 }
8302});
8303var iframe, getStyles, curCSS,
8304 ralpha = /alpha\([^)]*\)/i,
8305 ropacity = /opacity\s*=\s*([^)]*)/,
8306 rposition = /^(top|right|bottom|left)$/,
8307 // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
8308 // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
8309 rdisplayswap = /^(none|table(?!-c[ea]).+)/,
8310 rmargin = /^margin/,
8311 rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
8312 rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
8313 rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
8314 elemdisplay = { BODY: "block" },
8315
8316 cssShow = { position: "absolute", visibility: "hidden", display: "block" },
8317 cssNormalTransform = {
8318 letterSpacing: 0,
8319 fontWeight: 400
8320 },
8321
8322 cssExpand = [ "Top", "Right", "Bottom", "Left" ],
8323 cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
8324
8325// return a css property mapped to a potentially vendor prefixed property
8326function vendorPropName( style, name ) {
8327
8328 // shortcut for names that are not vendor prefixed
8329 if ( name in style ) {
8330 return name;
8331 }
8332
8333 // check for vendor prefixed names
8334 var capName = name.charAt(0).toUpperCase() + name.slice(1),
8335 origName = name,
8336 i = cssPrefixes.length;
8337
8338 while ( i-- ) {
8339 name = cssPrefixes[ i ] + capName;
8340 if ( name in style ) {
8341 return name;
8342 }
8343 }
8344
8345 return origName;
8346}
8347
8348function isHidden( elem, el ) {
8349 // isHidden might be called from jQuery#filter function;
8350 // in that case, element will be second argument
8351 elem = el || elem;
8352 return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
8353}
8354
8355function showHide( elements, show ) {
8356 var display, elem, hidden,
8357 values = [],
8358 index = 0,
8359 length = elements.length;
8360
8361 for ( ; index < length; index++ ) {
8362 elem = elements[ index ];
8363 if ( !elem.style ) {
8364 continue;
8365 }
8366
8367 values[ index ] = jQuery._data( elem, "olddisplay" );
8368 display = elem.style.display;
8369 if ( show ) {
8370 // Reset the inline display of this element to learn if it is
8371 // being hidden by cascaded rules or not
8372 if ( !values[ index ] && display === "none" ) {
8373 elem.style.display = "";
8374 }
8375
8376 // Set elements which have been overridden with display: none
8377 // in a stylesheet to whatever the default browser style is
8378 // for such an element
8379 if ( elem.style.display === "" && isHidden( elem ) ) {
8380 values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
8381 }
8382 } else {
8383
8384 if ( !values[ index ] ) {
8385 hidden = isHidden( elem );
8386
8387 if ( display && display !== "none" || !hidden ) {
8388 jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
8389 }
8390 }
8391 }
8392 }
8393
8394 // Set the display of most of the elements in a second loop
8395 // to avoid the constant reflow
8396 for ( index = 0; index < length; index++ ) {
8397 elem = elements[ index ];
8398 if ( !elem.style ) {
8399 continue;
8400 }
8401 if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
8402 elem.style.display = show ? values[ index ] || "" : "none";
8403 }
8404 }
8405
8406 return elements;
8407}
8408
8409jQuery.fn.extend({
8410 css: function( name, value ) {
8411 return jQuery.access( this, function( elem, name, value ) {
8412 var len, styles,
8413 map = {},
8414 i = 0;
8415
8416 if ( jQuery.isArray( name ) ) {
8417 styles = getStyles( elem );
8418 len = name.length;
8419
8420 for ( ; i < len; i++ ) {
8421 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
8422 }
8423
8424 return map;
8425 }
8426
8427 return value !== undefined ?
8428 jQuery.style( elem, name, value ) :
8429 jQuery.css( elem, name );
8430 }, name, value, arguments.length > 1 );
8431 },
8432 show: function() {
8433 return showHide( this, true );
8434 },
8435 hide: function() {
8436 return showHide( this );
8437 },
8438 toggle: function( state ) {
8439 var bool = typeof state === "boolean";
8440
8441 return this.each(function() {
8442 if ( bool ? state : isHidden( this ) ) {
8443 jQuery( this ).show();
8444 } else {
8445 jQuery( this ).hide();
8446 }
8447 });
8448 }
8449});
8450
8451jQuery.extend({
8452 // Add in style property hooks for overriding the default
8453 // behavior of getting and setting a style property
8454 cssHooks: {
8455 opacity: {
8456 get: function( elem, computed ) {
8457 if ( computed ) {
8458 // We should always get a number back from opacity
8459 var ret = curCSS( elem, "opacity" );
8460 return ret === "" ? "1" : ret;
8461 }
8462 }
8463 }
8464 },
8465
8466 // Don't automatically add "px" to these possibly-unitless properties
8467 cssNumber: {
8468 "columnCount": true,
8469 "fillOpacity": true,
8470 "fontWeight": true,
8471 "lineHeight": true,
8472 "opacity": true,
8473 "orphans": true,
8474 "widows": true,
8475 "zIndex": true,
8476 "zoom": true
8477 },
8478
8479 // Add in properties whose names you wish to fix before
8480 // setting or getting the value
8481 cssProps: {
8482 // normalize float css property
8483 "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
8484 },
8485
8486 // Get and set the style property on a DOM Node
8487 style: function( elem, name, value, extra ) {
8488 // Don't set styles on text and comment nodes
8489 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
8490 return;
8491 }
8492
8493 // Make sure that we're working with the right name
8494 var ret, type, hooks,
8495 origName = jQuery.camelCase( name ),
8496 style = elem.style;
8497
8498 name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
8499
8500 // gets hook for the prefixed version
8501 // followed by the unprefixed version
8502 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
8503
8504 // Check if we're setting a value
8505 if ( value !== undefined ) {
8506 type = typeof value;
8507
8508 // convert relative number strings (+= or -=) to relative numbers. #7345
8509 if ( type === "string" && (ret = rrelNum.exec( value )) ) {
8510 value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
8511 // Fixes bug #9237
8512 type = "number";
8513 }
8514
8515 // Make sure that NaN and null values aren't set. See: #7116
8516 if ( value == null || type === "number" && isNaN( value ) ) {
8517 return;
8518 }
8519
8520 // If a number was passed in, add 'px' to the (except for certain CSS properties)
8521 if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
8522 value += "px";
8523 }
8524
8525 // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
8526 // but it would mean to define eight (for every problematic property) identical functions
8527 if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
8528 style[ name ] = "inherit";
8529 }
8530
8531 // If a hook was provided, use that value, otherwise just set the specified value
8532 if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
8533
8534 // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
8535 // Fixes bug #5509
8536 try {
8537 style[ name ] = value;
8538 } catch(e) {}
8539 }
8540
8541 } else {
8542 // If a hook was provided get the non-computed value from there
8543 if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
8544 return ret;
8545 }
8546
8547 // Otherwise just get the value from the style object
8548 return style[ name ];
8549 }
8550 },
8551
8552 css: function( elem, name, extra, styles ) {
8553 var num, val, hooks,
8554 origName = jQuery.camelCase( name );
8555
8556 // Make sure that we're working with the right name
8557 name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
8558
8559 // gets hook for the prefixed version
8560 // followed by the unprefixed version
8561 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
8562
8563 // If a hook was provided get the computed value from there
8564 if ( hooks && "get" in hooks ) {
8565 val = hooks.get( elem, true, extra );
8566 }
8567
8568 // Otherwise, if a way to get the computed value exists, use that
8569 if ( val === undefined ) {
8570 val = curCSS( elem, name, styles );
8571 }
8572
8573 //convert "normal" to computed value
8574 if ( val === "normal" && name in cssNormalTransform ) {
8575 val = cssNormalTransform[ name ];
8576 }
8577
8578 // Return, converting to number if forced or a qualifier was provided and val looks numeric
8579 if ( extra === "" || extra ) {
8580 num = parseFloat( val );
8581 return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
8582 }
8583 return val;
8584 }
8585});
8586
8587// NOTE: we've included the "window" in window.getComputedStyle
8588// because jsdom on node.js will break without it.
8589if ( window.getComputedStyle ) {
8590 getStyles = function( elem ) {
8591 return window.getComputedStyle( elem, null );
8592 };
8593
8594 curCSS = function( elem, name, _computed ) {
8595 var width, minWidth, maxWidth,
8596 computed = _computed || getStyles( elem ),
8597
8598 // getPropertyValue is only needed for .css('filter') in IE9, see #12537
8599 ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
8600 style = elem.style;
8601
8602 if ( computed ) {
8603
8604 if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
8605 ret = jQuery.style( elem, name );
8606 }
8607
8608 // A tribute to the "awesome hack by Dean Edwards"
8609 // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
8610 // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
8611 // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
8612 if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
8613
8614 // Remember the original values
8615 width = style.width;
8616 minWidth = style.minWidth;
8617 maxWidth = style.maxWidth;
8618
8619 // Put in the new values to get a computed value out
8620 style.minWidth = style.maxWidth = style.width = ret;
8621 ret = computed.width;
8622
8623 // Revert the changed values
8624 style.width = width;
8625 style.minWidth = minWidth;
8626 style.maxWidth = maxWidth;
8627 }
8628 }
8629
8630 return ret;
8631 };
8632} else if ( document.documentElement.currentStyle ) {
8633 getStyles = function( elem ) {
8634 return elem.currentStyle;
8635 };
8636
8637 curCSS = function( elem, name, _computed ) {
8638 var left, rs, rsLeft,
8639 computed = _computed || getStyles( elem ),
8640 ret = computed ? computed[ name ] : undefined,
8641 style = elem.style;
8642
8643 // Avoid setting ret to empty string here
8644 // so we don't default to auto
8645 if ( ret == null && style && style[ name ] ) {
8646 ret = style[ name ];
8647 }
8648
8649 // From the awesome hack by Dean Edwards
8650 // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
8651
8652 // If we're not dealing with a regular pixel number
8653 // but a number that has a weird ending, we need to convert it to pixels
8654 // but not position css attributes, as those are proportional to the parent element instead
8655 // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
8656 if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
8657
8658 // Remember the original values
8659 left = style.left;
8660 rs = elem.runtimeStyle;
8661 rsLeft = rs && rs.left;
8662
8663 // Put in the new values to get a computed value out
8664 if ( rsLeft ) {
8665 rs.left = elem.currentStyle.left;
8666 }
8667 style.left = name === "fontSize" ? "1em" : ret;
8668 ret = style.pixelLeft + "px";
8669
8670 // Revert the changed values
8671 style.left = left;
8672 if ( rsLeft ) {
8673 rs.left = rsLeft;
8674 }
8675 }
8676
8677 return ret === "" ? "auto" : ret;
8678 };
8679}
8680
8681function setPositiveNumber( elem, value, subtract ) {
8682 var matches = rnumsplit.exec( value );
8683 return matches ?
8684 // Guard against undefined "subtract", e.g., when used as in cssHooks
8685 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
8686 value;
8687}
8688
8689function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
8690 var i = extra === ( isBorderBox ? "border" : "content" ) ?
8691 // If we already have the right measurement, avoid augmentation
8692 4 :
8693 // Otherwise initialize for horizontal or vertical properties
8694 name === "width" ? 1 : 0,
8695
8696 val = 0;
8697
8698 for ( ; i < 4; i += 2 ) {
8699 // both box models exclude margin, so add it if we want it
8700 if ( extra === "margin" ) {
8701 val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
8702 }
8703
8704 if ( isBorderBox ) {
8705 // border-box includes padding, so remove it if we want content
8706 if ( extra === "content" ) {
8707 val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
8708 }
8709
8710 // at this point, extra isn't border nor margin, so remove border
8711 if ( extra !== "margin" ) {
8712 val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
8713 }
8714 } else {
8715 // at this point, extra isn't content, so add padding
8716 val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
8717
8718 // at this point, extra isn't content nor padding, so add border
8719 if ( extra !== "padding" ) {
8720 val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
8721 }
8722 }
8723 }
8724
8725 return val;
8726}
8727
8728function getWidthOrHeight( elem, name, extra ) {
8729
8730 // Start with offset property, which is equivalent to the border-box value
8731 var valueIsBorderBox = true,
8732 val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
8733 styles = getStyles( elem ),
8734 isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
8735
8736 // some non-html elements return undefined for offsetWidth, so check for null/undefined
8737 // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
8738 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
8739 if ( val <= 0 || val == null ) {
8740 // Fall back to computed then uncomputed css if necessary
8741 val = curCSS( elem, name, styles );
8742 if ( val < 0 || val == null ) {
8743 val = elem.style[ name ];
8744 }
8745
8746 // Computed unit is not pixels. Stop here and return.
8747 if ( rnumnonpx.test(val) ) {
8748 return val;
8749 }
8750
8751 // we need the check for style in case a browser which returns unreliable values
8752 // for getComputedStyle silently falls back to the reliable elem.style
8753 valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
8754
8755 // Normalize "", auto, and prepare for extra
8756 val = parseFloat( val ) || 0;
8757 }
8758
8759 // use the active box-sizing model to add/subtract irrelevant styles
8760 return ( val +
8761 augmentWidthOrHeight(
8762 elem,
8763 name,
8764 extra || ( isBorderBox ? "border" : "content" ),
8765 valueIsBorderBox,
8766 styles
8767 )
8768 ) + "px";
8769}
8770
8771// Try to determine the default display value of an element
8772function css_defaultDisplay( nodeName ) {
8773 var doc = document,
8774 display = elemdisplay[ nodeName ];
8775
8776 if ( !display ) {
8777 display = actualDisplay( nodeName, doc );
8778
8779 // If the simple way fails, read from inside an iframe
8780 if ( display === "none" || !display ) {
8781 // Use the already-created iframe if possible
8782 iframe = ( iframe ||
8783 jQuery("<iframe frameborder='0' width='0' height='0'/>")
8784 .css( "cssText", "display:block !important" )
8785 ).appendTo( doc.documentElement );
8786
8787 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
8788 doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
8789 doc.write("<!doctype html><html><body>");
8790 doc.close();
8791
8792 display = actualDisplay( nodeName, doc );
8793 iframe.detach();
8794 }
8795
8796 // Store the correct default display
8797 elemdisplay[ nodeName ] = display;
8798 }
8799
8800 return display;
8801}
8802
8803// Called ONLY from within css_defaultDisplay
8804function actualDisplay( name, doc ) {
8805 var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
8806 display = jQuery.css( elem[0], "display" );
8807 elem.remove();
8808 return display;
8809}
8810
8811jQuery.each([ "height", "width" ], function( i, name ) {
8812 jQuery.cssHooks[ name ] = {
8813 get: function( elem, computed, extra ) {
8814 if ( computed ) {
8815 // certain elements can have dimension info if we invisibly show them
8816 // however, it must have a current display style that would benefit from this
8817 return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
8818 jQuery.swap( elem, cssShow, function() {
8819 return getWidthOrHeight( elem, name, extra );
8820 }) :
8821 getWidthOrHeight( elem, name, extra );
8822 }
8823 },
8824
8825 set: function( elem, value, extra ) {
8826 var styles = extra && getStyles( elem );
8827 return setPositiveNumber( elem, value, extra ?
8828 augmentWidthOrHeight(
8829 elem,
8830 name,
8831 extra,
8832 jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
8833 styles
8834 ) : 0
8835 );
8836 }
8837 };
8838});
8839
8840if ( !jQuery.support.opacity ) {
8841 jQuery.cssHooks.opacity = {
8842 get: function( elem, computed ) {
8843 // IE uses filters for opacity
8844 return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
8845 ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
8846 computed ? "1" : "";
8847 },
8848
8849 set: function( elem, value ) {
8850 var style = elem.style,
8851 currentStyle = elem.currentStyle,
8852 opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
8853 filter = currentStyle && currentStyle.filter || style.filter || "";
8854
8855 // IE has trouble with opacity if it does not have layout
8856 // Force it by setting the zoom level
8857 style.zoom = 1;
8858
8859 // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
8860 // if value === "", then remove inline opacity #12685
8861 if ( ( value >= 1 || value === "" ) &&
8862 jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
8863 style.removeAttribute ) {
8864
8865 // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
8866 // if "filter:" is present at all, clearType is disabled, we want to avoid this
8867 // style.removeAttribute is IE Only, but so apparently is this code path...
8868 style.removeAttribute( "filter" );
8869
8870 // if there is no filter style applied in a css rule or unset inline opacity, we are done
8871 if ( value === "" || currentStyle && !currentStyle.filter ) {
8872 return;
8873 }
8874 }
8875
8876 // otherwise, set new filter values
8877 style.filter = ralpha.test( filter ) ?
8878 filter.replace( ralpha, opacity ) :
8879 filter + " " + opacity;
8880 }
8881 };
8882}
8883
8884// These hooks cannot be added until DOM ready because the support test
8885// for it is not run until after DOM ready
8886jQuery(function() {
8887 if ( !jQuery.support.reliableMarginRight ) {
8888 jQuery.cssHooks.marginRight = {
8889 get: function( elem, computed ) {
8890 if ( computed ) {
8891 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
8892 // Work around by temporarily setting element display to inline-block
8893 return jQuery.swap( elem, { "display": "inline-block" },
8894 curCSS, [ elem, "marginRight" ] );
8895 }
8896 }
8897 };
8898 }
8899
8900 // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
8901 // getComputedStyle returns percent when specified for top/left/bottom/right
8902 // rather than make the css module depend on the offset module, we just check for it here
8903 if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
8904 jQuery.each( [ "top", "left" ], function( i, prop ) {
8905 jQuery.cssHooks[ prop ] = {
8906 get: function( elem, computed ) {
8907 if ( computed ) {
8908 computed = curCSS( elem, prop );
8909 // if curCSS returns percentage, fallback to offset
8910 return rnumnonpx.test( computed ) ?
8911 jQuery( elem ).position()[ prop ] + "px" :
8912 computed;
8913 }
8914 }
8915 };
8916 });
8917 }
8918
8919});
8920
8921if ( jQuery.expr && jQuery.expr.filters ) {
8922 jQuery.expr.filters.hidden = function( elem ) {
8923 // Support: Opera <= 12.12
8924 // Opera reports offsetWidths and offsetHeights less than zero on some elements
8925 return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
8926 (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
8927 };
8928
8929 jQuery.expr.filters.visible = function( elem ) {
8930 return !jQuery.expr.filters.hidden( elem );
8931 };
8932}
8933
8934// These hooks are used by animate to expand properties
8935jQuery.each({
8936 margin: "",
8937 padding: "",
8938 border: "Width"
8939}, function( prefix, suffix ) {
8940 jQuery.cssHooks[ prefix + suffix ] = {
8941 expand: function( value ) {
8942 var i = 0,
8943 expanded = {},
8944
8945 // assumes a single number if not a string
8946 parts = typeof value === "string" ? value.split(" ") : [ value ];
8947
8948 for ( ; i < 4; i++ ) {
8949 expanded[ prefix + cssExpand[ i ] + suffix ] =
8950 parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
8951 }
8952
8953 return expanded;
8954 }
8955 };
8956
8957 if ( !rmargin.test( prefix ) ) {
8958 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
8959 }
8960});
8961var r20 = /%20/g,
8962 rbracket = /\[\]$/,
8963 rCRLF = /\r?\n/g,
8964 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
8965 rsubmittable = /^(?:input|select|textarea|keygen)/i;
8966
8967jQuery.fn.extend({
8968 serialize: function() {
8969 return jQuery.param( this.serializeArray() );
8970 },
8971 serializeArray: function() {
8972 return this.map(function(){
8973 // Can add propHook for "elements" to filter or add form elements
8974 var elements = jQuery.prop( this, "elements" );
8975 return elements ? jQuery.makeArray( elements ) : this;
8976 })
8977 .filter(function(){
8978 var type = this.type;
8979 // Use .is(":disabled") so that fieldset[disabled] works
8980 return this.name && !jQuery( this ).is( ":disabled" ) &&
8981 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
8982 ( this.checked || !manipulation_rcheckableType.test( type ) );
8983 })
8984 .map(function( i, elem ){
8985 var val = jQuery( this ).val();
8986
8987 return val == null ?
8988 null :
8989 jQuery.isArray( val ) ?
8990 jQuery.map( val, function( val ){
8991 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
8992 }) :
8993 { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
8994 }).get();
8995 }
8996});
8997
8998//Serialize an array of form elements or a set of
8999//key/values into a query string
9000jQuery.param = function( a, traditional ) {
9001 var prefix,
9002 s = [],
9003 add = function( key, value ) {
9004 // If value is a function, invoke it and return its value
9005 value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
9006 s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
9007 };
9008
9009 // Set traditional to true for jQuery <= 1.3.2 behavior.
9010 if ( traditional === undefined ) {
9011 traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
9012 }
9013
9014 // If an array was passed in, assume that it is an array of form elements.
9015 if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
9016 // Serialize the form elements
9017 jQuery.each( a, function() {
9018 add( this.name, this.value );
9019 });
9020
9021 } else {
9022 // If traditional, encode the "old" way (the way 1.3.2 or older
9023 // did it), otherwise encode params recursively.
9024 for ( prefix in a ) {
9025 buildParams( prefix, a[ prefix ], traditional, add );
9026 }
9027 }
9028
9029 // Return the resulting serialization
9030 return s.join( "&" ).replace( r20, "+" );
9031};
9032
9033function buildParams( prefix, obj, traditional, add ) {
9034 var name;
9035
9036 if ( jQuery.isArray( obj ) ) {
9037 // Serialize array item.
9038 jQuery.each( obj, function( i, v ) {
9039 if ( traditional || rbracket.test( prefix ) ) {
9040 // Treat each array item as a scalar.
9041 add( prefix, v );
9042
9043 } else {
9044 // Item is non-scalar (array or object), encode its numeric index.
9045 buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
9046 }
9047 });
9048
9049 } else if ( !traditional && jQuery.type( obj ) === "object" ) {
9050 // Serialize object item.
9051 for ( name in obj ) {
9052 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
9053 }
9054
9055 } else {
9056 // Serialize scalar item.
9057 add( prefix, obj );
9058 }
9059}
9060jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
9061 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
9062 "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
9063
9064 // Handle event binding
9065 jQuery.fn[ name ] = function( data, fn ) {
9066 return arguments.length > 0 ?
9067 this.on( name, null, data, fn ) :
9068 this.trigger( name );
9069 };
9070});
9071
9072jQuery.fn.extend({
9073 hover: function( fnOver, fnOut ) {
9074 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
9075 },
9076
9077 bind: function( types, data, fn ) {
9078 return this.on( types, null, data, fn );
9079 },
9080 unbind: function( types, fn ) {
9081 return this.off( types, null, fn );
9082 },
9083
9084 delegate: function( selector, types, data, fn ) {
9085 return this.on( types, selector, data, fn );
9086 },
9087 undelegate: function( selector, types, fn ) {
9088 // ( namespace ) or ( selector, types [, fn] )
9089 return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
9090 }
9091});
9092var
9093 // Document location
9094 ajaxLocParts,
9095 ajaxLocation,
9096 ajax_nonce = jQuery.now(),
9097
9098 ajax_rquery = /\?/,
9099 rhash = /#.*$/,
9100 rts = /([?&])_=[^&]*/,
9101 rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
9102 // #7653, #8125, #8152: local protocol detection
9103 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
9104 rnoContent = /^(?:GET|HEAD)$/,
9105 rprotocol = /^\/\//,
9106 rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
9107
9108 // Keep a copy of the old load method
9109 _load = jQuery.fn.load,
9110
9111 /* Prefilters
9112 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
9113 * 2) These are called:
9114 * - BEFORE asking for a transport
9115 * - AFTER param serialization (s.data is a string if s.processData is true)
9116 * 3) key is the dataType
9117 * 4) the catchall symbol "*" can be used
9118 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
9119 */
9120 prefilters = {},
9121
9122 /* Transports bindings
9123 * 1) key is the dataType
9124 * 2) the catchall symbol "*" can be used
9125 * 3) selection will start with transport dataType and THEN go to "*" if needed
9126 */
9127 transports = {},
9128
9129 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
9130 allTypes = "*/".concat("*");
9131
9132// #8138, IE may throw an exception when accessing
9133// a field from window.location if document.domain has been set
9134try {
9135 ajaxLocation = location.href;
9136} catch( e ) {
9137 // Use the href attribute of an A element
9138 // since IE will modify it given document.location
9139 ajaxLocation = document.createElement( "a" );
9140 ajaxLocation.href = "";
9141 ajaxLocation = ajaxLocation.href;
9142}
9143
9144// Segment location into parts
9145ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
9146
9147// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
9148function addToPrefiltersOrTransports( structure ) {
9149
9150 // dataTypeExpression is optional and defaults to "*"
9151 return function( dataTypeExpression, func ) {
9152
9153 if ( typeof dataTypeExpression !== "string" ) {
9154 func = dataTypeExpression;
9155 dataTypeExpression = "*";
9156 }
9157
9158 var dataType,
9159 i = 0,
9160 dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
9161
9162 if ( jQuery.isFunction( func ) ) {
9163 // For each dataType in the dataTypeExpression
9164 while ( (dataType = dataTypes[i++]) ) {
9165 // Prepend if requested
9166 if ( dataType[0] === "+" ) {
9167 dataType = dataType.slice( 1 ) || "*";
9168 (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
9169
9170 // Otherwise append
9171 } else {
9172 (structure[ dataType ] = structure[ dataType ] || []).push( func );
9173 }
9174 }
9175 }
9176 };
9177}
9178
9179// Base inspection function for prefilters and transports
9180function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
9181
9182 var inspected = {},
9183 seekingTransport = ( structure === transports );
9184
9185 function inspect( dataType ) {
9186 var selected;
9187 inspected[ dataType ] = true;
9188 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
9189 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
9190 if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
9191 options.dataTypes.unshift( dataTypeOrTransport );
9192 inspect( dataTypeOrTransport );
9193 return false;
9194 } else if ( seekingTransport ) {
9195 return !( selected = dataTypeOrTransport );
9196 }
9197 });
9198 return selected;
9199 }
9200
9201 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
9202}
9203
9204// A special extend for ajax options
9205// that takes "flat" options (not to be deep extended)
9206// Fixes #9887
9207function ajaxExtend( target, src ) {
9208 var deep, key,
9209 flatOptions = jQuery.ajaxSettings.flatOptions || {};
9210
9211 for ( key in src ) {
9212 if ( src[ key ] !== undefined ) {
9213 ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
9214 }
9215 }
9216 if ( deep ) {
9217 jQuery.extend( true, target, deep );
9218 }
9219
9220 return target;
9221}
9222
9223jQuery.fn.load = function( url, params, callback ) {
9224 if ( typeof url !== "string" && _load ) {
9225 return _load.apply( this, arguments );
9226 }
9227
9228 var selector, response, type,
9229 self = this,
9230 off = url.indexOf(" ");
9231
9232 if ( off >= 0 ) {
9233 selector = url.slice( off, url.length );
9234 url = url.slice( 0, off );
9235 }
9236
9237 // If it's a function
9238 if ( jQuery.isFunction( params ) ) {
9239
9240 // We assume that it's the callback
9241 callback = params;
9242 params = undefined;
9243
9244 // Otherwise, build a param string
9245 } else if ( params && typeof params === "object" ) {
9246 type = "POST";
9247 }
9248
9249 // If we have elements to modify, make the request
9250 if ( self.length > 0 ) {
9251 jQuery.ajax({
9252 url: url,
9253
9254 // if "type" variable is undefined, then "GET" method will be used
9255 type: type,
9256 dataType: "html",
9257 data: params
9258 }).done(function( responseText ) {
9259
9260 // Save response for use in complete callback
9261 response = arguments;
9262
9263 self.html( selector ?
9264
9265 // If a selector was specified, locate the right elements in a dummy div
9266 // Exclude scripts to avoid IE 'Permission Denied' errors
9267 jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
9268
9269 // Otherwise use the full result
9270 responseText );
9271
9272 }).complete( callback && function( jqXHR, status ) {
9273 self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
9274 });
9275 }
9276
9277 return this;
9278};
9279
9280// Attach a bunch of functions for handling common AJAX events
9281jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
9282 jQuery.fn[ type ] = function( fn ){
9283 return this.on( type, fn );
9284 };
9285});
9286
9287jQuery.extend({
9288
9289 // Counter for holding the number of active queries
9290 active: 0,
9291
9292 // Last-Modified header cache for next request
9293 lastModified: {},
9294 etag: {},
9295
9296 ajaxSettings: {
9297 url: ajaxLocation,
9298 type: "GET",
9299 isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
9300 global: true,
9301 processData: true,
9302 async: true,
9303 contentType: "application/x-www-form-urlencoded; charset=UTF-8",
9304 /*
9305 timeout: 0,
9306 data: null,
9307 dataType: null,
9308 username: null,
9309 password: null,
9310 cache: null,
9311 throws: false,
9312 traditional: false,
9313 headers: {},
9314 */
9315
9316 accepts: {
9317 "*": allTypes,
9318 text: "text/plain",
9319 html: "text/html",
9320 xml: "application/xml, text/xml",
9321 json: "application/json, text/javascript"
9322 },
9323
9324 contents: {
9325 xml: /xml/,
9326 html: /html/,
9327 json: /json/
9328 },
9329
9330 responseFields: {
9331 xml: "responseXML",
9332 text: "responseText",
9333 json: "responseJSON"
9334 },
9335
9336 // Data converters
9337 // Keys separate source (or catchall "*") and destination types with a single space
9338 converters: {
9339
9340 // Convert anything to text
9341 "* text": String,
9342
9343 // Text to html (true = no transformation)
9344 "text html": true,
9345
9346 // Evaluate text as a json expression
9347 "text json": jQuery.parseJSON,
9348
9349 // Parse text as xml
9350 "text xml": jQuery.parseXML
9351 },
9352
9353 // For options that shouldn't be deep extended:
9354 // you can add your own custom options here if
9355 // and when you create one that shouldn't be
9356 // deep extended (see ajaxExtend)
9357 flatOptions: {
9358 url: true,
9359 context: true
9360 }
9361 },
9362
9363 // Creates a full fledged settings object into target
9364 // with both ajaxSettings and settings fields.
9365 // If target is omitted, writes into ajaxSettings.
9366 ajaxSetup: function( target, settings ) {
9367 return settings ?
9368
9369 // Building a settings object
9370 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
9371
9372 // Extending ajaxSettings
9373 ajaxExtend( jQuery.ajaxSettings, target );
9374 },
9375
9376 ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
9377 ajaxTransport: addToPrefiltersOrTransports( transports ),
9378
9379 // Main method
9380 ajax: function( url, options ) {
9381
9382 // If url is an object, simulate pre-1.5 signature
9383 if ( typeof url === "object" ) {
9384 options = url;
9385 url = undefined;
9386 }
9387
9388 // Force options to be an object
9389 options = options || {};
9390
9391 var // Cross-domain detection vars
9392 parts,
9393 // Loop variable
9394 i,
9395 // URL without anti-cache param
9396 cacheURL,
9397 // Response headers as string
9398 responseHeadersString,
9399 // timeout handle
9400 timeoutTimer,
9401
9402 // To know if global events are to be dispatched
9403 fireGlobals,
9404
9405 transport,
9406 // Response headers
9407 responseHeaders,
9408 // Create the final options object
9409 s = jQuery.ajaxSetup( {}, options ),
9410 // Callbacks context
9411 callbackContext = s.context || s,
9412 // Context for global events is callbackContext if it is a DOM node or jQuery collection
9413 globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
9414 jQuery( callbackContext ) :
9415 jQuery.event,
9416 // Deferreds
9417 deferred = jQuery.Deferred(),
9418 completeDeferred = jQuery.Callbacks("once memory"),
9419 // Status-dependent callbacks
9420 statusCode = s.statusCode || {},
9421 // Headers (they are sent all at once)
9422 requestHeaders = {},
9423 requestHeadersNames = {},
9424 // The jqXHR state
9425 state = 0,
9426 // Default abort message
9427 strAbort = "canceled",
9428 // Fake xhr
9429 jqXHR = {
9430 readyState: 0,
9431
9432 // Builds headers hashtable if needed
9433 getResponseHeader: function( key ) {
9434 var match;
9435 if ( state === 2 ) {
9436 if ( !responseHeaders ) {
9437 responseHeaders = {};
9438 while ( (match = rheaders.exec( responseHeadersString )) ) {
9439 responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
9440 }
9441 }
9442 match = responseHeaders[ key.toLowerCase() ];
9443 }
9444 return match == null ? null : match;
9445 },
9446
9447 // Raw string
9448 getAllResponseHeaders: function() {
9449 return state === 2 ? responseHeadersString : null;
9450 },
9451
9452 // Caches the header
9453 setRequestHeader: function( name, value ) {
9454 var lname = name.toLowerCase();
9455 if ( !state ) {
9456 name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
9457 requestHeaders[ name ] = value;
9458 }
9459 return this;
9460 },
9461
9462 // Overrides response content-type header
9463 overrideMimeType: function( type ) {
9464 if ( !state ) {
9465 s.mimeType = type;
9466 }
9467 return this;
9468 },
9469
9470 // Status-dependent callbacks
9471 statusCode: function( map ) {
9472 var code;
9473 if ( map ) {
9474 if ( state < 2 ) {
9475 for ( code in map ) {
9476 // Lazy-add the new callback in a way that preserves old ones
9477 statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
9478 }
9479 } else {
9480 // Execute the appropriate callbacks
9481 jqXHR.always( map[ jqXHR.status ] );
9482 }
9483 }
9484 return this;
9485 },
9486
9487 // Cancel the request
9488 abort: function( statusText ) {
9489 var finalText = statusText || strAbort;
9490 if ( transport ) {
9491 transport.abort( finalText );
9492 }
9493 done( 0, finalText );
9494 return this;
9495 }
9496 };
9497
9498 // Attach deferreds
9499 deferred.promise( jqXHR ).complete = completeDeferred.add;
9500 jqXHR.success = jqXHR.done;
9501 jqXHR.error = jqXHR.fail;
9502
9503 // Remove hash character (#7531: and string promotion)
9504 // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
9505 // Handle falsy url in the settings object (#10093: consistency with old signature)
9506 // We also use the url parameter if available
9507 s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
9508
9509 // Alias method option to type as per ticket #12004
9510 s.type = options.method || options.type || s.method || s.type;
9511
9512 // Extract dataTypes list
9513 s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
9514
9515 // A cross-domain request is in order when we have a protocol:host:port mismatch
9516 if ( s.crossDomain == null ) {
9517 parts = rurl.exec( s.url.toLowerCase() );
9518 s.crossDomain = !!( parts &&
9519 ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
9520 ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
9521 ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
9522 );
9523 }
9524
9525 // Convert data if not already a string
9526 if ( s.data && s.processData && typeof s.data !== "string" ) {
9527 s.data = jQuery.param( s.data, s.traditional );
9528 }
9529
9530 // Apply prefilters
9531 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
9532
9533 // If request was aborted inside a prefilter, stop there
9534 if ( state === 2 ) {
9535 return jqXHR;
9536 }
9537
9538 // We can fire global events as of now if asked to
9539 fireGlobals = s.global;
9540
9541 // Watch for a new set of requests
9542 if ( fireGlobals && jQuery.active++ === 0 ) {
9543 jQuery.event.trigger("ajaxStart");
9544 }
9545
9546 // Uppercase the type
9547 s.type = s.type.toUpperCase();
9548
9549 // Determine if request has content
9550 s.hasContent = !rnoContent.test( s.type );
9551
9552 // Save the URL in case we're toying with the If-Modified-Since
9553 // and/or If-None-Match header later on
9554 cacheURL = s.url;
9555
9556 // More options handling for requests with no content
9557 if ( !s.hasContent ) {
9558
9559 // If data is available, append data to url
9560 if ( s.data ) {
9561 cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
9562 // #9682: remove data so that it's not used in an eventual retry
9563 delete s.data;
9564 }
9565
9566 // Add anti-cache in url if needed
9567 if ( s.cache === false ) {
9568 s.url = rts.test( cacheURL ) ?
9569
9570 // If there is already a '_' parameter, set its value
9571 cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
9572
9573 // Otherwise add one to the end
9574 cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
9575 }
9576 }
9577
9578 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9579 if ( s.ifModified ) {
9580 if ( jQuery.lastModified[ cacheURL ] ) {
9581 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
9582 }
9583 if ( jQuery.etag[ cacheURL ] ) {
9584 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
9585 }
9586 }
9587
9588 // Set the correct header, if data is being sent
9589 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
9590 jqXHR.setRequestHeader( "Content-Type", s.contentType );
9591 }
9592
9593 // Set the Accepts header for the server, depending on the dataType
9594 jqXHR.setRequestHeader(
9595 "Accept",
9596 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
9597 s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
9598 s.accepts[ "*" ]
9599 );
9600
9601 // Check for headers option
9602 for ( i in s.headers ) {
9603 jqXHR.setRequestHeader( i, s.headers[ i ] );
9604 }
9605
9606 // Allow custom headers/mimetypes and early abort
9607 if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
9608 // Abort if not done already and return
9609 return jqXHR.abort();
9610 }
9611
9612 // aborting is no longer a cancellation
9613 strAbort = "abort";
9614
9615 // Install callbacks on deferreds
9616 for ( i in { success: 1, error: 1, complete: 1 } ) {
9617 jqXHR[ i ]( s[ i ] );
9618 }
9619
9620 // Get transport
9621 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
9622
9623 // If no transport, we auto-abort
9624 if ( !transport ) {
9625 done( -1, "No Transport" );
9626 } else {
9627 jqXHR.readyState = 1;
9628
9629 // Send global event
9630 if ( fireGlobals ) {
9631 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
9632 }
9633 // Timeout
9634 if ( s.async && s.timeout > 0 ) {
9635 timeoutTimer = setTimeout(function() {
9636 jqXHR.abort("timeout");
9637 }, s.timeout );
9638 }
9639
9640 try {
9641 state = 1;
9642 transport.send( requestHeaders, done );
9643 } catch ( e ) {
9644 // Propagate exception as error if not done
9645 if ( state < 2 ) {
9646 done( -1, e );
9647 // Simply rethrow otherwise
9648 } else {
9649 throw e;
9650 }
9651 }
9652 }
9653
9654 // Callback for when everything is done
9655 function done( status, nativeStatusText, responses, headers ) {
9656 var isSuccess, success, error, response, modified,
9657 statusText = nativeStatusText;
9658
9659 // Called once
9660 if ( state === 2 ) {
9661 return;
9662 }
9663
9664 // State is "done" now
9665 state = 2;
9666
9667 // Clear timeout if it exists
9668 if ( timeoutTimer ) {
9669 clearTimeout( timeoutTimer );
9670 }
9671
9672 // Dereference transport for early garbage collection
9673 // (no matter how long the jqXHR object will be used)
9674 transport = undefined;
9675
9676 // Cache response headers
9677 responseHeadersString = headers || "";
9678
9679 // Set readyState
9680 jqXHR.readyState = status > 0 ? 4 : 0;
9681
9682 // Determine if successful
9683 isSuccess = status >= 200 && status < 300 || status === 304;
9684
9685 // Get response data
9686 if ( responses ) {
9687 response = ajaxHandleResponses( s, jqXHR, responses );
9688 }
9689
9690 // Convert no matter what (that way responseXXX fields are always set)
9691 response = ajaxConvert( s, response, jqXHR, isSuccess );
9692
9693 // If successful, handle type chaining
9694 if ( isSuccess ) {
9695
9696 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9697 if ( s.ifModified ) {
9698 modified = jqXHR.getResponseHeader("Last-Modified");
9699 if ( modified ) {
9700 jQuery.lastModified[ cacheURL ] = modified;
9701 }
9702 modified = jqXHR.getResponseHeader("etag");
9703 if ( modified ) {
9704 jQuery.etag[ cacheURL ] = modified;
9705 }
9706 }
9707
9708 // if no content
9709 if ( status === 204 || s.type === "HEAD" ) {
9710 statusText = "nocontent";
9711
9712 // if not modified
9713 } else if ( status === 304 ) {
9714 statusText = "notmodified";
9715
9716 // If we have data, let's convert it
9717 } else {
9718 statusText = response.state;
9719 success = response.data;
9720 error = response.error;
9721 isSuccess = !error;
9722 }
9723 } else {
9724 // We extract error from statusText
9725 // then normalize statusText and status for non-aborts
9726 error = statusText;
9727 if ( status || !statusText ) {
9728 statusText = "error";
9729 if ( status < 0 ) {
9730 status = 0;
9731 }
9732 }
9733 }
9734
9735 // Set data for the fake xhr object
9736 jqXHR.status = status;
9737 jqXHR.statusText = ( nativeStatusText || statusText ) + "";
9738
9739 // Success/Error
9740 if ( isSuccess ) {
9741 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
9742 } else {
9743 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
9744 }
9745
9746 // Status-dependent callbacks
9747 jqXHR.statusCode( statusCode );
9748 statusCode = undefined;
9749
9750 if ( fireGlobals ) {
9751 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
9752 [ jqXHR, s, isSuccess ? success : error ] );
9753 }
9754
9755 // Complete
9756 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
9757
9758 if ( fireGlobals ) {
9759 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
9760 // Handle the global AJAX counter
9761 if ( !( --jQuery.active ) ) {
9762 jQuery.event.trigger("ajaxStop");
9763 }
9764 }
9765 }
9766
9767 return jqXHR;
9768 },
9769
9770 getJSON: function( url, data, callback ) {
9771 return jQuery.get( url, data, callback, "json" );
9772 },
9773
9774 getScript: function( url, callback ) {
9775 return jQuery.get( url, undefined, callback, "script" );
9776 }
9777});
9778
9779jQuery.each( [ "get", "post" ], function( i, method ) {
9780 jQuery[ method ] = function( url, data, callback, type ) {
9781 // shift arguments if data argument was omitted
9782 if ( jQuery.isFunction( data ) ) {
9783 type = type || callback;
9784 callback = data;
9785 data = undefined;
9786 }
9787
9788 return jQuery.ajax({
9789 url: url,
9790 type: method,
9791 dataType: type,
9792 data: data,
9793 success: callback
9794 });
9795 };
9796});
9797
9798/* Handles responses to an ajax request:
9799 * - finds the right dataType (mediates between content-type and expected dataType)
9800 * - returns the corresponding response
9801 */
9802function ajaxHandleResponses( s, jqXHR, responses ) {
9803 var firstDataType, ct, finalDataType, type,
9804 contents = s.contents,
9805 dataTypes = s.dataTypes;
9806
9807 // Remove auto dataType and get content-type in the process
9808 while( dataTypes[ 0 ] === "*" ) {
9809 dataTypes.shift();
9810 if ( ct === undefined ) {
9811 ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
9812 }
9813 }
9814
9815 // Check if we're dealing with a known content-type
9816 if ( ct ) {
9817 for ( type in contents ) {
9818 if ( contents[ type ] && contents[ type ].test( ct ) ) {
9819 dataTypes.unshift( type );
9820 break;
9821 }
9822 }
9823 }
9824
9825 // Check to see if we have a response for the expected dataType
9826 if ( dataTypes[ 0 ] in responses ) {
9827 finalDataType = dataTypes[ 0 ];
9828 } else {
9829 // Try convertible dataTypes
9830 for ( type in responses ) {
9831 if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
9832 finalDataType = type;
9833 break;
9834 }
9835 if ( !firstDataType ) {
9836 firstDataType = type;
9837 }
9838 }
9839 // Or just use first one
9840 finalDataType = finalDataType || firstDataType;
9841 }
9842
9843 // If we found a dataType
9844 // We add the dataType to the list if needed
9845 // and return the corresponding response
9846 if ( finalDataType ) {
9847 if ( finalDataType !== dataTypes[ 0 ] ) {
9848 dataTypes.unshift( finalDataType );
9849 }
9850 return responses[ finalDataType ];
9851 }
9852}
9853
9854/* Chain conversions given the request and the original response
9855 * Also sets the responseXXX fields on the jqXHR instance
9856 */
9857function ajaxConvert( s, response, jqXHR, isSuccess ) {
9858 var conv2, current, conv, tmp, prev,
9859 converters = {},
9860 // Work with a copy of dataTypes in case we need to modify it for conversion
9861 dataTypes = s.dataTypes.slice();
9862
9863 // Create converters map with lowercased keys
9864 if ( dataTypes[ 1 ] ) {
9865 for ( conv in s.converters ) {
9866 converters[ conv.toLowerCase() ] = s.converters[ conv ];
9867 }
9868 }
9869
9870 current = dataTypes.shift();
9871
9872 // Convert to each sequential dataType
9873 while ( current ) {
9874
9875 if ( s.responseFields[ current ] ) {
9876 jqXHR[ s.responseFields[ current ] ] = response;
9877 }
9878
9879 // Apply the dataFilter if provided
9880 if ( !prev && isSuccess && s.dataFilter ) {
9881 response = s.dataFilter( response, s.dataType );
9882 }
9883
9884 prev = current;
9885 current = dataTypes.shift();
9886
9887 if ( current ) {
9888
9889 // There's only work to do if current dataType is non-auto
9890 if ( current === "*" ) {
9891
9892 current = prev;
9893
9894 // Convert response if prev dataType is non-auto and differs from current
9895 } else if ( prev !== "*" && prev !== current ) {
9896
9897 // Seek a direct converter
9898 conv = converters[ prev + " " + current ] || converters[ "* " + current ];
9899
9900 // If none found, seek a pair
9901 if ( !conv ) {
9902 for ( conv2 in converters ) {
9903
9904 // If conv2 outputs current
9905 tmp = conv2.split( " " );
9906 if ( tmp[ 1 ] === current ) {
9907
9908 // If prev can be converted to accepted input
9909 conv = converters[ prev + " " + tmp[ 0 ] ] ||
9910 converters[ "* " + tmp[ 0 ] ];
9911 if ( conv ) {
9912 // Condense equivalence converters
9913 if ( conv === true ) {
9914 conv = converters[ conv2 ];
9915
9916 // Otherwise, insert the intermediate dataType
9917 } else if ( converters[ conv2 ] !== true ) {
9918 current = tmp[ 0 ];
9919 dataTypes.unshift( tmp[ 1 ] );
9920 }
9921 break;
9922 }
9923 }
9924 }
9925 }
9926
9927 // Apply converter (if not an equivalence)
9928 if ( conv !== true ) {
9929
9930 // Unless errors are allowed to bubble, catch and return them
9931 if ( conv && s[ "throws" ] ) {
9932 response = conv( response );
9933 } else {
9934 try {
9935 response = conv( response );
9936 } catch ( e ) {
9937 return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
9938 }
9939 }
9940 }
9941 }
9942 }
9943 }
9944
9945 return { state: "success", data: response };
9946}
9947// Install script dataType
9948jQuery.ajaxSetup({
9949 accepts: {
9950 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
9951 },
9952 contents: {
9953 script: /(?:java|ecma)script/
9954 },
9955 converters: {
9956 "text script": function( text ) {
9957 jQuery.globalEval( text );
9958 return text;
9959 }
9960 }
9961});
9962
9963// Handle cache's special case and global
9964jQuery.ajaxPrefilter( "script", function( s ) {
9965 if ( s.cache === undefined ) {
9966 s.cache = false;
9967 }
9968 if ( s.crossDomain ) {
9969 s.type = "GET";
9970 s.global = false;
9971 }
9972});
9973
9974// Bind script tag hack transport
9975jQuery.ajaxTransport( "script", function(s) {
9976
9977 // This transport only deals with cross domain requests
9978 if ( s.crossDomain ) {
9979
9980 var script,
9981 head = document.head || jQuery("head")[0] || document.documentElement;
9982
9983 return {
9984
9985 send: function( _, callback ) {
9986
9987 script = document.createElement("script");
9988
9989 script.async = true;
9990
9991 if ( s.scriptCharset ) {
9992 script.charset = s.scriptCharset;
9993 }
9994
9995 script.src = s.url;
9996
9997 // Attach handlers for all browsers
9998 script.onload = script.onreadystatechange = function( _, isAbort ) {
9999
10000 if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
10001
10002 // Handle memory leak in IE
10003 script.onload = script.onreadystatechange = null;
10004
10005 // Remove the script
10006 if ( script.parentNode ) {
10007 script.parentNode.removeChild( script );
10008 }
10009
10010 // Dereference the script
10011 script = null;
10012
10013 // Callback if not abort
10014 if ( !isAbort ) {
10015 callback( 200, "success" );
10016 }
10017 }
10018 };
10019
10020 // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
10021 // Use native DOM manipulation to avoid our domManip AJAX trickery
10022 head.insertBefore( script, head.firstChild );
10023 },
10024
10025 abort: function() {
10026 if ( script ) {
10027 script.onload( undefined, true );
10028 }
10029 }
10030 };
10031 }
10032});
10033var oldCallbacks = [],
10034 rjsonp = /(=)\?(?=&|$)|\?\?/;
10035
10036// Default jsonp settings
10037jQuery.ajaxSetup({
10038 jsonp: "callback",
10039 jsonpCallback: function() {
10040 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
10041 this[ callback ] = true;
10042 return callback;
10043 }
10044});
10045
10046// Detect, normalize options and install callbacks for jsonp requests
10047jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
10048
10049 var callbackName, overwritten, responseContainer,
10050 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
10051 "url" :
10052 typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
10053 );
10054
10055 // Handle iff the expected data type is "jsonp" or we have a parameter to set
10056 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
10057
10058 // Get callback name, remembering preexisting value associated with it
10059 callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
10060 s.jsonpCallback() :
10061 s.jsonpCallback;
10062
10063 // Insert callback into url or form data
10064 if ( jsonProp ) {
10065 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
10066 } else if ( s.jsonp !== false ) {
10067 s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
10068 }
10069
10070 // Use data converter to retrieve json after script execution
10071 s.converters["script json"] = function() {
10072 if ( !responseContainer ) {
10073 jQuery.error( callbackName + " was not called" );
10074 }
10075 return responseContainer[ 0 ];
10076 };
10077
10078 // force json dataType
10079 s.dataTypes[ 0 ] = "json";
10080
10081 // Install callback
10082 overwritten = window[ callbackName ];
10083 window[ callbackName ] = function() {
10084 responseContainer = arguments;
10085 };
10086
10087 // Clean-up function (fires after converters)
10088 jqXHR.always(function() {
10089 // Restore preexisting value
10090 window[ callbackName ] = overwritten;
10091
10092 // Save back as free
10093 if ( s[ callbackName ] ) {
10094 // make sure that re-using the options doesn't screw things around
10095 s.jsonpCallback = originalSettings.jsonpCallback;
10096
10097 // save the callback name for future use
10098 oldCallbacks.push( callbackName );
10099 }
10100
10101 // Call if it was a function and we have a response
10102 if ( responseContainer && jQuery.isFunction( overwritten ) ) {
10103 overwritten( responseContainer[ 0 ] );
10104 }
10105
10106 responseContainer = overwritten = undefined;
10107 });
10108
10109 // Delegate to script
10110 return "script";
10111 }
10112});
10113var xhrCallbacks, xhrSupported,
10114 xhrId = 0,
10115 // #5280: Internet Explorer will keep connections alive if we don't abort on unload
10116 xhrOnUnloadAbort = window.ActiveXObject && function() {
10117 // Abort all pending requests
10118 var key;
10119 for ( key in xhrCallbacks ) {
10120 xhrCallbacks[ key ]( undefined, true );
10121 }
10122 };
10123
10124// Functions to create xhrs
10125function createStandardXHR() {
10126 try {
10127 return new window.XMLHttpRequest();
10128 } catch( e ) {}
10129}
10130
10131function createActiveXHR() {
10132 try {
10133 return new window.ActiveXObject("Microsoft.XMLHTTP");
10134 } catch( e ) {}
10135}
10136
10137// Create the request object
10138// (This is still attached to ajaxSettings for backward compatibility)
10139jQuery.ajaxSettings.xhr = window.ActiveXObject ?
10140 /* Microsoft failed to properly
10141 * implement the XMLHttpRequest in IE7 (can't request local files),
10142 * so we use the ActiveXObject when it is available
10143 * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
10144 * we need a fallback.
10145 */
10146 function() {
10147 return !this.isLocal && createStandardXHR() || createActiveXHR();
10148 } :
10149 // For all other browsers, use the standard XMLHttpRequest object
10150 createStandardXHR;
10151
10152// Determine support properties
10153xhrSupported = jQuery.ajaxSettings.xhr();
10154jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
10155xhrSupported = jQuery.support.ajax = !!xhrSupported;
10156
10157// Create transport if the browser can provide an xhr
10158if ( xhrSupported ) {
10159
10160 jQuery.ajaxTransport(function( s ) {
10161 // Cross domain only allowed if supported through XMLHttpRequest
10162 if ( !s.crossDomain || jQuery.support.cors ) {
10163
10164 var callback;
10165
10166 return {
10167 send: function( headers, complete ) {
10168
10169 // Get a new xhr
10170 var handle, i,
10171 xhr = s.xhr();
10172
10173 // Open the socket
10174 // Passing null username, generates a login popup on Opera (#2865)
10175 if ( s.username ) {
10176 xhr.open( s.type, s.url, s.async, s.username, s.password );
10177 } else {
10178 xhr.open( s.type, s.url, s.async );
10179 }
10180
10181 // Apply custom fields if provided
10182 if ( s.xhrFields ) {
10183 for ( i in s.xhrFields ) {
10184 xhr[ i ] = s.xhrFields[ i ];
10185 }
10186 }
10187
10188 // Override mime type if needed
10189 if ( s.mimeType && xhr.overrideMimeType ) {
10190 xhr.overrideMimeType( s.mimeType );
10191 }
10192
10193 // X-Requested-With header
10194 // For cross-domain requests, seeing as conditions for a preflight are
10195 // akin to a jigsaw puzzle, we simply never set it to be sure.
10196 // (it can always be set on a per-request basis or even using ajaxSetup)
10197 // For same-domain requests, won't change header if already provided.
10198 if ( !s.crossDomain && !headers["X-Requested-With"] ) {
10199 headers["X-Requested-With"] = "XMLHttpRequest";
10200 }
10201
10202 // Need an extra try/catch for cross domain requests in Firefox 3
10203 try {
10204 for ( i in headers ) {
10205 xhr.setRequestHeader( i, headers[ i ] );
10206 }
10207 } catch( err ) {}
10208
10209 // Do send the request
10210 // This may raise an exception which is actually
10211 // handled in jQuery.ajax (so no try/catch here)
10212 xhr.send( ( s.hasContent && s.data ) || null );
10213
10214 // Listener
10215 callback = function( _, isAbort ) {
10216 var status, responseHeaders, statusText, responses;
10217
10218 // Firefox throws exceptions when accessing properties
10219 // of an xhr when a network error occurred
10220 // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
10221 try {
10222
10223 // Was never called and is aborted or complete
10224 if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
10225
10226 // Only called once
10227 callback = undefined;
10228
10229 // Do not keep as active anymore
10230 if ( handle ) {
10231 xhr.onreadystatechange = jQuery.noop;
10232 if ( xhrOnUnloadAbort ) {
10233 delete xhrCallbacks[ handle ];
10234 }
10235 }
10236
10237 // If it's an abort
10238 if ( isAbort ) {
10239 // Abort it manually if needed
10240 if ( xhr.readyState !== 4 ) {
10241 xhr.abort();
10242 }
10243 } else {
10244 responses = {};
10245 status = xhr.status;
10246 responseHeaders = xhr.getAllResponseHeaders();
10247
10248 // When requesting binary data, IE6-9 will throw an exception
10249 // on any attempt to access responseText (#11426)
10250 if ( typeof xhr.responseText === "string" ) {
10251 responses.text = xhr.responseText;
10252 }
10253
10254 // Firefox throws an exception when accessing
10255 // statusText for faulty cross-domain requests
10256 try {
10257 statusText = xhr.statusText;
10258 } catch( e ) {
10259 // We normalize with Webkit giving an empty statusText
10260 statusText = "";
10261 }
10262
10263 // Filter status for non standard behaviors
10264
10265 // If the request is local and we have data: assume a success
10266 // (success with no data won't get notified, that's the best we
10267 // can do given current implementations)
10268 if ( !status && s.isLocal && !s.crossDomain ) {
10269 status = responses.text ? 200 : 404;
10270 // IE - #1450: sometimes returns 1223 when it should be 204
10271 } else if ( status === 1223 ) {
10272 status = 204;
10273 }
10274 }
10275 }
10276 } catch( firefoxAccessException ) {
10277 if ( !isAbort ) {
10278 complete( -1, firefoxAccessException );
10279 }
10280 }
10281
10282 // Call complete if needed
10283 if ( responses ) {
10284 complete( status, statusText, responses, responseHeaders );
10285 }
10286 };
10287
10288 if ( !s.async ) {
10289 // if we're in sync mode we fire the callback
10290 callback();
10291 } else if ( xhr.readyState === 4 ) {
10292 // (IE6 & IE7) if it's in cache and has been
10293 // retrieved directly we need to fire the callback
10294 setTimeout( callback );
10295 } else {
10296 handle = ++xhrId;
10297 if ( xhrOnUnloadAbort ) {
10298 // Create the active xhrs callbacks list if needed
10299 // and attach the unload handler
10300 if ( !xhrCallbacks ) {
10301 xhrCallbacks = {};
10302 jQuery( window ).unload( xhrOnUnloadAbort );
10303 }
10304 // Add to list of active xhrs callbacks
10305 xhrCallbacks[ handle ] = callback;
10306 }
10307 xhr.onreadystatechange = callback;
10308 }
10309 },
10310
10311 abort: function() {
10312 if ( callback ) {
10313 callback( undefined, true );
10314 }
10315 }
10316 };
10317 }
10318 });
10319}
10320var fxNow, timerId,
10321 rfxtypes = /^(?:toggle|show|hide)$/,
10322 rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
10323 rrun = /queueHooks$/,
10324 animationPrefilters = [ defaultPrefilter ],
10325 tweeners = {
10326 "*": [function( prop, value ) {
10327 var tween = this.createTween( prop, value ),
10328 target = tween.cur(),
10329 parts = rfxnum.exec( value ),
10330 unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
10331
10332 // Starting value computation is required for potential unit mismatches
10333 start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
10334 rfxnum.exec( jQuery.css( tween.elem, prop ) ),
10335 scale = 1,
10336 maxIterations = 20;
10337
10338 if ( start && start[ 3 ] !== unit ) {
10339 // Trust units reported by jQuery.css
10340 unit = unit || start[ 3 ];
10341
10342 // Make sure we update the tween properties later on
10343 parts = parts || [];
10344
10345 // Iteratively approximate from a nonzero starting point
10346 start = +target || 1;
10347
10348 do {
10349 // If previous iteration zeroed out, double until we get *something*
10350 // Use a string for doubling factor so we don't accidentally see scale as unchanged below
10351 scale = scale || ".5";
10352
10353 // Adjust and apply
10354 start = start / scale;
10355 jQuery.style( tween.elem, prop, start + unit );
10356
10357 // Update scale, tolerating zero or NaN from tween.cur()
10358 // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
10359 } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
10360 }
10361
10362 // Update tween properties
10363 if ( parts ) {
10364 start = tween.start = +start || +target || 0;
10365 tween.unit = unit;
10366 // If a +=/-= token was provided, we're doing a relative animation
10367 tween.end = parts[ 1 ] ?
10368 start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
10369 +parts[ 2 ];
10370 }
10371
10372 return tween;
10373 }]
10374 };
10375
10376// Animations created synchronously will run synchronously
10377function createFxNow() {
10378 setTimeout(function() {
10379 fxNow = undefined;
10380 });
10381 return ( fxNow = jQuery.now() );
10382}
10383
10384function createTween( value, prop, animation ) {
10385 var tween,
10386 collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
10387 index = 0,
10388 length = collection.length;
10389 for ( ; index < length; index++ ) {
10390 if ( (tween = collection[ index ].call( animation, prop, value )) ) {
10391
10392 // we're done with this property
10393 return tween;
10394 }
10395 }
10396}
10397
10398function Animation( elem, properties, options ) {
10399 var result,
10400 stopped,
10401 index = 0,
10402 length = animationPrefilters.length,
10403 deferred = jQuery.Deferred().always( function() {
10404 // don't match elem in the :animated selector
10405 delete tick.elem;
10406 }),
10407 tick = function() {
10408 if ( stopped ) {
10409 return false;
10410 }
10411 var currentTime = fxNow || createFxNow(),
10412 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
10413 // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
10414 temp = remaining / animation.duration || 0,
10415 percent = 1 - temp,
10416 index = 0,
10417 length = animation.tweens.length;
10418
10419 for ( ; index < length ; index++ ) {
10420 animation.tweens[ index ].run( percent );
10421 }
10422
10423 deferred.notifyWith( elem, [ animation, percent, remaining ]);
10424
10425 if ( percent < 1 && length ) {
10426 return remaining;
10427 } else {
10428 deferred.resolveWith( elem, [ animation ] );
10429 return false;
10430 }
10431 },
10432 animation = deferred.promise({
10433 elem: elem,
10434 props: jQuery.extend( {}, properties ),
10435 opts: jQuery.extend( true, { specialEasing: {} }, options ),
10436 originalProperties: properties,
10437 originalOptions: options,
10438 startTime: fxNow || createFxNow(),
10439 duration: options.duration,
10440 tweens: [],
10441 createTween: function( prop, end ) {
10442 var tween = jQuery.Tween( elem, animation.opts, prop, end,
10443 animation.opts.specialEasing[ prop ] || animation.opts.easing );
10444 animation.tweens.push( tween );
10445 return tween;
10446 },
10447 stop: function( gotoEnd ) {
10448 var index = 0,
10449 // if we are going to the end, we want to run all the tweens
10450 // otherwise we skip this part
10451 length = gotoEnd ? animation.tweens.length : 0;
10452 if ( stopped ) {
10453 return this;
10454 }
10455 stopped = true;
10456 for ( ; index < length ; index++ ) {
10457 animation.tweens[ index ].run( 1 );
10458 }
10459
10460 // resolve when we played the last frame
10461 // otherwise, reject
10462 if ( gotoEnd ) {
10463 deferred.resolveWith( elem, [ animation, gotoEnd ] );
10464 } else {
10465 deferred.rejectWith( elem, [ animation, gotoEnd ] );
10466 }
10467 return this;
10468 }
10469 }),
10470 props = animation.props;
10471
10472 propFilter( props, animation.opts.specialEasing );
10473
10474 for ( ; index < length ; index++ ) {
10475 result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
10476 if ( result ) {
10477 return result;
10478 }
10479 }
10480
10481 jQuery.map( props, createTween, animation );
10482
10483 if ( jQuery.isFunction( animation.opts.start ) ) {
10484 animation.opts.start.call( elem, animation );
10485 }
10486
10487 jQuery.fx.timer(
10488 jQuery.extend( tick, {
10489 elem: elem,
10490 anim: animation,
10491 queue: animation.opts.queue
10492 })
10493 );
10494
10495 // attach callbacks from options
10496 return animation.progress( animation.opts.progress )
10497 .done( animation.opts.done, animation.opts.complete )
10498 .fail( animation.opts.fail )
10499 .always( animation.opts.always );
10500}
10501
10502function propFilter( props, specialEasing ) {
10503 var index, name, easing, value, hooks;
10504
10505 // camelCase, specialEasing and expand cssHook pass
10506 for ( index in props ) {
10507 name = jQuery.camelCase( index );
10508 easing = specialEasing[ name ];
10509 value = props[ index ];
10510 if ( jQuery.isArray( value ) ) {
10511 easing = value[ 1 ];
10512 value = props[ index ] = value[ 0 ];
10513 }
10514
10515 if ( index !== name ) {
10516 props[ name ] = value;
10517 delete props[ index ];
10518 }
10519
10520 hooks = jQuery.cssHooks[ name ];
10521 if ( hooks && "expand" in hooks ) {
10522 value = hooks.expand( value );
10523 delete props[ name ];
10524
10525 // not quite $.extend, this wont overwrite keys already present.
10526 // also - reusing 'index' from above because we have the correct "name"
10527 for ( index in value ) {
10528 if ( !( index in props ) ) {
10529 props[ index ] = value[ index ];
10530 specialEasing[ index ] = easing;
10531 }
10532 }
10533 } else {
10534 specialEasing[ name ] = easing;
10535 }
10536 }
10537}
10538
10539jQuery.Animation = jQuery.extend( Animation, {
10540
10541 tweener: function( props, callback ) {
10542 if ( jQuery.isFunction( props ) ) {
10543 callback = props;
10544 props = [ "*" ];
10545 } else {
10546 props = props.split(" ");
10547 }
10548
10549 var prop,
10550 index = 0,
10551 length = props.length;
10552
10553 for ( ; index < length ; index++ ) {
10554 prop = props[ index ];
10555 tweeners[ prop ] = tweeners[ prop ] || [];
10556 tweeners[ prop ].unshift( callback );
10557 }
10558 },
10559
10560 prefilter: function( callback, prepend ) {
10561 if ( prepend ) {
10562 animationPrefilters.unshift( callback );
10563 } else {
10564 animationPrefilters.push( callback );
10565 }
10566 }
10567});
10568
10569function defaultPrefilter( elem, props, opts ) {
10570 /* jshint validthis: true */
10571 var prop, value, toggle, tween, hooks, oldfire,
10572 anim = this,
10573 orig = {},
10574 style = elem.style,
10575 hidden = elem.nodeType && isHidden( elem ),
10576 dataShow = jQuery._data( elem, "fxshow" );
10577
10578 // handle queue: false promises
10579 if ( !opts.queue ) {
10580 hooks = jQuery._queueHooks( elem, "fx" );
10581 if ( hooks.unqueued == null ) {
10582 hooks.unqueued = 0;
10583 oldfire = hooks.empty.fire;
10584 hooks.empty.fire = function() {
10585 if ( !hooks.unqueued ) {
10586 oldfire();
10587 }
10588 };
10589 }
10590 hooks.unqueued++;
10591
10592 anim.always(function() {
10593 // doing this makes sure that the complete handler will be called
10594 // before this completes
10595 anim.always(function() {
10596 hooks.unqueued--;
10597 if ( !jQuery.queue( elem, "fx" ).length ) {
10598 hooks.empty.fire();
10599 }
10600 });
10601 });
10602 }
10603
10604 // height/width overflow pass
10605 if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
10606 // Make sure that nothing sneaks out
10607 // Record all 3 overflow attributes because IE does not
10608 // change the overflow attribute when overflowX and
10609 // overflowY are set to the same value
10610 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
10611
10612 // Set display property to inline-block for height/width
10613 // animations on inline elements that are having width/height animated
10614 if ( jQuery.css( elem, "display" ) === "inline" &&
10615 jQuery.css( elem, "float" ) === "none" ) {
10616
10617 // inline-level elements accept inline-block;
10618 // block-level elements need to be inline with layout
10619 if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
10620 style.display = "inline-block";
10621
10622 } else {
10623 style.zoom = 1;
10624 }
10625 }
10626 }
10627
10628 if ( opts.overflow ) {
10629 style.overflow = "hidden";
10630 if ( !jQuery.support.shrinkWrapBlocks ) {
10631 anim.always(function() {
10632 style.overflow = opts.overflow[ 0 ];
10633 style.overflowX = opts.overflow[ 1 ];
10634 style.overflowY = opts.overflow[ 2 ];
10635 });
10636 }
10637 }
10638
10639
10640 // show/hide pass
10641 for ( prop in props ) {
10642 value = props[ prop ];
10643 if ( rfxtypes.exec( value ) ) {
10644 delete props[ prop ];
10645 toggle = toggle || value === "toggle";
10646 if ( value === ( hidden ? "hide" : "show" ) ) {
10647 continue;
10648 }
10649 orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
10650 }
10651 }
10652
10653 if ( !jQuery.isEmptyObject( orig ) ) {
10654 if ( dataShow ) {
10655 if ( "hidden" in dataShow ) {
10656 hidden = dataShow.hidden;
10657 }
10658 } else {
10659 dataShow = jQuery._data( elem, "fxshow", {} );
10660 }
10661
10662 // store state if its toggle - enables .stop().toggle() to "reverse"
10663 if ( toggle ) {
10664 dataShow.hidden = !hidden;
10665 }
10666 if ( hidden ) {
10667 jQuery( elem ).show();
10668 } else {
10669 anim.done(function() {
10670 jQuery( elem ).hide();
10671 });
10672 }
10673 anim.done(function() {
10674 var prop;
10675 jQuery._removeData( elem, "fxshow" );
10676 for ( prop in orig ) {
10677 jQuery.style( elem, prop, orig[ prop ] );
10678 }
10679 });
10680 for ( prop in orig ) {
10681 tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
10682
10683 if ( !( prop in dataShow ) ) {
10684 dataShow[ prop ] = tween.start;
10685 if ( hidden ) {
10686 tween.end = tween.start;
10687 tween.start = prop === "width" || prop === "height" ? 1 : 0;
10688 }
10689 }
10690 }
10691 }
10692}
10693
10694function Tween( elem, options, prop, end, easing ) {
10695 return new Tween.prototype.init( elem, options, prop, end, easing );
10696}
10697jQuery.Tween = Tween;
10698
10699Tween.prototype = {
10700 constructor: Tween,
10701 init: function( elem, options, prop, end, easing, unit ) {
10702 this.elem = elem;
10703 this.prop = prop;
10704 this.easing = easing || "swing";
10705 this.options = options;
10706 this.start = this.now = this.cur();
10707 this.end = end;
10708 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
10709 },
10710 cur: function() {
10711 var hooks = Tween.propHooks[ this.prop ];
10712
10713 return hooks && hooks.get ?
10714 hooks.get( this ) :
10715 Tween.propHooks._default.get( this );
10716 },
10717 run: function( percent ) {
10718 var eased,
10719 hooks = Tween.propHooks[ this.prop ];
10720
10721 if ( this.options.duration ) {
10722 this.pos = eased = jQuery.easing[ this.easing ](
10723 percent, this.options.duration * percent, 0, 1, this.options.duration
10724 );
10725 } else {
10726 this.pos = eased = percent;
10727 }
10728 this.now = ( this.end - this.start ) * eased + this.start;
10729
10730 if ( this.options.step ) {
10731 this.options.step.call( this.elem, this.now, this );
10732 }
10733
10734 if ( hooks && hooks.set ) {
10735 hooks.set( this );
10736 } else {
10737 Tween.propHooks._default.set( this );
10738 }
10739 return this;
10740 }
10741};
10742
10743Tween.prototype.init.prototype = Tween.prototype;
10744
10745Tween.propHooks = {
10746 _default: {
10747 get: function( tween ) {
10748 var result;
10749
10750 if ( tween.elem[ tween.prop ] != null &&
10751 (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
10752 return tween.elem[ tween.prop ];
10753 }
10754
10755 // passing an empty string as a 3rd parameter to .css will automatically
10756 // attempt a parseFloat and fallback to a string if the parse fails
10757 // so, simple values such as "10px" are parsed to Float.
10758 // complex values such as "rotate(1rad)" are returned as is.
10759 result = jQuery.css( tween.elem, tween.prop, "" );
10760 // Empty strings, null, undefined and "auto" are converted to 0.
10761 return !result || result === "auto" ? 0 : result;
10762 },
10763 set: function( tween ) {
10764 // use step hook for back compat - use cssHook if its there - use .style if its
10765 // available and use plain properties where available
10766 if ( jQuery.fx.step[ tween.prop ] ) {
10767 jQuery.fx.step[ tween.prop ]( tween );
10768 } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
10769 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
10770 } else {
10771 tween.elem[ tween.prop ] = tween.now;
10772 }
10773 }
10774 }
10775};
10776
10777// Support: IE <=9
10778// Panic based approach to setting things on disconnected nodes
10779
10780Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
10781 set: function( tween ) {
10782 if ( tween.elem.nodeType && tween.elem.parentNode ) {
10783 tween.elem[ tween.prop ] = tween.now;
10784 }
10785 }
10786};
10787
10788jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
10789 var cssFn = jQuery.fn[ name ];
10790 jQuery.fn[ name ] = function( speed, easing, callback ) {
10791 return speed == null || typeof speed === "boolean" ?
10792 cssFn.apply( this, arguments ) :
10793 this.animate( genFx( name, true ), speed, easing, callback );
10794 };
10795});
10796
10797jQuery.fn.extend({
10798 fadeTo: function( speed, to, easing, callback ) {
10799
10800 // show any hidden elements after setting opacity to 0
10801 return this.filter( isHidden ).css( "opacity", 0 ).show()
10802
10803 // animate to the value specified
10804 .end().animate({ opacity: to }, speed, easing, callback );
10805 },
10806 animate: function( prop, speed, easing, callback ) {
10807 var empty = jQuery.isEmptyObject( prop ),
10808 optall = jQuery.speed( speed, easing, callback ),
10809 doAnimation = function() {
10810 // Operate on a copy of prop so per-property easing won't be lost
10811 var anim = Animation( this, jQuery.extend( {}, prop ), optall );
10812
10813 // Empty animations, or finishing resolves immediately
10814 if ( empty || jQuery._data( this, "finish" ) ) {
10815 anim.stop( true );
10816 }
10817 };
10818 doAnimation.finish = doAnimation;
10819
10820 return empty || optall.queue === false ?
10821 this.each( doAnimation ) :
10822 this.queue( optall.queue, doAnimation );
10823 },
10824 stop: function( type, clearQueue, gotoEnd ) {
10825 var stopQueue = function( hooks ) {
10826 var stop = hooks.stop;
10827 delete hooks.stop;
10828 stop( gotoEnd );
10829 };
10830
10831 if ( typeof type !== "string" ) {
10832 gotoEnd = clearQueue;
10833 clearQueue = type;
10834 type = undefined;
10835 }
10836 if ( clearQueue && type !== false ) {
10837 this.queue( type || "fx", [] );
10838 }
10839
10840 return this.each(function() {
10841 var dequeue = true,
10842 index = type != null && type + "queueHooks",
10843 timers = jQuery.timers,
10844 data = jQuery._data( this );
10845
10846 if ( index ) {
10847 if ( data[ index ] && data[ index ].stop ) {
10848 stopQueue( data[ index ] );
10849 }
10850 } else {
10851 for ( index in data ) {
10852 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
10853 stopQueue( data[ index ] );
10854 }
10855 }
10856 }
10857
10858 for ( index = timers.length; index--; ) {
10859 if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
10860 timers[ index ].anim.stop( gotoEnd );
10861 dequeue = false;
10862 timers.splice( index, 1 );
10863 }
10864 }
10865
10866 // start the next in the queue if the last step wasn't forced
10867 // timers currently will call their complete callbacks, which will dequeue
10868 // but only if they were gotoEnd
10869 if ( dequeue || !gotoEnd ) {
10870 jQuery.dequeue( this, type );
10871 }
10872 });
10873 },
10874 finish: function( type ) {
10875 if ( type !== false ) {
10876 type = type || "fx";
10877 }
10878 return this.each(function() {
10879 var index,
10880 data = jQuery._data( this ),
10881 queue = data[ type + "queue" ],
10882 hooks = data[ type + "queueHooks" ],
10883 timers = jQuery.timers,
10884 length = queue ? queue.length : 0;
10885
10886 // enable finishing flag on private data
10887 data.finish = true;
10888
10889 // empty the queue first
10890 jQuery.queue( this, type, [] );
10891
10892 if ( hooks && hooks.stop ) {
10893 hooks.stop.call( this, true );
10894 }
10895
10896 // look for any active animations, and finish them
10897 for ( index = timers.length; index--; ) {
10898 if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
10899 timers[ index ].anim.stop( true );
10900 timers.splice( index, 1 );
10901 }
10902 }
10903
10904 // look for any animations in the old queue and finish them
10905 for ( index = 0; index < length; index++ ) {
10906 if ( queue[ index ] && queue[ index ].finish ) {
10907 queue[ index ].finish.call( this );
10908 }
10909 }
10910
10911 // turn off finishing flag
10912 delete data.finish;
10913 });
10914 }
10915});
10916
10917// Generate parameters to create a standard animation
10918function genFx( type, includeWidth ) {
10919 var which,
10920 attrs = { height: type },
10921 i = 0;
10922
10923 // if we include width, step value is 1 to do all cssExpand values,
10924 // if we don't include width, step value is 2 to skip over Left and Right
10925 includeWidth = includeWidth? 1 : 0;
10926 for( ; i < 4 ; i += 2 - includeWidth ) {
10927 which = cssExpand[ i ];
10928 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
10929 }
10930
10931 if ( includeWidth ) {
10932 attrs.opacity = attrs.width = type;
10933 }
10934
10935 return attrs;
10936}
10937
10938// Generate shortcuts for custom animations
10939jQuery.each({
10940 slideDown: genFx("show"),
10941 slideUp: genFx("hide"),
10942 slideToggle: genFx("toggle"),
10943 fadeIn: { opacity: "show" },
10944 fadeOut: { opacity: "hide" },
10945 fadeToggle: { opacity: "toggle" }
10946}, function( name, props ) {
10947 jQuery.fn[ name ] = function( speed, easing, callback ) {
10948 return this.animate( props, speed, easing, callback );
10949 };
10950});
10951
10952jQuery.speed = function( speed, easing, fn ) {
10953 var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
10954 complete: fn || !fn && easing ||
10955 jQuery.isFunction( speed ) && speed,
10956 duration: speed,
10957 easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
10958 };
10959
10960 opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
10961 opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
10962
10963 // normalize opt.queue - true/undefined/null -> "fx"
10964 if ( opt.queue == null || opt.queue === true ) {
10965 opt.queue = "fx";
10966 }
10967
10968 // Queueing
10969 opt.old = opt.complete;
10970
10971 opt.complete = function() {
10972 if ( jQuery.isFunction( opt.old ) ) {
10973 opt.old.call( this );
10974 }
10975
10976 if ( opt.queue ) {
10977 jQuery.dequeue( this, opt.queue );
10978 }
10979 };
10980
10981 return opt;
10982};
10983
10984jQuery.easing = {
10985 linear: function( p ) {
10986 return p;
10987 },
10988 swing: function( p ) {
10989 return 0.5 - Math.cos( p*Math.PI ) / 2;
10990 }
10991};
10992
10993jQuery.timers = [];
10994jQuery.fx = Tween.prototype.init;
10995jQuery.fx.tick = function() {
10996 var timer,
10997 timers = jQuery.timers,
10998 i = 0;
10999
11000 fxNow = jQuery.now();
11001
11002 for ( ; i < timers.length; i++ ) {
11003 timer = timers[ i ];
11004 // Checks the timer has not already been removed
11005 if ( !timer() && timers[ i ] === timer ) {
11006 timers.splice( i--, 1 );
11007 }
11008 }
11009
11010 if ( !timers.length ) {
11011 jQuery.fx.stop();
11012 }
11013 fxNow = undefined;
11014};
11015
11016jQuery.fx.timer = function( timer ) {
11017 if ( timer() && jQuery.timers.push( timer ) ) {
11018 jQuery.fx.start();
11019 }
11020};
11021
11022jQuery.fx.interval = 13;
11023
11024jQuery.fx.start = function() {
11025 if ( !timerId ) {
11026 timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
11027 }
11028};
11029
11030jQuery.fx.stop = function() {
11031 clearInterval( timerId );
11032 timerId = null;
11033};
11034
11035jQuery.fx.speeds = {
11036 slow: 600,
11037 fast: 200,
11038 // Default speed
11039 _default: 400
11040};
11041
11042// Back Compat <1.8 extension point
11043jQuery.fx.step = {};
11044
11045if ( jQuery.expr && jQuery.expr.filters ) {
11046 jQuery.expr.filters.animated = function( elem ) {
11047 return jQuery.grep(jQuery.timers, function( fn ) {
11048 return elem === fn.elem;
11049 }).length;
11050 };
11051}
11052jQuery.fn.offset = function( options ) {
11053 if ( arguments.length ) {
11054 return options === undefined ?
11055 this :
11056 this.each(function( i ) {
11057 jQuery.offset.setOffset( this, options, i );
11058 });
11059 }
11060
11061 var docElem, win,
11062 box = { top: 0, left: 0 },
11063 elem = this[ 0 ],
11064 doc = elem && elem.ownerDocument;
11065
11066 if ( !doc ) {
11067 return;
11068 }
11069
11070 docElem = doc.documentElement;
11071
11072 // Make sure it's not a disconnected DOM node
11073 if ( !jQuery.contains( docElem, elem ) ) {
11074 return box;
11075 }
11076
11077 // If we don't have gBCR, just use 0,0 rather than error
11078 // BlackBerry 5, iOS 3 (original iPhone)
11079 if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
11080 box = elem.getBoundingClientRect();
11081 }
11082 win = getWindow( doc );
11083 return {
11084 top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
11085 left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
11086 };
11087};
11088
11089jQuery.offset = {
11090
11091 setOffset: function( elem, options, i ) {
11092 var position = jQuery.css( elem, "position" );
11093
11094 // set position first, in-case top/left are set even on static elem
11095 if ( position === "static" ) {
11096 elem.style.position = "relative";
11097 }
11098
11099 var curElem = jQuery( elem ),
11100 curOffset = curElem.offset(),
11101 curCSSTop = jQuery.css( elem, "top" ),
11102 curCSSLeft = jQuery.css( elem, "left" ),
11103 calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
11104 props = {}, curPosition = {}, curTop, curLeft;
11105
11106 // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
11107 if ( calculatePosition ) {
11108 curPosition = curElem.position();
11109 curTop = curPosition.top;
11110 curLeft = curPosition.left;
11111 } else {
11112 curTop = parseFloat( curCSSTop ) || 0;
11113 curLeft = parseFloat( curCSSLeft ) || 0;
11114 }
11115
11116 if ( jQuery.isFunction( options ) ) {
11117 options = options.call( elem, i, curOffset );
11118 }
11119
11120 if ( options.top != null ) {
11121 props.top = ( options.top - curOffset.top ) + curTop;
11122 }
11123 if ( options.left != null ) {
11124 props.left = ( options.left - curOffset.left ) + curLeft;
11125 }
11126
11127 if ( "using" in options ) {
11128 options.using.call( elem, props );
11129 } else {
11130 curElem.css( props );
11131 }
11132 }
11133};
11134
11135
11136jQuery.fn.extend({
11137
11138 position: function() {
11139 if ( !this[ 0 ] ) {
11140 return;
11141 }
11142
11143 var offsetParent, offset,
11144 parentOffset = { top: 0, left: 0 },
11145 elem = this[ 0 ];
11146
11147 // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
11148 if ( jQuery.css( elem, "position" ) === "fixed" ) {
11149 // we assume that getBoundingClientRect is available when computed position is fixed
11150 offset = elem.getBoundingClientRect();
11151 } else {
11152 // Get *real* offsetParent
11153 offsetParent = this.offsetParent();
11154
11155 // Get correct offsets
11156 offset = this.offset();
11157 if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
11158 parentOffset = offsetParent.offset();
11159 }
11160
11161 // Add offsetParent borders
11162 parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
11163 parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
11164 }
11165
11166 // Subtract parent offsets and element margins
11167 // note: when an element has margin: auto the offsetLeft and marginLeft
11168 // are the same in Safari causing offset.left to incorrectly be 0
11169 return {
11170 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
11171 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
11172 };
11173 },
11174
11175 offsetParent: function() {
11176 return this.map(function() {
11177 var offsetParent = this.offsetParent || docElem;
11178 while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
11179 offsetParent = offsetParent.offsetParent;
11180 }
11181 return offsetParent || docElem;
11182 });
11183 }
11184});
11185
11186
11187// Create scrollLeft and scrollTop methods
11188jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
11189 var top = /Y/.test( prop );
11190
11191 jQuery.fn[ method ] = function( val ) {
11192 return jQuery.access( this, function( elem, method, val ) {
11193 var win = getWindow( elem );
11194
11195 if ( val === undefined ) {
11196 return win ? (prop in win) ? win[ prop ] :
11197 win.document.documentElement[ method ] :
11198 elem[ method ];
11199 }
11200
11201 if ( win ) {
11202 win.scrollTo(
11203 !top ? val : jQuery( win ).scrollLeft(),
11204 top ? val : jQuery( win ).scrollTop()
11205 );
11206
11207 } else {
11208 elem[ method ] = val;
11209 }
11210 }, method, val, arguments.length, null );
11211 };
11212});
11213
11214function getWindow( elem ) {
11215 return jQuery.isWindow( elem ) ?
11216 elem :
11217 elem.nodeType === 9 ?
11218 elem.defaultView || elem.parentWindow :
11219 false;
11220}
11221// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
11222jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
11223 jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
11224 // margin is only for outerHeight, outerWidth
11225 jQuery.fn[ funcName ] = function( margin, value ) {
11226 var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
11227 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
11228
11229 return jQuery.access( this, function( elem, type, value ) {
11230 var doc;
11231
11232 if ( jQuery.isWindow( elem ) ) {
11233 // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
11234 // isn't a whole lot we can do. See pull request at this URL for discussion:
11235 // https://github.com/jquery/jquery/pull/764
11236 return elem.document.documentElement[ "client" + name ];
11237 }
11238
11239 // Get document width or height
11240 if ( elem.nodeType === 9 ) {
11241 doc = elem.documentElement;
11242
11243 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
11244 // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
11245 return Math.max(
11246 elem.body[ "scroll" + name ], doc[ "scroll" + name ],
11247 elem.body[ "offset" + name ], doc[ "offset" + name ],
11248 doc[ "client" + name ]
11249 );
11250 }
11251
11252 return value === undefined ?
11253 // Get width or height on the element, requesting but not forcing parseFloat
11254 jQuery.css( elem, type, extra ) :
11255
11256 // Set width or height on the element
11257 jQuery.style( elem, type, value, extra );
11258 }, type, chainable ? margin : undefined, chainable, null );
11259 };
11260 });
11261});
11262// Limit scope pollution from any deprecated API
11263// (function() {
11264
11265// The number of elements contained in the matched element set
11266jQuery.fn.size = function() {
11267 return this.length;
11268};
11269
11270jQuery.fn.andSelf = jQuery.fn.addBack;
11271
11272// })();
11273if ( typeof module === "object" && module && typeof module.exports === "object" ) {
11274 // Expose jQuery as module.exports in loaders that implement the Node
11275 // module pattern (including browserify). Do not create the global, since
11276 // the user will be storing it themselves locally, and globals are frowned
11277 // upon in the Node module world.
11278 module.exports = jQuery;
11279} else {
11280 // Otherwise expose jQuery to the global object as usual
11281 window.jQuery = window.$ = jQuery;
11282
11283 // Register as a named AMD module, since jQuery can be concatenated with other
11284 // files that may use define, but not via a proper concatenation script that
11285 // understands anonymous AMD modules. A named AMD is safest and most robust
11286 // way to register. Lowercase jquery is used because AMD module names are
11287 // derived from file names, and jQuery is normally delivered in a lowercase
11288 // file name. Do this after creating the global so that if an AMD module wants
11289 // to call noConflict to hide this version of jQuery, it will work.
11290 if ( typeof define === "function" && define.amd ) {
11291 define( "jquery", [], function () { return jQuery; } );
11292 }
11293}
11294
11295})( window );
11296</script><p><g class="gr_ gr_7 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" id="7" data-gr-id="7"></g></p>
11297<!-- Start of Snow Effect -->
11298<script src="http://files.enjin.com/207770/snow.js"></script>
11299<!-- End of Snow Effect -->
11300<script src="js/modernizr.custom.js"></script>
11301<div class="container">
11302<div class="social"><a href="https://twitter.com/d7craft"><i class="fa fa-twitter"></i></a> <!-- Link To WoK Twitter --> <a href="https://www.youtube.com/user/d7craft"><i class="fa fa-youtube"></i></a> <!-- Link To website' YouTube --> <a href="https://www.facebook.com//?fref=ts"><i class="fa fa-facebook"></i></a> <!-- Link To WoK Facebook -->
11303<p class="copyright">Coded By D7craft <br />Copyright © 2017 <g class="gr_ gr_8 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" id="8" data-gr-id="8"></g> </p>
11304<div class="navEasterEgg"><g class="gr_ gr_9 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" id="9" data-gr-id="9"></g></div>
11305<!-- Copyright Message --></div>
11306<div class="logo"></div>
11307<div class="main clearfix">
11308<div id="menu" class="nav">
11309<ul>
11310<li class="nav2"><a href="/pro-rp.com/forum/threads/66/#post-102"> <span>تØÙ…يل المود</span> </a></li>
11311<li class="nav3"><a href="/ts3server://5.135.202.105">TeamSpeak</a></li>
11312<li class="nav4"><a href="/forum"> <span>المنتدى</span> </a></li>
11313</ul>
11314</div>
11315<div class="sub clearfix">
11316<div id="menubg" class="navbg">
11317<ul>
11318<li>
11319<div class="navbgs2"></div>
11320</li>
11321<li>
11322<div class="navbgs3"></div>
11323</li>
11324<li>
11325<div class="navbgs4"></div>
11326</li>
11327</ul>
11328</div>
11329</div>
11330</div>
11331</div>
11332<div class="containerbg">
11333<div class="hoverbackground hoverbackground2"></div>
11334<div class="hoverbackground hoverbackground3"></div>
11335<div class="hoverbackground hoverbackground4"></div>
11336<div class="hoverbackground hoverbackgroundEasterEgg"></div>
11337
11338<!-- Start of Snow Effect -->
11339<div id="snowflakeContainer">
11340 <p class="snowflake">*</p>
11341</div>
11342<!-- End of Snow Effect -->
11343
11344<script>// <![CDATA[
11345 $(".nav2").hover(function(){ $(".navbgs2").toggleClass("navbgs2h"); $(".container").toggleClass("containerhover"); $(".hoverbackground2").toggleClass("hoverbackground2h"); }); $(".nav3").hover(function(){ $(".navbgs3").toggleClass("navbgs3h"); $(".container").toggleClass("containerhover"); $(".hoverbackground3").toggleClass("hoverbackground3h"); }); $(".nav4").hover(function(){ $(".navbgs4").toggleClass("navbgs4h"); $(".container").toggleClass("containerhover"); $(".hoverbackground4").toggleClass("hoverbackground4h"); }); $(".navEasterEgg").click(function(){ $(".container").toggleClass("containerhover"); $(".hoverbackgroundEasterEgg").toggleClass("hoverbackgroundEasterEggh"); });
11346// ]]></script>
11347<script>// <![CDATA[
11348 $(window).resize(function() { $('html, body').animate({ scrollTop: $(document).height() }, 0); return false; });
11349// ]]></script>
11350</div>
11351<script type="text/javascript" src="https://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js"></script>
11352<script>// <![CDATA[
11353 $(function(){ $(document).click(function() { if ($(".s_popup-canvas-separator").length){ $("body").css("overflow","hidden"); $(".s_popup-canvas-separator").css("width","100%"); } if (!$(".s_popup-canvas-separator").length){ $("body").css("overflow","auto"); } } ); }); $(document).bind("DOMNodeInserted",function(){ if ($(".s_popup-canvas-separator").length){ $("body").css("overflow","hidden"); $(".s_popup-canvas-separator").css("width","100%"); } }); $(document).bind("DOMNodeRemoved",function(){ if (!$(".s_popup-canvas-separator").length){ $("body").css("overflow","auto"); } });
11354// ]]></script></div></div>
11355
11356
11357 <div class="fixed_height_elem container_spacer last">
11358 <div class="left"><!-- --></div>
11359 <div class="right"><!-- --></div>
11360 <div class="middle"><!-- --></div>
11361 </div>
11362 <div class='clearing'><!-- --></div>
11363 </div><!-- .section -->
11364 </td>
11365 <td class="section-border"><div class="decorator-box"></div></td>
11366 </tr>
11367</table><!-- .section-collection -->
11368</div><!-- -->
11369 <div class="fixed_height_elem"><table class="section-collection"><tr class="top">
11370 <td class="section-border"><div class="decorator-box"></div></td>
11371 <td id="section-footer"
11372 class="section-holder section-width-large"
11373 style=""
11374 data-width="1030"
11375 >
11376 <div class="section"> <div class=" container_spacer last">
11377 <div class="left"><!-- --></div>
11378 <div class="right"><!-- --></div>
11379 <div class="middle"><!-- --></div>
11380 </div>
11381 <div class='clearing'><!-- --></div>
11382 </div><!-- .section -->
11383 </td>
11384 <td class="section-border"><div class="decorator-box"></div></td>
11385 </tr>
11386</table><!-- .section-collection -->
11387</div><!-- -->
11388
11389
11390 </div><!-- #site-body -->
11391
11392 <div class="fixed_height_elem" id="page-footer">
11393 <div class="left">
11394 <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/"><img alt="Creative Commons License" style="border-width:0;" src="http://i.creativecommons.org/l/by-nc-nd/3.0/80x15.png"></a> </div>
11395 </div>
11396
11397 </div><!-- #page-wrap -->
11398</div><!-- #page -->
11399
11400
11401
11402
11403
11404</div></div>
11405
11406
11407
11408
11409
11410
11411
11412<script type="text/javascript">
11413$(document).ready(function() {
11414 $('#enjin-tray-chatchannels').addClass('announcements');
11415
11416 Enjin_Core.Announcements.init([{"announcement_id":"48622","site_id":"207770","title":"Happy Holidays!","announcement":"\n<div class=\"bbcode_center\" style=\"text-align:center\">\n<span style=\"font-size:18px\"><b><span style=\"color:#dd9323\">Happy New Years to everyone from all of us here at WoK! Hope you guys are enjoying the start of this new year and to celebrate we are having a sale! 40% off kredits from Jan 1 -15th.<br \/>\n<br \/>\nThank you to all who have supported us thru all these years and continue to this day. We've had our ups and downs but no doubt in this 2017 year we will continue working hard to provide you the best that we can.<br \/>\nHappy New Year, one and all, and thank you once again.<br \/>\n\u2764 \u2764 \u2764 <\/span><\/b><\/span>\n<\/div>\n","type":"popup","animation":"disabled","ack_btn_text":"I Agree","starts":"now","starts_date":"0","starts_days":"0","ends":"delete","ends_date":"0","ends_days":"0","allow_specific_users":"","on_pages":"all","specific_pages":"","repeat":"0","repeat_unit":"days","repeat_value":"1","repeat_week_days":"0000000","send_notification":"0","order":"0","hidden":"0","_time_viewed_":null}]);
11417 Enjin_Core.Reminders.init([]);
11418});
11419</script>
11420<div id="site-announcements">
11421 <a href="#">
11422 <i class="icon-warning-sign icon"></i>
11423 <span class="ann-tray-text"><span class="amount"></span> <span class="singular">Notice</span><span class="plural">Notices</span></span>
11424 </a>
11425 <div class="site-announcement">
11426 <div class="title-bar">
11427 <div class="title ann-title"></div>
11428 <div class="close-wrapper"><a href="#" onclick="Enjin_Core.Announcements.close(true);return false;"><div class="close"></div></a></div>
11429 </div>
11430 <div class="content"></div>
11431
11432 <div class="nav-bar nav-bar-bottom">
11433 <div class="nav">
11434 <div class="announcements-nav">
11435 <div class="element_button" onclick="Enjin_Core.Announcements.prev();return false;">
11436 <div class="l"><!-- --></div>
11437 <div class="r"><!-- --></div>
11438 <input type="button" value="Prev" onclick="">
11439 </div>
11440 <div class="element_button" onclick="Enjin_Core.Announcements.next();return false;">
11441 <div class="l"><!-- --></div>
11442 <div class="r"><!-- --></div>
11443 <input type="button" value="Next" onclick="">
11444 </div>
11445 <div class="title title-bottom">Announcement <span class="index"></span> of <span class="total"></span></div>
11446 </div>
11447
11448 <div class="element_button btn-delete-ann">
11449 <div class="l"><!-- --></div>
11450 <div class="r"><!-- --></div>
11451 <input type="button" value="Delete Announcement" />
11452 </div>
11453 <div class="element_button btn-agree-terms">
11454 <div class="l"><!-- --></div>
11455 <div class="r"><!-- --></div>
11456 <input type="button" value="I Agree to the Terms" />
11457 </div>
11458
11459 </div>
11460 </div>
11461 </div>
11462 <div class="border"></div>
11463</div>
11464
11465
11466<div id="announcement-popup" class="element_popup element_popup_core element_popup_window warning-issued-popup" style="z-index: 20000; display: none;">
11467 <div class="inner window-frame">
11468 <div class="popup_window_title">
11469 <span class="title-text"></span>
11470 <div class="close-wrapper btn-delete-ann-x">
11471 <a href="#"><div class="close"></div></a>
11472 </div>
11473 </div>
11474 <div class="content">
11475 <div class="announcement-text">
11476
11477 </div>
11478 <div class="controls">
11479 <div class="element_button prev"><div class="l"><!-- --></div><div class="r"><!-- --></div><input type="button" value="Prev" onclick=""></div>
11480 <div class="element_button next"><div class="l"><!-- --></div><div class="r"><!-- --></div><input type="button" value="Next" onclick=""></div>
11481
11482 <div class="title title-bottom"><span class="index">1</span> of <span class="total">4</span> Announcement</div>
11483
11484 <div class="element_button btn-delete-ann"><div class="l"><!-- --></div><div class="r"><!-- --></div><input type="button" value="Delete Announcement"></div>
11485 <div class="element_button btn-agree"><div class="l"><!-- --></div><div class="r"><!-- --></div><input type="button" value=""></div>
11486 </div>
11487 </div>
11488 </div>
11489</div>
11490<div class="announcement-canvas-separator" style="z-index: 19999;height: 100% !important; display: none;"> </div>
11491<!-- 0.068s -->
11492<!-- pusher part -->
11493
11494
11495<script src="https://www.google.com/recaptcha/api.js" async defer></script><script type="text/javascript">var recaptcha_publickey = "6Le3_AUTAAAAALjgZgjXxE1mU9KxrYl_g9mWmNSd";</script><script type="text/javascript">var recaptcha_token = "jOo-pnrHzjsIqxlH-g3G8w1jHfNU2lys_rVxUwHv9R3IgoQ8v9CbXHVhpsYVZG6e7YwAbUtSchhv5wJFPEeWUoX9MQ9k04FeN3UjmBGjHjM";</script>
11496<!-- Start Quantcast tag -->
11497<script type="text/javascript">
11498_qoptions={
11499qacct:"p-e2f9QTuI7ynec"
11500};
11501</script>
11502<script type="text/javascript" src="http://edge.quantserve.com/quant.js" async defer></script>
11503<noscript>
11504<img src="http://pixel.quantserve.com/pixel/p-e2f9QTuI7ynec.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
11505</noscript>
11506<!-- End Quantcast tag -->
11507
11508
11509
11510<div id="fb-root"></div><script type="text/javascript">
11511 //<!--
11512 (function(d, s, id) {
11513 var js, fjs = d.getElementsByTagName(s)[0];
11514 if (d.getElementById(id)) return;
11515 js = d.createElement(s); js.id = id;
11516 js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
11517 js.async = true;
11518 fjs.parentNode.insertBefore(js, fjs);
11519 }(document, 'script', 'facebook-jssdk'));
11520 //-->
11521</script>
11522<script type="text/javascript">
11523 //<!--
11524 (function() {
11525 var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
11526 po.src = 'https://apis.google.com/js/plusone.js';
11527 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
11528 })();
11529 //-->
11530</script>
11531<script type="text/javascript">
11532 //<!--
11533 !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); //-->
11534</script><!-- web6.enjin.com -->
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544<script type="text/javascript" src="http://enjin.host/201701160642/platform/react.js"></script>
11545
11546<script type="text/javascript">
11547//<![CDATA[
11548(function() {
11549var _analytics_scr = document.createElement('script');
11550_analytics_scr.type = 'text/javascript'; _analytics_scr.async = true; _analytics_scr.src = '/_Incapsula_Resource?SWJIYLWA=2977d8d74f63d7f8fedbea018b7a1d05&ns=1';
11551var _analytics_elem = document.getElementsByTagName('script')[0]; _analytics_elem.parentNode.insertBefore(_analytics_scr, _analytics_elem);
11552})();
11553// ]]>
11554</script></body>
11555
11556</html></div> </div>
11557 </div><!-- module_content -->
11558
11559
11560
11561 </div><!-- .module --> </td>
11562 </tr>
11563 </table>
11564 </div><!-- .container_content -->
11565 </div><!-- .container_body -->
11566
11567 <div class="fixed_height_elem container_footer">
11568 <div class="left"><!-- --></div>
11569 <div class="right"><!-- --></div>
11570 </div>
11571
11572 </div><!-- .container -->
11573
11574
11575
11576 <div class="fixed_height_elem container_spacer last">
11577 <div class="left"><!-- --></div>
11578 <div class="right"><!-- --></div>
11579 <div class="middle"><!-- --></div>
11580 </div>
11581 <div class='clearing'><!-- --></div>
11582 </div><!-- .section -->
11583 </td>
11584 <td class="section-border"><div class="decorator-box"></div></td>
11585 </tr>
11586</table><!-- .section-collection -->
11587</div><!-- -->
11588 <div class="fixed_height_elem"><table class="section-collection"><tr class="top">
11589 <td class="section-border"><div class="decorator-box"></div></td>
11590 <td id="section-footer"
11591 class="section-holder section-width-large"
11592 style=""
11593 data-width="1030"
11594 >
11595 <div class="section"> <div class=" container_spacer last">
11596 <div class="left"><!-- --></div>
11597 <div class="right"><!-- --></div>
11598 <div class="middle"><!-- --></div>
11599 </div>
11600 <div class='clearing'><!-- --></div>
11601 </div><!-- .section -->
11602 </td>
11603 <td class="section-border"><div class="decorator-box"></div></td>
11604 </tr>
11605</table><!-- .section-collection -->
11606</div><!-- -->
11607
11608
11609 </div><!-- #page-wrap -->
11610</div><!-- #page -->
11611
11612
11613
11614
11615
11616</div></div>
11617
11618
11619
11620
11621
11622
11623
11624<script type="text/javascript">
11625$(document).ready(function() {
11626
11627 Enjin_Core.Announcements.init([]);
11628 Enjin_Core.Reminders.init([]);
11629});
11630</script>
11631<div id="site-announcements">
11632 <a href="#">
11633 <i class="icon-warning-sign icon"></i>
11634 <span class="ann-tray-text"><span class="amount"></span> <span class="singular">Notice</span><span class="plural">Notices</span></span>
11635 </a>
11636 <div class="site-announcement">
11637 <div class="title-bar">
11638 <div class="title ann-title"></div>
11639 <div class="close-wrapper"><a href="#" onclick="Enjin_Core.Announcements.close(true);return false;"><div class="close"></div></a></div>
11640 </div>
11641 <div class="content"></div>
11642
11643 <div class="nav-bar nav-bar-bottom">
11644 <div class="nav">
11645 <div class="announcements-nav">
11646 <div class="element_button" onclick="Enjin_Core.Announcements.prev();return false;">
11647 <div class="l"><!-- --></div>
11648 <div class="r"><!-- --></div>
11649 <input type="button" value="Prev" onclick="">
11650 </div>
11651 <div class="element_button" onclick="Enjin_Core.Announcements.next();return false;">
11652 <div class="l"><!-- --></div>
11653 <div class="r"><!-- --></div>
11654 <input type="button" value="Next" onclick="">
11655 </div>
11656 <div class="title title-bottom">Announcement <span class="index"></span> of <span class="total"></span></div>
11657 </div>
11658
11659 <div class="element_button btn-delete-ann">
11660 <div class="l"><!-- --></div>
11661 <div class="r"><!-- --></div>
11662 <input type="button" value="Delete Announcement" />
11663 </div>
11664 <div class="element_button btn-agree-terms">
11665 <div class="l"><!-- --></div>
11666 <div class="r"><!-- --></div>
11667 <input type="button" value="I Agree to the Terms" />
11668 </div>
11669
11670 </div>
11671 </div>
11672 </div>
11673 <div class="border"></div>
11674</div>
11675
11676
11677<div id="announcement-popup" class="element_popup element_popup_core element_popup_window warning-issued-popup" style="z-index: 20000; display: none;">
11678 <div class="inner window-frame">
11679 <div class="popup_window_title">
11680 <span class="title-text"></span>
11681 <div class="close-wrapper btn-delete-ann-x">
11682 <a href="#"><div class="close"></div></a>
11683 </div>
11684 </div>
11685 <div class="content">
11686 <div class="announcement-text">
11687
11688 </div>
11689 <div class="controls">
11690 <div class="element_button prev"><div class="l"><!-- --></div><div class="r"><!-- --></div><input type="button" value="Prev" onclick=""></div>
11691 <div class="element_button next"><div class="l"><!-- --></div><div class="r"><!-- --></div><input type="button" value="Next" onclick=""></div>
11692
11693 <div class="title title-bottom"><span class="index">1</span> of <span class="total">4</span> Announcement</div>
11694
11695 <div class="element_button btn-delete-ann"><div class="l"><!-- --></div><div class="r"><!-- --></div><input type="button" value="Delete Announcement"></div>
11696 <div class="element_button btn-agree"><div class="l"><!-- --></div><div class="r"><!-- --></div><input type="button" value=""></div>
11697 </div>
11698 </div>
11699 </div>
11700</div>
11701<div class="announcement-canvas-separator" style="z-index: 19999;height: 100% !important; display: none;"> </div>
11702<!-- 0.067s -->
11703<!-- pusher part -->
11704
11705
11706<script src="https://www.google.com/recaptcha/api.js" async defer></script><script type="text/javascript">var recaptcha_publickey = "6Le3_AUTAAAAALjgZgjXxE1mU9KxrYl_g9mWmNSd";</script><script type="text/javascript">var recaptcha_token = "jOo-pnrHzjsIqxlH-g3G86m-PQaNEB1WqqbY21IaJKwlPShpePeS1QGSL66OjFL4r7fXXAKPFUQdj_6c8YRxtoX9MQ9k04FeN3UjmBGjHjM";</script>
11707<!-- Start Quantcast tag -->
11708<script type="text/javascript">
11709_qoptions={
11710qacct:"p-e2f9QTuI7ynec"
11711};
11712</script>
11713<script type="text/javascript" src="http://edge.quantserve.com/quant.js" async defer></script>
11714<noscript>
11715<img src="http://pixel.quantserve.com/pixel/p-e2f9QTuI7ynec.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
11716</noscript>
11717<!-- End Quantcast tag -->
11718
11719
11720
11721<div id="fb-root"></div><script type="text/javascript">
11722 //<!--
11723 (function(d, s, id) {
11724 var js, fjs = d.getElementsByTagName(s)[0];
11725 if (d.getElementById(id)) return;
11726 js = d.createElement(s); js.id = id;
11727 js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
11728 js.async = true;
11729 fjs.parentNode.insertBefore(js, fjs);
11730 }(document, 'script', 'facebook-jssdk'));
11731 //-->
11732</script>
11733<script type="text/javascript">
11734 //<!--
11735 !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); //-->
11736</script><!-- web3.enjin.com -->
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746<script type="text/javascript" src="http://enjin.host/201701191220/platform/react.js"></script>
11747
11748</body>
11749
11750</html>