EASYNOLOBANCASELLAPRO - Version 1.4.6.3

Version Notes

- fixed some bugs

- support for IWD one page checkout

- support for Idev one step checkout

- external payments

Download this release

Release Info

Developer Easy Nolo SpA
Extension EASYNOLOBANCASELLAPRO
Version 1.4.6.3
Comparing to
See all releases


Code changes from version 1.4.6.2 to 1.4.6.3

Files changed (109) hide show
  1. app/code/community/EasyNolo/.DS_Store +0 -0
  2. app/code/community/EasyNolo/BancaSellaPro/.DS_Store +0 -0
  3. app/code/community/EasyNolo/BancaSellaPro/.project +0 -0
  4. app/code/community/EasyNolo/BancaSellaPro/Block/Adminhtml/System/Config/Gestpayinfo.php +0 -0
  5. app/code/community/EasyNolo/BancaSellaPro/Block/Adminhtml/System/Config/Redinfo.php +0 -0
  6. app/code/community/EasyNolo/BancaSellaPro/Block/Adminhtml/System/Config/Riskifiedinfo.php +0 -0
  7. app/code/community/EasyNolo/BancaSellaPro/Block/AlternativePayments/Info.php +6 -0
  8. app/code/community/EasyNolo/BancaSellaPro/Block/Confirm3d.php +0 -0
  9. app/code/community/EasyNolo/BancaSellaPro/Block/Form.php +4 -2
  10. app/code/community/EasyNolo/BancaSellaPro/Block/Newroot.php +0 -0
  11. app/code/community/EasyNolo/BancaSellaPro/Block/Redirect.php +0 -0
  12. app/code/community/EasyNolo/BancaSellaPro/Block/Tokenization/List.php +0 -0
  13. app/code/community/EasyNolo/BancaSellaPro/Block/Tokenization/Newtoken.php +0 -0
  14. app/code/community/EasyNolo/BancaSellaPro/Block/Utility/Text.php +0 -0
  15. app/code/community/EasyNolo/BancaSellaPro/Exception.php +0 -0
  16. app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments.php +132 -0
  17. app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Ideal.php +7 -9
  18. app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Interface.php +6 -0
  19. app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Klarna.php +39 -0
  20. app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Mybank.php +8 -10
  21. app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Paypal.php +16 -16
  22. app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Qiwi.php +15 -0
  23. app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Sofort.php +0 -0
  24. app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/UnionPay.php +15 -0
  25. app/code/community/EasyNolo/BancaSellaPro/Helper/Baseclient.php +0 -0
  26. app/code/community/EasyNolo/BancaSellaPro/Helper/Crypt.php +3 -1
  27. app/code/community/EasyNolo/BancaSellaPro/Helper/Data.php +30 -1
  28. app/code/community/EasyNolo/BancaSellaPro/Helper/Recurringprofile.php +0 -0
  29. app/code/community/EasyNolo/BancaSellaPro/Helper/Red.php +0 -0
  30. app/code/community/EasyNolo/BancaSellaPro/Helper/Riskified.php +0 -0
  31. app/code/community/EasyNolo/BancaSellaPro/Helper/S2s.php +6 -3
  32. app/code/community/EasyNolo/BancaSellaPro/Model/Gestpay.php +19 -15
  33. app/code/community/EasyNolo/BancaSellaPro/Model/Observer.php +26 -0
  34. app/code/community/EasyNolo/BancaSellaPro/Model/Resource/Sales/Order/FingerPrint.php +0 -0
  35. app/code/community/EasyNolo/BancaSellaPro/Model/Resource/Sales/Order/FingerPrint/Collection.php +0 -0
  36. app/code/community/EasyNolo/BancaSellaPro/Model/Resource/Token.php +0 -0
  37. app/code/community/EasyNolo/BancaSellaPro/Model/Resource/Token/Collection.php +0 -0
  38. app/code/community/EasyNolo/BancaSellaPro/Model/Sales/Order/FingerPrint.php +0 -0
  39. app/code/community/EasyNolo/BancaSellaPro/Model/Sales/Recurring/Profile.php +0 -0
  40. app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/Currency.php +0 -0
  41. app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/FraudOrderStatus.php +0 -0
  42. app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/Language.php +0 -0
  43. app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/OrderStatus.php +0 -0
  44. app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/PaymentAction.php +0 -0
  45. app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/TokenizationContext.php +0 -0
  46. app/code/community/EasyNolo/BancaSellaPro/Model/Token.php +0 -0
  47. app/code/community/EasyNolo/BancaSellaPro/Model/Webservice/Abstract.php +0 -0
  48. app/code/community/EasyNolo/BancaSellaPro/Model/Webservice/Wscryptdecrypt.php +35 -11
  49. app/code/community/EasyNolo/BancaSellaPro/Model/Webservice/Wss2s.php +4 -3
  50. app/code/community/EasyNolo/BancaSellaPro/_additional_structure/.DS_Store +0 -0
  51. app/code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/form_onepagecheckout.phtml +0 -116
  52. app/code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/iframe.phtml +0 -58
  53. app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/.DS_Store +0 -0
  54. app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/adminhtml/.DS_Store +0 -0
  55. app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/adminhtml/default/.DS_Store +0 -0
  56. app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/adminhtml/default/default/.DS_Store +0 -0
  57. app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/adminhtml/default/default/images/.DS_Store +0 -0
  58. app/code/community/EasyNolo/BancaSellaPro/controllers/AjaxController.php +697 -0
  59. app/code/community/EasyNolo/BancaSellaPro/controllers/Checkout/OnepageController.php +138 -0
  60. app/code/community/EasyNolo/BancaSellaPro/controllers/GestpayController.php +1 -1
  61. app/code/community/EasyNolo/BancaSellaPro/controllers/JsonController.php +0 -0
  62. app/code/community/EasyNolo/BancaSellaPro/controllers/TokenizationController.php +0 -0
  63. app/code/community/EasyNolo/BancaSellaPro/etc/config.xml +122 -0
  64. app/code/community/EasyNolo/BancaSellaPro/etc/jstranslator.xml +0 -0
  65. app/code/community/EasyNolo/BancaSellaPro/etc/system.xml +246 -25
  66. app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/install-1.3.0.php +0 -0
  67. app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/upgrade-1.3.0-1.3.1.php +0 -0
  68. app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/upgrade-1.4.2-1.4.3.php +0 -0
  69. app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/upgrade-1.4.3-1.4.4.php +0 -0
  70. app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/upgrade-1.4.4-1.4.5.php +0 -0
  71. app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/upgrade-1.4.5-1.4.6.php +0 -0
  72. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/layout/easynolo_bancasellapro.xml +53 -1
  73. app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/alternative_payments.phtml +5 -0
  74. app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/alternative_payments/default.phtml +1 -0
  75. app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/alternative_payments/js.phtml +56 -0
  76. app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/alternative_payments/klarna.phtml +33 -0
  77. app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/alternative_payments/nojs.phtml +25 -0
  78. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/confirm3d.phtml +0 -0
  79. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/form.phtml +57 -50
  80. app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/form_idev.phtml +189 -0
  81. app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/form_onepagecheckout.phtml +173 -0
  82. app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/iframe.phtml +72 -0
  83. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/newtoken.phtml +0 -0
  84. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/redirect.phtml +0 -0
  85. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/riskified.phtml +1 -1
  86. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/token/list.phtml +0 -0
  87. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/page/redirect.phtml +0 -0
  88. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/enterprise/default/layout/easynolo_bancasellapro.xml +0 -0
  89. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/etc → etc}/modules/EasyNolo_BancaSellaPro.xml +0 -0
  90. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/etc → etc}/modules/EasyNolo_BancaSellaPro.xml.Onepage.txt +0 -0
  91. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/locale → locale}/en_US/EasyNolo_BancaSellaPro.csv +0 -0
  92. app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/locale → locale}/it_IT/EasyNolo_BancaSellaPro.csv +0 -0
  93. {app/code/community/EasyNolo/BancaSellaPro/_additional_structure/js → js}/bancasellapro/gestpayform.js +16 -12
  94. app/code/community/EasyNolo/BancaSellaPro/_additional_structure/js/bancasellapro/gestpayform_onepagecheckout.js → js/bancasellapro/gestpayform_idev_onestepcheckout.js +264 -280
  95. {app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/frontend/base/default/js/easynolo_bancasella → js/bancasellapro}/gestpayform_onepagecheckout.js +265 -134
  96. js/bancasellapro/gestpayform_onepagecheckout_jquery.js +30 -0
  97. js/bancasellapro/jquery/jquery-1.10.2.js +9789 -0
  98. js/bancasellapro/jquery/jquery-1.10.2.min.js +6 -0
  99. js/bancasellapro/jquery/jquery-1.10.2.min.map +1 -0
  100. js/bancasellapro/jquery/noconflict.js +28 -0
  101. {app/code/community/EasyNolo/BancaSellaPro/_additional_structure/js → js}/bancasellapro/newtoken.js +1 -0
  102. {app/code/community/EasyNolo/BancaSellaPro/_additional_structure/js → js}/bancasellapro/red_blackbox.js +1 -0
  103. {app/code/community/EasyNolo/BancaSellaPro/_additional_structure/js → js}/bancasellapro/riskified.js +0 -0
  104. package.xml +98 -57
  105. {app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin → skin}/adminhtml/default/default/images/bancasellapro/gestpay.png +0 -0
  106. {app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin → skin}/adminhtml/default/default/images/bancasellapro/red.png +0 -0
  107. {app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin → skin}/adminhtml/default/default/images/bancasellapro/riskified.png +0 -0
  108. skin/frontend/base/default/css/easynolo_bancasella/gestpay.css +31 -0
  109. {app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin → skin}/frontend/base/default/images/easynolo_bancasella/wait.gif +0 -0
app/code/community/EasyNolo/.DS_Store DELETED
Binary file
app/code/community/EasyNolo/BancaSellaPro/.DS_Store DELETED
Binary file
app/code/community/EasyNolo/BancaSellaPro/.project CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Block/Adminhtml/System/Config/Gestpayinfo.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Block/Adminhtml/System/Config/Redinfo.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Block/Adminhtml/System/Config/Riskifiedinfo.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Block/AlternativePayments/Info.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class EasyNolo_BancaSellaPro_Block_AlternativePayments_Info extends Mage_Core_Block_Template
4
+ {
5
+
6
+ }
app/code/community/EasyNolo/BancaSellaPro/Block/Confirm3d.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Block/Form.php CHANGED
@@ -13,9 +13,11 @@ class EasyNolo_BancaSellaPro_Block_Form extends Mage_Payment_Block_Form
13
  {
14
  parent::_construct();
15
 
16
- if(Mage::app()->getRequest()->getRouteName()=='opc'){
17
  $this->setTemplate('easynolo/bancasellapro/gestpay/form_onepagecheckout.phtml');
18
- }else{
 
 
19
  $this->setTemplate('easynolo/bancasellapro/gestpay/form.phtml');
20
  }
21
  }
13
  {
14
  parent::_construct();
15
 
16
+ if(in_array(Mage::app()->getRequest()->getRouteName(), array('opc', 'iwd_opc'))){
17
  $this->setTemplate('easynolo/bancasellapro/gestpay/form_onepagecheckout.phtml');
18
+ } elseif(in_array(Mage::app()->getRequest()->getRouteName(), array('onestepcheckout'))){
19
+ $this->setTemplate('easynolo/bancasellapro/gestpay/form_idev.phtml');
20
+ } else {
21
  $this->setTemplate('easynolo/bancasellapro/gestpay/form.phtml');
22
  }
23
  }
app/code/community/EasyNolo/BancaSellaPro/Block/Newroot.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Block/Redirect.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Block/Tokenization/List.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Block/Tokenization/Newtoken.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Block/Utility/Text.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Exception.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments.php ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class EasyNolo_BancaSellaPro_Helper_AlternativePayments extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ const SELECT_HTMLID = 'gestpay_alternative_payment';
7
+
8
+ protected $_methods = null;
9
+
10
+ protected function _init()
11
+ {
12
+ if (is_null($this->_methods)) {
13
+ $this->_methods = array();
14
+ foreach ((array)Mage::getConfig()->getNode('global/gestpaypro/alternative_payments') as $code => $methodsXml) {
15
+ if (Mage::getStoreConfig('payment/gestpaypro_alternative_payments/enable_'.$code)) {
16
+ $this->_methods[$code] = (array)$methodsXml;
17
+ }
18
+ }
19
+ }
20
+
21
+ return $this->_methods;
22
+ }
23
+
24
+ public function isEnabled()
25
+ {
26
+ $methods = $this->_init();
27
+
28
+ return count($methods) > 0;
29
+ }
30
+
31
+ public function getSelectBox($defValue = null)
32
+ {
33
+ $html = '';
34
+ $methods = $this->_init();
35
+
36
+ if ($methods) {
37
+ $id = self::SELECT_HTMLID;
38
+ $name = 'payment[alternative_payment]';
39
+ $additionalBlocks = array(
40
+ 'js' => 'easynolo/bancasellapro/gestpay/alternative_payments/js.phtml'
41
+ );
42
+
43
+ if (is_null($defValue)) {
44
+ $defValue = '';
45
+ }
46
+ $options = array(
47
+ '' => Mage::helper('easynolo_bancasellapro')->__('Credit Card')
48
+ );
49
+ foreach ($methods as $code => $method) {
50
+ $options[$code] = $method['title'];
51
+
52
+ if (empty($method['template'])) {
53
+ $method['template'] = 'default.phtml';
54
+ }
55
+
56
+ $additionalBlocks[] =
57
+ Mage::app()->getLayout()
58
+ ->createBlock('easynolo_bancasellapro/alternativePayments_info')
59
+ ->setCode($code)
60
+ ->setMethodConfig(new Varien_Object($method))
61
+ ->setTemplate('easynolo/bancasellapro/gestpay/alternative_payments/'.$method['template']);
62
+ }
63
+ $selectHtml = Mage::app()->getLayout()->createBlock('core/html_select')
64
+ ->setName($name)
65
+ ->setId($id)
66
+ ->setTitle(Mage::helper('easynolo_bancasellapro')->__('Payment Method'))
67
+ ->setValue($defValue)
68
+ ->setOptions($options)
69
+ ->setExtraParams('onchange="alternativePaymentMethodChange(this);"')
70
+ ->getHtml();
71
+
72
+ $block = Mage::app()->getLayout()->createBlock('easynolo_bancasellapro/alternativePayments_info')
73
+ ->setTemplate('easynolo/bancasellapro/gestpay/alternative_payments.phtml')
74
+ ->setSelectHtml($selectHtml)
75
+ ;
76
+
77
+ $this->_appendAdditional($block, $additionalBlocks);
78
+
79
+ $html = $block->toHtml();
80
+ }
81
+
82
+ return $html;
83
+ }
84
+
85
+ public function getNoJs()
86
+ {
87
+ $block = Mage::app()->getLayout()->createBlock('easynolo_bancasellapro/alternativePayments_info')
88
+ ->setTemplate('easynolo/bancasellapro/gestpay/alternative_payments/nojs.phtml')
89
+ ;
90
+ return $block->toHtml();
91
+ }
92
+
93
+ protected function _appendAdditional(Mage_Core_Block_Abstract $infoBlock, $additional)
94
+ {
95
+ foreach ($additional as $block)
96
+ {
97
+ if (is_string($block)) {
98
+ $block = Mage::app()->getLayout()->createBlock('core/template')->setTemplate($block);
99
+ }
100
+
101
+ if (is_object($block) && $block instanceof Mage_Core_Block_Abstract) {
102
+ $infoBlock->append($block);
103
+ }
104
+ }
105
+ }
106
+
107
+ public function getMethodsJson()
108
+ {
109
+ $json = array();
110
+ $methods = $this->_init();
111
+
112
+ foreach ($methods as $code => $method) {
113
+ $json[$code] = array(
114
+ 'title' => $method['title'],
115
+ 'type' => $method['type'],
116
+ );
117
+ }
118
+
119
+ return json_encode($json);
120
+ }
121
+
122
+ public function getMethod($code)
123
+ {
124
+ $methods = $this->_init();
125
+
126
+ if (isset($methods[$code])) {
127
+ return $methods[$code];
128
+ }
129
+
130
+ return false;
131
+ }
132
+ }
app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Ideal.php CHANGED
@@ -1,17 +1,15 @@
1
  <?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: maintux
5
- * Date: 18/01/17
6
- * Time: 17:48
7
- */
8
- class EasyNolo_BancaSellaPro_Helper_AlternativePayments_Ideal extends Mage_Core_Helper_Abstract {
9
 
10
- function addCustomParams(&$params, $order_id=null){
11
- $storeId = Mage::app()->getStore()->getStoreId();
 
 
 
12
  $params['paymentTypeDetail'] = array(
13
  'IdealBankCode' => Mage::getStoreConfigFlag('payment/gestpaypro_alternative_payments/ideal_bankcode', $storeId)
14
  );
 
 
15
  }
16
 
17
  }
1
  <?php
 
 
 
 
 
 
 
2
 
3
+ class EasyNolo_BancaSellaPro_Helper_AlternativePayments_Ideal extends Mage_Core_Helper_Abstract implements EasyNolo_BancaSellaPro_Helper_AlternativePayments_Interface {
4
+
5
+ public function getEncryptParams(Mage_Sales_Model_Order $order){
6
+ $storeId = $order->getStoreId();
7
+
8
  $params['paymentTypeDetail'] = array(
9
  'IdealBankCode' => Mage::getStoreConfigFlag('payment/gestpaypro_alternative_payments/ideal_bankcode', $storeId)
10
  );
11
+
12
+ return $params;
13
  }
14
 
15
  }
app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Interface.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ interface EasyNolo_BancaSellaPro_Helper_AlternativePayments_Interface
4
+ {
5
+ public function getEncryptParams(Mage_Sales_Model_Order $order);
6
+ }
app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Klarna.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class EasyNolo_BancaSellaPro_Helper_AlternativePayments_Klarna extends Mage_Core_Helper_Abstract implements EasyNolo_BancaSellaPro_Helper_AlternativePayments_Interface {
4
+
5
+ public function getEncryptParams(Mage_Sales_Model_Order $order){
6
+
7
+ $method = $order->getPayment()->getMethodInstance();
8
+ $additionalData = $method->getInfoInstance()->getAdditionalData();
9
+
10
+ $additionalData = @unserialize($additionalData);
11
+
12
+ $params = array('OrderDetails' => array('BillingAddress' => array(), 'ProductDetails' => array()));
13
+
14
+ if ($additionalData) {
15
+ $params['OrderDetails']['BillingAddress']['StreetName'] = $additionalData['klarna_street'];
16
+ $params['OrderDetails']['BillingAddress']['City'] = $additionalData['klarna_city'];
17
+ $params['OrderDetails']['BillingAddress']['ZipCode'] = $additionalData['klarna_zip'];
18
+ $params['OrderDetails']['BillingAddress']['CountryCode'] = $additionalData['klarna_country'];
19
+ }
20
+
21
+ foreach($order->getAllItems() as $order_item) {
22
+ $params['OrderDetails']['ProductDetails']['ProductDetail'][] = array(
23
+ 'ProductCode' => $order_item->getId(),
24
+ 'Name' => $order_item->getName(),
25
+ 'SKU' => $order_item->getSku(),
26
+ 'Description' => $order_item->getDescription(),
27
+ 'Quantity' => (int)$order_item->getQtyOrdered(),
28
+ 'UnitPrice' => round($order_item->getPrice(), 2),
29
+ 'Price' => round($order_item->getRowTotal(), 2),
30
+ 'Type' => 1,
31
+ 'Vat' => $order_item->getTaxPercent().'%',
32
+ 'Discount' => round($order_item->getDiscountAmount(), 2)
33
+ );
34
+ }
35
+
36
+ return $params;
37
+ }
38
+
39
+ }
app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Mybank.php CHANGED
@@ -1,17 +1,15 @@
1
  <?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: maintux
5
- * Date: 18/01/17
6
- * Time: 17:48
7
- */
8
- class EasyNolo_BancaSellaPro_Helper_AlternativePayments_Mybank extends Mage_Core_Helper_Abstract {
9
 
10
- function addCustomParams(&$params, $order_id=null){
11
- $storeId = Mage::app()->getStore()->getStoreId();
 
 
 
12
  $params['paymentTypeDetail'] = array(
13
  'MyBankBankCode' => Mage::getStoreConfigFlag('payment/gestpaypro_alternative_payments/mybank_bankcode', $storeId)
14
  );
 
 
15
  }
16
-
17
  }
1
  <?php
 
 
 
 
 
 
 
2
 
3
+ class EasyNolo_BancaSellaPro_Helper_AlternativePayments_Mybank extends Mage_Core_Helper_Abstract implements EasyNolo_BancaSellaPro_Helper_AlternativePayments_Interface {
4
+
5
+ public function getEncryptParams(Mage_Sales_Model_Order $order){
6
+ $storeId = $order->getStoreId();
7
+
8
  $params['paymentTypeDetail'] = array(
9
  'MyBankBankCode' => Mage::getStoreConfigFlag('payment/gestpaypro_alternative_payments/mybank_bankcode', $storeId)
10
  );
11
+
12
+ return $params;
13
  }
14
+
15
  }
app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Paypal.php CHANGED
@@ -1,23 +1,18 @@
1
  <?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: maintux
5
- * Date: 18/01/17
6
- * Time: 17:48
7
- */
8
- class EasyNolo_BancaSellaPro_Helper_AlternativePayments_Paypal extends Mage_Core_Helper_Abstract {
9
 
10
- function addCustomParams(&$params, $order_id=null){
11
- if(!$order_id) return;
12
- $order = Mage::getModel('sales/order')->load($order_id);
13
- $storeId = Mage::app()->getStore()->getStoreId();
 
14
  $showProductInfo = Mage::getStoreConfigFlag('payment/gestpaypro_alternative_payments/paypal_show_product_info', $storeId);
15
  $sellerProtection = Mage::getStoreConfigFlag('payment/gestpaypro_alternative_payments/paypal_seller_protection', $storeId);
 
16
  if($showProductInfo){
17
- if(!isset($params['OrderDetails'])) $params['OrderDetails'] = array();
18
- $params['OrderDetails']['ArrayOfProductDetail'] = array('ProductDetail' => array());
19
  foreach($order->getAllItems() as $order_item) {
20
- $params['OrderDetails']['ArrayOfProductDetail']['ProductDetail'][] = array(
21
  'ProductCode' => $order_item->getId(),
22
  'Name' => $order_item->getName(),
23
  'SKU' => $order_item->getSku(),
@@ -26,20 +21,25 @@ class EasyNolo_BancaSellaPro_Helper_AlternativePayments_Paypal extends Mage_Core
26
  'UnitPrice' => round($order_item->getPrice(), 2),
27
  'Price' => round($order_item->getRowTotal(), 2),
28
  'Type' => 1,
29
- 'Vat' => $order_item->getTaxPercent().'%'
 
30
  );
31
  }
32
  }
 
33
  if($sellerProtection){
34
  $params['ppSellerProtection'] = 1;
35
  $shipping_address = $order->getShippingAddress();
36
  $params['shippingDetails'] = array();
37
  $params['shippingDetails']['shipToName'] = $shipping_address->getFirstname().' '.$shipping_address->getLastname();
38
- $params['shippingDetails']['shipToStreet'] = $shipping_address->getStreet(-1);
39
  $params['shippingDetails']['shipToCity'] = $shipping_address->getCity();
40
  $params['shippingDetails']['shipToCountryCode'] = $shipping_address->getCountryModel()->getIso2Code();
41
  $params['shippingDetails']['shipToZip'] = $shipping_address->getPostcode();
 
42
  }
 
 
43
  }
44
 
45
  }
1
  <?php
 
 
 
 
 
 
 
2
 
3
+ class EasyNolo_BancaSellaPro_Helper_AlternativePayments_Paypal extends Mage_Core_Helper_Abstract implements EasyNolo_BancaSellaPro_Helper_AlternativePayments_Interface {
4
+
5
+ public function getEncryptParams(Mage_Sales_Model_Order $order){
6
+
7
+ $storeId = $order->getStoreId();
8
  $showProductInfo = Mage::getStoreConfigFlag('payment/gestpaypro_alternative_payments/paypal_show_product_info', $storeId);
9
  $sellerProtection = Mage::getStoreConfigFlag('payment/gestpaypro_alternative_payments/paypal_seller_protection', $storeId);
10
+
11
  if($showProductInfo){
12
+ $params['OrderDetails'] = array();
13
+ $params['OrderDetails']['ProductDetails'] = array();
14
  foreach($order->getAllItems() as $order_item) {
15
+ $params['OrderDetails']['ProductDetails']['ProductDetail'][] = array(
16
  'ProductCode' => $order_item->getId(),
17
  'Name' => $order_item->getName(),
18
  'SKU' => $order_item->getSku(),
21
  'UnitPrice' => round($order_item->getPrice(), 2),
22
  'Price' => round($order_item->getRowTotal(), 2),
23
  'Type' => 1,
24
+ 'Vat' => $order_item->getTaxPercent().'%',
25
+ 'Discount' => round($order_item->getDiscountAmount(), 2)
26
  );
27
  }
28
  }
29
+
30
  if($sellerProtection){
31
  $params['ppSellerProtection'] = 1;
32
  $shipping_address = $order->getShippingAddress();
33
  $params['shippingDetails'] = array();
34
  $params['shippingDetails']['shipToName'] = $shipping_address->getFirstname().' '.$shipping_address->getLastname();
35
+ $params['shippingDetails']['shipToStreet'] = $shipping_address->getStreet(1);
36
  $params['shippingDetails']['shipToCity'] = $shipping_address->getCity();
37
  $params['shippingDetails']['shipToCountryCode'] = $shipping_address->getCountryModel()->getIso2Code();
38
  $params['shippingDetails']['shipToZip'] = $shipping_address->getPostcode();
39
+ $params['shippingDetails']['shipToStreet2'] = $shipping_address->getStreet(2);
40
  }
41
+
42
+ return $params;
43
  }
44
 
45
  }
app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Qiwi.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class EasyNolo_BancaSellaPro_Helper_AlternativePayments_Qiwi extends Mage_Core_Helper_Abstract implements EasyNolo_BancaSellaPro_Helper_AlternativePayments_Interface {
4
+
5
+ public function getEncryptParams(Mage_Sales_Model_Order $order){
6
+
7
+ $params = array('OrderDetails' => array('BillingAddress' => array(), 'CustomerDetail' => array()));
8
+
9
+ $params['OrderDetails']['BillingAddress']['CountryCode'] = $order->getBillingAddress()->getCountryId();
10
+ $params['OrderDetails']['CustomerDetail']['PrimaryPhone'] = $order->getBillingAddress()->getTelephone();
11
+
12
+ return $params;
13
+ }
14
+
15
+ }
app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/Sofort.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Helper/AlternativePayments/UnionPay.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class EasyNolo_BancaSellaPro_Helper_AlternativePayments_UnionPay extends Mage_Core_Helper_Abstract implements EasyNolo_BancaSellaPro_Helper_AlternativePayments_Interface {
4
+
5
+ public function getEncryptParams(Mage_Sales_Model_Order $order){
6
+
7
+ $params = array('OrderDetails' => array('CustomerDetail' => array()));
8
+
9
+ $params['OrderDetails']['CustomerDetail']['PrimaryEmail'] = $order->getCustomerEmail();
10
+ $params['OrderDetails']['CustomerDetail']['PrimaryPhone'] = $order->getBillingAddress()->getTelephone();
11
+
12
+ return $params;
13
+ }
14
+
15
+ }
app/code/community/EasyNolo/BancaSellaPro/Helper/Baseclient.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Helper/Crypt.php CHANGED
@@ -43,9 +43,11 @@ class EasyNolo_BancaSellaPro_Helper_Crypt extends EasyNolo_BancaSellaPro_Helper_
43
  */
44
  public function getEncryptStringByOrder ($order){
45
  $method = $order->getPayment()->getMethodInstance();
 
46
  /** @var $webService EasyNolo_BancaSellaPro_Model_Webservice_Wscryptdecrypt */
47
  $webService = Mage::getModel('easynolo_bancasellapro/webservice_wscryptdecrypt');
48
  $webService->setOrder($order);
 
49
  $webService->setBaseUrl($method->getBaseWSDLUrlSella());
50
 
51
  return $this->getEncryptString($webService);
@@ -105,7 +107,7 @@ class EasyNolo_BancaSellaPro_Helper_Crypt extends EasyNolo_BancaSellaPro_Helper_
105
  return false;
106
  }
107
 
108
- $orderId = $webService->getShopTransactionID();
109
  /** @var Mage_Sales_Model_Order $order */
110
 
111
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
43
  */
44
  public function getEncryptStringByOrder ($order){
45
  $method = $order->getPayment()->getMethodInstance();
46
+
47
  /** @var $webService EasyNolo_BancaSellaPro_Model_Webservice_Wscryptdecrypt */
48
  $webService = Mage::getModel('easynolo_bancasellapro/webservice_wscryptdecrypt');
49
  $webService->setOrder($order);
50
+ $webService->setPaymentInfo($order);
51
  $webService->setBaseUrl($method->getBaseWSDLUrlSella());
52
 
53
  return $this->getEncryptString($webService);
107
  return false;
108
  }
109
 
110
+ $orderId = $_helper->getIncrementIdByShopTransactionId($webService->getShopTransactionID());
111
  /** @var Mage_Sales_Model_Order $order */
112
 
113
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
app/code/community/EasyNolo/BancaSellaPro/Helper/Data.php CHANGED
@@ -129,7 +129,7 @@ class EasyNolo_BancaSellaPro_Helper_Data extends Mage_Core_Helper_Abstract {
129
  $dependsArray = (array)$depens;
130
  //se presente la dipendenza da IWD devo aggiornare la finestra per il pagamento con iframe
131
  if(isset($dependsArray['IWD_Opc'])){
132
- return true;
133
  }
134
  }
135
  return false;
@@ -148,4 +148,33 @@ class EasyNolo_BancaSellaPro_Helper_Data extends Mage_Core_Helper_Abstract {
148
  }
149
 
150
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  }
129
  $dependsArray = (array)$depens;
130
  //se presente la dipendenza da IWD devo aggiornare la finestra per il pagamento con iframe
131
  if(isset($dependsArray['IWD_Opc'])){
132
+ return Mage::helper('core')->isModuleEnabled('IWD_Opc');
133
  }
134
  }
135
  return false;
148
  }
149
 
150
  }
151
+
152
+ public function getShopTransactionId($orderOrMethod){
153
+ if($orderOrMethod instanceof Mage_Sales_Model_Order)
154
+ $transId = $orderOrMethod->getIncrementId();
155
+ elseif ($orderOrMethod instanceof EasyNolo_BancaSellaPro_Model_Gestpay)
156
+ $transId = $orderOrMethod->getFutureOrderId();
157
+ else
158
+ Mage::throwException('Invalid params');
159
+
160
+ $container = new Varien_Object();
161
+ $container->setShopTransactionId($transId);
162
+ $container->setOrderOrMethod($orderOrMethod);
163
+ // Dispatch event that allows transaction id customization
164
+ Mage::dispatchEvent('easynolo_bancasellapro_get_shop_transaction_id', array('container' => $container));
165
+
166
+ return $container->getShopTransactionId();
167
+ }
168
+
169
+ public function getIncrementIdByShopTransactionId($shopTransactionId){
170
+ $incrementId = $shopTransactionId;
171
+ $container = new Varien_Object();
172
+ $container->setIncrementId($incrementId);
173
+ $container->setShopTransactionId($shopTransactionId);
174
+ // Dispatch event that allows transaction id customization
175
+ Mage::dispatchEvent('easynolo_bancasellapro_get_increment_id', array('container' => $container));
176
+
177
+ return $container->getIncrementId();
178
+ }
179
+
180
  }
app/code/community/EasyNolo/BancaSellaPro/Helper/Recurringprofile.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Helper/Red.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Helper/Riskified.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Helper/S2s.php CHANGED
@@ -15,7 +15,8 @@ class EasyNolo_BancaSellaPro_Helper_S2s extends EasyNolo_BancaSellaPro_Helper_Ba
15
  public function capturePayment($payment,$amount){
16
  $order = $payment->getOrder();
17
  $_helper= Mage::helper('easynolo_bancasellapro');
18
- $_helper->log('richiesto capture per ordine '. $order->getIncrementId());
 
19
  //inizializza il webservice
20
  $webservice = $this->getInitWebservice();
21
  //imposta l'ordine
@@ -34,7 +35,8 @@ class EasyNolo_BancaSellaPro_Helper_S2s extends EasyNolo_BancaSellaPro_Helper_Ba
34
  public function refundPayment($payment,$amount){
35
  $order = $payment->getOrder();
36
  $_helper= Mage::helper('easynolo_bancasellapro');
37
- $_helper->log('richiesto refund per ordine '. $order->getIncrementId());
 
38
  //inizializza il webservice
39
  $webservice = $this->getInitWebservice();
40
  //imposta l'ordine
@@ -53,7 +55,8 @@ class EasyNolo_BancaSellaPro_Helper_S2s extends EasyNolo_BancaSellaPro_Helper_Ba
53
  public function voidPayment($payment){
54
  $order = $payment->getOrder();
55
  $_helper= Mage::helper('easynolo_bancasellapro');
56
- $_helper->log('richiesto annullamento per ordine '. $order->getIncrementId());
 
57
  //inizializza il webservice
58
  $webservice = $this->getInitWebservice();
59
  //imposta l'ordine
15
  public function capturePayment($payment,$amount){
16
  $order = $payment->getOrder();
17
  $_helper= Mage::helper('easynolo_bancasellapro');
18
+ $shopTransactionId = $_helper->getShopTransactionId($order);
19
+ $_helper->log('richiesto capture per ordine '. $shopTransactionId);
20
  //inizializza il webservice
21
  $webservice = $this->getInitWebservice();
22
  //imposta l'ordine
35
  public function refundPayment($payment,$amount){
36
  $order = $payment->getOrder();
37
  $_helper= Mage::helper('easynolo_bancasellapro');
38
+ $shopTransactionId = $_helper->getShopTransactionId($order);
39
+ $_helper->log('richiesto refund per ordine '. $shopTransactionId);
40
  //inizializza il webservice
41
  $webservice = $this->getInitWebservice();
42
  //imposta l'ordine
55
  public function voidPayment($payment){
56
  $order = $payment->getOrder();
57
  $_helper= Mage::helper('easynolo_bancasellapro');
58
+ $shopTransactionId = $_helper->getShopTransactionId($order);
59
+ $_helper->log('richiesto annullamento per ordine '. $shopTransactionId);
60
  //inizializza il webservice
61
  $webservice = $this->getInitWebservice();
62
  //imposta l'ordine
app/code/community/EasyNolo/BancaSellaPro/Model/Gestpay.php CHANGED
@@ -310,23 +310,27 @@ class EasyNolo_BancaSellaPro_Model_Gestpay extends Mage_Payment_Model_Method_Abs
310
  */
311
  public function assignData($data)
312
  {
313
- if ($this->isIframeEnabled()) {
314
- $children = Mage::getConfig()->getNode('modules')->children();
315
- $modulesArray = (array)$children;
316
- //controllo se ci sono dipendenze nel modulo bancasella
317
- if (isset($modulesArray['EasyNolo_BancaSellaPro']->depends)) {
318
- $depens = $modulesArray['EasyNolo_BancaSellaPro']->depends->children();
319
- $dependsArray = (array)$depens;
320
- //se presente la dipendenza da IWD devo aggiornare la finestra per il pagamento con iframe
321
- if (isset($dependsArray['IWD_Opc'])) {
322
- //calcolare l encrypt e lo associa al metodo di pagamento solo in questa richiesta
323
- $helper = Mage::helper('easynolo_bancasellapro/crypt');
324
- $encryptString = $helper->getEncryptStringBeforeOrder($this);
325
- $this->setEncryptString($encryptString);
326
- Mage::helper('easynolo_bancasellapro')->log('Salvo l encrypt string per ricreare l\'iframe => ' . $encryptString);
327
- }
328
  }
329
  }
 
 
 
 
 
 
 
 
 
 
330
  }
331
 
332
  /**
310
  */
311
  public function assignData($data)
312
  {
313
+ if (is_object($data)) {
314
+ $data = $data->getData();
315
+ }
316
+
317
+ $details = array();
318
+
319
+ foreach ($data as $k => $v) {
320
+ if (!in_array($k, array('method', 'checks')) && !preg_match('/^cc_/', $k)) {
321
+ $details[$k] = $v;
 
 
 
 
 
 
322
  }
323
  }
324
+
325
+ if (!empty($details)) {
326
+ $this->getInfoInstance()->setAdditionalData(serialize($details));
327
+ }
328
+
329
+ if ($this->isIframeEnabled() && empty($data['alternative_payment'])) {
330
+ $helper = Mage::helper('easynolo_bancasellapro/crypt');
331
+ $encryptString = $helper->getEncryptStringBeforeOrder($this);
332
+ $this->setEncryptString($encryptString);
333
+ }
334
  }
335
 
336
  /**
app/code/community/EasyNolo/BancaSellaPro/Model/Observer.php CHANGED
@@ -24,6 +24,32 @@ class EasyNolo_BancaSellaPro_Model_Observer extends Mage_Core_Model_Abstract{
24
  $observer->getResult()->setJson($json);
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  /**
28
  * Metodo che si occupa dell'esecuzione dei pagamenti per i profili ricorrenti
29
  */
24
  $observer->getResult()->setJson($json);
25
  }
26
 
27
+ /**
28
+ * Save encrypt string for frontend JS
29
+ * @param $observer
30
+ */
31
+ public function addDataToResultSaveOrderIframe($observer){
32
+ try {
33
+ $action = $observer->getControllerAction();
34
+ if ($response = $action->getResponse()->getBody()) {
35
+ $json = json_decode($response, true);
36
+
37
+ if (is_array($json) && !empty($json['success'])) {
38
+ $payment = $action->getOnepage()->getQuote()->getPayment();
39
+ if ($payment && $payment->getMethod() == 'gestpaypro') {
40
+ if ($instance = $payment->getMethodInstance()) {
41
+ //se il metodo ha l'encryptString allora lo salvo nel result
42
+ $json['encrypt_string'] = $instance->getEncryptString();
43
+ }
44
+ }
45
+ $action->getResponse()->setBody(json_encode($json));
46
+ }
47
+ }
48
+ } catch (Exception $e) {}
49
+
50
+ return $this;
51
+ }
52
+
53
  /**
54
  * Metodo che si occupa dell'esecuzione dei pagamenti per i profili ricorrenti
55
  */
app/code/community/EasyNolo/BancaSellaPro/Model/Resource/Sales/Order/FingerPrint.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/Resource/Sales/Order/FingerPrint/Collection.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/Resource/Token.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/Resource/Token/Collection.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/Sales/Order/FingerPrint.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/Sales/Recurring/Profile.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/Currency.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/FraudOrderStatus.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/Language.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/OrderStatus.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/PaymentAction.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/System/Config/Source/TokenizationContext.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/Token.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/Webservice/Abstract.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/Model/Webservice/Wscryptdecrypt.php CHANGED
@@ -28,8 +28,9 @@ class EasyNolo_BancaSellaPro_Model_Webservice_Wscryptdecrypt extends EasyNolo_Ba
28
 
29
  if($gestpay instanceof EasyNolo_BancaSellaPro_Model_Gestpay){
30
 
 
31
  $this->setData('shopLogin', $gestpay->getMerchantId());
32
- $this->setData('shopTransactionId', $order->getIncrementId());
33
  $this->setData('uicCode', $gestpay->getCurrency());
34
  $this->setData('languageId', $gestpay->getLanguage());
35
  $this->setData('amount', round($total, 2));
@@ -70,10 +71,10 @@ class EasyNolo_BancaSellaPro_Model_Webservice_Wscryptdecrypt extends EasyNolo_Ba
70
 
71
  $quote = $method->getQuote();
72
  $total = $method->getTotalByOrder($quote);
73
- $orderId = $method->getFutureOrderId();
74
 
75
  $this->setData('shopLogin', $method->getMerchantId());
76
- $this->setData('shopTransactionId', $orderId);
77
  $this->setData('uicCode', $method->getCurrency());
78
  $this->setData('languageId', $method->getLanguage());
79
  $this->setData('amount', round($total, 2));
@@ -89,7 +90,30 @@ class EasyNolo_BancaSellaPro_Model_Webservice_Wscryptdecrypt extends EasyNolo_Ba
89
  $this->setData('amount', round($_newAmount, 2));
90
  }
91
  }
 
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  }
94
 
95
  /**
@@ -111,14 +135,8 @@ class EasyNolo_BancaSellaPro_Model_Webservice_Wscryptdecrypt extends EasyNolo_Ba
111
  }
112
  $param['amount'] = $this->getData('amount');
113
 
114
- $ap = $this->getData('alternativePayments');
115
- if(count($ap) > 0 && !$this->getData('iframeEnabled')){
116
- $param['paymentTypes'] = array('paymentType' => array());
117
- $param['paymentTypes']['paymentType'][] = 'CREDITCARD';
118
- foreach ($ap as $alternative_payment){
119
- $param['paymentTypes']['paymentType'][] = $alternative_payment;
120
- Mage::helper('easynolo_bancasellapro/alternativePayments_'.strtolower($alternative_payment));
121
- }
122
  }
123
 
124
  if($this->getData('requestToken')) {
@@ -133,6 +151,12 @@ class EasyNolo_BancaSellaPro_Model_Webservice_Wscryptdecrypt extends EasyNolo_Ba
133
  Mage::helper('easynolo_bancasellapro/riskified')->addOrderDetailsParams($param, $this->getData('orderId'));
134
  }
135
 
 
 
 
 
 
 
136
  $_helper->log($param);
137
 
138
  return $param;
28
 
29
  if($gestpay instanceof EasyNolo_BancaSellaPro_Model_Gestpay){
30
 
31
+ $shopTransactionId = Mage::helper('easynolo_bancasellapro')->getShopTransactionId($order);
32
  $this->setData('shopLogin', $gestpay->getMerchantId());
33
+ $this->setData('shopTransactionId', $shopTransactionId);
34
  $this->setData('uicCode', $gestpay->getCurrency());
35
  $this->setData('languageId', $gestpay->getLanguage());
36
  $this->setData('amount', round($total, 2));
71
 
72
  $quote = $method->getQuote();
73
  $total = $method->getTotalByOrder($quote);
74
+ $shopTransactionId = Mage::helper('easynolo_bancasellapro')->getShopTransactionId($method);
75
 
76
  $this->setData('shopLogin', $method->getMerchantId());
77
+ $this->setData('shopTransactionId', $shopTransactionId);
78
  $this->setData('uicCode', $method->getCurrency());
79
  $this->setData('languageId', $method->getLanguage());
80
  $this->setData('amount', round($total, 2));
90
  $this->setData('amount', round($_newAmount, 2));
91
  }
92
  }
93
+ }
94
 
95
+ public function setPaymentInfo(Mage_Sales_Model_Order $order) {
96
+ $method = $order->getPayment()->getMethodInstance();
97
+ $additionalData = $method->getInfoInstance()->getAdditionalData();
98
+ if ($additionalData && ($additionalData = @unserialize($additionalData))) {
99
+ if (!empty($additionalData['alternative_payment'])) {
100
+ $method = Mage::helper('easynolo_bancasellapro/alternativePayments')->getMethod($additionalData['alternative_payment']);
101
+ if ($method) {
102
+ $paymentTypes = array('paymentType' => array());
103
+ $paymentTypes['paymentType'][] = $method['type'];
104
+ if (!empty($method['encrypt_helper'])) {
105
+ $helperPayment = Mage::helper($method['encrypt_helper']);
106
+ if ($helperPayment) {
107
+ $additional = $helperPayment->getEncryptParams($order);
108
+ if ($additional) {
109
+ $this->setPaymentAdditionalParams($additional);
110
+ }
111
+ }
112
+ }
113
+ $this->setData('paymentTypes', $paymentTypes);
114
+ }
115
+ }
116
+ }
117
  }
118
 
119
  /**
135
  }
136
  $param['amount'] = $this->getData('amount');
137
 
138
+ if ($this->getData('paymentTypes')) {
139
+ $param['paymentTypes'] = $this->getData('paymentTypes');
 
 
 
 
 
 
140
  }
141
 
142
  if($this->getData('requestToken')) {
151
  Mage::helper('easynolo_bancasellapro/riskified')->addOrderDetailsParams($param, $this->getData('orderId'));
152
  }
153
 
154
+ if ($additional = $this->getPaymentAdditionalParams()) {
155
+ if (is_array($additional)) {
156
+ $param = array_merge_recursive($param, $additional);
157
+ }
158
+ }
159
+
160
  $_helper->log($param);
161
 
162
  return $param;
app/code/community/EasyNolo/BancaSellaPro/Model/Webservice/Wss2s.php CHANGED
@@ -32,9 +32,10 @@ class EasyNolo_BancaSellaPro_Model_Webservice_Wss2s extends EasyNolo_BancaSellaP
32
 
33
  if($gestpay instanceof EasyNolo_BancaSellaPro_Model_Gestpay){
34
 
 
35
  $this->setData('shopLogin', $gestpay->getMerchantId() );
36
- $this->setData('shopTransactionId', $order->getIncrementId() );
37
- $this->setData('bankTransactionId',$bankId);
38
  $this->setData('uicCode', $gestpay->getCurrency() );
39
  $this->setData('languageId', $gestpay->getLanguage() );
40
  $this->setData('amount', round($total, 2));
@@ -118,7 +119,7 @@ class EasyNolo_BancaSellaPro_Model_Webservice_Wss2s extends EasyNolo_BancaSellaP
118
  "shopLogin" => $gestpay->getMerchantId(),
119
  "uicCode" => $gestpay->getCurrency(),
120
  "amount" => round($gestpay->getTotalByOrder($order), 2),
121
- "shopTransactionId" => $order->getIncrementId(),
122
  "transKey" => $transactionKey,
123
  "PARes" => $paRes
124
  );
32
 
33
  if($gestpay instanceof EasyNolo_BancaSellaPro_Model_Gestpay){
34
 
35
+ $shopTransactionId = Mage::helper('easynolo_bancasellapro')->getShopTransactionId($order);
36
  $this->setData('shopLogin', $gestpay->getMerchantId() );
37
+ $this->setData('shopTransactionId', $shopTransactionId);
38
+ $this->setData('bankTransactionId', $bankId);
39
  $this->setData('uicCode', $gestpay->getCurrency() );
40
  $this->setData('languageId', $gestpay->getLanguage() );
41
  $this->setData('amount', round($total, 2));
119
  "shopLogin" => $gestpay->getMerchantId(),
120
  "uicCode" => $gestpay->getCurrency(),
121
  "amount" => round($gestpay->getTotalByOrder($order), 2),
122
+ "shopTransactionId" => $_helper->getShopTransactionId($order),
123
  "transKey" => $transactionKey,
124
  "PARes" => $paRes
125
  );
app/code/community/EasyNolo/BancaSellaPro/_additional_structure/.DS_Store DELETED
Binary file
app/code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/form_onepagecheckout.phtml DELETED
@@ -1,116 +0,0 @@
1
- <?php
2
- /**
3
- * @category EasyNolo
4
- * @package EasyNolo_BancaSellaPro
5
- * @author Easy Nolo <ecommerce@sella.it>
6
- */
7
- ?>
8
-
9
- <?php /* @var $this EasyNolo_BancaSellaPro_Block_Form */?>
10
- <?php /* @var $method EasyNolo_BancaSellaPro_Model_Gestpay */?>
11
- <?php $method = $this->getMethod() ?>
12
- <?php $_code=$this->getMethodCode() ?>
13
- <?php $merchantId = $method->getMerchantId() ?>
14
-
15
- <?php
16
- try{
17
- /** @var EasyNolo_BancaSellaPro_Helper_Crypt $helper */
18
- $encryptString = false;
19
-
20
- if( $this->isIframeEnabled() ){
21
- $helper =Mage::helper('easynolo_bancasellapro/crypt');
22
- $encryptString = $helper->getEncryptStringBeforeOrder($method);
23
- }
24
- ?>
25
-
26
- <fieldset class="form-list">
27
- <?php $_code=$this->getMethodCode() ?>
28
- <ul class="form-list" id="payment_iframe_<?php echo $_code ?>" style="display:none;">
29
- <li>
30
- <label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
31
- <div class="input-box">
32
- <input type="text" id="hid_<?php echo $_code ?>_cc_number" name="bancasella_iframe[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text required-entry validate-number validate-cc-number" value="" autocomplete="off" />
33
- </div>
34
- </li>
35
- <li>
36
- <label for="hid_<?php echo $_code ?>_cc_exp_mm" class="required"><em>*</em><?php echo $this->__('Expiration Date') ?></label>
37
- <div class="input-box">
38
- <div class="v-fix">
39
- <select id="hid_<?php echo $_code ?>_cc_exp_mm" name="bancasella_iframe[cc_exp_mm]" class="month required-entry">
40
- <?php foreach ($this->getCcMonths() as $k=>$v): ?>
41
- <option value="<?php echo $k?$k:'' ?>"><?php echo $v ?></option>
42
- <?php endforeach ?>
43
- </select>
44
- </div>
45
- <div class="v-fix">
46
- <select id="hid_<?php echo $_code ?>_cc_exp_yy" name="bancasella_iframe[cc_exp_yy]" class="year required-entry">
47
- <?php foreach ($this->getCcYears() as $k=>$v): ?>
48
- <option value="<?php echo $k?$k:'' ?>"><?php echo $v ?></option>
49
- <?php endforeach ?>
50
- </select>
51
- </div>
52
- </div>
53
- </li>
54
- <li>
55
- <label for="<?php echo $_code ?>_cc_cvv" class="required"><em>*</em><?php echo $this->__('CVV2 / 4DBC') ?></label>
56
- <div class="input-box">
57
- <input type="text" id="hid_<?php echo $_code ?>_cc_cvv" name="bancasella_iframe[cc_cvv]" title="<?php echo $this->__('CVV2 / 4DBC') ?>" class="input-text required-entry validate-number" value="" autocomplete="off" />
58
- </div>
59
- </li>
60
- <li>
61
- <label for="<?php echo $_code ?>_cc_name" class="required"><em>*</em><?php echo $this->__('Name on Card') ?></label>
62
- <div class="input-box">
63
- <input type="text" id="hid_<?php echo $_code ?>_cc_name" name="bancasella_iframe[cc_name]" title="<?php echo $this->__('Name on Card') ?>" class="input-text required-entry" value="" autocomplete="off" />
64
- </div>
65
- </li>
66
- <li>
67
- <label for="<?php echo $_code ?>_cc_email" class="required"><em>*</em><?php echo $this->__('Email') ?></label>
68
- <div class="input-box">
69
- <input type="text" id="hid_<?php echo $_code ?>_cc_email" name="bancasella_iframe[cc_email]" title="<?php echo $this->__('Email') ?>" class="input-text required-entry validate-email" value="" autocomplete="off" />
70
- </div>
71
- </li>
72
-
73
- </ul>
74
-
75
- <ul id="payment_form_<?php echo $_code ?>" style="display: none;">
76
- <li>
77
- <?php echo $this->__($method->getConfigData ( 'description' )) ?>
78
- </li>
79
- </ul>
80
- <?php if($encryptString): ?>
81
- <script type="text/javascript">
82
- //<![CDATA[
83
- if ( typeof BancaSellaForm !== 'undefined'){
84
-
85
- var GestPayConfig = {};
86
- GestPayConfig.merchantId = '<?php echo $merchantId ?>';
87
- GestPayConfig.stringEncrypt = '<?php echo $encryptString ?>';
88
- GestPayConfig.formId = 'payment_iframe_<?php echo $_code ?>';
89
- GestPayConfig.radioBancaSella= 'p_method_<?php echo $_code ?>';
90
- GestPayConfig.cssSelectorInfo = '#payment_form_<?php echo $_code ?> li';
91
- GestPayConfig.GestPayExternalClass = GestPay;
92
- GestPayConfig.idStart = 'hid_<?php echo $_code ?>';
93
- GestPayConfig.cssSelectorRadioPayment = '#checkout-payment-method-load input[type="radio"]';
94
- GestPayConfig.confirmPage = '<?php echo $this->getPage3d(); ?>';
95
- GestPayConfig.authPage = '<?php echo $this->getAuthPage(); ?>';
96
- GestPayConfig.showHidePaymentDivId = 'opc-payment';
97
- GestPayConfig.waitImage= '<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>';
98
- GestPayConfig.successRedirect = '<?php echo $this->getSuccessRedirect()?>';
99
- GestPayConfig.isRecurringProfile= '<?php echo $this->isRecurringProfile()?>';
100
- GestPayConfig.code= '<?php echo $_code ?>';
101
-
102
- GestPayConfig.enableFormToIframe = typeof BrowserEnabled !== 'undefined'? BrowserEnabled : false;
103
-
104
- BancaSellaForm.init(GestPayConfig);
105
- }
106
- //]]>
107
- </script>
108
- <?php endif; ?>
109
- </fieldset>
110
- <?php
111
- }catch(Exception $e){
112
- //se il modulo non è configurato correttamente potrebbe
113
- $_helper= Mage::helper('easynolo_bancasellapro');
114
- $_helper->log($e->getMessage());
115
- }
116
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/iframe.phtml DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: maintux
5
- * Date: 18/12/16
6
- * Time: 19:13
7
- */
8
- ?>
9
- <script type="text/javascript">
10
- if (typeof Review != 'undefined') {
11
- Review.addMethods({
12
- nextStep: function(transport){
13
- if (transport && transport.responseText) {
14
- response = eval('(' + transport.responseText + ')');
15
- if (!response.success) {
16
- var msg = response.error_messages;
17
- if (typeof(msg)=='object') {
18
- msg = msg.join("\n");
19
- }
20
- if (msg) {
21
- alert(msg);
22
- }
23
- if (response.update_section) {
24
- $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
25
- }
26
- if (response.goto_section) {
27
- checkout.gotoSection(response.goto_section);
28
- }
29
- }else{
30
- this.isSuccess = true;
31
- BancaSellaForm.redirectSuccessUrl = this.successUrl;
32
- if(!BancaSellaForm.lock && ($(BancaSellaForm.radioBancaSella).checked)){
33
-
34
- if (response.success) {
35
- BancaSellaForm.redirectAfterIframe = this.successUrl;
36
- }
37
- if (response.redirect) {
38
- BancaSellaForm.redirectAfterIframe = response.redirect;
39
- }
40
-
41
- BancaSellaForm.saveDataCC($(BancaSellaForm.formId));
42
- //inviamo i dati della carta
43
- BancaSellaForm.sendPaymentIframe();
44
- }else{
45
- if (response.redirect) {
46
- location.href = response.redirect;
47
- return;
48
- }
49
- if (response.success) {
50
- window.location=this.successUrl;
51
- }
52
- }
53
- }
54
- }
55
- }
56
- });
57
- }
58
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/.DS_Store DELETED
Binary file
app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/adminhtml/.DS_Store DELETED
Binary file
app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/adminhtml/default/.DS_Store DELETED
Binary file
app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/adminhtml/default/default/.DS_Store DELETED
Binary file
app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/adminhtml/default/default/images/.DS_Store DELETED
Binary file
app/code/community/EasyNolo/BancaSellaPro/controllers/AjaxController.php ADDED
@@ -0,0 +1,697 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: caccia
5
+ * Date: 01/04/17
6
+ * Time: 13.45
7
+ */
8
+ class EasyNolo_BancaSellaPro_AjaxController extends Mage_Core_Controller_Front_Action{
9
+
10
+ public function saveOrderAction(){
11
+
12
+ $formErrors = array(
13
+ 'billing_errors' => array(),
14
+ 'shipping_errors' => array(),
15
+ );
16
+
17
+ $settings = Mage::helper('onestepcheckout/checkout')->loadConfig();
18
+ $post = $this->getRequest()->getPost();
19
+ $checkoutHelper = Mage::helper('onestepcheckout/checkout');
20
+
21
+ $payment_data = $this->getRequest()->getPost('payment');
22
+
23
+
24
+ $billing_data = $this->getRequest()->getPost('billing', array());
25
+ $shipping_data = $this->getRequest()->getPost('shipping', array());
26
+
27
+ $billing_data = $checkoutHelper->load_exclude_data($billing_data);
28
+ $shipping_data = $checkoutHelper->load_exclude_data($shipping_data);
29
+
30
+ if(!empty($billing_data)){
31
+ $this->getQuote()->getBillingAddress()->addData($billing_data)->implodeStreetAddress();
32
+ }
33
+ if(!$this->getQuote()->isVirtual()&&$settings['enable_different_shipping']) {
34
+
35
+ $this->getQuote()->getShippingAddress()->setCountryId($shipping_data['country_id'])->setCollectShippingRates(true);
36
+ }
37
+
38
+ if(!$this->_isLoggedIn()){
39
+ $registration_mode = $settings['registration_mode'];
40
+ if($registration_mode == 'auto_generate_account') {
41
+ // Modify billing data to contain password also
42
+ $password = Mage::helper('onestepcheckout/checkout')->generatePassword();
43
+ $billing_data['customer_password'] = $password;
44
+ $billing_data['confirm_password'] = $password;
45
+ $this->getQuote()->getCustomer()->setData('password', $password);
46
+ $this->getQuote()->setData('password_hash',Mage::getModel('customer/customer')->encryptPassword($password));
47
+
48
+ }
49
+
50
+
51
+ if($registration_mode == 'require_registration' || $registration_mode == 'allow_guest') {
52
+ if(!empty($billing_data['customer_password']) && !empty($billing_data['confirm_password']) && ($billing_data['customer_password'] == $billing_data['confirm_password'])){
53
+ $password = $billing_data['customer_password'];
54
+ $this->getQuote()->setCheckoutMethod('register');
55
+ $this->getQuote()->setCustomerId(0);
56
+ $this->getQuote()->getCustomer()->setData('password', $password);
57
+ $this->getQuote()->setData('password_hash',Mage::getModel('customer/customer')->encryptPassword($password));
58
+ }
59
+ }
60
+
61
+ }
62
+
63
+ if($this->_isLoggedIn() || $registration_mode == 'require_registration' || $registration_mode == 'auto_generate_account' || (!empty($billing_data['customer_password']) && !empty($billing_data['confirm_password']))){
64
+ //handle this as Magento handles subscriptions for registered users (no confirmation ever)
65
+ $subscribe_newsletter = $this->getRequest()->getPost('subscribe_newsletter');
66
+ if(!empty($subscribe_newsletter)){
67
+ $this->getQuote()->getCustomer()->setIsSubscribed(1);
68
+ }
69
+ }
70
+
71
+ $billingAddressId = $this->getRequest()->getPost('billing_address_id');
72
+ $customerAddressId = (!empty($billingAddressId)) ? $billingAddressId : false ;
73
+
74
+ if($this->_isLoggedIn()){
75
+ $this->getQuote()->getBillingAddress()->setSaveInAddressBook(empty($billing_data['save_in_address_book']) ? 0 : 1);
76
+ $this->getQuote()->getShippingAddress()->setSaveInAddressBook(empty($shipping_data['save_in_address_book']) ? 0 : 1);
77
+ }
78
+
79
+ $result = $this->_getOnepage()->saveBilling($billing_data, $customerAddressId);
80
+
81
+ if(!empty($billing_data['customer_password']) && !empty($billing_data['confirm_password'])) {
82
+ // Trick to allow saving of
83
+ $this->_getOnepage()->saveCheckoutMethod('register');
84
+ $this->getQuote()->setCustomerId(0);
85
+ $customerData = '';
86
+ $tmpBilling = $billing_data;
87
+
88
+ if(!empty($tmpBilling['street']) && is_array($tmpBilling['street'])){
89
+ $tmpBilling ['street'] = '';
90
+ }
91
+ $tmpBData = array();
92
+ foreach($this->getQuote()->getBillingAddress()->implodeStreetAddress()->getData() as $k=>$v){
93
+ if(!empty($v) && !is_array($v)){
94
+ $tmpBData[$k]=$v;
95
+ }
96
+ }
97
+ $customerData= array_intersect($tmpBilling, $tmpBData);
98
+
99
+ if(!empty($customerData)){
100
+ $this->getQuote()->getCustomer()->addData($customerData);
101
+ foreach($customerData as $key => $value){
102
+ $this->getQuote()->setData('customer_'.$key, $value);
103
+ }
104
+ }
105
+ }
106
+
107
+ $customerSession = Mage::getSingleton('customer/session');
108
+
109
+ if (!empty($billing_data['dob']) && !$customerSession->isLoggedIn()) {
110
+ $dob = Mage::app()->getLocale()->date($billing_data['dob'], null, null, false)->toString('yyyy-MM-dd');
111
+ $this->getQuote()->setCustomerDob($dob);
112
+ $this->getQuote()->setDob($dob);
113
+ $this->getQuote()->getBillingAddress()->setDob($dob);
114
+ }
115
+
116
+ if($customerSession->isLoggedIn() && !empty($billing_data['dob'])){
117
+ $dob = Mage::app()->getLocale()->date($billing_data['dob'], null, null, false)->toString('yyyy-MM-dd');
118
+ $customerSession->getCustomer()
119
+ ->setId($customerSession->getId())
120
+ ->setWebsiteId($customerSession->getCustomer()->getWebsiteId())
121
+ ->setEmail($customerSession->getCustomer()->getEmail())
122
+ ->setDob($dob)
123
+ ->save()
124
+ ;
125
+ }
126
+
127
+ // set customer tax/vat number for further usage
128
+ $taxid = '';
129
+ if(!empty($billing_data['taxvat'])){
130
+ $taxid = $billing_data['taxvat'];
131
+ } else if(!empty($billing_data['vat_id'])){
132
+ $taxid = $billing_data['vat_id'];
133
+ }
134
+ if (!empty($taxid)) {
135
+ $this->getQuote()->setCustomerTaxvat($taxid);
136
+ $this->getQuote()->setTaxvat($taxid);
137
+ $this->getQuote()->getBillingAddress()->setTaxvat($taxid);
138
+ $this->getQuote()->getBillingAddress()->setTaxId($taxid);
139
+ $this->getQuote()->getBillingAddress()->setVatId($taxid);
140
+ }
141
+
142
+ if($customerSession->isLoggedIn() && !empty($billing_data['taxvat'])){
143
+ $customerSession->getCustomer()
144
+ ->setTaxId($billing_data['taxvat'])
145
+ ->setTaxvat($billing_data['taxvat'])
146
+ ->setVatId($billing_data['taxvat'])
147
+ ->save()
148
+ ;
149
+ }
150
+
151
+ if(isset($result['error'])) {
152
+ $formErrors['billing_error'] = true;
153
+ $formErrors['billing_errors'] = $checkoutHelper->_getAddressError($result, $billing_data);
154
+ //$this->log[] = 'Error saving billing details: ' . implode(', ', $formErrors['billing_errors']);
155
+ }
156
+
157
+ // Validate stuff that saveBilling doesn't handle
158
+ if(!$this->_isLoggedIn()) {
159
+ $validator = new Zend_Validate_EmailAddress();
160
+ if(!$billing_data['email'] || $billing_data['email'] == '' || !$validator->isValid($billing_data['email'])) {
161
+
162
+ if(is_array($formErrors['billing_errors'])) {
163
+ $formErrors['billing_errors'][] = 'email';
164
+ }
165
+ else {
166
+ $formErrors['billing_errors'] = array('email');
167
+ }
168
+
169
+ $formErrors['billing_error'] = true;
170
+
171
+ }
172
+ else {
173
+
174
+
175
+ $allow_guest_create_account_validation = false;
176
+
177
+ if($settings['registration_mode'] == 'allow_guest') {
178
+ if(isset($post['create_account']) && $post['create_account'] == '1') {
179
+ $allow_guest_create_account_validation = true;
180
+ }
181
+ }
182
+
183
+
184
+ if($settings['registration_mode'] == 'require_registration' || $settings['registration_mode'] == 'auto_generate_account' || $allow_guest_create_account_validation) {
185
+ if($this->_customerEmailExists($billing_data['email'], Mage::app()->getWebsite()->getId())) {
186
+
187
+ $allow_without_password = $settings['registration_order_without_password'];
188
+
189
+
190
+
191
+ if(!$allow_without_password) {
192
+ if(is_array($formErrors['billing_errors'])) {
193
+ $formErrors['billing_errors'][] = 'email';
194
+ $formErrors['billing_errors'][] = 'email_registered';
195
+ }
196
+ else {
197
+ $formErrors['billing_errors'] = array('email','email_registered');
198
+ }
199
+ }
200
+ else {
201
+ }
202
+ }
203
+ else {
204
+
205
+ $password_errors = array();
206
+
207
+ if(!isset($billing_data['customer_password']) || $billing_data['customer_password'] == '') {
208
+ $password_errors[] = 'password';
209
+ }
210
+
211
+ if(!isset($billing_data['confirm_password']) || $billing_data['confirm_password'] == '') {
212
+ $password_errors[] = 'confirm_password';
213
+ }
214
+ else {
215
+ if($billing_data['confirm_password'] !== $billing_data['customer_password']) {
216
+ $password_errors[] = 'password';
217
+ $password_errors[] = 'confirm_password';
218
+ }
219
+ }
220
+
221
+ if(count($password_errors) > 0) {
222
+ if(is_array($formErrors['billing_errors'])) {
223
+ foreach($password_errors as $error) {
224
+ $formErrors['billing_errors'][] = $error;
225
+ }
226
+ }
227
+ else {
228
+ $formErrors['billing_errors'] = $password_errors;
229
+ }
230
+ }
231
+ }
232
+ }
233
+
234
+
235
+ }
236
+ }
237
+
238
+ if($settings['enable_terms']) {
239
+ if(!isset($post['accept_terms']) || $post['accept_terms'] != '1') {
240
+ $formErrors['terms_error'] = true;
241
+ }
242
+ }
243
+
244
+
245
+ if ($settings['enable_default_terms'] && $requiredAgreements = Mage::helper('checkout')->getRequiredAgreementIds()) {
246
+ $postedAgreements = array_keys($this->getRequest()->getPost('agreement', array()));
247
+ if ($diff = array_diff($requiredAgreements, $postedAgreements)) {
248
+ //$formErrors['terms_error'] = $this->__('Please agree to all the terms and conditions before placing the order.');
249
+ $formErrors['agreements_error'] = true;
250
+ }
251
+ }
252
+
253
+ $shippingAddressId = $this->getRequest()->getPost('shipping_address_id', false);
254
+
255
+ if(!$this->getQuote()->isVirtual()&&$settings['enable_different_shipping']) {
256
+ if(!isset($billing_data['use_for_shipping']) || $billing_data['use_for_shipping'] != '1') {
257
+ //$shipping_result = $this->_getOnepage()->saveShipping($shipping_data, $shippingAddressId);
258
+ $shipping_result = Mage::helper('onestepcheckout/checkout')->saveShipping($shipping_data, $shippingAddressId);
259
+
260
+ if(isset($shipping_result['error'])) {
261
+ $formErrors['shipping_error'] = true;
262
+ $formErrors['shipping_errors'] = $checkoutHelper->_getAddressError($shipping_result, $shipping_data, 'shipping');
263
+ }
264
+ }
265
+ else {
266
+ //$shipping_result = $this->_getOnepage()->saveShipping($billing_data, $shippingAddressId);
267
+ $shipping_result = Mage::helper('onestepcheckout/checkout')->saveShipping($billing_data, $customerAddressId);
268
+ }
269
+ }
270
+
271
+
272
+ // Save shipping method
273
+ $shipping_method = $this->getRequest()->getPost('shipping_method', '');
274
+
275
+ if(!$this->getQuote()->isVirtual()){
276
+ //additional checks if the rate is indeed available for chosen shippin address
277
+ $availableRates = $this->getAvailableRates($this->_getOnepage()->getQuote()->getShippingAddress()->getGroupedAllShippingRates());
278
+ if(empty($shipping_method) || !in_array($shipping_method,$availableRates['codes'])){
279
+ $formErrors['shipping_method'] = true;
280
+ } else if (!$this->_getOnepage()->getQuote()->getShippingAddress()->getShippingDescription()) {
281
+ if(!empty($availableRates['rates'][$shipping_method])){
282
+ $rate = $availableRates['rates'][$shipping_method];
283
+ $shippingDescription = $rate->getCarrierTitle() . ' - ' . $rate->getMethodTitle();
284
+ $this->_getOnepage()->getQuote()->getShippingAddress()->setShippingDescription(trim($shippingDescription, ' -'));
285
+ }
286
+ }
287
+
288
+ //$result = $this->_getOnepage()->saveShippingMethod($shipping_method);
289
+ $result = Mage::helper('onestepcheckout/checkout')->saveShippingMethod($shipping_method);
290
+ if(isset($result['error'])) {
291
+ $formErrors['shipping_method'] = true;
292
+ }
293
+ else {
294
+ Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method', array('request'=>$this->getRequest(), 'quote'=>$this->_getOnepage()->getQuote()));
295
+ }
296
+ }
297
+
298
+
299
+
300
+
301
+ // Save payment method
302
+ $payment = $this->getRequest()->getPost('payment', array());
303
+ $paymentRedirect = false;
304
+
305
+ $payment = $this->filterPaymentData($payment);
306
+
307
+ //echo '<pre>' . print_r($_POST,1) . '</pre>';
308
+ //echo '<pre>' . print_r($payment,1) . '</pre>';
309
+
310
+ try {
311
+ if(!empty($payment['method']) && $payment['method'] == 'free' && $this->getQuote()->getGrandTotal() > 0){
312
+
313
+ $instance = Mage::helper('payment')->getMethodInstance('free');
314
+ if ($instance->isAvailable($this->getQuote())) {
315
+ $instance->setInfoInstance($this->getQuote()->getPayment());
316
+ $this->getQuote()->getPayment()->setMethodInstance($instance);
317
+ }
318
+ }
319
+ //$result = $this->_getOnepage()->savePayment($payment);
320
+ $result = Mage::helper('onestepcheckout/checkout')->savePayment($payment);
321
+ $paymentRedirect = $this->getQuote()->getPayment()->getCheckoutRedirectUrl();
322
+
323
+
324
+
325
+ }
326
+ catch (Mage_Payment_Exception $e) {
327
+ if ($e->getFields()) {
328
+ $result['fields'] = $e->getFields();
329
+ }
330
+ $result['error'] = $e->getMessage();
331
+ }
332
+ catch (Exception $e) {
333
+ $result['error'] = $e->getMessage();
334
+ }
335
+
336
+ if(isset($result['error'])) {
337
+
338
+ if($result['error'] == 'Can not retrieve payment method instance') {
339
+ $formErrors['payment_method'] = true;
340
+ }
341
+ else {
342
+ $formErrors['payment_method_error'] = $result['error'];
343
+ }
344
+ }
345
+
346
+
347
+ if(!$this->hasFormErrors($formErrors)) {
348
+
349
+ if($settings['enable_newsletter'] && isset($post['subscribe_newsletter'])) {
350
+ // Handle newsletter
351
+ $subscribe_newsletter = $post['subscribe_newsletter'];
352
+ $registration_mode = $settings['registration_mode'];
353
+ if(!empty($subscribe_newsletter) && ($registration_mode != 'require_registration' && $registration_mode != 'auto_generate_account') && !$this->getRequest()->getPost('create_account')) {
354
+ $model = Mage::getModel('newsletter/subscriber');
355
+ $model->loadByEmail($billing_data['email']);
356
+ if(!$model->isSubscribed()){
357
+ $model->subscribe($billing_data['email']);
358
+ }
359
+ }
360
+ }
361
+
362
+ if($paymentRedirect && $paymentRedirect != '') {
363
+ $response = array("success"=>true,"error"=>false,"redirect"=>$paymentRedirect);
364
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
365
+ return;
366
+ }
367
+ $customer = null;
368
+
369
+ if(! $this->_isLoggedIn() ) {
370
+
371
+ if( $this->_isEmailRegistered($billing_data['email']) ) {
372
+
373
+ $registration_mode = $settings['registration_mode'];
374
+ $allow_without_password = $settings['registration_order_without_password'];
375
+
376
+ if($registration_mode == 'require_registration' || $registration_mode == 'auto_generate_account') {
377
+
378
+ if($allow_without_password) {
379
+
380
+ // Place order on the emails account without the password
381
+ $customer = $this->_getCustomer($billing_data['email']);
382
+
383
+ $this->_getOnepage()->saveCheckoutMethod('guest');
384
+
385
+ }
386
+
387
+ } elseif ($registration_mode == 'allow_guest') {
388
+ $customer = $this->_getCustomer($billing_data['email']);
389
+ $this->_getOnepage()->saveCheckoutMethod('guest');
390
+
391
+ } else {
392
+ $this->get_Onepage()->saveCheckoutMethod('guest');
393
+
394
+ }
395
+
396
+
397
+ } else {
398
+
399
+ if($settings['registration_mode'] == 'require_registration') {
400
+
401
+ // Save as register
402
+ $this->_getOnepage()->saveCheckoutMethod('register');
403
+ $this->getQuote()->setCustomerId(0);
404
+
405
+ }
406
+ elseif($settings['registration_mode'] == 'allow_guest') {
407
+ if(isset($post['create_account']) && $post['create_account'] == '1') {
408
+ $this->_getOnepage()->saveCheckoutMethod('register');
409
+ $this->getQuote()->setCustomerId(0);
410
+
411
+ }
412
+ else {
413
+ $this->_getOnepage()->saveCheckoutMethod('guest');
414
+
415
+ }
416
+ }
417
+ else{
418
+
419
+
420
+ $registration_mode = $settings['registration_mode'];
421
+
422
+ if($registration_mode == 'auto_generate_account') {
423
+ $this->_getOnepage()->saveCheckoutMethod('register');
424
+ $this->getQuote()->setCustomerId(0);
425
+ }
426
+ else {
427
+ $this->_getOnepage()->saveCheckoutMethod('guest');
428
+ }
429
+ }
430
+ }
431
+ }
432
+ $result = $this->_saveOrder($customer);
433
+
434
+ }
435
+ else{
436
+ $result=array('success'=>false,'error'=>true,'errors'=>$formErrors);
437
+ $this->getLayout()->getBlockSingleton('onestepcheckout/checkout')->setFormErrors($formErrors);
438
+
439
+ }
440
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
441
+ }
442
+
443
+ protected function _saveOrder($customer)
444
+ {
445
+ // Hack to fix weird Magento payment behaviour
446
+ $result = array();
447
+ try {
448
+ $payment = $this->getRequest()->getPost('payment', false);
449
+ if($payment) {
450
+ $payment = $this->filterPaymentData($payment);
451
+ $this->getQuote()->getPayment()->importData($payment);
452
+
453
+ $ccSaveAllowedMethods = array('ccsave');
454
+ $method = $this->getQuote()->getPayment()->getMethodInstance();
455
+
456
+ if(in_array($method->getCode(), $ccSaveAllowedMethods)){
457
+ $info = $method->getInfoInstance();
458
+ $info->setCcNumberEnc($info->encrypt($info->getCcNumber()));
459
+ }
460
+
461
+ }
462
+
463
+
464
+
465
+
466
+ if(!$this->getQuote()&& !$this->getQuote()->getShippingAddress()->getShippingDescription()){
467
+ Mage::throwException(Mage::helper('checkout')->__('Please choose a shipping method'));
468
+ }
469
+
470
+ if(!Mage::helper('customer')->isLoggedIn()){
471
+ $this->getQuote()->setTotalsCollectedFlag(false)->collectTotals();
472
+ }
473
+ $this->_getOnepage()->saveOrder();
474
+
475
+
476
+ if($customer) {
477
+ $order_id = $this->_getOnepage()->getLastOrderId();
478
+ $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
479
+
480
+ $order
481
+ ->setCustomerId($customer->getId())
482
+ ->setCustomerIsGuest(false)
483
+ ->setCustomerGroupId($customer->getGroupId())
484
+ ->setCustomerEmail($customer->getEmail())
485
+ ->setCustomerFirstname($customer->getFirstname())
486
+ ->setCustomerLastname($customer->getLastname())
487
+ ->setCustomerMiddlename($customer->getMiddlename())
488
+ ->setCustomerPrefix($customer->getPrefix())
489
+ ->setCustomerSuffix($customer->getSuffix())
490
+ ->setCustomerTaxvat($customer->getTaxvat())
491
+ ->setCustomerGender($customer->getGender())
492
+ ->save();
493
+ }
494
+
495
+ $redirectUrl = $this->_getOnepage()->getCheckout()->getRedirectUrl();
496
+
497
+ if($redirectUrl) {
498
+ $redirect = $redirectUrl;
499
+ } else {
500
+ $this->getQuote()->setIsActive(false);
501
+ $this->getQuote()->save();
502
+ $redirect = Mage::getUrl('checkout/onepage/success');
503
+ //$this->_redirect('checkout/onepage/success', array('_secure'=>true));
504
+ }
505
+ $result = array('success'=>true);
506
+ if (isset($redirect)) {
507
+ $result['redirect'] = $redirect;
508
+ }
509
+ } catch(Exception $e) {
510
+ //need to activate
511
+ $this->_getOnepage()->getQuote()->setIsActive(true);
512
+ //need to recalculate
513
+ $this->_getOnepage()->getQuote()->getShippingAddress()->setCollectShippingRates(true)->collectTotals();
514
+ $error = $e->getMessage();
515
+ $errors = array();
516
+ $errors['unknown_source_error'] = $error;
517
+ Mage::logException($e);
518
+ Mage::helper('checkout')->sendPaymentFailedEmail($this->getQuote(), $error);
519
+ $result = array('success'=>false,
520
+ 'error'=>true,
521
+ 'errors'=>$errors);
522
+ $this->getLayout()->getBlockSingleton('onestepcheckout/checkout')->setFormErrors($errors);
523
+
524
+ }
525
+
526
+ return $result;
527
+ }
528
+
529
+ public function getQuote(){
530
+ return $this->_getOnepage()->getQuote();
531
+ }
532
+
533
+ protected function _getOnepage()
534
+ {
535
+ return Mage::getSingleton('checkout/type_onepage');
536
+ }
537
+
538
+ protected function _getSession()
539
+ {
540
+ return Mage::getSingleton('customer/session');
541
+ }
542
+
543
+ protected function _getCustomer($email)
544
+ {
545
+ $model = Mage::getModel('customer/customer');
546
+ $model->setWebsiteId(Mage::app()->getStore()->getWebsiteId())->loadByEmail($email);
547
+
548
+ if($model->getId() == NULL) {
549
+ return false;
550
+ }
551
+
552
+ return $model;
553
+ }
554
+
555
+ protected function _isLoggedIn()
556
+ {
557
+ $helper = Mage::helper('customer');
558
+ if( $helper->isLoggedIn()) {
559
+ return true;
560
+ }
561
+
562
+ return false;
563
+ }
564
+
565
+ protected function _customerEmailExists($email, $websiteId = null)
566
+ {
567
+ $customer = Mage::getModel('customer/customer');
568
+ if ($websiteId) {
569
+ $customer->setWebsiteId($websiteId);
570
+ }
571
+ $customer->loadByEmail($email);
572
+ if ($customer->getId()) {
573
+ return $customer;
574
+ }
575
+ return false;
576
+ }
577
+
578
+ public function getAvailableRates($rates){
579
+ $return = array();
580
+ if(!empty($rates)){
581
+ foreach ($rates as $_code => $_rates){
582
+ foreach ($_rates as $rate){
583
+ $return['codes'][] = $rate->getCode();
584
+ $return['rates'][$rate->getCode()] = $rate;
585
+ }
586
+ }
587
+ }
588
+ return $return;
589
+ }
590
+ public function hasFormErrors($formErrors)
591
+ {
592
+ if($this->hasShippingErrors($formErrors) || $this->hasBillingErrors($formErrors) || $this->hasMethodErrors($formErrors) || $this->hasShipmentErrors($formErrors)) {
593
+ return true;
594
+ }
595
+
596
+ return false;
597
+ }
598
+
599
+ public function hasMethodErrors($formErrors)
600
+ {
601
+ if(isset($formErrors['shipping_method']) && $formErrors['shipping_method']) {
602
+ return true;
603
+ }
604
+
605
+ if(isset($formErrors['payment_method']) && $formErrors['payment_method']) {
606
+ return true;
607
+ }
608
+
609
+ if(isset($formErrors['payment_method_error'])) {
610
+ return true;
611
+ }
612
+
613
+ if(isset($formErrors['terms_error'])) {
614
+ return true;
615
+ }
616
+
617
+ if(isset($formErrors['agreements_error'])) {
618
+ return true;
619
+ }
620
+
621
+ return false;
622
+ }
623
+
624
+ public function hasShippingErrors($formErrors)
625
+ {
626
+ if(isset($formErrors['shipping_errors'])) {
627
+ if(count($formErrors['shipping_errors']) == 0) {
628
+ return false;
629
+ }
630
+ return true;
631
+ }
632
+ else {
633
+ return true;
634
+ }
635
+ }
636
+
637
+ public function hasBillingErrors($formErrors)
638
+ {
639
+ if(count($formErrors) > 0) {
640
+ if(isset($formErrors['billing_errors'])) {
641
+ if(count($formErrors['billing_errors']) == 0) {
642
+
643
+ return false;
644
+ }
645
+ return true;
646
+ }
647
+ else {
648
+ return true;
649
+ }
650
+ }
651
+ return false;
652
+ }
653
+
654
+ public function hasShipmentErrors($formErrors)
655
+ {
656
+ if(!empty($formErrors['shipping_method'])){
657
+ return true;
658
+ }
659
+ return false;
660
+ }
661
+
662
+ protected function filterPaymentData($payment){
663
+ if($payment){
664
+
665
+ foreach($payment as $key => $value){
666
+
667
+ if(!strstr($key, '_data') && is_array($value) && !empty($value)){
668
+ foreach($value as $subkey => $realValue){
669
+ if(!empty($realValue)){
670
+ $payment[$subkey]=$realValue;
671
+ }
672
+ }
673
+ }
674
+ }
675
+
676
+ foreach ($payment as $key => $value){
677
+ if(!strstr($key, '_data') && is_array($value)){
678
+ unset($payment[$key]);
679
+ }
680
+ }
681
+ }
682
+
683
+ return $payment;
684
+ }
685
+
686
+ protected function _isEmailRegistered($email)
687
+ {
688
+ $model = Mage::getModel('customer/customer');
689
+ $model->setWebsiteId(Mage::app()->getStore()->getWebsiteId())->loadByEmail($email);
690
+
691
+ if($model->getId() == NULL) {
692
+ return false;
693
+ }
694
+
695
+ return true;
696
+ }
697
+ }
app/code/community/EasyNolo/BancaSellaPro/controllers/Checkout/OnepageController.php ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once Mage::getModuleDir('controllers', 'Mage_Checkout') . DS . 'OnepageController.php';
4
+
5
+ if (Mage::helper('easynolo_bancasellapro')->isIWDOpcEnable()) {
6
+ require_once Mage::getModuleDir('controllers', 'IWD_Opc') . DS . 'Checkout' . DS . 'OnepageController.php';
7
+ abstract class EasyNolo_BancaSellaPro_Checkout_OnepageController_Abstract extends IWD_Opc_Checkout_OnepageController {}
8
+ } else {
9
+ abstract class EasyNolo_BancaSellaPro_Checkout_OnepageController_Abstract extends Mage_Checkout_OnepageController {}
10
+ }
11
+
12
+ class EasyNolo_BancaSellaPro_Checkout_OnepageController extends EasyNolo_BancaSellaPro_Checkout_OnepageController_Abstract
13
+ {
14
+ /**
15
+ * Create order action
16
+ */
17
+ public function saveOrderAction()
18
+ {
19
+ if(version_compare(Mage::getVersion(), '1.8.1') >= 0) {
20
+ if (!$this->_validateFormKey()) {
21
+ $this->_redirect('*/*');
22
+ return;
23
+ }
24
+ }
25
+
26
+ $result = array();
27
+ try {
28
+
29
+ if ($this->getRequest()->isPost()) {
30
+ $data = $this->getRequest()->getPost('billing', array());
31
+ if (!empty($data)) {
32
+ $customerAddressId = $this->getRequest()->getPost('billing_address_id', false);
33
+
34
+ if (isset($data['email'])) {
35
+ $data['email'] = trim($data['email']);
36
+ }
37
+ $result = $this->getOnepage()->saveBilling($data, $customerAddressId);
38
+
39
+ if (!empty($result['error'])) {
40
+ return $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
41
+ }
42
+ }
43
+
44
+ if (empty($data['use_for_shipping'])) {
45
+ $data = $this->getRequest()->getPost('shipping', array());
46
+ if (!empty($data)) {
47
+ $customerAddressId = $this->getRequest()->getPost('shipping_address_id', false);
48
+ $result = $this->getOnepage()->saveShipping($data, $customerAddressId);
49
+
50
+ if (!empty($result['error'])) {
51
+ return $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
52
+ }
53
+ }
54
+ }
55
+ }
56
+
57
+ $requiredAgreements = Mage::helper('checkout')->getRequiredAgreementIds();
58
+ if ($requiredAgreements) {
59
+ $postedAgreements = array_keys($this->getRequest()->getPost('agreement', array()));
60
+ $diff = array_diff($requiredAgreements, $postedAgreements);
61
+ if ($diff) {
62
+ $result['success'] = false;
63
+ $result['error'] = true;
64
+ $result['error_messages'] = $this->__('Please agree to all the terms and conditions before placing the order.');
65
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
66
+ return;
67
+ }
68
+ }
69
+
70
+ $data = $this->getRequest()->getPost('payment', array());
71
+ if ($data) {
72
+ if(version_compare(Mage::getVersion(), '1.9') >= 0) {
73
+ $data['checks'] = Mage_Payment_Model_Method_Abstract::CHECK_USE_CHECKOUT
74
+ | Mage_Payment_Model_Method_Abstract::CHECK_USE_FOR_COUNTRY
75
+ | Mage_Payment_Model_Method_Abstract::CHECK_USE_FOR_CURRENCY
76
+ | Mage_Payment_Model_Method_Abstract::CHECK_ORDER_TOTAL_MIN_MAX
77
+ | Mage_Payment_Model_Method_Abstract::CHECK_ZERO_TOTAL;
78
+ }
79
+ $this->getOnepage()->getQuote()->getPayment()->importData($data);
80
+ }
81
+
82
+ $this->getOnepage()->saveOrder();
83
+
84
+ $redirectUrl = $this->getOnepage()->getCheckout()->getRedirectUrl();
85
+ $result['success'] = true;
86
+ $result['error'] = false;
87
+ } catch (Mage_Payment_Model_Info_Exception $e) {
88
+ $message = $e->getMessage();
89
+ if (!empty($message)) {
90
+ $result['error_messages'] = $message;
91
+ }
92
+ $result['goto_section'] = 'payment';
93
+ $result['update_section'] = array(
94
+ 'name' => 'payment-method',
95
+ 'html' => $this->_getPaymentMethodsHtml()
96
+ );
97
+ } catch (Mage_Core_Exception $e) {
98
+ Mage::logException($e);
99
+ Mage::helper('checkout')->sendPaymentFailedEmail($this->getOnepage()->getQuote(), $e->getMessage());
100
+ $result['success'] = false;
101
+ $result['error'] = true;
102
+ $result['error_messages'] = $e->getMessage();
103
+
104
+ $gotoSection = $this->getOnepage()->getCheckout()->getGotoSection();
105
+ if ($gotoSection) {
106
+ $result['goto_section'] = $gotoSection;
107
+ $this->getOnepage()->getCheckout()->setGotoSection(null);
108
+ }
109
+ $updateSection = $this->getOnepage()->getCheckout()->getUpdateSection();
110
+ if ($updateSection) {
111
+ if (isset($this->_sectionUpdateFunctions[$updateSection])) {
112
+ $updateSectionFunction = $this->_sectionUpdateFunctions[$updateSection];
113
+ $result['update_section'] = array(
114
+ 'name' => $updateSection,
115
+ 'html' => $this->$updateSectionFunction()
116
+ );
117
+ }
118
+ $this->getOnepage()->getCheckout()->setUpdateSection(null);
119
+ }
120
+ } catch (Exception $e) {
121
+ Mage::logException($e);
122
+ Mage::helper('checkout')->sendPaymentFailedEmail($this->getOnepage()->getQuote(), $e->getMessage());
123
+ $result['success'] = false;
124
+ $result['error'] = true;
125
+ $result['error_messages'] = $this->__('There was an error processing your order. Please contact us or try again later.');
126
+ }
127
+ $this->getOnepage()->getQuote()->save();
128
+ /**
129
+ * when there is redirect to third party, we don't want to save order yet.
130
+ * we will save the order in return action.
131
+ */
132
+ if (isset($redirectUrl)) {
133
+ $result['redirect'] = $redirectUrl;
134
+ }
135
+
136
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
137
+ }
138
+ }
app/code/community/EasyNolo/BancaSellaPro/controllers/GestpayController.php CHANGED
@@ -158,7 +158,7 @@ class EasyNolo_BancaSellaPro_GestpayController extends Mage_Core_Controller_Fron
158
  $webservice->setDecryptParam($a , $b);
159
  $helper->decryptPaymentRequest ($webservice);
160
 
161
- $orderId = $webservice->getShopTransactionID();
162
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
163
 
164
  if($order->getId()){
158
  $webservice->setDecryptParam($a , $b);
159
  $helper->decryptPaymentRequest ($webservice);
160
 
161
+ $orderId = $_helper->getIncrementIdByShopTransactionId($webservice->getShopTransactionID());
162
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
163
 
164
  if($order->getId()){
app/code/community/EasyNolo/BancaSellaPro/controllers/JsonController.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/controllers/TokenizationController.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/etc/config.xml CHANGED
@@ -85,6 +85,113 @@
85
  </setup>
86
  </easynolo_bancasellapro_setup>
87
  </resources>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  </global>
89
 
90
  <phpunit>
@@ -111,6 +218,13 @@
111
  </modules>
112
  </args>
113
  </opc>
 
 
 
 
 
 
 
114
  </routers>
115
  <layout>
116
  <updates>
@@ -136,6 +250,14 @@
136
  </easynolo_bancasellapro_add_result>
137
  </observers>
138
  </iwd_opc_before_send_result_save_payment>
 
 
 
 
 
 
 
 
139
  <checkout_type_onepage_save_order_after>
140
  <observers>
141
  <easynolo_bancasellapro_save_finger_print>
85
  </setup>
86
  </easynolo_bancasellapro_setup>
87
  </resources>
88
+ <gestpaypro>
89
+ <alternative_payments>
90
+ <alipay>
91
+ <title>Alipay</title>
92
+ <type>S2PALI</type>
93
+ <template>default.phtml</template>
94
+ </alipay>
95
+ <bitcoin>
96
+ <title>Bitcoin</title>
97
+ <type>S2PBIT</type>
98
+ <template>default.phtml</template>
99
+ </bitcoin>
100
+ <consel>
101
+ <title>Consel</title>
102
+ <type>CONSEL</type>
103
+ <template>default.phtml</template>
104
+ </consel>
105
+ <eps>
106
+ <title>EPS</title>
107
+ <type>S2PALI</type>
108
+ <template>default.phtml</template>
109
+ </eps>
110
+ <giropay>
111
+ <title>Giropay</title>
112
+ <type>S2PGIR</type>
113
+ <template>default.phtml</template>
114
+ </giropay>
115
+ <mybank>
116
+ <title>MyBank</title>
117
+ <encrypt_helper>easynolo_bancasellapro/alternativePayments_mybank</encrypt_helper>
118
+ <type>MYBANK</type>
119
+ </mybank>
120
+ <ideal>
121
+ <title>IDeal</title>
122
+ <type>IDEAL</type>
123
+ <encrypt_helper>easynolo_bancasellapro/alternativePayments_ideal</encrypt_helper>
124
+ <template>default.phtml</template>
125
+ </ideal>
126
+ <klarna>
127
+ <title>Klarna</title>
128
+ <type>S2PKLA</type>
129
+ <encrypt_helper>easynolo_bancasellapro/alternativePayments_klarna</encrypt_helper>
130
+ <template>klarna.phtml</template>
131
+ </klarna>
132
+ <konbini>
133
+ <title>Konbini</title>
134
+ <type>S2PKON</type>
135
+ <template>default.phtml</template>
136
+ </konbini>
137
+ <mercadopago>
138
+ <title>MercadoPago</title>
139
+ <type>S2PMER</type>
140
+ <template>default.phtml</template>
141
+ </mercadopago>
142
+ <multibanco>
143
+ <title>Multibanco</title>
144
+ <type>S2PMUL</type>
145
+ <template>default.phtml</template>
146
+ </multibanco>
147
+ <paypal>
148
+ <title>Paypal</title>
149
+ <type>PAYPAL</type>
150
+ <encrypt_helper>easynolo_bancasellapro/alternativePayments_paypal</encrypt_helper>
151
+ <template>default.phtml</template>
152
+ </paypal>
153
+ <paysafecard>
154
+ <title>Paysafecard</title>
155
+ <type>S2PPSC</type>
156
+ <template>default.phtml</template>
157
+ </paysafecard>
158
+ <qiwi>
159
+ <title>Qiwi</title>
160
+ <type>S2PQIW</type>
161
+ <template>default.phtml</template>
162
+ </qiwi>
163
+ <sofort>
164
+ <title>Sofort</title>
165
+ <type>SOFORT</type>
166
+ <template>default.phtml</template>
167
+ </sofort>
168
+ <tenpay>
169
+ <title>TenPay</title>
170
+ <type>S2PTEN</type>
171
+ <template>default.phtml</template>
172
+ </tenpay>
173
+ <timpersonal>
174
+ <title>TIMpersonal</title>
175
+ <type>TIMPERSONAL</type>
176
+ <template>default.phtml</template>
177
+ </timpersonal>
178
+ <unionpay>
179
+ <title>UnionPay</title>
180
+ <type>S2PUNI</type>
181
+ <template>default.phtml</template>
182
+ </unionpay>
183
+ <webmoney>
184
+ <title>WebMoney</title>
185
+ <type>S2PWMO</type>
186
+ <template>default.phtml</template>
187
+ </webmoney>
188
+ <yandex>
189
+ <title>Yandex</title>
190
+ <type>S2PYAN</type>
191
+ <template>default.phtml</template>
192
+ </yandex>
193
+ </alternative_payments>
194
+ </gestpaypro>
195
  </global>
196
 
197
  <phpunit>
218
  </modules>
219
  </args>
220
  </opc>
221
+ <checkout>
222
+ <args>
223
+ <modules>
224
+ <easynolo_bancasellapro before="Mage_Checkout_OnepageController">EasyNolo_BancaSellaPro_Checkout</easynolo_bancasellapro>
225
+ </modules>
226
+ </args>
227
+ </checkout>
228
  </routers>
229
  <layout>
230
  <updates>
250
  </easynolo_bancasellapro_add_result>
251
  </observers>
252
  </iwd_opc_before_send_result_save_payment>
253
+ <controller_action_postdispatch_checkout_onepage_saveOrder>
254
+ <observers>
255
+ <easynolo_bancasellapro_add_result>
256
+ <class>easynolo_bancasellapro/observer</class>
257
+ <method>addDataToResultSaveOrderIframe</method>
258
+ </easynolo_bancasellapro_add_result>
259
+ </observers>
260
+ </controller_action_postdispatch_checkout_onepage_saveOrder>
261
  <checkout_type_onepage_save_order_after>
262
  <observers>
263
  <easynolo_bancasellapro_save_finger_print>
app/code/community/EasyNolo/BancaSellaPro/etc/jstranslator.xml CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/etc/system.xml CHANGED
@@ -475,7 +475,6 @@
475
  </submitted_order_status>
476
  </fields>
477
  </gestpaypro_riskified>
478
- <!--
479
  <gestpaypro_alternative_payments translate="label" module="easynolo_bancasellapro">
480
  <label>EasyNolo Banca Sella GestPay Pro - Alternative Payments</label>
481
  <frontend_type>text</frontend_type>
@@ -484,44 +483,79 @@
484
  <show_in_website>1</show_in_website>
485
  <show_in_store>1</show_in_store>
486
  <fields>
487
- <enable_paypal translate="label">
488
- <label>Enable Paypal</label>
489
  <frontend_type>select</frontend_type>
490
  <source_model>adminhtml/system_config_source_yesno</source_model>
491
  <comment>
492
- <![CDATA[Flag to activate Paypal integration]]>
493
  </comment>
494
  <sort_order>1</sort_order>
495
  <show_in_default>1</show_in_default>
496
  <show_in_website>1</show_in_website>
497
  <show_in_store>0</show_in_store>
498
- </enable_paypal>
499
- <paypal_show_product_info translate="label">
500
- <label>Paypal - Show product info</label>
501
  <frontend_type>select</frontend_type>
502
  <source_model>adminhtml/system_config_source_yesno</source_model>
503
  <comment>
504
- <![CDATA[Show product info at paypal’s buying page]]>
505
  </comment>
506
- <sort_order>2</sort_order>
507
  <show_in_default>1</show_in_default>
508
  <show_in_website>1</show_in_website>
509
  <show_in_store>0</show_in_store>
510
- <depends><enable_paypal>1</enable_paypal></depends>
511
- </paypal_show_product_info>
512
- <paypal_seller_protection translate="label">
513
- <label>Paypal - Seller Protection</label>
514
  <frontend_type>select</frontend_type>
515
  <source_model>adminhtml/system_config_source_yesno</source_model>
516
  <comment>
517
- <![CDATA[Enable Paypal seller protection]]>
518
  </comment>
519
- <sort_order>3</sort_order>
520
  <show_in_default>1</show_in_default>
521
  <show_in_website>1</show_in_website>
522
  <show_in_store>0</show_in_store>
523
- <depends><enable_paypal>1</enable_paypal></depends>
524
- </paypal_seller_protection>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
525
  <enable_mybank translate="label">
526
  <label>Enable MyBank</label>
527
  <frontend_type>select</frontend_type>
@@ -529,20 +563,22 @@
529
  <comment>
530
  <![CDATA[Flag to activate MyBank integration]]>
531
  </comment>
532
- <sort_order>4</sort_order>
533
  <show_in_default>1</show_in_default>
534
  <show_in_website>1</show_in_website>
535
  <show_in_store>0</show_in_store>
536
  </enable_mybank>
 
537
  <mybank_bankcode>
538
- <label>MyBank Bank Code</label>
539
  <frontend_type>text</frontend_type>
540
- <sort_order>5</sort_order>
541
  <show_in_default>1</show_in_default>
542
  <show_in_website>1</show_in_website>
543
  <show_in_store>0</show_in_store>
544
  <depends><enable_mybank>1</enable_mybank></depends>
545
  </mybank_bankcode>
 
546
  <enable_ideal translate="label">
547
  <label>Enable IDeal</label>
548
  <frontend_type>select</frontend_type>
@@ -550,20 +586,141 @@
550
  <comment>
551
  <![CDATA[Flag to activate IDeal integration]]>
552
  </comment>
553
- <sort_order>6</sort_order>
554
  <show_in_default>1</show_in_default>
555
  <show_in_website>1</show_in_website>
556
  <show_in_store>0</show_in_store>
557
  </enable_ideal>
 
558
  <ideal_bankcode>
559
- <label>IDeal Bank Code</label>
560
  <frontend_type>text</frontend_type>
561
- <sort_order>7</sort_order>
562
  <show_in_default>1</show_in_default>
563
  <show_in_website>1</show_in_website>
564
  <show_in_store>0</show_in_store>
565
  <depends><enable_ideal>1</enable_ideal></depends>
566
  </ideal_bankcode>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
567
  <enable_sofort translate="label">
568
  <label>Enable Sofort</label>
569
  <frontend_type>select</frontend_type>
@@ -571,14 +728,78 @@
571
  <comment>
572
  <![CDATA[Flag to activate Sofort integration]]>
573
  </comment>
574
- <sort_order>8</sort_order>
575
  <show_in_default>1</show_in_default>
576
  <show_in_website>1</show_in_website>
577
  <show_in_store>0</show_in_store>
578
  </enable_sofort>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
  </fields>
580
  </gestpaypro_alternative_payments>
581
- -->
582
  </groups>
583
  </payment>
584
  </sections>
475
  </submitted_order_status>
476
  </fields>
477
  </gestpaypro_riskified>
 
478
  <gestpaypro_alternative_payments translate="label" module="easynolo_bancasellapro">
479
  <label>EasyNolo Banca Sella GestPay Pro - Alternative Payments</label>
480
  <frontend_type>text</frontend_type>
483
  <show_in_website>1</show_in_website>
484
  <show_in_store>1</show_in_store>
485
  <fields>
486
+ <enable_alipay translate="label">
487
+ <label>Enable Alipay</label>
488
  <frontend_type>select</frontend_type>
489
  <source_model>adminhtml/system_config_source_yesno</source_model>
490
  <comment>
491
+ <![CDATA[Flag to activate Alipay integration]]>
492
  </comment>
493
  <sort_order>1</sort_order>
494
  <show_in_default>1</show_in_default>
495
  <show_in_website>1</show_in_website>
496
  <show_in_store>0</show_in_store>
497
+ </enable_alipay>
498
+ <enable_bitcoin translate="label">
499
+ <label>Enable Bitcoin</label>
500
  <frontend_type>select</frontend_type>
501
  <source_model>adminhtml/system_config_source_yesno</source_model>
502
  <comment>
503
+ <![CDATA[Flag to activate Bitcoin integration]]>
504
  </comment>
505
+ <sort_order>10</sort_order>
506
  <show_in_default>1</show_in_default>
507
  <show_in_website>1</show_in_website>
508
  <show_in_store>0</show_in_store>
509
+ </enable_bitcoin>
510
+ <enable_consel translate="label">
511
+ <label>Enable Consel</label>
 
512
  <frontend_type>select</frontend_type>
513
  <source_model>adminhtml/system_config_source_yesno</source_model>
514
  <comment>
515
+ <![CDATA[Flag to activate Consel integration]]>
516
  </comment>
517
+ <sort_order>20</sort_order>
518
  <show_in_default>1</show_in_default>
519
  <show_in_website>1</show_in_website>
520
  <show_in_store>0</show_in_store>
521
+ </enable_consel>
522
+ <consel_promocode translate="label">
523
+ <label>Consel - Merchant Promotional Code</label>
524
+ <frontend_type>text</frontend_type>
525
+ <comment>
526
+ <![CDATA[Mandatory to show Consel in the pagam's Payment Method]]>
527
+ </comment>
528
+ <sort_order>22</sort_order>
529
+ <show_in_default>1</show_in_default>
530
+ <show_in_website>1</show_in_website>
531
+ <show_in_store>0</show_in_store>
532
+ <depends><enable_consel>1</enable_consel></depends>
533
+ </consel_promocode>
534
+ <enable_eps translate="label">
535
+ <label>Enable EPS</label>
536
+ <frontend_type>select</frontend_type>
537
+ <source_model>adminhtml/system_config_source_yesno</source_model>
538
+ <comment>
539
+ <![CDATA[Flag to activate EPS integration]]>
540
+ </comment>
541
+ <sort_order>30</sort_order>
542
+ <show_in_default>1</show_in_default>
543
+ <show_in_website>1</show_in_website>
544
+ <show_in_store>0</show_in_store>
545
+ </enable_eps>
546
+ <enable_giropay translate="label">
547
+ <label>Enable Giropay</label>
548
+ <frontend_type>select</frontend_type>
549
+ <source_model>adminhtml/system_config_source_yesno</source_model>
550
+ <comment>
551
+ <![CDATA[Flag to activate EPS integration]]>
552
+ </comment>
553
+ <sort_order>40</sort_order>
554
+ <show_in_default>1</show_in_default>
555
+ <show_in_website>1</show_in_website>
556
+ <show_in_store>0</show_in_store>
557
+ </enable_giropay>
558
+
559
  <enable_mybank translate="label">
560
  <label>Enable MyBank</label>
561
  <frontend_type>select</frontend_type>
563
  <comment>
564
  <![CDATA[Flag to activate MyBank integration]]>
565
  </comment>
566
+ <sort_order>50</sort_order>
567
  <show_in_default>1</show_in_default>
568
  <show_in_website>1</show_in_website>
569
  <show_in_store>0</show_in_store>
570
  </enable_mybank>
571
+
572
  <mybank_bankcode>
573
+ <label>MyBank - Bank Code</label>
574
  <frontend_type>text</frontend_type>
575
+ <sort_order>60</sort_order>
576
  <show_in_default>1</show_in_default>
577
  <show_in_website>1</show_in_website>
578
  <show_in_store>0</show_in_store>
579
  <depends><enable_mybank>1</enable_mybank></depends>
580
  </mybank_bankcode>
581
+
582
  <enable_ideal translate="label">
583
  <label>Enable IDeal</label>
584
  <frontend_type>select</frontend_type>
586
  <comment>
587
  <![CDATA[Flag to activate IDeal integration]]>
588
  </comment>
589
+ <sort_order>70</sort_order>
590
  <show_in_default>1</show_in_default>
591
  <show_in_website>1</show_in_website>
592
  <show_in_store>0</show_in_store>
593
  </enable_ideal>
594
+
595
  <ideal_bankcode>
596
+ <label>IDeal - Bank Code</label>
597
  <frontend_type>text</frontend_type>
598
+ <sort_order>80</sort_order>
599
  <show_in_default>1</show_in_default>
600
  <show_in_website>1</show_in_website>
601
  <show_in_store>0</show_in_store>
602
  <depends><enable_ideal>1</enable_ideal></depends>
603
  </ideal_bankcode>
604
+
605
+ <enable_klarna translate="label">
606
+ <label>Enable Klarna</label>
607
+ <frontend_type>select</frontend_type>
608
+ <source_model>adminhtml/system_config_source_yesno</source_model>
609
+ <comment>
610
+ <![CDATA[Flag to activate Klarna integration]]>
611
+ </comment>
612
+ <sort_order>90</sort_order>
613
+ <show_in_default>1</show_in_default>
614
+ <show_in_website>1</show_in_website>
615
+ <show_in_store>0</show_in_store>
616
+ </enable_klarna>
617
+
618
+ <enable_konbini translate="label">
619
+ <label>Enable Konbini</label>
620
+ <frontend_type>select</frontend_type>
621
+ <source_model>adminhtml/system_config_source_yesno</source_model>
622
+ <comment>
623
+ <![CDATA[Flag to activate Konbini integration]]>
624
+ </comment>
625
+ <sort_order>100</sort_order>
626
+ <show_in_default>1</show_in_default>
627
+ <show_in_website>1</show_in_website>
628
+ <show_in_store>0</show_in_store>
629
+ </enable_konbini>
630
+
631
+ <enable_mercadopago translate="label">
632
+ <label>Enable MercadoPago</label>
633
+ <frontend_type>select</frontend_type>
634
+ <source_model>adminhtml/system_config_source_yesno</source_model>
635
+ <comment>
636
+ <![CDATA[Flag to activate MercadoPago integration]]>
637
+ </comment>
638
+ <sort_order>110</sort_order>
639
+ <show_in_default>1</show_in_default>
640
+ <show_in_website>1</show_in_website>
641
+ <show_in_store>0</show_in_store>
642
+ </enable_mercadopago>
643
+
644
+ <enable_multibanco translate="label">
645
+ <label>Enable Multibanco</label>
646
+ <frontend_type>select</frontend_type>
647
+ <source_model>adminhtml/system_config_source_yesno</source_model>
648
+ <comment>
649
+ <![CDATA[Flag to activate Multibanco integration]]>
650
+ </comment>
651
+ <sort_order>110</sort_order>
652
+ <show_in_default>1</show_in_default>
653
+ <show_in_website>1</show_in_website>
654
+ <show_in_store>0</show_in_store>
655
+ </enable_multibanco>
656
+
657
+
658
+ <enable_paypal translate="label">
659
+ <label>Enable Paypal</label>
660
+ <frontend_type>select</frontend_type>
661
+ <source_model>adminhtml/system_config_source_yesno</source_model>
662
+ <comment>
663
+ <![CDATA[Flag to activate Paypal integration]]>
664
+ </comment>
665
+ <sort_order>120</sort_order>
666
+ <show_in_default>1</show_in_default>
667
+ <show_in_website>1</show_in_website>
668
+ <show_in_store>0</show_in_store>
669
+ </enable_paypal>
670
+
671
+ <paypal_show_product_info translate="label">
672
+ <label>Paypal - Show product info</label>
673
+ <frontend_type>select</frontend_type>
674
+ <source_model>adminhtml/system_config_source_yesno</source_model>
675
+ <comment>
676
+ <![CDATA[Show product info at paypal’s buying page]]>
677
+ </comment>
678
+ <sort_order>121</sort_order>
679
+ <show_in_default>1</show_in_default>
680
+ <show_in_website>1</show_in_website>
681
+ <show_in_store>0</show_in_store>
682
+ <depends><enable_paypal>1</enable_paypal></depends>
683
+ </paypal_show_product_info>
684
+ <paypal_seller_protection translate="label">
685
+ <label>Paypal - Seller Protection</label>
686
+ <frontend_type>select</frontend_type>
687
+ <source_model>adminhtml/system_config_source_yesno</source_model>
688
+ <comment>
689
+ <![CDATA[Enable Paypal seller protection]]>
690
+ </comment>
691
+ <sort_order>123</sort_order>
692
+ <show_in_default>1</show_in_default>
693
+ <show_in_website>1</show_in_website>
694
+ <show_in_store>0</show_in_store>
695
+ <depends><enable_paypal>1</enable_paypal></depends>
696
+ </paypal_seller_protection>
697
+
698
+ <enable_paysafecard translate="label">
699
+ <label>Enable Paysafecard</label>
700
+ <frontend_type>select</frontend_type>
701
+ <source_model>adminhtml/system_config_source_yesno</source_model>
702
+ <comment>
703
+ <![CDATA[Flag to activate Paysafecard integration]]>
704
+ </comment>
705
+ <sort_order>130</sort_order>
706
+ <show_in_default>1</show_in_default>
707
+ <show_in_website>1</show_in_website>
708
+ <show_in_store>0</show_in_store>
709
+ </enable_paysafecard>
710
+
711
+ <enable_qiwi translate="label">
712
+ <label>Enable QIWI</label>
713
+ <frontend_type>select</frontend_type>
714
+ <source_model>adminhtml/system_config_source_yesno</source_model>
715
+ <comment>
716
+ <![CDATA[Flag to activate QIWI integration]]>
717
+ </comment>
718
+ <sort_order>135</sort_order>
719
+ <show_in_default>1</show_in_default>
720
+ <show_in_website>1</show_in_website>
721
+ <show_in_store>0</show_in_store>
722
+ </enable_qiwi>
723
+
724
  <enable_sofort translate="label">
725
  <label>Enable Sofort</label>
726
  <frontend_type>select</frontend_type>
728
  <comment>
729
  <![CDATA[Flag to activate Sofort integration]]>
730
  </comment>
731
+ <sort_order>140</sort_order>
732
  <show_in_default>1</show_in_default>
733
  <show_in_website>1</show_in_website>
734
  <show_in_store>0</show_in_store>
735
  </enable_sofort>
736
+
737
+ <enable_tenpay translate="label">
738
+ <label>Enable TenPay</label>
739
+ <frontend_type>select</frontend_type>
740
+ <source_model>adminhtml/system_config_source_yesno</source_model>
741
+ <comment>
742
+ <![CDATA[Flag to activate TenPay integration]]>
743
+ </comment>
744
+ <sort_order>150</sort_order>
745
+ <show_in_default>1</show_in_default>
746
+ <show_in_website>1</show_in_website>
747
+ <show_in_store>0</show_in_store>
748
+ </enable_tenpay>
749
+
750
+ <enable_timpersonal translate="label">
751
+ <label>Enable TIMpersonal</label>
752
+ <frontend_type>select</frontend_type>
753
+ <source_model>adminhtml/system_config_source_yesno</source_model>
754
+ <comment>
755
+ <![CDATA[Flag to activate TIMpersonal integration]]>
756
+ </comment>
757
+ <sort_order>160</sort_order>
758
+ <show_in_default>1</show_in_default>
759
+ <show_in_website>1</show_in_website>
760
+ <show_in_store>0</show_in_store>
761
+ </enable_timpersonal>
762
+
763
+ <enable_unionpay translate="label">
764
+ <label>Enable UnionPay</label>
765
+ <frontend_type>select</frontend_type>
766
+ <source_model>adminhtml/system_config_source_yesno</source_model>
767
+ <comment>
768
+ <![CDATA[Flag to activate UnionPay integration]]>
769
+ </comment>
770
+ <sort_order>170</sort_order>
771
+ <show_in_default>1</show_in_default>
772
+ <show_in_website>1</show_in_website>
773
+ <show_in_store>0</show_in_store>
774
+ </enable_unionpay>
775
+
776
+ <enable_webmoney translate="label">
777
+ <label>Enable WebMoney</label>
778
+ <frontend_type>select</frontend_type>
779
+ <source_model>adminhtml/system_config_source_yesno</source_model>
780
+ <comment>
781
+ <![CDATA[Flag to activate WebMoney integration]]>
782
+ </comment>
783
+ <sort_order>180</sort_order>
784
+ <show_in_default>1</show_in_default>
785
+ <show_in_website>1</show_in_website>
786
+ <show_in_store>0</show_in_store>
787
+ </enable_webmoney>
788
+
789
+ <enable_yandex translate="label">
790
+ <label>Enable Yandex</label>
791
+ <frontend_type>select</frontend_type>
792
+ <source_model>adminhtml/system_config_source_yesno</source_model>
793
+ <comment>
794
+ <![CDATA[Flag to activate Yandex integration]]>
795
+ </comment>
796
+ <sort_order>180</sort_order>
797
+ <show_in_default>1</show_in_default>
798
+ <show_in_website>1</show_in_website>
799
+ <show_in_store>0</show_in_store>
800
+ </enable_yandex>
801
  </fields>
802
  </gestpaypro_alternative_payments>
 
803
  </groups>
804
  </payment>
805
  </sections>
app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/install-1.3.0.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/upgrade-1.3.0-1.3.1.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/upgrade-1.4.2-1.4.3.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/upgrade-1.4.3-1.4.4.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/upgrade-1.4.4-1.4.5.php CHANGED
File without changes
app/code/community/EasyNolo/BancaSellaPro/sql/easynolo_bancasellapro_setup/upgrade-1.4.5-1.4.6.php CHANGED
File without changes
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/layout/easynolo_bancasellapro.xml RENAMED
@@ -44,6 +44,7 @@
44
  <reference name="head">
45
  <block type="easynolo_bancasellapro/utility_text" name="gestpay.iframe.external"/>
46
  <action method="addJs"><script>prototype/window.js</script></action>
 
47
  <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
48
  <action method="addCss"><name>lib/prototype/windows/themes/magento.css</name></action>
49
  <action method="addJs" ifconfig="payment/gestpaypro_red/enable"><script>bancasellapro/red_blackbox.js</script></action>
@@ -82,9 +83,11 @@
82
  <reference name="head">
83
  <block type="easynolo_bancasellapro/utility_text" name="gestpay.iframe.external"/>
84
  <action method="addJs"><script>prototype/window.js</script></action>
 
85
  <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
86
  <action method="addCss"><name>lib/prototype/windows/themes/magento.css</name></action>
87
- <action method="addItem"><type>skin_js</type><name>js/easynolo_bancasella/gestpayform_onepagecheckout.js</name></action>
 
88
  <block type="core/text" name="paymentfont">
89
  <action method="setText">
90
  <text>
@@ -101,6 +104,31 @@
101
  </reference>
102
  </opc_index_index>
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  <!--WARNING: if you use a magento version 1.6 you must to use this comment handle instead of precedent handle-->
105
  <!--<opc_index_index>-->
106
  <!--<reference name="head">-->
@@ -112,6 +140,30 @@
112
  <!--</reference>-->
113
  <!--</opc_index_index>-->
114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
 
116
 
117
 
44
  <reference name="head">
45
  <block type="easynolo_bancasellapro/utility_text" name="gestpay.iframe.external"/>
46
  <action method="addJs"><script>prototype/window.js</script></action>
47
+ <action method="addItem"><type>skin_css</type><name>css/easynolo_bancasella/gestpay.css</name></action>
48
  <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
49
  <action method="addCss"><name>lib/prototype/windows/themes/magento.css</name></action>
50
  <action method="addJs" ifconfig="payment/gestpaypro_red/enable"><script>bancasellapro/red_blackbox.js</script></action>
83
  <reference name="head">
84
  <block type="easynolo_bancasellapro/utility_text" name="gestpay.iframe.external"/>
85
  <action method="addJs"><script>prototype/window.js</script></action>
86
+ <action method="addItem"><type>skin_css</type><name>css/easynolo_bancasella/gestpay.css</name></action>
87
  <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
88
  <action method="addCss"><name>lib/prototype/windows/themes/magento.css</name></action>
89
+ <action method="addJs"><script>bancasellapro/gestpayform_onepagecheckout_jquery.js</script></action>
90
+ <action method="addJs"><script>bancasellapro/gestpayform_onepagecheckout.js</script><params><![CDATA[name="gestpayform_iwd"]]></params></action>
91
  <block type="core/text" name="paymentfont">
92
  <action method="setText">
93
  <text>
104
  </reference>
105
  </opc_index_index>
106
 
107
+ <iwd_opc_index_index>
108
+ <reference name="head">
109
+ <block type="easynolo_bancasellapro/utility_text" name="gestpay.iframe.external"/>
110
+ <action method="addJs"><script>prototype/window.js</script></action>
111
+ <action method="addItem"><type>skin_css</type><name>css/easynolo_bancasella/gestpay.css</name></action>
112
+ <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
113
+ <action method="addCss"><name>lib/prototype/windows/themes/magento.css</name></action>
114
+ <action method="addJs"><script>bancasellapro/gestpayform_onepagecheckout_jquery.js</script></action>
115
+ <action method="addJs"><script>bancasellapro/gestpayform_onepagecheckout.js</script><params><![CDATA[name="gestpayform_iwd"]]></params></action>
116
+ <block type="core/text" name="paymentfont">
117
+ <action method="setText">
118
+ <text>
119
+ <![CDATA[<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css">]]>
120
+ </text>
121
+ </action>
122
+ </block>
123
+ <reference name="before_body_end">
124
+ <block type="core/text" name="gestpaypro.red.script.block">
125
+ <action method="setText" ifconfig="payment/gestpaypro_red/enable"><text><![CDATA[<script src="https://mpsnare.iesnare.com/snare.js"></script>]]></text></action>
126
+ </block>
127
+ <block type="core/template" name="gestpaypro.iframe.script.block" template="easynolo/bancasellapro/gestpay/iframe.phtml" ifconfig="payment/gestpaypro/iframe"/>
128
+ </reference>
129
+ </reference>
130
+ </iwd_opc_index_index>
131
+
132
  <!--WARNING: if you use a magento version 1.6 you must to use this comment handle instead of precedent handle-->
133
  <!--<opc_index_index>-->
134
  <!--<reference name="head">-->
140
  <!--</reference>-->
141
  <!--</opc_index_index>-->
142
 
143
+ <onestepcheckout_index_index>
144
+ <reference name="head">
145
+ <block type="easynolo_bancasellapro/utility_text" name="gestpay.iframe.external"/>
146
+ <action method="addItem"><type>skin_css</type><name>css/easynolo_bancasella/gestpay.css</name></action>
147
+ <action method="addJs"><script>prototype/window.js</script></action>
148
+ <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
149
+ <action method="addCss"><name>lib/prototype/windows/themes/magento.css</name></action>
150
+ <action method="addJs"><script>bancasellapro/gestpayform_idev_onestepcheckout.js</script><params><![CDATA[name="gestpayform_idev"]]></params></action>
151
+ </reference>
152
+ <block type="core/text" name="paymentfont">
153
+ <action method="setText">
154
+ <text>
155
+ <![CDATA[<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css">]]>
156
+ </text>
157
+ </action>
158
+ </block>
159
+ <reference name="before_body_end">
160
+ <block type="core/text" name="gestpaypro.red.script.block">
161
+ <action method="setText" ifconfig="payment/gestpaypro_red/enable"><text><![CDATA[<script src="https://mpsnare.iesnare.com/snare.js"></script>]]></text></action>
162
+ </block>
163
+ <block type="core/template" name="gestpaypro.iframe.script.block" template="easynolo/bancasellapro/gestpay/iframe.phtml" ifconfig="payment/gestpaypro/iframe"/>
164
+ </reference>
165
+ </onestepcheckout_index_index>
166
+
167
 
168
 
169
 
app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/alternative_payments.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <li class="alternative-payments">
2
+ <label for="<?php echo EasyNolo_BancaSellaPro_Helper_AlternativePayments::SELECT_HTMLID;?>"><?php echo Mage::helper('easynolo_bancasellapro')->__('Payment Method');?></label>
3
+ <?php echo $this->getSelectHtml(); ?>
4
+ </li>
5
+ <?php echo $this->getChildHtml(); ?>
app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/alternative_payments/default.phtml ADDED
@@ -0,0 +1 @@
 
1
+ <!-- no additional fields -->
app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/alternative_payments/js.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $alternativeHelper = Mage::helper('easynolo_bancasellapro/alternativePayments'); ?>
2
+ <script type="text/javascript">
3
+ window.alternativePaymentMethodsSelector = '<?php echo EasyNolo_BancaSellaPro_Helper_AlternativePayments::SELECT_HTMLID; ?>';
4
+ window.alternativePaymentMethods = <?php echo $alternativeHelper->getMethodsJson(); ?>;
5
+
6
+ window.alternativePaymentMethodChange = function(select, checkTokens) {
7
+ if (select) {
8
+ var liCreditCard = $$('.payment_form_gestpaypro > li.gestpay-form-field:not(.alternative-method)');
9
+ $$('.payment_form_gestpaypro > li.gestpay-form-field.alternative-method').each(function(el){ el.hide(); });
10
+
11
+ if (select.selectedIndex > 0) {
12
+ liCreditCard.each(function(el){ el.hide(); });
13
+ $$('.payment_form_gestpaypro > li.gestpay-form-field.alternative-method-'+select.value).each(function(el){ el.show(); });
14
+ $$('.payment_form_gestpaypro .gestpay-tokens').each(function(el){ el.hide(); });
15
+ } else {
16
+ liCreditCard.each(function(el){ el.show(); });
17
+ $$('.payment_form_gestpaypro .gestpay-tokens').each(function(el){ el.show(); });
18
+
19
+ if (typeof checkTokens == 'undefined' || checkTokens) {
20
+ tokenPaymentMethodChange();
21
+ }
22
+ }
23
+ }
24
+ };
25
+
26
+ window.tokenPaymentMethodChange = function() {
27
+ if ($('hid_gestpaypro_token')) {
28
+ if ($('hid_gestpaypro_token').checked) {
29
+ $$('.gestpay-form-field').each(function (f) {
30
+ $(f).show();
31
+ });
32
+ if ($(alternativePaymentMethodsSelector)) {
33
+ alternativePaymentMethodChange($(alternativePaymentMethodsSelector), false);
34
+ }
35
+ } else {
36
+ $$('.gestpay-form-field').each(function (f) {
37
+ $(f).hide();
38
+ });
39
+ }
40
+ }
41
+ }
42
+
43
+ <?php if (!Mage::app()->getRequest()->isAjax()): ?>
44
+ document.observe("dom:loaded", function() {
45
+ <?php endif; ?>
46
+ setTimeout(function(){
47
+ if ($(alternativePaymentMethodsSelector)) {
48
+ alternativePaymentMethodChange($(alternativePaymentMethodsSelector));
49
+ }
50
+
51
+ tokenPaymentMethodChange();
52
+ }, 0);
53
+ <?php if (!Mage::app()->getRequest()->isAjax()): ?>
54
+ });
55
+ <?php endif; ?>
56
+ </script>
app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/alternative_payments/klarna.phtml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <li class="gestpay-form-field alternative-method alternative-method-<?php echo $this->getCode(); ?>" style="display: none">
2
+ <label for="gestpay_<?php echo $_code ?>_street_name" class="required"><?php echo $this->__('Shipping street name') ?></label>
3
+ <div class="input-box">
4
+ <input type="text" id="gestpay_<?php echo $_code ?>_street_name" name="payment[klarna_street]" title="<?php echo $this->__('Shipping street name') ?>" class="input-text required-entry" value="" />
5
+ </div>
6
+ </li>
7
+ <li class="gestpay-form-field alternative-method alternative-method-<?php echo $this->getCode(); ?>" style="display: none">
8
+ <label for="gestpay_<?php echo $_code ?>_city_name" class="required"><?php echo $this->__('Shipping city name') ?></label>
9
+ <div class="input-box">
10
+ <input type="text" id="gestpay_<?php echo $_code ?>_city_name" name="payment[klarna_city]" title="<?php echo $this->__('Shipping city name') ?>" class="input-text required-entry" value="" />
11
+ </div>
12
+ </li>
13
+ <li class="gestpay-form-field alternative-method alternative-method-<?php echo $this->getCode(); ?>" style="display: none">
14
+ <label for="gestpay_<?php echo $_code ?>_city_name" class="required"><?php echo $this->__('Shipping zip code') ?></label>
15
+ <div class="input-box">
16
+ <input type="text" id="gestpay_<?php echo $_code ?>_zip_code" name="payment[klarna_zip]" title="<?php echo $this->__('Shipping zip code') ?>" class="input-text required-entry" value="" />
17
+ </div>
18
+ </li>
19
+ <li class="gestpay-form-field alternative-method alternative-method-<?php echo $this->getCode(); ?>" style="display: none">
20
+ <label for="gestpay_<?php echo $_code ?>_country" class="required"><?php echo $this->__('Shipping country') ?></label>
21
+ <div class="input-box">
22
+ <select id="gestpay_<?php echo $_code ?>_country" name="payment[klarna_country]" title="<?php echo $this->__('Shipping country') ?>" class="input-select required-entry">
23
+ <option value=""></option>
24
+ <option value="AT">AT</option>
25
+ <option value="DK">DK</option>
26
+ <option value="FI">FI</option>
27
+ <option value="DE">DE</option>
28
+ <option value="NL">NL</option>
29
+ <option value="NO">NO</option>
30
+ <option value="SE">SE</option>
31
+ </select>
32
+ </div>
33
+ </li>
app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/alternative_payments/nojs.phtml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript">
2
+ window.tokenPaymentMethodChange = function() {
3
+ if ($('hid_gestpaypro_token')) {
4
+ if ($('hid_gestpaypro_token').checked) {
5
+ $$('.gestpay-form-field').each(function (f) {
6
+ $(f).show();
7
+ });
8
+ } else {
9
+ $$('.gestpay-form-field').each(function (f) {
10
+ $(f).hide();
11
+ });
12
+ }
13
+ }
14
+ }
15
+
16
+ <?php if (!Mage::app()->getRequest()->isAjax()): ?>
17
+ document.observe("dom:loaded", function() {
18
+ <?php endif; ?>
19
+ setTimeout(function(){
20
+ tokenPaymentMethodChange();
21
+ }, 0);
22
+ <?php if (!Mage::app()->getRequest()->isAjax()): ?>
23
+ });
24
+ <?php endif; ?>
25
+ </script>
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/confirm3d.phtml RENAMED
File without changes
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/form.phtml RENAMED
@@ -12,8 +12,9 @@
12
  $method = $this->getMethod();
13
  $_code = $this->getMethodCode();
14
  $merchantId = $method->getMerchantId();
15
- ?>
16
 
 
 
17
  <?php
18
  try{
19
  /** @var EasyNolo_BancaSellaPro_Helper_Crypt $helper */
@@ -28,28 +29,33 @@ try{
28
 
29
  <fieldset class="form-list">
30
  <?php if($this->isIframeEnabled()): ?>
31
- <ul class="form-list" id="payment_iframe_<?php echo $_code ?>" style="display:none;">
 
 
 
 
 
32
  <?php $hasToken = $this->showToken(); ?>
33
  <?php if($hasToken): ?>
34
  <?php $token_helper = Mage::helper('easynolo_bancasellapro/recurringprofile'); ?>
35
  <li class="gestpay-tokens">
36
  <h4><?php echo $this->__('Your saved cards'); ?></h4>
37
- <table style="width: 50%">
38
  <thead>
39
- <tr>
40
- <th>&nbsp;</th>
41
- <th><?php echo $this->__('Card') ?></th>
42
- <th><?php echo $this->__('Expiration') ?></th>
43
- <th>&nbsp;</th>
44
- </tr>
45
  </thead>
46
  <tbody>
47
  <?php $i = 0; foreach ($this->getAllTokens() as $token): ?>
48
  <tr>
49
  <td style="text-align: center; vertical-align: middle;">
50
- <input <?php if($i==0){ echo 'checked'; } ?> type="radio" id="hid_<?php echo $_code ?>_token" name="bancasella_iframe[token]" style="margin-right: 4px;" value="<?php echo $token->getEntityId(); ?>" autocomplete="off" />
51
  </td>
52
- <td style="vertical-align: middle;"><?php echo $token_helper->getFormattedToken($token->getToken()); ?></td>
53
  <td style="vertical-align: middle;"><span class="nobr"><?php echo Mage::helper('core')->formatDate($token->getExpiryDate(), 'medium', false); ?></span></td>
54
  <td style="text-align: center; vertical-align: middle;" class="last">
55
  <?php $_vendor = $token_helper->getCardVendor($token->getToken()); ?>
@@ -58,12 +64,12 @@ try{
58
  </span>
59
  </td>
60
  </tr>
61
- <?php $i++; endforeach; ?>
62
- <tr>
63
- <td colspan="4">
64
- <a href="#" data-action="switchTokenToCard"><?php echo $this->__('Use new card'); ?></a>
65
- </td>
66
- </tr>
67
  </tbody>
68
  </table>
69
  </li>
@@ -113,7 +119,10 @@ try{
113
  </li>
114
  </ul>
115
  <?php else: ?>
116
- <ul id="payment_form_<?php echo $_code ?>" style="display: none;">
 
 
 
117
  <li>
118
  <?php echo $this->__($method->getConfigData ( 'description' )) ?>
119
  </li>
@@ -123,44 +132,42 @@ try{
123
  <?php if($this->isIframeEnabled()): ?>
124
  <script type="text/javascript">
125
  //<![CDATA[
126
- if ( typeof BancaSellaForm !== 'undefined'){
 
 
127
 
128
- var GestPayConfig = {};
129
- GestPayConfig.merchantId = '<?php echo $merchantId ?>';
130
- <?php if($encryptString): ?>
131
  GestPayConfig.stringEncrypt = '<?php echo $encryptString ?>';
132
- <?php endif; ?>
133
- GestPayConfig.formId = 'payment_iframe_<?php echo $_code ?>';
134
- GestPayConfig.radioBancaSella = 'p_method_<?php echo $_code ?>';
135
- GestPayConfig.cssSelectorInfo = '#payment_form_<?php echo $_code ?> li';
136
- GestPayConfig.GestPayExternalClass = GestPay;
137
- GestPayConfig.idStart = 'hid_<?php echo $_code ?>';
138
- GestPayConfig.cssSelectorRadioPayment = '#checkout-payment-method-load input[type="radio"]';
139
- GestPayConfig.confirmPage = '<?php echo $this->getPage3d(); ?>';
140
- GestPayConfig.authPage = '<?php echo $this->getAuthPage(); ?>';
141
- GestPayConfig.showHidePaymentDivId = 'opc-payment';
142
- GestPayConfig.waitImage = '<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>';
143
- GestPayConfig.successRedirect = '<?php echo $this->getSuccessRedirect()?>';
144
- GestPayConfig.isRecurringProfile = '<?php echo $this->isRecurringProfile()?>';
145
- GestPayConfig.code = '<?php echo $_code ?>';
146
- GestPayConfig.enableRed = <?php echo $this->isRedEnabled() ? 'true' : 'false'; ?>;
147
- GestPayConfig.enableRiskified = <?php echo $this->isRiskifiedEnabled() ? 'true' : 'false'; ?>;
148
 
149
- GestPayConfig.enableFormToIframe = typeof BrowserEnabled !== 'undefined'? BrowserEnabled : false;
150
 
151
- BancaSellaForm.init(GestPayConfig);
152
 
153
- if(jQuery('a[data-action="switchTokenToCard"]').length > 0){
154
- jQuery('a[data-action="switchTokenToCard"]').on('click', function(event){
155
- event.preventDefault();
156
- jQuery(this).closest('li').hide();
157
- jQuery('.gestpay-form-field').show();
158
- jQuery('.gestpay-form-field label').addClass('required');
159
- jQuery('.gestpay-tokens input').prop('disabled', true);
160
- jQuery('.gestpay-form-field input, .gestpay-form-field select').addClass('required-entry').prop('disabled', false);
161
- })
162
  }
163
- }
 
 
164
  //]]>
165
  </script>
166
  <?php endif; ?>
12
  $method = $this->getMethod();
13
  $_code = $this->getMethodCode();
14
  $merchantId = $method->getMerchantId();
 
15
 
16
+ $alternativeHelper = Mage::helper('easynolo_bancasellapro/alternativePayments');
17
+ ?>
18
  <?php
19
  try{
20
  /** @var EasyNolo_BancaSellaPro_Helper_Crypt $helper */
29
 
30
  <fieldset class="form-list">
31
  <?php if($this->isIframeEnabled()): ?>
32
+ <ul class="form-list payment_form_<?php echo $_code ?>" id="payment_iframe_<?php echo $_code ?>" style="display:none;">
33
+ <?php if ($alternativeHelper->isEnabled()): ?>
34
+ <?php echo $alternativeHelper->getSelectBox();?>
35
+ <?php else: ?>
36
+ <?php echo $alternativeHelper->getNoJs(); ?>
37
+ <?php endif; ?>
38
  <?php $hasToken = $this->showToken(); ?>
39
  <?php if($hasToken): ?>
40
  <?php $token_helper = Mage::helper('easynolo_bancasellapro/recurringprofile'); ?>
41
  <li class="gestpay-tokens">
42
  <h4><?php echo $this->__('Your saved cards'); ?></h4>
43
+ <table style="width: 100%">
44
  <thead>
45
+ <tr>
46
+ <th>&nbsp;</th>
47
+ <th><?php echo $this->__('Card') ?></th>
48
+ <th><?php echo $this->__('Expiration') ?></th>
49
+ <th>&nbsp;</th>
50
+ </tr>
51
  </thead>
52
  <tbody>
53
  <?php $i = 0; foreach ($this->getAllTokens() as $token): ?>
54
  <tr>
55
  <td style="text-align: center; vertical-align: middle;">
56
+ <input <?php if($i==0){ echo 'checked'; } ?> onclick="tokenPaymentMethodChange();" type="radio" id="hid_<?php echo $_code ?>_token_<?php echo $i;?>" name="bancasella_iframe[token]" style="margin-right: 4px;" value="<?php echo $token->getEntityId(); ?>" autocomplete="off" />
57
  </td>
58
+ <td style="vertical-align: middle;"><label for="hid_<?php echo $_code ?>_token_<?php echo $i;?>"><?php echo $token_helper->getFormattedToken($token->getToken()); ?></label></td>
59
  <td style="vertical-align: middle;"><span class="nobr"><?php echo Mage::helper('core')->formatDate($token->getExpiryDate(), 'medium', false); ?></span></td>
60
  <td style="text-align: center; vertical-align: middle;" class="last">
61
  <?php $_vendor = $token_helper->getCardVendor($token->getToken()); ?>
64
  </span>
65
  </td>
66
  </tr>
67
+ <?php $i++; endforeach; ?>
68
+ <tr>
69
+ <td colspan="4">
70
+ <label><input type="radio" onclick="tokenPaymentMethodChange();" id="hid_<?php echo $_code ?>_token" name="bancasella_iframe[token]" style="margin-right: 4px;" value="" autocomplete="off" /> <?php echo $this->__('Use new card'); ?></label>
71
+ </td>
72
+ </tr>
73
  </tbody>
74
  </table>
75
  </li>
119
  </li>
120
  </ul>
121
  <?php else: ?>
122
+ <ul id="payment_form_<?php echo $_code ?>" style="display: none;" class="payment_form_<?php echo $_code ?>">
123
+ <?php if ($alternativeHelper->isEnabled()): ?>
124
+ <?php echo $alternativeHelper->getSelectBox();?>
125
+ <?php endif; ?>
126
  <li>
127
  <?php echo $this->__($method->getConfigData ( 'description' )) ?>
128
  </li>
132
  <?php if($this->isIframeEnabled()): ?>
133
  <script type="text/javascript">
134
  //<![CDATA[
135
+ var GestPayConfig = {};
136
+ var initBancaSellaForm = function() {
137
+ if ( typeof BancaSellaForm !== 'undefined') {
138
 
139
+ var GestPayConfig = {};
140
+ GestPayConfig.merchantId = '<?php echo $merchantId ?>';
141
+ <?php if($encryptString): ?>
142
  GestPayConfig.stringEncrypt = '<?php echo $encryptString ?>';
143
+ <?php endif; ?>
144
+ GestPayConfig.formId = 'payment_iframe_<?php echo $_code ?>';
145
+ GestPayConfig.radioBancaSella = 'p_method_<?php echo $_code ?>';
146
+ GestPayConfig.cssSelectorInfo = '#payment_form_<?php echo $_code ?> li';
147
+ GestPayConfig.GestPayExternalClass = GestPay;
148
+ GestPayConfig.idStart = 'hid_<?php echo $_code ?>';
149
+ GestPayConfig.cssSelectorRadioPayment = '#checkout-payment-method-load input[type="radio"]';
150
+ GestPayConfig.confirmPage = '<?php echo $this->getPage3d(); ?>';
151
+ GestPayConfig.authPage = '<?php echo $this->getAuthPage(); ?>';
152
+ GestPayConfig.showHidePaymentDivId = 'opc-payment';
153
+ GestPayConfig.waitImage = '<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>';
154
+ GestPayConfig.successRedirect = '<?php echo $this->getSuccessRedirect()?>';
155
+ GestPayConfig.isRecurringProfile = '<?php echo $this->isRecurringProfile()?>';
156
+ GestPayConfig.code = '<?php echo $_code ?>';
157
+ GestPayConfig.enableRed = <?php echo $this->isRedEnabled() ? 'true' : 'false'; ?>;
158
+ GestPayConfig.enableRiskified = <?php echo $this->isRiskifiedEnabled() ? 'true' : 'false'; ?>;
159
 
160
+ GestPayConfig.enableFormToIframe = typeof BrowserEnabled !== 'undefined' ? BrowserEnabled : false;
161
 
162
+ BancaSellaForm.init(GestPayConfig);
163
 
164
+ } else {
165
+ // wait for load
166
+ setTimeout(initBancaSellaForm, 100);
 
 
 
 
 
 
167
  }
168
+ };
169
+ initBancaSellaForm();
170
+
171
  //]]>
172
  </script>
173
  <?php endif; ?>
app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/form_idev.phtml ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category EasyNolo
4
+ * @package EasyNolo_BancaSellaPro
5
+ * @author Easy Nolo <ecommerce@sella.it>
6
+ */
7
+ ?>
8
+
9
+ <?php
10
+ /* @var $this EasyNolo_BancaSellaPro_Block_Form */
11
+ /* @var $method EasyNolo_BancaSellaPro_Model_Gestpay */
12
+ $method = $this->getMethod();
13
+ $_code = $this->getMethodCode();
14
+ $merchantId = $method->getMerchantId();
15
+
16
+ $alternativeHelper = Mage::helper('easynolo_bancasellapro/alternativePayments');
17
+
18
+ try {
19
+ /** @var EasyNolo_BancaSellaPro_Helper_Crypt $helper */
20
+ $encryptString = false;
21
+
22
+ // If RED is enabled we must retrieve encrypted string after order confirmation.
23
+ if( $this->isAjaxRequest() && $this->isIframeEnabled() && !$this->isRedEnabled() && !$this->isRiskifiedEnabled()){
24
+ $helper = Mage::helper('easynolo_bancasellapro/crypt');
25
+ $encryptString = $helper->getEncryptStringBeforeOrder($method);
26
+ }
27
+
28
+ ?>
29
+
30
+ <ul class="form-list payment_form_<?php echo $_code ?>" id="payment_form_<?php echo $_code ?>" style="display:none;">
31
+ <?php if ($alternativeHelper->isEnabled()): ?>
32
+ <?php echo $alternativeHelper->getSelectBox();?>
33
+ <?php else: ?>
34
+ <?php echo $alternativeHelper->getNoJs(); ?>
35
+ <?php endif; ?>
36
+ <?php if($this->isIframeEnabled()): ?>
37
+ <?php $hasToken = $this->showToken(); ?>
38
+ <?php if($hasToken): ?>
39
+ <?php $token_helper = Mage::helper('easynolo_bancasellapro/recurringprofile'); ?>
40
+ <li class="gestpay-tokens">
41
+ <h4><?php echo $this->__('Your saved cards'); ?></h4>
42
+ <table style="width: 100%">
43
+ <thead>
44
+ <tr>
45
+ <th>&nbsp;</th>
46
+ <th><?php echo $this->__('Card') ?></th>
47
+ <th><?php echo $this->__('Expiration') ?></th>
48
+ <th>&nbsp;</th>
49
+ </tr>
50
+ </thead>
51
+ <tbody>
52
+ <?php $i = 0; foreach ($this->getAllTokens() as $token): ?>
53
+ <tr>
54
+ <td style="text-align: center; vertical-align: middle;">
55
+ <input <?php if($i==0){ echo 'checked'; } ?> onclick="tokenPaymentMethodChange();" type="radio" id="hid_<?php echo $_code ?>_token_<?php echo $i;?>" name="bancasella_iframe[token]" style="margin-right: 4px;" value="<?php echo $token->getEntityId(); ?>" autocomplete="off" />
56
+ </td>
57
+ <td style="vertical-align: middle;"><label for="hid_<?php echo $_code ?>_token_<?php echo $i;?>"><?php echo $token_helper->getFormattedToken($token->getToken()); ?></label></td>
58
+ <td style="vertical-align: middle;"><span class="nobr"><?php echo Mage::helper('core')->formatDate($token->getExpiryDate(), 'medium', false); ?></span></td>
59
+ <td style="text-align: center; vertical-align: middle;" class="last">
60
+ <?php $_vendor = $token_helper->getCardVendor($token->getToken()); ?>
61
+ <span title="<?php echo $_vendor['label']; ?>">
62
+ <i style="font-family: PaymentFont;font-style: normal;font-size: 25px;" class="pf-<?php echo $_vendor['id'] ?>"></i>
63
+ </span>
64
+ </td>
65
+ </tr>
66
+ <?php $i++; endforeach; ?>
67
+ <tr>
68
+ <td colspan="4">
69
+ <label><input type="radio" onclick="tokenPaymentMethodChange();" id="hid_<?php echo $_code ?>_token" name="bancasella_iframe[token]" style="margin-right: 4px;" value="" autocomplete="off" /> <?php echo $this->__('Use new card'); ?></label>
70
+ </td>
71
+ </tr>
72
+ </tbody>
73
+ </table>
74
+ </li>
75
+ <?php endif; ?>
76
+ <li style="<?php if($hasToken){ echo 'display: none'; } ?>" class="gestpay-form-field">
77
+ <label for="<?php echo $_code ?>_cc_number" class="<?php if(!$hasToken){ echo 'required'; } ?>"><?php echo $this->__('Credit Card Number') ?></label>
78
+ <div class="input-box">
79
+ <input <?php if($hasToken){ echo 'disabled'; } ?> type="text" id="hid_<?php echo $_code ?>_cc_number" name="bancasella_iframe[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text <?php if(!$hasToken){ echo 'required-entry'; } ?> validate-number validate-cc-number" value="" autocomplete="off" />
80
+ </div>
81
+ </li>
82
+ <li style="<?php if($hasToken){ echo 'display: none'; } ?>" class="gestpay-form-field">
83
+ <label for="hid_<?php echo $_code ?>_cc_exp_mm" class="<?php if(!$hasToken){ echo 'required'; } ?>"><?php echo $this->__('Expiration Date') ?></label>
84
+ <div class="input-box">
85
+ <div class="v-fix">
86
+ <select <?php if($hasToken){ echo 'disabled'; } ?> id="hid_<?php echo $_code ?>_cc_exp_mm" name="bancasella_iframe[cc_exp_mm]" class="month <?php if(!$hasToken){ echo 'required-entry'; } ?>">
87
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
88
+ <option value="<?php echo $k?$k:'' ?>"><?php echo $v ?></option>
89
+ <?php endforeach ?>
90
+ </select>
91
+ </div>
92
+ <div class="v-fix">
93
+ <select <?php if($hasToken){ echo 'disabled'; } ?> id="hid_<?php echo $_code ?>_cc_exp_yy" name="bancasella_iframe[cc_exp_yy]" class="year <?php if(!$hasToken){ echo 'required-entry'; } ?>">
94
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
95
+ <option value="<?php echo $k?$k:'' ?>"><?php echo $v ?></option>
96
+ <?php endforeach ?>
97
+ </select>
98
+ </div>
99
+ </div>
100
+ </li>
101
+ <li style="<?php if($hasToken){ echo 'display: none'; } ?>" class="gestpay-form-field">
102
+ <label for="<?php echo $_code ?>_cc_cvv" class="<?php if(!$hasToken){ echo 'required'; } ?>"><?php echo $this->__('CVV2 / 4DBC') ?></label>
103
+ <div class="input-box">
104
+ <input type="text" id="hid_<?php echo $_code ?>_cc_cvv" name="bancasella_iframe[cc_cvv]" title="<?php echo $this->__('CVV2 / 4DBC') ?>" class="input-text <?php if(!$hasToken){ echo 'required-entry'; } ?> validate-number" value="" autocomplete="off" />
105
+ </div>
106
+ </li>
107
+ <li style="<?php if($hasToken){ echo 'display: none'; } ?>" class="gestpay-form-field">
108
+ <label for="<?php echo $_code ?>_cc_name" class="<?php if(!$hasToken){ echo 'required'; } ?>"><?php echo $this->__('Name on Card') ?></label>
109
+ <div class="input-box">
110
+ <input <?php if($hasToken){ echo 'disabled'; } ?> type="text" id="hid_<?php echo $_code ?>_cc_name" name="bancasella_iframe[cc_name]" title="<?php echo $this->__('Name on Card') ?>" class="input-text <?php if(!$hasToken){ echo 'required-entry'; } ?>" value="" autocomplete="off" />
111
+ </div>
112
+ </li>
113
+ <li style="<?php if($hasToken){ echo 'display: none'; } ?>" class="gestpay-form-field">
114
+ <label for="<?php echo $_code ?>_cc_email" class="<?php if(!$hasToken){ echo 'required'; } ?>"><?php echo $this->__('Email') ?></label>
115
+ <div class="input-box">
116
+ <input <?php if($hasToken){ echo 'disabled'; } ?> type="text" id="hid_<?php echo $_code ?>_cc_email" name="bancasella_iframe[cc_email]" title="<?php echo $this->__('Email') ?>" class="input-text <?php if(!$hasToken){ echo 'required-entry'; } ?> validate-email" value="" autocomplete="off" />
117
+ </div>
118
+ </li>
119
+ <?php else: ?>
120
+ <li>
121
+ <?php echo $this->__($method->getConfigData ( 'description' )) ?>
122
+ </li>
123
+ <?php endif; ?>
124
+ </ul>
125
+
126
+ <?php if($this->isIframeEnabled()): ?>
127
+ <script type="text/javascript">
128
+ //<![CDATA[
129
+ var reviewObject = {};
130
+ var GestPayConfig = {};
131
+ var initBancaSellaForm = function() {
132
+ if ( typeof BancaSellaForm !== 'undefined') {
133
+
134
+ var GestPayConfig = {};
135
+ GestPayConfig.merchantId = '<?php echo $merchantId ?>';
136
+ <?php if($encryptString): ?>
137
+ GestPayConfig.stringEncrypt = '<?php echo $encryptString ?>';
138
+ <?php endif; ?>
139
+ GestPayConfig.formId = 'payment_form_<?php echo $_code ?>';
140
+ GestPayConfig.radioBancaSella = 'p_method_<?php echo $_code ?>';
141
+ GestPayConfig.cssSelectorInfo = '#payment_form_<?php echo $_code ?> li';
142
+ GestPayConfig.GestPayExternalClass = GestPay;
143
+ GestPayConfig.idStart = 'hid_<?php echo $_code ?>';
144
+ GestPayConfig.cssSelectorRadioPayment = '#checkout-payment-method-load input[type="radio"]';
145
+ GestPayConfig.confirmPage = '<?php echo $this->getPage3d(); ?>';
146
+ GestPayConfig.authPage = '<?php echo $this->getAuthPage(); ?>';
147
+ GestPayConfig.showHidePaymentDivId = 'opc-payment';
148
+ GestPayConfig.waitImage = '<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>';
149
+ GestPayConfig.successRedirect = '<?php echo $this->getSuccessRedirect()?>';
150
+ GestPayConfig.isRecurringProfile = '<?php echo $this->isRecurringProfile()?>';
151
+ GestPayConfig.code = '<?php echo $_code ?>';
152
+ GestPayConfig.enableRed = <?php echo $this->isRedEnabled() ? 'true' : 'false'; ?>;
153
+ GestPayConfig.enableRiskified = <?php echo $this->isRiskifiedEnabled() ? 'true' : 'false'; ?>;
154
+
155
+ GestPayConfig.enableFormToIframe = typeof BrowserEnabled !== 'undefined' ? BrowserEnabled : false;
156
+
157
+ BancaSellaForm.init(GestPayConfig);
158
+
159
+ reviewObject = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));
160
+ $('onestepcheckout-form').writeAttribute('onsubmit', 'reviewObject.save(); return false;');
161
+                     $('onestepcheckout-form').submit = function() {
162
+                         reviewObject.save();
163
+                         return false;
164
+                     }
165
+ } else {
166
+ // wait for load
167
+ setTimeout(initBancaSellaForm, 100);
168
+ }
169
+ };
170
+ initBancaSellaForm();
171
+
172
+ //]]>
173
+ </script>
174
+ <?php endif; ?>
175
+ <?php
176
+
177
+ } catch(Exception $e){
178
+ $_helper= Mage::helper('easynolo_bancasellapro');
179
+ $_helper->log($e->getMessage());
180
+ ?>
181
+ <script type="text/javascript">
182
+ //<![CDATA[
183
+ if ( typeof BancaSellaForm !== 'undefined' ){
184
+ BancaSellaForm.code= '<?php echo $_code ?>';
185
+ BancaSellaForm.removePaymentMethod();
186
+ }
187
+ //]]>
188
+ </script>
189
+ <?php } ?>
app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/form_onepagecheckout.phtml ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category EasyNolo
4
+ * @package EasyNolo_BancaSellaPro
5
+ * @author Easy Nolo <ecommerce@sella.it>
6
+ */
7
+ ?>
8
+
9
+ <?php /* @var $this EasyNolo_BancaSellaPro_Block_Form */?>
10
+ <?php /* @var $method EasyNolo_BancaSellaPro_Model_Gestpay */?>
11
+ <?php $method = $this->getMethod() ?>
12
+ <?php $_code=$this->getMethodCode() ?>
13
+ <?php $merchantId = $method->getMerchantId() ?>
14
+ <?php $alternativeHelper = Mage::helper('easynolo_bancasellapro/alternativePayments'); ?>
15
+
16
+ <?php
17
+ try{
18
+ /** @var EasyNolo_BancaSellaPro_Helper_Crypt $helper */
19
+ $encryptString = false;
20
+ ?>
21
+ <div class="iwd_opc_universal_wrapper iwd_opc_cc_wrapper"
22
+ data-https="<?php echo Mage::app()->getStore()->isCurrentlySecure() ? 1 : 0; ?>">
23
+ <?php $_code=$this->getMethodCode() ?>
24
+
25
+ <?php
26
+ if($this->isIframeEnabled()) :
27
+ $helper = Mage::helper('easynolo_bancasellapro/crypt');
28
+ $encryptString = $helper->getEncryptStringBeforeOrder($method);
29
+ ?>
30
+ <ul class="form-list payment_form_<?php echo $_code ?>" id="payment_iframe_<?php echo $_code ?>">
31
+ <?php if ($alternativeHelper->isEnabled()): ?>
32
+ <?php echo $alternativeHelper->getSelectBox();?>
33
+ <?php else: ?>
34
+ <?php echo $alternativeHelper->getNoJs(); ?>
35
+ <?php endif; ?>
36
+ <?php $hasToken = $this->showToken(); ?>
37
+ <?php if($hasToken): ?>
38
+ <?php $token_helper = Mage::helper('easynolo_bancasellapro/recurringprofile'); ?>
39
+ <li class="gestpay-tokens">
40
+ <h4><?php echo $this->__('Your saved cards'); ?></h4>
41
+ <table style="width: 100%">
42
+ <thead>
43
+ <tr>
44
+ <th>&nbsp;</th>
45
+ <th><?php echo $this->__('Card') ?></th>
46
+ <th><?php echo $this->__('Expiration') ?></th>
47
+ <th>&nbsp;</th>
48
+ </tr>
49
+ </thead>
50
+ <tbody>
51
+ <?php $i = 0; foreach ($this->getAllTokens() as $token): ?>
52
+ <tr>
53
+ <td style="text-align: center; vertical-align: middle;">
54
+ <input <?php if($i==0){ echo 'checked'; } ?> onclick="tokenPaymentMethodChange();" type="radio" id="hid_<?php echo $_code ?>_token_<?php echo $i;?>" name="bancasella_iframe[token]" style="margin-right: 4px;" value="<?php echo $token->getEntityId(); ?>" autocomplete="off" />
55
+ </td>
56
+ <td style="vertical-align: middle;"><label for="hid_<?php echo $_code ?>_token_<?php echo $i;?>"><?php echo $token_helper->getFormattedToken($token->getToken()); ?></label></td>
57
+ <td style="vertical-align: middle;"><span class="nobr"><?php echo Mage::helper('core')->formatDate($token->getExpiryDate(), 'medium', false); ?></span></td>
58
+ <td style="text-align: center; vertical-align: middle;" class="last">
59
+ <?php $_vendor = $token_helper->getCardVendor($token->getToken()); ?>
60
+ <span title="<?php echo $_vendor['label']; ?>">
61
+ <i style="font-family: PaymentFont;font-style: normal;font-size: 25px;" class="pf-<?php echo $_vendor['id'] ?>"></i>
62
+ </span>
63
+ </td>
64
+ </tr>
65
+ <?php $i++; endforeach; ?>
66
+ <tr>
67
+ <td colspan="4">
68
+ <label><input type="radio" onclick="tokenPaymentMethodChange();" id="hid_<?php echo $_code ?>_token" name="bancasella_iframe[token]" style="margin-right: 4px;" value="" autocomplete="off" /> <?php echo $this->__('Use new card'); ?></label>
69
+ </td>
70
+ </tr>
71
+ </tbody>
72
+ </table>
73
+ </li>
74
+ <?php endif; ?>
75
+ <li class="gestpay-form-field">
76
+ <label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
77
+ <div class="input-box">
78
+ <input type="text" id="hid_<?php echo $_code ?>_cc_number" name="bancasella_iframe[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text required-entry iwd_opc_field iwd_opc_input validate-iwd-opc-cc-number validate-iwd-opc-cc-type" value="" autocomplete="off" />
79
+ </div>
80
+ </li>
81
+ <li class="gestpay-form-field">
82
+ <label for="hid_<?php echo $_code ?>_cc_exp_mm" class="required"><em>*</em><?php echo $this->__('Expiration Date') ?></label>
83
+ <div class="input-box">
84
+ <div class="v-fix">
85
+ <select id="hid_<?php echo $_code ?>_cc_exp_mm" name="bancasella_iframe[cc_exp_mm]" class="month required-entry">
86
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
87
+ <option value="<?php echo $k?$k:'' ?>"><?php echo $v ?></option>
88
+ <?php endforeach ?>
89
+ </select>
90
+ </div>
91
+ <div class="v-fix">
92
+ <select id="hid_<?php echo $_code ?>_cc_exp_yy" name="bancasella_iframe[cc_exp_yy]" class="year required-entry">
93
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
94
+ <option value="<?php echo $k?$k:'' ?>"><?php echo $v ?></option>
95
+ <?php endforeach ?>
96
+ </select>
97
+ </div>
98
+ </div>
99
+ </li>
100
+ <li class="gestpay-form-field">
101
+ <label for="<?php echo $_code ?>_cc_cvv" class="required"><em>*</em><?php echo $this->__('CVV2 / 4DBC') ?></label>
102
+ <div class="input-box">
103
+ <input type="text" id="hid_<?php echo $_code ?>_cc_cvv" name="bancasella_iframe[cc_cvv]" title="<?php echo $this->__('CVV2 / 4DBC') ?>" class="input-text required-entry iwd_opc_field iwd_opc_input required-entry validate-iwd-opc-cvv" value="" autocomplete="off" />
104
+ </div>
105
+ </li>
106
+ <li class="gestpay-form-field">
107
+ <label for="<?php echo $_code ?>_cc_name" class="required"><em>*</em><?php echo $this->__('Name on Card') ?></label>
108
+ <div class="input-box">
109
+ <input type="text" id="hid_<?php echo $_code ?>_cc_name" name="bancasella_iframe[cc_name]" title="<?php echo $this->__('Name on Card') ?>" class="input-text required-entry" value="" autocomplete="off" />
110
+ </div>
111
+ </li>
112
+ <li class="gestpay-form-field">
113
+ <label for="<?php echo $_code ?>_cc_email" class="required"><em>*</em><?php echo $this->__('Email') ?></label>
114
+ <div class="input-box">
115
+ <input type="text" id="hid_<?php echo $_code ?>_cc_email" name="bancasella_iframe[cc_email]" title="<?php echo $this->__('Email') ?>" class="input-text required-entry validate-email iwd_opc_field iwd_opc_input" value="" autocomplete="off" />
116
+ </div>
117
+ </li>
118
+ </ul>
119
+ <?php else: ?>
120
+ <ul id="payment_form_<?php echo $_code ?>" class="payment_form_<?php echo $_code ?>">
121
+ <?php if ($alternativeHelper->isEnabled()): ?>
122
+ <?php echo $alternativeHelper->getSelectBox();?>
123
+ <?php endif; ?>
124
+ <li>
125
+ <?php echo $this->__($method->getConfigData ( 'description' )) ?>
126
+ </li>
127
+ </ul>
128
+ <?php endif; ?>
129
+ <?php if($encryptString): ?>
130
+ <script type="text/javascript">
131
+ //<![CDATA[
132
+
133
+ var GestPayConfig = {};
134
+ var initBancaSellaForm = function() {
135
+ if ( typeof BancaSellaForm !== 'undefined'){
136
+
137
+ GestPayConfig.merchantId = '<?php echo $merchantId ?>';
138
+ GestPayConfig.stringEncrypt = '<?php echo $encryptString ?>';
139
+ GestPayConfig.formId = 'payment_iframe_<?php echo $_code ?>';
140
+ GestPayConfig.radioBancaSella= 'p_method_<?php echo $_code ?>';
141
+ GestPayConfig.cssSelectorInfo = '#payment_form_<?php echo $_code ?> li';
142
+ GestPayConfig.GestPayExternalClass = GestPay;
143
+ GestPayConfig.idStart = 'hid_<?php echo $_code ?>';
144
+ GestPayConfig.cssSelectorRadioPayment = '#checkout-payment-method-load input[type="radio"]';
145
+ GestPayConfig.confirmPage = '<?php echo $this->getPage3d(); ?>';
146
+ GestPayConfig.authPage = '<?php echo $this->getAuthPage(); ?>';
147
+ GestPayConfig.showHidePaymentDivId = 'opc-payment';
148
+ GestPayConfig.waitImage= '<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>';
149
+ GestPayConfig.successRedirect = '<?php echo $this->getSuccessRedirect()?>';
150
+ GestPayConfig.isRecurringProfile= '<?php echo $this->isRecurringProfile()?>';
151
+ GestPayConfig.code= '<?php echo $_code ?>';
152
+
153
+ GestPayConfig.enableFormToIframe = typeof BrowserEnabled !== 'undefined'? BrowserEnabled : false;
154
+
155
+ BancaSellaForm.init(GestPayConfig);
156
+ } else {
157
+ // wait for load
158
+ setTimeout(initBancaSellaForm, 100);
159
+ }
160
+ }
161
+ initBancaSellaForm();
162
+
163
+ //]]>
164
+ </script>
165
+ <?php endif;?>
166
+ </div>
167
+ <?php
168
+ }catch(Exception $e){
169
+ //se il modulo non è configurato correttamente potrebbe
170
+ $_helper= Mage::helper('easynolo_bancasellapro');
171
+ $_helper->log($e->getMessage());
172
+ }
173
+ ?>
app/design/frontend/base/default/template/easynolo/bancasellapro/gestpay/iframe.phtml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: maintux
5
+ * Date: 18/12/16
6
+ * Time: 19:13
7
+ */
8
+ ?>
9
+ <script type="text/javascript">
10
+ if (typeof Review != 'undefined') {
11
+
12
+ var nextStep = function(transport){
13
+ if (transport && transport.responseText) {
14
+ response = eval('(' + transport.responseText + ')');
15
+ if (!response.success) {
16
+ var msg = response.error_messages;
17
+ if (typeof(msg)=='object') {
18
+ msg = msg.join("\n");
19
+ }
20
+ if (msg) {
21
+ alert(msg);
22
+ }
23
+ if (response.update_section) {
24
+ $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
25
+ }
26
+ if (response.goto_section) {
27
+ checkout.gotoSection(response.goto_section);
28
+ }
29
+ }else{
30
+ this.isSuccess = true;
31
+ BancaSellaForm.redirectSuccessUrl = this.successUrl;
32
+
33
+ if (typeof response.encrypt_string != 'undefined' && response.encrypt_string) {
34
+ BancaSellaForm.stringEncrypt = response.encrypt_string;
35
+ }
36
+
37
+ var alternativePayment = typeof alternativePaymentMethodsSelector != 'undefined' && $(alternativePaymentMethodsSelector) && $(alternativePaymentMethodsSelector).value;
38
+
39
+ if(!BancaSellaForm.lock && ($(BancaSellaForm.radioBancaSella).checked) && !alternativePayment){
40
+
41
+ if (response.success) {
42
+ BancaSellaForm.redirectAfterIframe = this.successUrl;
43
+ }
44
+ if (response.redirect) {
45
+ BancaSellaForm.redirectAfterIframe = response.redirect;
46
+ }
47
+
48
+ BancaSellaForm.saveDataCC($(BancaSellaForm.formId));
49
+ //inviamo i dati della carta
50
+ BancaSellaForm.sendPaymentIframe();
51
+ }else{
52
+ if (response.redirect) {
53
+ location.href = response.redirect;
54
+ return;
55
+ }
56
+ if (response.success) {
57
+ window.location=this.successUrl;
58
+ }
59
+ }
60
+ }
61
+ }
62
+ };
63
+
64
+ if (typeof Singleton != 'undefined') {
65
+ Singleton.get(Review).nextStep = nextStep;
66
+ } else {
67
+ Review.addMethods({
68
+ nextStep: nextStep
69
+ });
70
+ }
71
+ }
72
+ </script>
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/newtoken.phtml RENAMED
File without changes
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/redirect.phtml RENAMED
File without changes
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/riskified.phtml RENAMED
@@ -9,7 +9,7 @@
9
 
10
  <script type="text/javascript">
11
  //<![CDATA[
12
- var riskified_store_domain = '<?php echo $_SERVER['HTTP_HOST']; ?>';
13
  var riskified_session_id = '<?php echo Mage::getSingleton("core/session")->getEncryptedSessionId() ?>';
14
  //]]>
15
  </script>
9
 
10
  <script type="text/javascript">
11
  //<![CDATA[
12
+ var riskified_store_domain = '<?php echo Mage::app()->getRequest()->getHttpHost(); ?>';
13
  var riskified_session_id = '<?php echo Mage::getSingleton("core/session")->getEncryptedSessionId() ?>';
14
  //]]>
15
  </script>
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/gestpay/token/list.phtml RENAMED
File without changes
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/base/default/template/easynolo/bancasellapro/page/redirect.phtml RENAMED
File without changes
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/design → design}/frontend/enterprise/default/layout/easynolo_bancasellapro.xml RENAMED
File without changes
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/etc → etc}/modules/EasyNolo_BancaSellaPro.xml RENAMED
File without changes
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/etc → etc}/modules/EasyNolo_BancaSellaPro.xml.Onepage.txt RENAMED
File without changes
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/locale → locale}/en_US/EasyNolo_BancaSellaPro.csv RENAMED
File without changes
app/{code/community/EasyNolo/BancaSellaPro/_additional_structure/app/locale → locale}/it_IT/EasyNolo_BancaSellaPro.csv RENAMED
File without changes
{app/code/community/EasyNolo/BancaSellaPro/_additional_structure/js → js}/bancasellapro/gestpayform.js RENAMED
@@ -1,3 +1,4 @@
 
1
  if (typeof BancaSellaForm == 'undefined') {
2
 
3
  var BancaSellaForm = {
@@ -75,7 +76,9 @@ if (typeof BancaSellaForm == 'undefined') {
75
  var form = $(BancaSellaForm.formId);
76
  BancaSellaForm.realForm = form;
77
  Form.getElements(form).each(function (input){
78
- jQuery(input).prop('disabled', true);
 
 
79
  });
80
  }
81
  }
@@ -90,9 +93,8 @@ if (typeof BancaSellaForm == 'undefined') {
90
  if(BancaSellaForm.enable
91
  && $(BancaSellaForm.showHidePaymentDivId).hasClassName('allow')) {
92
  Form.getElements($(BancaSellaForm.formId )).each(function (input){
93
- var $input = jQuery(input);
94
- if($input.is(':visible') && $input.prop('disabled')){
95
- $input.prop('disabled', false);
96
  }
97
  });
98
  }
@@ -400,15 +402,17 @@ if (typeof BancaSellaForm == 'undefined') {
400
  },
401
 
402
  saveDataCC: function (form){
403
- form = jQuery(form);
404
  BancaSellaForm.ccData = {};
405
- BancaSellaForm.ccData.token = form.find("[name='bancasella_iframe[token]']:checked").val();
406
- BancaSellaForm.ccData.cc = form.find("[name='bancasella_iframe[cc_number]']").val();
407
- BancaSellaForm.ccData.expmm = form.find("[name='bancasella_iframe[cc_exp_mm]']").val();
408
- BancaSellaForm.ccData.expyy = form.find("[name='bancasella_iframe[cc_exp_yy]']").val();
409
- BancaSellaForm.ccData.cvv2 = form.find("[name='bancasella_iframe[cc_cvv]']").val();
410
- BancaSellaForm.ccData.name = form.find("[name='bancasella_iframe[cc_name]']").val();
411
- BancaSellaForm.ccData.email = form.find("[name='bancasella_iframe[cc_email]']").val();
 
 
412
  return true;
413
  },
414
 
1
+ ;
2
  if (typeof BancaSellaForm == 'undefined') {
3
 
4
  var BancaSellaForm = {
76
  var form = $(BancaSellaForm.formId);
77
  BancaSellaForm.realForm = form;
78
  Form.getElements(form).each(function (input){
79
+ if (!$(input).hasClassName('alternative-method') && $(input).id != "gestpay_alternative_payment" ) {
80
+ $(input).disabled = true;
81
+ }
82
  });
83
  }
84
  }
93
  if(BancaSellaForm.enable
94
  && $(BancaSellaForm.showHidePaymentDivId).hasClassName('allow')) {
95
  Form.getElements($(BancaSellaForm.formId )).each(function (input){
96
+ if($(input).visible() && $(input).disabled){
97
+ $(input).disabled = false;
 
98
  }
99
  });
100
  }
402
  },
403
 
404
  saveDataCC: function (form){
405
+ form = $(form);
406
  BancaSellaForm.ccData = {};
407
+ var token = form.down("[name='bancasella_iframe[token]']:checked", 0);
408
+ BancaSellaForm.ccData.token = token ? token.value : '';
409
+ BancaSellaForm.ccData.cc = form.down("[name='bancasella_iframe[cc_number]']", 0).value;
410
+ BancaSellaForm.ccData.expmm = form.down("[name='bancasella_iframe[cc_exp_mm]']", 0).value;
411
+ BancaSellaForm.ccData.expyy = form.down("[name='bancasella_iframe[cc_exp_yy]']", 0).value;
412
+ BancaSellaForm.ccData.cvv2 = form.down("[name='bancasella_iframe[cc_cvv]']", 0).value;
413
+ BancaSellaForm.ccData.name = form.down("[name='bancasella_iframe[cc_name]']", 0).value;
414
+ BancaSellaForm.ccData.email = form.down("[name='bancasella_iframe[cc_email]']", 0).value;
415
+
416
  return true;
417
  },
418
 
app/code/community/EasyNolo/BancaSellaPro/_additional_structure/js/bancasellapro/gestpayform_onepagecheckout.js → js/bancasellapro/gestpayform_idev_onestepcheckout.js RENAMED
@@ -1,27 +1,29 @@
1
- if (typeof(BancaSellaForm) == 'undefined') {
 
2
 
3
  var BancaSellaForm = {
4
- formId : false,
5
- merchantId : false,
6
- stringEncrypt : false,
7
- radioBancaSella : false,
8
- cssSelectorInfo : false,
9
- GestPayExternalClass : false,
10
- enable : false,
11
- idStart : false,
12
- cssSelectorRadioPayment : false,
13
- redirectSuccessUrl : false,
14
- redirectAfterIframe : false,
15
- confirmPage : false,
16
- authPage : false,
17
- dialogCC : false,
18
  lock: false,
19
- modal3d : false,
20
- successRedirect : false,
21
- initalized : false,
22
- code:null,
23
- enableFormToIframe:false,
24
- isRecurringProfile:false,
 
25
 
26
  init : function (config){
27
  this.formId = config.formId;
@@ -37,33 +39,27 @@ if (typeof(BancaSellaForm) == 'undefined') {
37
  this.waitImage = config.waitImage;
38
  this.GestPayExternalClass = config.GestPayExternalClass;
39
  this.successRedirect = config.successRedirect;
40
-
41
- this.enableFormToIframe= config.enableFormToIframe;
42
- this.code= config.code;
43
- this.isRecurringProfile= config.isRecurringProfile;
 
44
 
45
  if(!this.enableFormToIframe && this.isRecurringProfile){
46
  this.removePaymentMethod();
47
- return;
48
- }
49
-
50
- document.observe("payment-method:switched", function(event) {
51
- if(event.memo.method_code == "gestpaypro"){
52
- if(!BancaSellaForm.initalized){
53
- BancaSellaForm.start();
54
- }
55
- BancaSellaForm.toggleStatusForm(true);
56
- }else{
57
- BancaSellaForm.disableForm();
58
  }
59
- });
60
-
61
  },
 
62
  start : function(){
63
  if(!this.lock){
64
- this.showWait();
65
  BancaSellaForm.initalized = true;
66
- BancaSellaForm.createPagePaymentToOrder(false);
67
 
68
  $$(this.cssSelectorRadioPayment).each(
69
  function(item){
@@ -71,131 +67,176 @@ if (typeof(BancaSellaForm) == 'undefined') {
71
  }
72
  );
73
  //aggiorniamo lo stato del form al caricamento del pagamento
74
- payment.addAfterInitFunction('update-get-pay-form',BancaSellaForm.togglePaymentForm);
75
 
76
- //aggiungiamo i dati dell form ad una variabile interna per l'invio dei dati
77
- payment.addBeforeValidateFunction('before-validate-gest-pay',function(){
 
78
  if(!BancaSellaForm.lock){
79
  if(BancaSellaForm.enable){
80
- var form =$(BancaSellaForm.formId );
81
- BancaSellaForm.realForm=form;
82
- return;
 
 
 
 
 
 
 
83
  }
84
  }
85
- BancaSellaForm.realForm = null;
 
86
  });
 
87
  }
88
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  toggleStatusForm : function (isEnable){
90
  if(isEnable){
91
  this.lock = false;
92
  this.enable = false;
93
  this.togglePaymentForm();
94
  //nascondo il messaggio del redirect dopo la conferma ordine
95
- $$(this.cssSelectorInfo).first().hide();
 
96
  }else{
97
  this.disableForm();
98
  //mostro il messaggio del redirect dopo la conferma ordine
99
- $$(this.cssSelectorInfo).first().show();
 
100
  this.lock = true;
101
  }
102
  },
 
103
  toggleForm: function (){
104
  if(!this.lock){
105
  if(this.enable && this.formId){
106
  this.disableForm();
107
  }
108
  else{
 
 
 
109
  this.enableForm();
110
  }
111
  }
112
  },
 
113
  enableForm : function (){
114
  if(!this.lock){
115
- // if(!this.enable ){
116
- $(this.formId).show();
117
- Form.enable( $(this.formId));
118
- this.enable = true;
119
- // }
120
  return true;
121
  }
122
  return false;
123
  },
 
124
  disableForm : function(){
125
- // if(!this.lock){
126
- if(this.enable ){
127
- $(this.formId).hide();
128
- Form.disable( $(this.formId));
129
- this.enable = false;
130
- // }
131
  return true;
132
  }
133
  return false;
134
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  togglePaymentForm : function (){
136
- if($(BancaSellaForm.radioBancaSella).checked){
137
  BancaSellaForm.enableForm();
138
  }else{
139
  BancaSellaForm.disableForm();
140
  }
141
  return false;
142
  },
 
143
  paymentPageLoad : function( Result ){
 
144
  if(Result.ErrorCode != 10){
145
- //l'iframe non è stato creato
146
- if(!this.enableFormToIframe && this.isRecurringProfile){
147
- //se il pagamento era per un profilo ricorrente allora rimuovo la form
148
- BancaSellaForm.removePaymentMethod();
149
- return;
150
- }else{
151
- BancaSellaForm.toggleStatusForm(false);
152
- }
153
  }else{
154
  BancaSellaForm.toggleStatusForm(true);
155
  }
156
- BancaSellaForm.hideWait();
157
- BancaSellaForm.unlockPlaceOrder();
158
  },
159
- paymentPageLoadToOrder : function( Result ){
160
- if(Result.ErrorCode != 10){
161
- if(!BancaSellaForm.enableFormToIframe && BancaSellaForm.isRecurringProfile){
162
- //se il pagamento era per un profilo ricorrente allora rimuovo la form
163
- BancaSellaForm.removePaymentMethod();
164
- return;
165
- }else{
166
- BancaSellaForm.toggleStatusForm(false);
 
 
 
 
 
 
 
 
 
 
 
167
  }
168
- }else{
169
- BancaSellaForm.toggleStatusForm(true);
170
- IWD.OPC.saveOrder();
171
- IWD.OPC.Plugin.dispatch('savePaymentAfter');
172
  }
173
- BancaSellaForm.hideWait();
174
- },
175
- paymentPageLoadToSaveOrder : function( Result ){
176
 
177
- BancaSellaForm.paymentPageLoad(Result);
178
- IWD.OPC.saveOrder();
179
 
 
 
180
  },
181
- sendPaymentIframe : function (){
182
- BancaSellaForm.showWait();
183
- BancaSellaForm.GestPayExternalClass.SendPayment ({
184
- CC : BancaSellaForm.ccData.cc,
185
- EXPMM : BancaSellaForm.ccData.expmm,
186
- EXPYY : BancaSellaForm.ccData.expyy,
187
- CVV2 : BancaSellaForm.ccData.cvv2,
188
- Name: BancaSellaForm.ccData.name,
189
- Email: BancaSellaForm.ccData.email
190
- },
 
191
  function ( Result ) {
192
  BancaSellaForm.hideWait();
193
- BancaSellaForm.analizeResponse.delay(0.8,Result);
194
  }
195
  );
196
- return true;
197
  },
198
- analizeResponse : function(Result){
 
 
199
  if (Result.ErrorCode != 0){
200
  if (Result.ErrorCode == 8006){
201
  //3D Transaction
@@ -237,29 +278,28 @@ if (typeof(BancaSellaForm) == 'undefined') {
237
  BancaSellaForm.showModalDialogCC(idErrorInput, Result.ErrorDescription);
238
  return false;
239
  }
240
- }else{
241
  //pagamento effettuato con successo oppure l'utente ha annullato il 3dsecure;
242
- setLocation(BancaSellaForm.successRedirect + '?a='+ BancaSellaForm.merchantId + '&b='+ Result.EncryptedString);
 
243
  return;
244
  }
245
  },
 
246
  call3dSecure : function (TransKey, VBVRisp){
247
  BancaSellaForm.transKey=TransKey;
248
  var a = this.merchantId;
249
  var b = VBVRisp;
250
- var c= BancaSellaForm.confirmPage;
251
  var definitiveUrl = BancaSellaForm.authPage+'?a='+a+'&b='+b+'&c='+c ;
252
  BancaSellaForm.showModal(definitiveUrl);
253
  },
 
254
  redirectPaymentPage : function (){
255
- if(BancaSellaForm.isRecurringProfile){
256
- //il pagamento ricorrente non puo essere effettuato su bancasella
257
- setLocation(BancaSellaForm.redirectAfterIframe);
258
- }else{
259
- setLocation(BancaSellaForm.successRedirect);
260
- }
261
  return;
262
  },
 
263
  showModal : function (url)
264
  {
265
  this.modal3d = new Window(
@@ -280,6 +320,7 @@ if (typeof(BancaSellaForm) == 'undefined') {
280
  this.modal3d.setZIndex(1000);
281
  this.modal3d.showCenter(true);
282
  },
 
283
  //chiamata dall'iframe e non in questa pagina
284
  sendPares : function (pares){
285
  this.modal3d.close();
@@ -290,11 +331,12 @@ if (typeof(BancaSellaForm) == 'undefined') {
290
  },
291
  function ( Result ) {
292
  BancaSellaForm.hideWait();
293
- BancaSellaForm.analizeResponse.delay(0.8,Result);
294
  }
295
  );
296
  return false;
297
  },
 
298
  showModalDialogCC : function( id, message ){
299
  var form = BancaSellaForm.realForm;
300
 
@@ -320,31 +362,42 @@ if (typeof(BancaSellaForm) == 'undefined') {
320
  if (!validator.validate())
321
  return false;
322
  BancaSellaForm.saveDataCC($('modal-form'));
 
323
  BancaSellaForm.sendPaymentIframe.delay(0.8);
324
  return true;
325
  }
326
  }
327
  );
328
  }
329
- alert(message);
330
  },
 
 
 
 
 
 
 
 
 
331
  showWait : function(){
332
- IWD.OPC.Checkout.showLoader();
333
- IWD.OPC.Checkout.lockPlaceOrder();
 
 
 
 
 
334
  },
 
335
  hideWait: function(){
336
- IWD.OPC.Checkout.hideLoader();
337
- IWD.OPC.Checkout.unlockPlaceOrder();
338
- },
339
- lockPlaceOrder: function(){
340
- IWD.OPC.Checkout.lockPlaceOrder();
341
- },
342
- unlockPlaceOrder: function(){
343
- IWD.OPC.Checkout.unlockPlaceOrder();
344
  },
345
 
346
- saveDataCC :function (form){
347
  BancaSellaForm.ccData=[];
 
 
348
  BancaSellaForm.ccData.cc = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_number').first());
349
  BancaSellaForm.ccData.expmm = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_exp_mm').first());
350
  BancaSellaForm.ccData.expyy = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_exp_yy').first());
@@ -353,7 +406,8 @@ if (typeof(BancaSellaForm) == 'undefined') {
353
  BancaSellaForm.ccData.email = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_email').first());
354
  return true;
355
  },
356
- populateForm:function(form,id,enable){
 
357
  Form.getElements(form).each(function (input){
358
  input.disabled=enable;
359
  if(input.id == id){
@@ -397,21 +451,26 @@ if (typeof(BancaSellaForm) == 'undefined') {
397
  }
398
  });
399
  },
 
400
  checkAndCloseDialogCC : function(){
401
  if(BancaSellaForm.dialogCC){
402
  Windows.close('dialogcc');
403
  BancaSellaForm.dialogCC=false;
404
  }
405
  },
 
406
  removePaymentMethod : function(){
407
- $(this.formId).hide();
 
 
408
  var $paymentForm = $('p_method_' + this.code);
409
  $paymentForm.setAttribute('disabled','disabled');
410
- $paymentForm.up('dt').hide();
411
  },
 
412
  createPagePaymentToOrder: function (callSendOrder){
413
- IWD.OPC.Checkout.showLoader();
414
- IWD.OPC.Checkout.lockPlaceOrder();
415
  if(callSendOrder){
416
  BancaSellaForm.GestPayExternalClass.CreatePaymentPage( BancaSellaForm.merchantId, BancaSellaForm.stringEncrypt, BancaSellaForm.paymentPageLoadToOrder);
417
  }
@@ -420,173 +479,98 @@ if (typeof(BancaSellaForm) == 'undefined') {
420
  }
421
  }
422
  };
423
- }
424
-
425
- // define jquery
426
- if(typeof($j_opc) == 'undefined' || $j_opc == undefined || !$j_opc){
427
- $j_opc = false;
428
-
429
- if(typeof($ji) != 'undefined' && $ji != undefined && $ji)
430
- $j_opc = $ji; // from iwd_all 2.x
431
- else{
432
- if(typeof($j) != 'undefined' && $j != undefined && $j)
433
- $j_opc = $j; // from default magento 1.9
434
- else{
435
- if(typeof(jQuery) != 'undefined' && jQuery != undefined && jQuery)
436
- $j_opc = jQuery;
437
- }
438
- }
439
- }
440
-
441
- if(typeof IWD.OPC != 'undefined'){
442
-
443
- IWD.OPC.prepareOrderResponse = function (response){
444
- IWD.OPC.Checkout.xhr = null;
445
- if (typeof(response.error) != "undefined" && response.error!=false){
446
- IWD.OPC.Checkout.hideLoader();
447
- IWD.OPC.Checkout.unlockPlaceOrder();
448
- IWD.OPC.saveOrderStatus = false;
449
- $j_opc('.opc-message-container').html(response.error);
450
- $j_opc('.opc-message-wrapper').show();
451
- IWD.OPC.Plugin.dispatch('error');
452
- return;
453
- }
454
-
455
- if (typeof(response.error_messages) != "undefined" && response.error_messages!=false){
456
- IWD.OPC.Checkout.hideLoader();
457
- IWD.OPC.Checkout.unlockPlaceOrder();
458
 
459
- IWD.OPC.saveOrderStatus = false;
460
- $j_opc('.opc-message-container').html(response.error_messages);
461
- $j_opc('.opc-message-wrapper').show();
462
- IWD.OPC.Plugin.dispatch('error');
463
- return;
464
- }
465
-
466
- if (typeof(response.update_section) != "undefined"){
467
- IWD.OPC.Checkout.hideLoader();
468
- IWD.OPC.Checkout.unlockPlaceOrder();
469
- //create catch for default logic - for not spam errors to console
470
- try{
471
- $j_opc('#checkout-' + response.update_section.name + '-load').html(response.update_section.html);
472
- }catch(e){
473
-
474
- }
475
- IWD.OPC.prepareExtendPaymentForm();
476
- $j_opc('#payflow-advanced-iframe').show();
477
- $j_opc('#payflow-link-iframe').show();
478
- $j_opc('#hss-iframe').show();
479
- }
480
 
481
- if(!BancaSellaForm.lock && ($(BancaSellaForm.radioBancaSella).checked)){
482
- IWD.OPC.prepareExtendPaymentForm();
483
- $j_opc('.opc-col-right').find('h3').first().text(Translator.translate('Please wait...'));
484
- $j_opc('#opc-review-block').html('<div><p>'+Translator.translate('You are waiting the completion of payment')+'</p></div>');
485
 
486
- if (response.redirect) {
487
- BancaSellaForm.redirectAfterIframe = response.redirect;
 
488
  }
489
 
490
- BancaSellaForm.saveDataCC(BancaSellaForm.realForm);
491
- //inviamo i dati della carta
492
- BancaSellaForm.sendPaymentIframe();
493
- }else{
494
- if (typeof(response.redirect) !="undefined"){
495
- if (response.redirect!==false){
496
- setLocation(response.redirect);
497
- return;
498
  }
499
- }
500
- }
501
- IWD.OPC.Checkout.hideLoader();
502
- IWD.OPC.Checkout.unlockPlaceOrder();
503
-
504
- IWD.OPC.Plugin.dispatch('responseSaveOrder', response);
505
- };
506
- IWD.OPC.preparePaymentResponse = function(response){
507
-
508
- IWD.OPC.Checkout.xhr = null;
509
-
510
- IWD.OPC.agreements = $j_opc('#checkout-agreements').serializeArray();
511
-
512
- IWD.OPC.getSubscribe();
513
-
514
- if (typeof(response.review)!= "undefined"){
515
- IWD.OPC.Decorator.updateGrandTotal(response);
516
-
517
- $j_opc('#opc-review-block').html(response.review);
518
- IWD.OPC.Checkout.removePrice();
519
-
520
- // need to recheck subscribe and agreenet checkboxes
521
- IWD.OPC.recheckItems();
522
- }
523
 
524
- IWD.OPC.Checkout.hideLoader();
525
- IWD.OPC.Checkout.unlockPlaceOrder();
 
526
 
527
- if (typeof(response.error) != "undefined"){
 
 
528
 
529
- IWD.OPC.Plugin.dispatch('error');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
530
 
531
- $j_opc('.opc-message-container').html(response.error);
532
- $j_opc('.opc-message-wrapper').show();
533
- IWD.OPC.Checkout.hideLoader();
534
- IWD.OPC.Checkout.unlockPlaceOrder();
535
- IWD.OPC.saveOrderStatus = false;
536
 
537
- return;
538
- }
539
 
540
- //SOME PAYMENT METHOD REDIRECT CUSTOMER TO PAYMENT GATEWAY
541
- if (typeof(response.redirect) != "undefined" && IWD.OPC.saveOrderStatus===true){
542
- IWD.OPC.Checkout.xhr = null;
543
- IWD.OPC.Plugin.dispatch('redirectPayment', response.redirect);
544
- if (IWD.OPC.Checkout.xhr==null){
545
- setLocation(response.redirect);
546
- }
547
- else
548
- {
549
- IWD.OPC.Checkout.hideLoader();
550
- IWD.OPC.Checkout.unlockPlaceOrder();
551
- }
552
 
553
- return;
554
- }
 
 
 
 
555
 
556
- if(typeof(response.encrypt_string) != "undefined" ){
 
 
557
 
558
- if (typeof IWD.OPC.Checkout.showLoader != "undefined"){
559
- IWD.OPC.Checkout.showLoader();
 
 
 
 
 
 
 
 
560
  }
561
- //aggiorno la stringa
562
- BancaSellaForm.stringEncrypt = response.encrypt_string;
563
-
564
- BancaSellaForm.createPagePaymentToOrder(IWD.OPC.saveOrderStatus===true);
565
 
566
- }else if (IWD.OPC.saveOrderStatus===true){
567
- IWD.OPC.saveOrder();
568
- }else{
569
- if (typeof IWD.OPC.Checkout.hideLoader != "undefined"){
570
- IWD.OPC.Checkout.hideLoader();
571
- }
572
- IWD.OPC.Checkout.unlockPlaceOrder();
573
- }
574
- IWD.OPC.Plugin.dispatch('savePaymentAfter');
575
- }
576
- }
577
-
578
- $j_opc.ajaxPrefilter(function( options ) {
579
- if(decodeURIComponent(options.data).indexOf('payment[method]=gestpaypro') != -1 ){
580
- //salvo i dati della carta nel oggetto
581
- BancaSellaForm.saveDataCC(BancaSellaForm.realForm);
582
-
583
- //rimuovo tutti i dati della carta dalla richiesta
584
- var splitItems= options.data.split('&');
585
- for(var i=0; i < splitItems.length; ++i){
586
- if(decodeURIComponent(splitItems[i]).indexOf('bancasella_iframe') == 0 ){
587
- splitItems.splice(i--,1);
588
- }
589
- }
590
- options.data = splitItems.join('&');
591
  }
592
- });
1
+ ;
2
+ if (typeof BancaSellaForm == 'undefined') {
3
 
4
  var BancaSellaForm = {
5
+ formId: false,
6
+ merchantId: false,
7
+ stringEncrypt: false,
8
+ radioBancaSella: false,
9
+ cssSelectorInfo: false,
10
+ GestPayExternalClass: false,
11
+ enable: false,
12
+ idStart: false,
13
+ cssSelectorRadioPayment: false,
14
+ redirectSuccessUrl: false,
15
+ redirectAfterIframe: false,
16
+ confirmPage: false,
17
+ authPage: false,
18
+ dialogCC: false,
19
  lock: false,
20
+ modal3d: false,
21
+ successRedirect: false,
22
+ code: null,
23
+ enableFormToIframe: false,
24
+ isRecurringProfile: false,
25
+ enableRed: false,
26
+ enableRiskified: false,
27
 
28
  init : function (config){
29
  this.formId = config.formId;
39
  this.waitImage = config.waitImage;
40
  this.GestPayExternalClass = config.GestPayExternalClass;
41
  this.successRedirect = config.successRedirect;
42
+ this.enableFormToIframe = config.enableFormToIframe;
43
+ this.code = config.code;
44
+ this.isRecurringProfile = config.isRecurringProfile;
45
+ this.enableRed = config.enableRed;
46
+ this.enableRiskified = config.enableRiskified;
47
 
48
  if(!this.enableFormToIframe && this.isRecurringProfile){
49
  this.removePaymentMethod();
50
+ }else if (this.enableFormToIframe){
51
+ this.start();
52
+ // al click sulla form visibile e con input disabilitati, la funzione li riabilita
53
+ if($(this.showHidePaymentDivId)) {
54
+ $(this.showHidePaymentDivId).down('.step-title').on('click', this.checkClickPayment.bind(this));
 
 
 
 
 
 
55
  }
56
+ }
 
57
  },
58
+
59
  start : function(){
60
  if(!this.lock){
61
+
62
  BancaSellaForm.initalized = true;
 
63
 
64
  $$(this.cssSelectorRadioPayment).each(
65
  function(item){
67
  }
68
  );
69
  //aggiorniamo lo stato del form al caricamento del pagamento
70
+ payment.addAfterInitFunction('update-get-pay-form', BancaSellaForm.togglePaymentForm);
71
 
72
+ //aggiungiamo la validazione del form con i dati della carta nello step di pagamento
73
+ // e la rimozione del form per non far inviare i dati
74
+ payment.addBeforeValidateFunction('before-validate-gest-pay', function(){
75
  if(!BancaSellaForm.lock){
76
  if(BancaSellaForm.enable){
77
+ var validator = new Validation($(BancaSellaForm.formId ));
78
+ if (!validator.validate())
79
+ return false;
80
+ var form = $(BancaSellaForm.formId);
81
+ BancaSellaForm.realForm = form;
82
+ Form.getElements(form).each(function (input){
83
+ if (!$(input).hasClassName('alternative-method') && $(input).id != "gestpay_alternative_payment" ) {
84
+ $(input).disabled = true;
85
+ }
86
+ });
87
  }
88
  }
89
+ //restituisco true per la validazione
90
+ return true;
91
  });
92
+
93
  }
94
  },
95
+
96
+ checkClickPayment : function (){
97
+ if(BancaSellaForm.enable
98
+ && $(BancaSellaForm.showHidePaymentDivId).hasClassName('allow')) {
99
+ Form.getElements($(BancaSellaForm.formId )).each(function (input){
100
+ var $input = jQuery(input);
101
+ if($input.is(':visible') && $input.prop('disabled')){
102
+ $input.prop('disabled', false);
103
+ }
104
+ });
105
+ }
106
+ },
107
+
108
  toggleStatusForm : function (isEnable){
109
  if(isEnable){
110
  this.lock = false;
111
  this.enable = false;
112
  this.togglePaymentForm();
113
  //nascondo il messaggio del redirect dopo la conferma ordine
114
+ if($$(this.cssSelectorInfo).first())
115
+ $$(this.cssSelectorInfo).first().hide();
116
  }else{
117
  this.disableForm();
118
  //mostro il messaggio del redirect dopo la conferma ordine
119
+ if($$(this.cssSelectorInfo).first())
120
+ $$(this.cssSelectorInfo).first().show();
121
  this.lock = true;
122
  }
123
  },
124
+
125
  toggleForm: function (){
126
  if(!this.lock){
127
  if(this.enable && this.formId){
128
  this.disableForm();
129
  }
130
  else{
131
+ if (!BancaSellaForm.initalized) {
132
+ BancaSellaForm.start();
133
+ }
134
  this.enableForm();
135
  }
136
  }
137
  },
138
+
139
  enableForm : function (){
140
  if(!this.lock){
141
+ if(!this.enable ){
142
+ $(this.formId).show();
143
+ Form.enable($(this.formId));
144
+ this.enable = true;
145
+ }
146
  return true;
147
  }
148
  return false;
149
  },
150
+
151
  disableForm : function(){
152
+ if(!this.lock){
153
+ if(this.enable ){
154
+ $(this.formId).hide();
155
+ Form.disable($(this.formId));
156
+ this.enable = false;
157
+ }
158
  return true;
159
  }
160
  return false;
161
  },
162
+
163
+ debugInputForm : function (){
164
+ var obj ={
165
+ CC : $F($(this.idStart+'_cc_number')),
166
+ EXPMM : $F($(this.idStart+'_cc_exp_mm')),
167
+ EXPYY : $F($(this.idStart+'_cc_exp_yy')),
168
+ CVV2 : $F($(this.idStart+'_cc_cvv')),
169
+ Name: $F($(this.idStart+'_cc_name')),
170
+ Email: $F($(this.idStart+'_cc_email'))
171
+ };
172
+ console.log(obj);
173
+ },
174
+
175
  togglePaymentForm : function (){
176
+ if($(BancaSellaForm.radioBancaSella) && $(BancaSellaForm.radioBancaSella).checked){
177
  BancaSellaForm.enableForm();
178
  }else{
179
  BancaSellaForm.disableForm();
180
  }
181
  return false;
182
  },
183
+
184
  paymentPageLoad : function( Result ){
185
+ BancaSellaForm.hideWait();
186
  if(Result.ErrorCode != 10){
187
+ BancaSellaForm.toggleStatusForm(false);
 
 
 
 
 
 
 
188
  }else{
189
  BancaSellaForm.toggleStatusForm(true);
190
  }
 
 
191
  },
192
+
193
+ sendPaymentIframe : function (){
194
+ BancaSellaForm.showWait();
195
+
196
+ this.showWait();
197
+ var that = this;
198
+
199
+ if(BancaSellaForm.ccData.cc != "") {
200
+ this.GestPayExternalClass.CreatePaymentPage(this.merchantId, this.stringEncrypt, function (Result) {
201
+ that.paymentPageLoad(Result);
202
+ that._sendPaymentIframe();
203
+ });
204
+ } else {
205
+ if(BancaSellaForm.ccData.token) {
206
+ this._sendPaymentWithToken();
207
+ }
208
+ else {
209
+ alert("Invalid data");
210
+ BancaSellaForm.hideWait();
211
  }
 
 
 
 
212
  }
 
 
 
213
 
214
+ return true;
215
+ },
216
 
217
+ _sendPaymentWithToken: function(){
218
+ document.location.href = '/bancasellapro/tokenization/payUsingToken/token/'+BancaSellaForm.ccData.token;
219
  },
220
+
221
+ _sendPaymentIframe: function(){
222
+ var params = {
223
+ CC: BancaSellaForm.ccData.cc,
224
+ EXPMM: BancaSellaForm.ccData.expmm,
225
+ EXPYY: BancaSellaForm.ccData.expyy,
226
+ CVV2: BancaSellaForm.ccData.cvv2,
227
+ Name: BancaSellaForm.ccData.name,
228
+ Email: BancaSellaForm.ccData.email
229
+ }
230
+ BancaSellaForm.GestPayExternalClass.SendPayment(params,
231
  function ( Result ) {
232
  BancaSellaForm.hideWait();
233
+ BancaSellaForm.analyzeResponse.delay(0.8,Result);
234
  }
235
  );
 
236
  },
237
+
238
+ analyzeResponse : function(Result){
239
+
240
  if (Result.ErrorCode != 0){
241
  if (Result.ErrorCode == 8006){
242
  //3D Transaction
278
  BancaSellaForm.showModalDialogCC(idErrorInput, Result.ErrorDescription);
279
  return false;
280
  }
281
+ } else {
282
  //pagamento effettuato con successo oppure l'utente ha annullato il 3dsecure;
283
+ url = BancaSellaForm.successRedirect + '?a='+ BancaSellaForm.merchantId + '&b='+ Result.EncryptedString;
284
+ location.href = url;
285
  return;
286
  }
287
  },
288
+
289
  call3dSecure : function (TransKey, VBVRisp){
290
  BancaSellaForm.transKey=TransKey;
291
  var a = this.merchantId;
292
  var b = VBVRisp;
293
+ var c = BancaSellaForm.confirmPage;
294
  var definitiveUrl = BancaSellaForm.authPage+'?a='+a+'&b='+b+'&c='+c ;
295
  BancaSellaForm.showModal(definitiveUrl);
296
  },
297
+
298
  redirectPaymentPage : function (){
299
+ setLocation(BancaSellaForm.successRedirect);
 
 
 
 
 
300
  return;
301
  },
302
+
303
  showModal : function (url)
304
  {
305
  this.modal3d = new Window(
320
  this.modal3d.setZIndex(1000);
321
  this.modal3d.showCenter(true);
322
  },
323
+
324
  //chiamata dall'iframe e non in questa pagina
325
  sendPares : function (pares){
326
  this.modal3d.close();
331
  },
332
  function ( Result ) {
333
  BancaSellaForm.hideWait();
334
+ BancaSellaForm.analyzeResponse.delay(0.8,Result);
335
  }
336
  );
337
  return false;
338
  },
339
+
340
  showModalDialogCC : function( id, message ){
341
  var form = BancaSellaForm.realForm;
342
 
362
  if (!validator.validate())
363
  return false;
364
  BancaSellaForm.saveDataCC($('modal-form'));
365
+
366
  BancaSellaForm.sendPaymentIframe.delay(0.8);
367
  return true;
368
  }
369
  }
370
  );
371
  }
372
+ BancaSellaForm.openAlert(message);
373
  },
374
+
375
+ openAlert : function (message){
376
+ Dialog.alert(message,
377
+ { className:'magento', width:280, height:100, okLabel: "ok",
378
+ ok:function() { return true;}
379
+ }
380
+ );
381
+ },
382
+
383
  showWait : function(){
384
+ Dialog.info('<img src="'+BancaSellaForm.waitImage+'" class="v-middle" />'+ Translator.translate('Please wait...'),
385
+ { className:'magento',
386
+ width:150,
387
+ height:50,
388
+ zIndex:1000
389
+ }
390
+ );
391
  },
392
+
393
  hideWait: function(){
394
+ Dialog.closeInfo();
 
 
 
 
 
 
 
395
  },
396
 
397
+ saveDataCC: function (form){
398
  BancaSellaForm.ccData=[];
399
+ var token = form.down("[name='bancasella_iframe[token]']:checked", 0);
400
+ BancaSellaForm.ccData.token = token ? token.value : '';
401
  BancaSellaForm.ccData.cc = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_number').first());
402
  BancaSellaForm.ccData.expmm = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_exp_mm').first());
403
  BancaSellaForm.ccData.expyy = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_exp_yy').first());
406
  BancaSellaForm.ccData.email = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_email').first());
407
  return true;
408
  },
409
+
410
+ populateForm: function(form,id,enable){
411
  Form.getElements(form).each(function (input){
412
  input.disabled=enable;
413
  if(input.id == id){
451
  }
452
  });
453
  },
454
+
455
  checkAndCloseDialogCC : function(){
456
  if(BancaSellaForm.dialogCC){
457
  Windows.close('dialogcc');
458
  BancaSellaForm.dialogCC=false;
459
  }
460
  },
461
+
462
  removePaymentMethod : function(){
463
+ if(this.formId){
464
+ $(this.formId).hide();
465
+ }
466
  var $paymentForm = $('p_method_' + this.code);
467
  $paymentForm.setAttribute('disabled','disabled');
468
+ $paymentForm.up().up().hide();
469
  },
470
+
471
  createPagePaymentToOrder: function (callSendOrder){
472
+ BancaSellaForm.showWait();
473
+
474
  if(callSendOrder){
475
  BancaSellaForm.GestPayExternalClass.CreatePaymentPage( BancaSellaForm.merchantId, BancaSellaForm.stringEncrypt, BancaSellaForm.paymentPageLoadToOrder);
476
  }
479
  }
480
  }
481
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
482
 
483
+ var Review = Class.create();
484
+ Review.prototype = {
485
+ initialize: function(saveUrl, successUrl, agreementsForm){
486
+ this.saveUrl = saveUrl;
487
+ this.successUrl = successUrl;
488
+ this.agreementsForm = agreementsForm;
489
+ this.onSave = this.nextStep.bindAsEventListener(this);
490
+ this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
491
+ },
 
 
 
 
 
 
 
 
 
 
 
 
492
 
493
+ save: function(){
494
+ BancaSellaForm.showWait();
 
 
495
 
496
+ var params = Form.serialize('onestepcheckout-form');
497
+ if (this.agreementsForm) {
498
+ params += '&'+Form.serialize(this.agreementsForm);
499
  }
500
 
501
+ var request = new Ajax.Request(
502
+ this.saveUrl,
503
+ {
504
+ method:'post',
505
+ parameters:params,
506
+ onComplete: this.onComplete,
507
+ onSuccess: this.onSave,
508
+ onFailure: this.ajaxFailure
509
  }
510
+ );
511
+ },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
512
 
513
+ ajaxFailure: function(){
514
+ location.href = this.failureUrl;
515
+ },
516
 
517
+ resetLoadWaiting: function(transport){
518
+ BancaSellaForm.hideWait();
519
+ },
520
 
521
+ nextStep: function(transport){
522
+ if (transport && transport.responseText) {
523
+ response = eval('(' + transport.responseText + ')');
524
+ if (!response.success) {
525
+ var msg = response.error_messages;
526
+ if (typeof(msg)=='object') {
527
+ msg = msg.join("\n");
528
+ }
529
+ if (msg) {
530
+ alert(msg);
531
+ }
532
+ if (response.update_section) {
533
+ $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
534
+ }
535
+ if (response.goto_section) {
536
+ checkout.gotoSection(response.goto_section);
537
+ }
538
+ }else{
539
+ this.isSuccess = true;
540
+ BancaSellaForm.redirectSuccessUrl = this.successUrl;
541
 
542
+ if (typeof response.encrypt_string != 'undefined' && response.encrypt_string) {
543
+ BancaSellaForm.stringEncrypt = response.encrypt_string;
544
+ }
 
 
545
 
546
+ var alternativePayment = typeof alternativePaymentMethodsSelector != 'undefined' && $(alternativePaymentMethodsSelector) && $(alternativePaymentMethodsSelector).value;
 
547
 
548
+ if(!BancaSellaForm.lock && $(BancaSellaForm.radioBancaSella) && ($(BancaSellaForm.radioBancaSella).checked) && !alternativePayment){
 
 
 
 
 
 
 
 
 
 
 
549
 
550
+ if (response.success) {
551
+ BancaSellaForm.redirectAfterIframe = this.successUrl;
552
+ }
553
+ if (response.redirect) {
554
+ BancaSellaForm.redirectAfterIframe = response.redirect;
555
+ }
556
 
557
+ BancaSellaForm.saveDataCC($(BancaSellaForm.formId));
558
+ //inviamo i dati della carta
559
+ BancaSellaForm.sendPaymentIframe();
560
 
561
+ }else {
562
+ if (response.redirect) {
563
+ location.href = response.redirect;
564
+ return;
565
+ }
566
+ if (response.success) {
567
+ window.location=this.successUrl;
568
+ }
569
+ }
570
+ }
571
  }
572
+ },
 
 
 
573
 
574
+ isSuccess: false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  }
576
+ }
{app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin/frontend/base/default/js/easynolo_bancasella → js/bancasellapro}/gestpayform_onepagecheckout.js RENAMED
@@ -1,4 +1,5 @@
1
- if (typeof(BancaSellaForm) == 'undefined') {
 
2
 
3
  var BancaSellaForm = {
4
  formId : false,
@@ -58,6 +59,30 @@ if (typeof(BancaSellaForm) == 'undefined') {
58
  }
59
  });
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  },
62
  start : function(){
63
  if(!this.lock){
@@ -65,25 +90,28 @@ if (typeof(BancaSellaForm) == 'undefined') {
65
  BancaSellaForm.initalized = true;
66
  BancaSellaForm.createPagePaymentToOrder(false);
67
 
68
- $$(this.cssSelectorRadioPayment).each(
69
- function(item){
70
- Event.observe(item, 'click', BancaSellaForm.togglePaymentForm);
71
- }
72
- );
73
- //aggiorniamo lo stato del form al caricamento del pagamento
74
- payment.addAfterInitFunction('update-get-pay-form',BancaSellaForm.togglePaymentForm);
75
-
76
- //aggiungiamo i dati dell form ad una variabile interna per l'invio dei dati
77
- payment.addBeforeValidateFunction('before-validate-gest-pay',function(){
78
- if(!BancaSellaForm.lock){
79
- if(BancaSellaForm.enable){
80
- var form =$(BancaSellaForm.formId );
81
- BancaSellaForm.realForm=form;
82
- return;
83
  }
84
- }
85
- BancaSellaForm.realForm = null;
86
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }
88
  },
89
  toggleStatusForm : function (isEnable){
@@ -92,11 +120,15 @@ if (typeof(BancaSellaForm) == 'undefined') {
92
  this.enable = false;
93
  this.togglePaymentForm();
94
  //nascondo il messaggio del redirect dopo la conferma ordine
95
- $$(this.cssSelectorInfo).first().hide();
 
 
96
  }else{
97
  this.disableForm();
98
  //mostro il messaggio del redirect dopo la conferma ordine
99
- $$(this.cssSelectorInfo).first().show();
 
 
100
  this.lock = true;
101
  }
102
  },
@@ -129,10 +161,12 @@ if (typeof(BancaSellaForm) == 'undefined') {
129
  return false;
130
  },
131
  togglePaymentForm : function (){
132
- if($(BancaSellaForm.radioBancaSella).checked){
133
- BancaSellaForm.enableForm();
134
- }else{
135
- BancaSellaForm.disableForm();
 
 
136
  }
137
  return false;
138
  },
@@ -174,23 +208,45 @@ if (typeof(BancaSellaForm) == 'undefined') {
174
  IWD.OPC.saveOrder();
175
 
176
  },
 
177
  sendPaymentIframe : function (){
178
  BancaSellaForm.showWait();
179
- BancaSellaForm.GestPayExternalClass.SendPayment ({
180
- CC : BancaSellaForm.ccData.cc,
181
- EXPMM : BancaSellaForm.ccData.expmm,
182
- EXPYY : BancaSellaForm.ccData.expyy,
183
- CVV2 : BancaSellaForm.ccData.cvv2,
184
- Name: BancaSellaForm.ccData.name,
185
- Email: BancaSellaForm.ccData.email
186
- },
187
- function ( Result ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  BancaSellaForm.hideWait();
189
- BancaSellaForm.analizeResponse.delay(0.8,Result);
190
  }
191
- );
192
  return true;
193
  },
 
 
 
 
 
194
  analizeResponse : function(Result){
195
  if (Result.ErrorCode != 0){
196
  if (Result.ErrorCode == 8006){
@@ -340,6 +396,8 @@ if (typeof(BancaSellaForm) == 'undefined') {
340
  },
341
  saveDataCC :function (form){
342
  BancaSellaForm.ccData=[];
 
 
343
  BancaSellaForm.ccData.cc = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_number').first());
344
  BancaSellaForm.ccData.expmm = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_exp_mm').first());
345
  BancaSellaForm.ccData.expyy = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_exp_yy').first());
@@ -433,151 +491,224 @@ if(typeof($j_opc) == 'undefined' || $j_opc == undefined || !$j_opc){
433
  }
434
  }
435
 
436
- if(typeof IWD.OPC != 'undefined'){
437
 
438
- IWD.OPC.prepareOrderResponse = function (response){
439
- IWD.OPC.Checkout.xhr = null;
440
- if (typeof(response.error) != "undefined" && response.error!=false){
441
- IWD.OPC.Checkout.hideLoader();
442
- IWD.OPC.Checkout.unlockPlaceOrder();
443
- IWD.OPC.saveOrderStatus = false;
444
- $j_opc('.opc-message-container').html(response.error);
445
- $j_opc('.opc-message-wrapper').show();
446
- IWD.OPC.Plugin.dispatch('error');
447
- return;
448
- }
 
 
449
 
450
- if (typeof(response.error_messages) != "undefined" && response.error_messages!=false){
451
- IWD.OPC.Checkout.hideLoader();
452
- IWD.OPC.Checkout.unlockPlaceOrder();
453
 
454
- IWD.OPC.saveOrderStatus = false;
455
- $j_opc('.opc-message-container').html(response.error_messages);
456
- $j_opc('.opc-message-wrapper').show();
457
- IWD.OPC.Plugin.dispatch('error');
458
- return;
459
- }
460
 
 
461
 
 
 
 
 
462
 
463
- if (typeof(response.update_section) != "undefined"){
464
- IWD.OPC.Checkout.hideLoader();
465
- IWD.OPC.Checkout.unlockPlaceOrder();
466
 
467
- //create catch for default logic - for not spam errors to console
468
- try{
469
- $j_opc('#checkout-' + response.update_section.name + '-load').html(response.update_section.html);
470
- }catch(e){
471
 
 
 
 
 
 
472
  }
473
- IWD.OPC.prepareExtendPaymentForm();
474
- $j_opc('#payflow-advanced-iframe').show();
475
- $j_opc('#payflow-link-iframe').show();
476
- $j_opc('#hss-iframe').show();
477
- }
478
 
479
- if(!BancaSellaForm.lock && ($(BancaSellaForm.radioBancaSella).checked)){
480
- IWD.OPC.prepareExtendPaymentForm();
481
- $j_opc('.opc-col-right').find('h3').first().text(Translator.translate('Please wait...'));
482
- $j_opc('#opc-review-block').html('<div><p>'+Translator.translate('You are waiting the completion of payment')+'</p></div>');
 
 
 
 
 
 
 
 
 
 
 
 
 
483
 
484
- if (response.redirect) {
485
- BancaSellaForm.redirectAfterIframe = response.redirect;
 
 
 
486
  }
487
 
488
- BancaSellaForm.saveDataCC(BancaSellaForm.realForm);
489
- //inviamo i dati della carta
490
- BancaSellaForm.sendPaymentIframe();
491
- }else{
492
- if (typeof(response.redirect) !="undefined"){
493
- if (response.redirect!==false){
494
- setLocation(response.redirect);
495
- return;
 
 
 
496
  }
 
 
 
 
497
  }
498
- }
499
- IWD.OPC.Checkout.hideLoader();
500
- IWD.OPC.Checkout.unlockPlaceOrder();
501
 
502
- IWD.OPC.Plugin.dispatch('responseSaveOrder', response);
503
- };
504
- IWD.OPC.preparePaymentResponse = function(response){
505
 
506
- IWD.OPC.Checkout.xhr = null;
 
 
 
507
 
508
- IWD.OPC.agreements = $j_opc('#checkout-agreements').serializeArray();
 
 
509
 
510
- IWD.OPC.getSubscribe();
 
 
 
 
 
 
 
 
 
 
 
 
 
511
 
512
- if (typeof(response.review)!= "undefined"){
513
- IWD.OPC.Decorator.updateGrandTotal(response);
514
- $j_opc('#opc-review-block').html(response.review);
515
 
516
- IWD.OPC.Checkout.removePrice();
517
 
518
- // need to recheck subscribe and agreenet checkboxes
519
- IWD.OPC.recheckItems();
520
- }
521
 
522
- IWD.OPC.Checkout.hideLoader();
523
- IWD.OPC.Checkout.unlockPlaceOrder();
524
 
525
- if (typeof(response.error) != "undefined"){
 
 
526
 
527
- IWD.OPC.Plugin.dispatch('error');
 
 
 
 
528
 
529
- $j_opc('.opc-message-container').html(response.error);
530
- $j_opc('.opc-message-wrapper').show();
531
  IWD.OPC.Checkout.hideLoader();
532
  IWD.OPC.Checkout.unlockPlaceOrder();
533
- IWD.OPC.saveOrderStatus = false;
534
 
535
- return;
536
- }
537
 
538
- //SOME PAYMENT METHOD REDIRECT CUSTOMER TO PAYMENT GATEWAY
539
- if (typeof(response.redirect) != "undefined" && IWD.OPC.saveOrderStatus===true){
540
- IWD.OPC.Checkout.xhr = null;
541
- IWD.OPC.Plugin.dispatch('redirectPayment', response.redirect);
542
- if (IWD.OPC.Checkout.xhr==null){
543
- setLocation(response.redirect);
544
- }
545
- else
546
- {
547
  IWD.OPC.Checkout.hideLoader();
548
  IWD.OPC.Checkout.unlockPlaceOrder();
 
 
 
549
  }
550
 
551
- return;
552
- }
 
 
 
 
 
 
 
 
 
 
553
 
 
 
554
 
555
- if(typeof(response.encrypt_string) != "undefined" ){
556
 
557
- if (typeof IWD.OPC.Checkout.showLoader != "undefined"){
558
- IWD.OPC.Checkout.showLoader();
559
- }
560
- //aggiorno la stringa
561
- BancaSellaForm.stringEncrypt = response.encrypt_string;
562
 
563
- BancaSellaForm.createPagePaymentToOrder(IWD.OPC.saveOrderStatus===true);
 
 
 
 
564
 
565
- }else if (IWD.OPC.saveOrderStatus===true){
566
- IWD.OPC.saveOrder();
567
- }else{
568
- if (typeof IWD.OPC.Checkout.hideLoader != "undefined"){
569
- IWD.OPC.Checkout.hideLoader();
 
 
 
 
570
  }
571
- IWD.OPC.Checkout.unlockPlaceOrder();
572
  }
573
- IWD.OPC.Plugin.dispatch('savePaymentAfter');
 
574
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  }
576
 
 
 
577
  $j_opc.ajaxPrefilter(function( options ) {
578
  if(decodeURIComponent(options.data).indexOf('payment[method]=gestpaypro') != -1 ){
579
  //salvo i dati della carta nel oggetto
580
- BancaSellaForm.saveDataCC(BancaSellaForm.realForm);
 
 
 
 
581
 
582
  //rimuovo tutti i dati della carta dalla richiesta
583
  var splitItems= options.data.split('&');
1
+ ;
2
+ if (typeof BancaSellaForm == 'undefined') {
3
 
4
  var BancaSellaForm = {
5
  formId : false,
59
  }
60
  });
61
 
62
+ if (typeof PaymentMethod.prototype.savePaymentMethod == 'function') {
63
+ var savePaymentMethod = PaymentMethod.prototype.savePaymentMethod;
64
+ PaymentMethod.prototype.savePaymentMethod = function() {
65
+ if (this.getPaymentMethodCode()) {
66
+ if(!BancaSellaForm.initalized){
67
+ BancaSellaForm.start();
68
+ }
69
+ }
70
+ savePaymentMethod.apply(this, arguments);
71
+ }
72
+ }
73
+
74
+ if (typeof PaymentMethod.prototype.initPaymentMethods == 'function') {
75
+ var initPaymentMethods = PaymentMethod.prototype.initPaymentMethods;
76
+ PaymentMethod.prototype.initPaymentMethods = function() {
77
+ if (this.getPaymentMethodCode()) {
78
+ if(!BancaSellaForm.initalized){
79
+ BancaSellaForm.start();
80
+ }
81
+ }
82
+ initPaymentMethods.apply(this, arguments);
83
+ }
84
+ }
85
+
86
  },
87
  start : function(){
88
  if(!this.lock){
90
  BancaSellaForm.initalized = true;
91
  BancaSellaForm.createPagePaymentToOrder(false);
92
 
93
+ if (typeof payment != "undefined") {
94
+ $$(this.cssSelectorRadioPayment).each(
95
+ function(item){
96
+ Event.observe(item, 'click', BancaSellaForm.togglePaymentForm);
 
 
 
 
 
 
 
 
 
 
 
97
  }
98
+ );
99
+
100
+ //aggiorniamo lo stato del form al caricamento del pagamento
101
+ payment.addAfterInitFunction('update-get-pay-form', BancaSellaForm.togglePaymentForm);
102
+
103
+ //aggiungiamo i dati dell form ad una variabile interna per l'invio dei dati
104
+ payment.addBeforeValidateFunction('before-validate-gest-pay', function () {
105
+ if (!BancaSellaForm.lock) {
106
+ if (BancaSellaForm.enable) {
107
+ var form = $(BancaSellaForm.formId);
108
+ BancaSellaForm.realForm = form;
109
+ return;
110
+ }
111
+ }
112
+ BancaSellaForm.realForm = null;
113
+ });
114
+ }
115
  }
116
  },
117
  toggleStatusForm : function (isEnable){
120
  this.enable = false;
121
  this.togglePaymentForm();
122
  //nascondo il messaggio del redirect dopo la conferma ordine
123
+ if ($$(this.cssSelectorInfo).length) {
124
+ $$(this.cssSelectorInfo).first().hide();
125
+ }
126
  }else{
127
  this.disableForm();
128
  //mostro il messaggio del redirect dopo la conferma ordine
129
+ if ($$(this.cssSelectorInfo).length) {
130
+ $$(this.cssSelectorInfo).first().show();
131
+ }
132
  this.lock = true;
133
  }
134
  },
161
  return false;
162
  },
163
  togglePaymentForm : function (){
164
+ if (!!BancaSellaForm.radioBancaSella && $(BancaSellaForm.radioBancaSella)) {
165
+ if ($(BancaSellaForm.formId) && $(BancaSellaForm.formId).visible()) {
166
+ BancaSellaForm.enableForm();
167
+ } else {
168
+ BancaSellaForm.disableForm();
169
+ }
170
  }
171
  return false;
172
  },
208
  IWD.OPC.saveOrder();
209
 
210
  },
211
+
212
  sendPaymentIframe : function (){
213
  BancaSellaForm.showWait();
214
+
215
+ if (typeof BancaSellaForm.GestPayExternalClass.HiddeniFrame == 'undefined' || !BancaSellaForm.GestPayExternalClass.HiddeniFrame) {
216
+ this.createPagePaymentToOrder(true);
217
+ }
218
+
219
+ if(BancaSellaForm.ccData.cc != "") {
220
+
221
+ BancaSellaForm.GestPayExternalClass.SendPayment({
222
+ CC: BancaSellaForm.ccData.cc,
223
+ EXPMM: BancaSellaForm.ccData.expmm,
224
+ EXPYY: BancaSellaForm.ccData.expyy,
225
+ CVV2: BancaSellaForm.ccData.cvv2,
226
+ Name: BancaSellaForm.ccData.name,
227
+ Email: BancaSellaForm.ccData.email
228
+ },
229
+ function (Result) {
230
+ BancaSellaForm.hideWait();
231
+ BancaSellaForm.analizeResponse.delay(0.8, Result);
232
+ }
233
+ );
234
+ } else {
235
+ if(BancaSellaForm.ccData.token) {
236
+ this._sendPaymentWithToken();
237
+ }
238
+ else {
239
+ alert("Invalid data");
240
  BancaSellaForm.hideWait();
 
241
  }
242
+ }
243
  return true;
244
  },
245
+
246
+ _sendPaymentWithToken: function(){
247
+ document.location.href = '/bancasellapro/tokenization/payUsingToken/token/'+BancaSellaForm.ccData.token;
248
+ },
249
+
250
  analizeResponse : function(Result){
251
  if (Result.ErrorCode != 0){
252
  if (Result.ErrorCode == 8006){
396
  },
397
  saveDataCC :function (form){
398
  BancaSellaForm.ccData=[];
399
+ var token = form.down("[name='bancasella_iframe[token]']:checked", 0);
400
+ BancaSellaForm.ccData.token = token ? token.value : '';
401
  BancaSellaForm.ccData.cc = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_number').first());
402
  BancaSellaForm.ccData.expmm = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_exp_mm').first());
403
  BancaSellaForm.ccData.expyy = $F(form.getElementsBySelector('#'+BancaSellaForm.idStart+'_cc_exp_yy').first());
491
  }
492
  }
493
 
 
494
 
495
+ var initIWDOPC = function ()
496
+ {
497
+ if (typeof Singleton != 'undefined' && typeof OnePage != 'undefined') {
498
+ IWD = window.IWD || {};
499
+ IWD.OPC = Singleton.get(OnePage)
500
+ IWD.OPC.Checkout = IWD.OPC;
501
+ IWD.OPC.Checkout.unlockPlaceOrder = function() {};
502
+ IWD.OPC.Checkout.lockPlaceOrder = function() {};
503
+ }
504
+ if (typeof IWD != 'undefined' && typeof IWD.OPC != 'undefined') {
505
+ IWD.OPC.saveOrderOnSuccess = function (result) {
506
+ if (typeof(result.status) !== 'undefined') {
507
+ if (result.status) {
508
 
509
+ if (typeof(result.redirect_url) !="undefined"){
510
+ if (result.redirect_url!==false){
511
+ var alternativePayment = typeof alternativePaymentMethodsSelector != 'undefined' && $(alternativePaymentMethodsSelector) && $(alternativePaymentMethodsSelector).value;
512
 
513
+ if(!BancaSellaForm.lock && $(BancaSellaForm.formId) && $(BancaSellaForm.formId).visible() && !alternativePayment){
514
+ $j_opc('.opc-col-right').find('h3').first().text(Translator.translate('Please wait...'));
515
+ $j_opc('#opc-review-block').html('<div><p>'+Translator.translate('You are waiting the completion of payment')+'</p></div>');
 
 
 
516
 
517
+ BancaSellaForm.redirectAfterIframe = result.redirect_url;
518
 
519
+ var form = BancaSellaForm.realForm || $(BancaSellaForm.formId);
520
+ BancaSellaForm.saveDataCC(form);
521
+ //inviamo i dati della carta
522
+ BancaSellaForm.sendPaymentIframe();
523
 
524
+ return false;
525
+ } else if ($(BancaSellaForm.formId) && $(BancaSellaForm.formId).visible()) {
526
+ setLocation(result.redirect_url);
527
 
528
+ return false;
529
+ }
530
+ }
531
+ }
532
 
533
+
534
+ this.parseSuccessResult(result);
535
+ } else {
536
+ this.parseErrorResultSaveOrder(result);
537
+ }
538
  }
 
 
 
 
 
539
 
540
+ return false;
541
+ };
542
+ IWD.OPC.prepareOrderResponse = function (response){
543
+ IWD.OPC.Checkout.xhr = null;
544
+ if (typeof(response.error) != "undefined" && response.error!=false){
545
+ IWD.OPC.Checkout.hideLoader();
546
+ IWD.OPC.Checkout.unlockPlaceOrder();
547
+ IWD.OPC.saveOrderStatus = false;
548
+ $j_opc('.opc-message-container').html(response.error);
549
+ $j_opc('.opc-message-wrapper').show();
550
+ IWD.OPC.Plugin.dispatch('error');
551
+ return;
552
+ }
553
+
554
+ if (typeof(response.error_messages) != "undefined" && response.error_messages!=false){
555
+ IWD.OPC.Checkout.hideLoader();
556
+ IWD.OPC.Checkout.unlockPlaceOrder();
557
 
558
+ IWD.OPC.saveOrderStatus = false;
559
+ $j_opc('.opc-message-container').html(response.error_messages);
560
+ $j_opc('.opc-message-wrapper').show();
561
+ IWD.OPC.Plugin.dispatch('error');
562
+ return;
563
  }
564
 
565
+
566
+
567
+ if (typeof(response.update_section) != "undefined"){
568
+ IWD.OPC.Checkout.hideLoader();
569
+ IWD.OPC.Checkout.unlockPlaceOrder();
570
+
571
+ //create catch for default logic - for not spam errors to console
572
+ try{
573
+ $j_opc('#checkout-' + response.update_section.name + '-load').html(response.update_section.html);
574
+ }catch(e){
575
+
576
  }
577
+ IWD.OPC.prepareExtendPaymentForm();
578
+ $j_opc('#payflow-advanced-iframe').show();
579
+ $j_opc('#payflow-link-iframe').show();
580
+ $j_opc('#hss-iframe').show();
581
  }
 
 
 
582
 
583
+ var alternativePayment = typeof alternativePaymentMethodsSelector != 'undefined' && $(alternativePaymentMethodsSelector) && $(alternativePaymentMethodsSelector).value;
 
 
584
 
585
+ if(!BancaSellaForm.lock && $(BancaSellaForm.formId) && $(BancaSellaForm.formId).visible() && !alternativePayment){
586
+ IWD.OPC.prepareExtendPaymentForm();
587
+ $j_opc('.opc-col-right').find('h3').first().text(Translator.translate('Please wait...'));
588
+ $j_opc('#opc-review-block').html('<div><p>'+Translator.translate('You are waiting the completion of payment')+'</p></div>');
589
 
590
+ if (response.redirect) {
591
+ BancaSellaForm.redirectAfterIframe = response.redirect;
592
+ }
593
 
594
+ var form = BancaSellaForm.realForm || $(BancaSellaForm.formId);
595
+ BancaSellaForm.saveDataCC(form);
596
+ //inviamo i dati della carta
597
+ BancaSellaForm.sendPaymentIframe();
598
+ }else{
599
+ if (typeof(response.redirect) !="undefined"){
600
+ if (response.redirect!==false){
601
+ setLocation(response.redirect);
602
+ return;
603
+ }
604
+ }
605
+ }
606
+ IWD.OPC.Checkout.hideLoader();
607
+ IWD.OPC.Checkout.unlockPlaceOrder();
608
 
609
+ IWD.OPC.Plugin.dispatch('responseSaveOrder', response);
610
+ };
611
+ IWD.OPC.preparePaymentResponse = function(response){
612
 
613
+ IWD.OPC.Checkout.xhr = null;
614
 
615
+ IWD.OPC.agreements = $j_opc('#checkout-agreements').serializeArray();
 
 
616
 
617
+ IWD.OPC.getSubscribe();
 
618
 
619
+ if (typeof(response.review)!= "undefined"){
620
+ IWD.OPC.Decorator.updateGrandTotal(response);
621
+ $j_opc('#opc-review-block').html(response.review);
622
 
623
+ IWD.OPC.Checkout.removePrice();
624
+
625
+ // need to recheck subscribe and agreenet checkboxes
626
+ IWD.OPC.recheckItems();
627
+ }
628
 
 
 
629
  IWD.OPC.Checkout.hideLoader();
630
  IWD.OPC.Checkout.unlockPlaceOrder();
 
631
 
632
+ if (typeof(response.error) != "undefined"){
 
633
 
634
+ IWD.OPC.Plugin.dispatch('error');
635
+
636
+ $j_opc('.opc-message-container').html(response.error);
637
+ $j_opc('.opc-message-wrapper').show();
 
 
 
 
 
638
  IWD.OPC.Checkout.hideLoader();
639
  IWD.OPC.Checkout.unlockPlaceOrder();
640
+ IWD.OPC.saveOrderStatus = false;
641
+
642
+ return;
643
  }
644
 
645
+ //SOME PAYMENT METHOD REDIRECT CUSTOMER TO PAYMENT GATEWAY
646
+ if (typeof(response.redirect) != "undefined" && IWD.OPC.saveOrderStatus===true){
647
+ IWD.OPC.Checkout.xhr = null;
648
+ IWD.OPC.Plugin.dispatch('redirectPayment', response.redirect);
649
+ if (IWD.OPC.Checkout.xhr==null){
650
+ setLocation(response.redirect);
651
+ }
652
+ else
653
+ {
654
+ IWD.OPC.Checkout.hideLoader();
655
+ IWD.OPC.Checkout.unlockPlaceOrder();
656
+ }
657
 
658
+ return;
659
+ }
660
 
 
661
 
662
+ if(typeof(response.encrypt_string) != "undefined" ){
 
 
 
 
663
 
664
+ if (typeof IWD.OPC.Checkout.showLoader != "undefined"){
665
+ IWD.OPC.Checkout.showLoader();
666
+ }
667
+ //aggiorno la stringa
668
+ BancaSellaForm.stringEncrypt = response.encrypt_string;
669
 
670
+ BancaSellaForm.createPagePaymentToOrder(IWD.OPC.saveOrderStatus===true);
671
+
672
+ }else if (IWD.OPC.saveOrderStatus===true){
673
+ IWD.OPC.saveOrder();
674
+ }else{
675
+ if (typeof IWD.OPC.Checkout.hideLoader != "undefined"){
676
+ IWD.OPC.Checkout.hideLoader();
677
+ }
678
+ IWD.OPC.Checkout.unlockPlaceOrder();
679
  }
680
+ IWD.OPC.Plugin.dispatch('savePaymentAfter');
681
  }
682
+ } else {
683
+ setTimeout(initIWDOPC, 100);
684
  }
685
+ };
686
+
687
+
688
+ if (typeof OnePage != 'undefined') {
689
+ OnePage.prototype.initConfig = function () {
690
+ if (typeof(iwdOpcConfig) === 'string' && iwdOpcConfig) {
691
+ var config = $ji.parseJSON(iwdOpcConfig);
692
+ this.config = config;
693
+ return config;
694
+ } else {
695
+ this.addError('Initial config is missing');
696
+ }
697
+
698
+ return '';
699
+ };
700
  }
701
 
702
+ initIWDOPC();
703
+
704
  $j_opc.ajaxPrefilter(function( options ) {
705
  if(decodeURIComponent(options.data).indexOf('payment[method]=gestpaypro') != -1 ){
706
  //salvo i dati della carta nel oggetto
707
+ var alternativePayment = typeof alternativePaymentMethodsSelector != 'undefined' && $(alternativePaymentMethodsSelector) && $(alternativePaymentMethodsSelector).value;
708
+ var form = BancaSellaForm.realForm || $(BancaSellaForm.formId);
709
+ if (!alternativePayment) {
710
+ BancaSellaForm.saveDataCC(form);
711
+ }
712
 
713
  //rimuovo tutti i dati della carta dalla richiesta
714
  var splitItems= options.data.split('&');
js/bancasellapro/gestpayform_onepagecheckout_jquery.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ // define jquery
4
+ if(typeof($j_opc) == 'undefined' || $j_opc == undefined || !$j_opc){
5
+ $j_opc = false;
6
+
7
+ if(typeof($ji) != 'undefined' && $ji != undefined && $ji)
8
+ $j_opc = $ji; // from iwd_all 2.x
9
+ else{
10
+ if(typeof($j) != 'undefined' && $j != undefined && $j)
11
+ $j_opc = $j; // from default magento 1.9
12
+ else{
13
+ if(typeof(jQuery) != 'undefined' && jQuery != undefined && jQuery) {
14
+ $j_opc = jQuery;
15
+ } else {
16
+ /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
17
+ //@ sourceMappingURL=jquery-1.10.2.min.map
18
+ */
19
+ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.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%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
20
+ }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
21
+ u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
22
+
23
+ // Avoid PrototypeJS conflicts, assign jQuery to $j instead of $
24
+ var $j = jQuery.noConflict();
25
+ var $ji = $j
26
+ }
27
+
28
+ }
29
+ }
30
+ }
js/bancasellapro/jquery/jquery-1.10.2.js ADDED
@@ -0,0 +1,9789 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery JavaScript Library v1.10.2
3
+ * http://jquery.com/
4
+ *
5
+ * Includes Sizzle.js
6
+ * http://sizzlejs.com/
7
+ *
8
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
9
+ * Released under the MIT license
10
+ * http://jquery.org/license
11
+ *
12
+ * Date: 2013-07-03T13:48Z
13
+ */
14
+ (function( window, undefined ) {
15
+
16
+ // Can't do this because several apps including ASP.NET trace
17
+ // the stack via arguments.caller.callee and Firefox dies if
18
+ // you try to trace through "use strict" call chains. (#13335)
19
+ // Support: Firefox 18+
20
+ //"use strict";
21
+ var
22
+ // The deferred used on DOM ready
23
+ readyList,
24
+
25
+ // A central reference to the root jQuery(document)
26
+ rootjQuery,
27
+
28
+ // Support: IE<10
29
+ // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
30
+ core_strundefined = typeof undefined,
31
+
32
+ // Use the correct document accordingly with window argument (sandbox)
33
+ location = window.location,
34
+ document = window.document,
35
+ docElem = document.documentElement,
36
+
37
+ // Map over jQuery in case of overwrite
38
+ _jQuery = window.jQuery,
39
+
40
+ // Map over the $ in case of overwrite
41
+ _$ = window.$,
42
+
43
+ // [[Class]] -> type pairs
44
+ class2type = {},
45
+
46
+ // List of deleted data cache ids, so we can reuse them
47
+ core_deletedIds = [],
48
+
49
+ core_version = "1.10.2",
50
+
51
+ // Save a reference to some core methods
52
+ core_concat = core_deletedIds.concat,
53
+ core_push = core_deletedIds.push,
54
+ core_slice = core_deletedIds.slice,
55
+ core_indexOf = core_deletedIds.indexOf,
56
+ core_toString = class2type.toString,
57
+ core_hasOwn = class2type.hasOwnProperty,
58
+ core_trim = core_version.trim,
59
+
60
+ // Define a local copy of jQuery
61
+ jQuery = function( selector, context ) {
62
+ // The jQuery object is actually just the init constructor 'enhanced'
63
+ return new jQuery.fn.init( selector, context, rootjQuery );
64
+ },
65
+
66
+ // Used for matching numbers
67
+ core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
68
+
69
+ // Used for splitting on whitespace
70
+ core_rnotwhite = /\S+/g,
71
+
72
+ // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
73
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
74
+
75
+ // A simple way to check for HTML strings
76
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
77
+ // Strict HTML recognition (#11290: must start with <)
78
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
79
+
80
+ // Match a standalone tag
81
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
82
+
83
+ // JSON RegExp
84
+ rvalidchars = /^[\],:{}\s]*$/,
85
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
86
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
87
+ rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
88
+
89
+ // Matches dashed string for camelizing
90
+ rmsPrefix = /^-ms-/,
91
+ rdashAlpha = /-([\da-z])/gi,
92
+
93
+ // Used by jQuery.camelCase as callback to replace()
94
+ fcamelCase = function( all, letter ) {
95
+ return letter.toUpperCase();
96
+ },
97
+
98
+ // The ready event handler
99
+ completed = function( event ) {
100
+
101
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
102
+ if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
103
+ detach();
104
+ jQuery.ready();
105
+ }
106
+ },
107
+ // Clean-up method for dom ready events
108
+ detach = function() {
109
+ if ( document.addEventListener ) {
110
+ document.removeEventListener( "DOMContentLoaded", completed, false );
111
+ window.removeEventListener( "load", completed, false );
112
+
113
+ } else {
114
+ document.detachEvent( "onreadystatechange", completed );
115
+ window.detachEvent( "onload", completed );
116
+ }
117
+ };
118
+
119
+ jQuery.fn = jQuery.prototype = {
120
+ // The current version of jQuery being used
121
+ jquery: core_version,
122
+
123
+ constructor: jQuery,
124
+ init: function( selector, context, rootjQuery ) {
125
+ var match, elem;
126
+
127
+ // HANDLE: $(""), $(null), $(undefined), $(false)
128
+ if ( !selector ) {
129
+ return this;
130
+ }
131
+
132
+ // Handle HTML strings
133
+ if ( typeof selector === "string" ) {
134
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
135
+ // Assume that strings that start and end with <> are HTML and skip the regex check
136
+ match = [ null, selector, null ];
137
+
138
+ } else {
139
+ match = rquickExpr.exec( selector );
140
+ }
141
+
142
+ // Match html or make sure no context is specified for #id
143
+ if ( match && (match[1] || !context) ) {
144
+
145
+ // HANDLE: $(html) -> $(array)
146
+ if ( match[1] ) {
147
+ context = context instanceof jQuery ? context[0] : context;
148
+
149
+ // scripts is true for back-compat
150
+ jQuery.merge( this, jQuery.parseHTML(
151
+ match[1],
152
+ context && context.nodeType ? context.ownerDocument || context : document,
153
+ true
154
+ ) );
155
+
156
+ // HANDLE: $(html, props)
157
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
158
+ for ( match in context ) {
159
+ // Properties of context are called as methods if possible
160
+ if ( jQuery.isFunction( this[ match ] ) ) {
161
+ this[ match ]( context[ match ] );
162
+
163
+ // ...and otherwise set as attributes
164
+ } else {
165
+ this.attr( match, context[ match ] );
166
+ }
167
+ }
168
+ }
169
+
170
+ return this;
171
+
172
+ // HANDLE: $(#id)
173
+ } else {
174
+ elem = document.getElementById( match[2] );
175
+
176
+ // Check parentNode to catch when Blackberry 4.6 returns
177
+ // nodes that are no longer in the document #6963
178
+ if ( elem && elem.parentNode ) {
179
+ // Handle the case where IE and Opera return items
180
+ // by name instead of ID
181
+ if ( elem.id !== match[2] ) {
182
+ return rootjQuery.find( selector );
183
+ }
184
+
185
+ // Otherwise, we inject the element directly into the jQuery object
186
+ this.length = 1;
187
+ this[0] = elem;
188
+ }
189
+
190
+ this.context = document;
191
+ this.selector = selector;
192
+ return this;
193
+ }
194
+
195
+ // HANDLE: $(expr, $(...))
196
+ } else if ( !context || context.jquery ) {
197
+ return ( context || rootjQuery ).find( selector );
198
+
199
+ // HANDLE: $(expr, context)
200
+ // (which is just equivalent to: $(context).find(expr)
201
+ } else {
202
+ return this.constructor( context ).find( selector );
203
+ }
204
+
205
+ // HANDLE: $(DOMElement)
206
+ } else if ( selector.nodeType ) {
207
+ this.context = this[0] = selector;
208
+ this.length = 1;
209
+ return this;
210
+
211
+ // HANDLE: $(function)
212
+ // Shortcut for document ready
213
+ } else if ( jQuery.isFunction( selector ) ) {
214
+ return rootjQuery.ready( selector );
215
+ }
216
+
217
+ if ( selector.selector !== undefined ) {
218
+ this.selector = selector.selector;
219
+ this.context = selector.context;
220
+ }
221
+
222
+ return jQuery.makeArray( selector, this );
223
+ },
224
+
225
+ // Start with an empty selector
226
+ selector: "",
227
+
228
+ // The default length of a jQuery object is 0
229
+ length: 0,
230
+
231
+ toArray: function() {
232
+ return core_slice.call( this );
233
+ },
234
+
235
+ // Get the Nth element in the matched element set OR
236
+ // Get the whole matched element set as a clean array
237
+ get: function( num ) {
238
+ return num == null ?
239
+
240
+ // Return a 'clean' array
241
+ this.toArray() :
242
+
243
+ // Return just the object
244
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
245
+ },
246
+
247
+ // Take an array of elements and push it onto the stack
248
+ // (returning the new matched element set)
249
+ pushStack: function( elems ) {
250
+
251
+ // Build a new jQuery matched element set
252
+ var ret = jQuery.merge( this.constructor(), elems );
253
+
254
+ // Add the old object onto the stack (as a reference)
255
+ ret.prevObject = this;
256
+ ret.context = this.context;
257
+
258
+ // Return the newly-formed element set
259
+ return ret;
260
+ },
261
+
262
+ // Execute a callback for every element in the matched set.
263
+ // (You can seed the arguments with an array of args, but this is
264
+ // only used internally.)
265
+ each: function( callback, args ) {
266
+ return jQuery.each( this, callback, args );
267
+ },
268
+
269
+ ready: function( fn ) {
270
+ // Add the callback
271
+ jQuery.ready.promise().done( fn );
272
+
273
+ return this;
274
+ },
275
+
276
+ slice: function() {
277
+ return this.pushStack( core_slice.apply( this, arguments ) );
278
+ },
279
+
280
+ first: function() {
281
+ return this.eq( 0 );
282
+ },
283
+
284
+ last: function() {
285
+ return this.eq( -1 );
286
+ },
287
+
288
+ eq: function( i ) {
289
+ var len = this.length,
290
+ j = +i + ( i < 0 ? len : 0 );
291
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
292
+ },
293
+
294
+ map: function( callback ) {
295
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
296
+ return callback.call( elem, i, elem );
297
+ }));
298
+ },
299
+
300
+ end: function() {
301
+ return this.prevObject || this.constructor(null);
302
+ },
303
+
304
+ // For internal use only.
305
+ // Behaves like an Array's method, not like a jQuery method.
306
+ push: core_push,
307
+ sort: [].sort,
308
+ splice: [].splice
309
+ };
310
+
311
+ // Give the init function the jQuery prototype for later instantiation
312
+ jQuery.fn.init.prototype = jQuery.fn;
313
+
314
+ jQuery.extend = jQuery.fn.extend = function() {
315
+ var src, copyIsArray, copy, name, options, clone,
316
+ target = arguments[0] || {},
317
+ i = 1,
318
+ length = arguments.length,
319
+ deep = false;
320
+
321
+ // Handle a deep copy situation
322
+ if ( typeof target === "boolean" ) {
323
+ deep = target;
324
+ target = arguments[1] || {};
325
+ // skip the boolean and the target
326
+ i = 2;
327
+ }
328
+
329
+ // Handle case when target is a string or something (possible in deep copy)
330
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
331
+ target = {};
332
+ }
333
+
334
+ // extend jQuery itself if only one argument is passed
335
+ if ( length === i ) {
336
+ target = this;
337
+ --i;
338
+ }
339
+
340
+ for ( ; i < length; i++ ) {
341
+ // Only deal with non-null/undefined values
342
+ if ( (options = arguments[ i ]) != null ) {
343
+ // Extend the base object
344
+ for ( name in options ) {
345
+ src = target[ name ];
346
+ copy = options[ name ];
347
+
348
+ // Prevent never-ending loop
349
+ if ( target === copy ) {
350
+ continue;
351
+ }
352
+
353
+ // Recurse if we're merging plain objects or arrays
354
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
355
+ if ( copyIsArray ) {
356
+ copyIsArray = false;
357
+ clone = src && jQuery.isArray(src) ? src : [];
358
+
359
+ } else {
360
+ clone = src && jQuery.isPlainObject(src) ? src : {};
361
+ }
362
+
363
+ // Never move original objects, clone them
364
+ target[ name ] = jQuery.extend( deep, clone, copy );
365
+
366
+ // Don't bring in undefined values
367
+ } else if ( copy !== undefined ) {
368
+ target[ name ] = copy;
369
+ }
370
+ }
371
+ }
372
+ }
373
+
374
+ // Return the modified object
375
+ return target;
376
+ };
377
+
378
+ jQuery.extend({
379
+ // Unique for each copy of jQuery on the page
380
+ // Non-digits removed to match rinlinejQuery
381
+ expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
382
+
383
+ noConflict: function( deep ) {
384
+ if ( window.$ === jQuery ) {
385
+ window.$ = _$;
386
+ }
387
+
388
+ if ( deep && window.jQuery === jQuery ) {
389
+ window.jQuery = _jQuery;
390
+ }
391
+
392
+ return jQuery;
393
+ },
394
+
395
+ // Is the DOM ready to be used? Set to true once it occurs.
396
+ isReady: false,
397
+
398
+ // A counter to track how many items to wait for before
399
+ // the ready event fires. See #6781
400
+ readyWait: 1,
401
+
402
+ // Hold (or release) the ready event
403
+ holdReady: function( hold ) {
404
+ if ( hold ) {
405
+ jQuery.readyWait++;
406
+ } else {
407
+ jQuery.ready( true );
408
+ }
409
+ },
410
+
411
+ // Handle when the DOM is ready
412
+ ready: function( wait ) {
413
+
414
+ // Abort if there are pending holds or we're already ready
415
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
416
+ return;
417
+ }
418
+
419
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
420
+ if ( !document.body ) {
421
+ return setTimeout( jQuery.ready );
422
+ }
423
+
424
+ // Remember that the DOM is ready
425
+ jQuery.isReady = true;
426
+
427
+ // If a normal DOM Ready event fired, decrement, and wait if need be
428
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
429
+ return;
430
+ }
431
+
432
+ // If there are functions bound, to execute
433
+ readyList.resolveWith( document, [ jQuery ] );
434
+
435
+ // Trigger any bound ready events
436
+ if ( jQuery.fn.trigger ) {
437
+ jQuery( document ).trigger("ready").off("ready");
438
+ }
439
+ },
440
+
441
+ // See test/unit/core.js for details concerning isFunction.
442
+ // Since version 1.3, DOM methods and functions like alert
443
+ // aren't supported. They return false on IE (#2968).
444
+ isFunction: function( obj ) {
445
+ return jQuery.type(obj) === "function";
446
+ },
447
+
448
+ isArray: Array.isArray || function( obj ) {
449
+ return jQuery.type(obj) === "array";
450
+ },
451
+
452
+ isWindow: function( obj ) {
453
+ /* jshint eqeqeq: false */
454
+ return obj != null && obj == obj.window;
455
+ },
456
+
457
+ isNumeric: function( obj ) {
458
+ return !isNaN( parseFloat(obj) ) && isFinite( obj );
459
+ },
460
+
461
+ type: function( obj ) {
462
+ if ( obj == null ) {
463
+ return String( obj );
464
+ }
465
+ return typeof obj === "object" || typeof obj === "function" ?
466
+ class2type[ core_toString.call(obj) ] || "object" :
467
+ typeof obj;
468
+ },
469
+
470
+ isPlainObject: function( obj ) {
471
+ var key;
472
+
473
+ // Must be an Object.
474
+ // Because of IE, we also have to check the presence of the constructor property.
475
+ // Make sure that DOM nodes and window objects don't pass through, as well
476
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
477
+ return false;
478
+ }
479
+
480
+ try {
481
+ // Not own constructor property must be Object
482
+ if ( obj.constructor &&
483
+ !core_hasOwn.call(obj, "constructor") &&
484
+ !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
485
+ return false;
486
+ }
487
+ } catch ( e ) {
488
+ // IE8,9 Will throw exceptions on certain host objects #9897
489
+ return false;
490
+ }
491
+
492
+ // Support: IE<9
493
+ // Handle iteration over inherited properties before own properties.
494
+ if ( jQuery.support.ownLast ) {
495
+ for ( key in obj ) {
496
+ return core_hasOwn.call( obj, key );
497
+ }
498
+ }
499
+
500
+ // Own properties are enumerated firstly, so to speed up,
501
+ // if last one is own, then all properties are own.
502
+ for ( key in obj ) {}
503
+
504
+ return key === undefined || core_hasOwn.call( obj, key );
505
+ },
506
+
507
+ isEmptyObject: function( obj ) {
508
+ var name;
509
+ for ( name in obj ) {
510
+ return false;
511
+ }
512
+ return true;
513
+ },
514
+
515
+ error: function( msg ) {
516
+ throw new Error( msg );
517
+ },
518
+
519
+ // data: string of html
520
+ // context (optional): If specified, the fragment will be created in this context, defaults to document
521
+ // keepScripts (optional): If true, will include scripts passed in the html string
522
+ parseHTML: function( data, context, keepScripts ) {
523
+ if ( !data || typeof data !== "string" ) {
524
+ return null;
525
+ }
526
+ if ( typeof context === "boolean" ) {
527
+ keepScripts = context;
528
+ context = false;
529
+ }
530
+ context = context || document;
531
+
532
+ var parsed = rsingleTag.exec( data ),
533
+ scripts = !keepScripts && [];
534
+
535
+ // Single tag
536
+ if ( parsed ) {
537
+ return [ context.createElement( parsed[1] ) ];
538
+ }
539
+
540
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
541
+ if ( scripts ) {
542
+ jQuery( scripts ).remove();
543
+ }
544
+ return jQuery.merge( [], parsed.childNodes );
545
+ },
546
+
547
+ parseJSON: function( data ) {
548
+ // Attempt to parse using the native JSON parser first
549
+ if ( window.JSON && window.JSON.parse ) {
550
+ return window.JSON.parse( data );
551
+ }
552
+
553
+ if ( data === null ) {
554
+ return data;
555
+ }
556
+
557
+ if ( typeof data === "string" ) {
558
+
559
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
560
+ data = jQuery.trim( data );
561
+
562
+ if ( data ) {
563
+ // Make sure the incoming data is actual JSON
564
+ // Logic borrowed from http://json.org/json2.js
565
+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
566
+ .replace( rvalidtokens, "]" )
567
+ .replace( rvalidbraces, "")) ) {
568
+
569
+ return ( new Function( "return " + data ) )();
570
+ }
571
+ }
572
+ }
573
+
574
+ jQuery.error( "Invalid JSON: " + data );
575
+ },
576
+
577
+ // Cross-browser xml parsing
578
+ parseXML: function( data ) {
579
+ var xml, tmp;
580
+ if ( !data || typeof data !== "string" ) {
581
+ return null;
582
+ }
583
+ try {
584
+ if ( window.DOMParser ) { // Standard
585
+ tmp = new DOMParser();
586
+ xml = tmp.parseFromString( data , "text/xml" );
587
+ } else { // IE
588
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
589
+ xml.async = "false";
590
+ xml.loadXML( data );
591
+ }
592
+ } catch( e ) {
593
+ xml = undefined;
594
+ }
595
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
596
+ jQuery.error( "Invalid XML: " + data );
597
+ }
598
+ return xml;
599
+ },
600
+
601
+ noop: function() {},
602
+
603
+ // Evaluates a script in a global context
604
+ // Workarounds based on findings by Jim Driscoll
605
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
606
+ globalEval: function( data ) {
607
+ if ( data && jQuery.trim( data ) ) {
608
+ // We use execScript on Internet Explorer
609
+ // We use an anonymous function so that context is window
610
+ // rather than jQuery in Firefox
611
+ ( window.execScript || function( data ) {
612
+ window[ "eval" ].call( window, data );
613
+ } )( data );
614
+ }
615
+ },
616
+
617
+ // Convert dashed to camelCase; used by the css and data modules
618
+ // Microsoft forgot to hump their vendor prefix (#9572)
619
+ camelCase: function( string ) {
620
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
621
+ },
622
+
623
+ nodeName: function( elem, name ) {
624
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
625
+ },
626
+
627
+ // args is for internal usage only
628
+ each: function( obj, callback, args ) {
629
+ var value,
630
+ i = 0,
631
+ length = obj.length,
632
+ isArray = isArraylike( obj );
633
+
634
+ if ( args ) {
635
+ if ( isArray ) {
636
+ for ( ; i < length; i++ ) {
637
+ value = callback.apply( obj[ i ], args );
638
+
639
+ if ( value === false ) {
640
+ break;
641
+ }
642
+ }
643
+ } else {
644
+ for ( i in obj ) {
645
+ value = callback.apply( obj[ i ], args );
646
+
647
+ if ( value === false ) {
648
+ break;
649
+ }
650
+ }
651
+ }
652
+
653
+ // A special, fast, case for the most common use of each
654
+ } else {
655
+ if ( isArray ) {
656
+ for ( ; i < length; i++ ) {
657
+ value = callback.call( obj[ i ], i, obj[ i ] );
658
+
659
+ if ( value === false ) {
660
+ break;
661
+ }
662
+ }
663
+ } else {
664
+ for ( i in obj ) {
665
+ value = callback.call( obj[ i ], i, obj[ i ] );
666
+
667
+ if ( value === false ) {
668
+ break;
669
+ }
670
+ }
671
+ }
672
+ }
673
+
674
+ return obj;
675
+ },
676
+
677
+ // Use native String.trim function wherever possible
678
+ trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
679
+ function( text ) {
680
+ return text == null ?
681
+ "" :
682
+ core_trim.call( text );
683
+ } :
684
+
685
+ // Otherwise use our own trimming functionality
686
+ function( text ) {
687
+ return text == null ?
688
+ "" :
689
+ ( text + "" ).replace( rtrim, "" );
690
+ },
691
+
692
+ // results is for internal usage only
693
+ makeArray: function( arr, results ) {
694
+ var ret = results || [];
695
+
696
+ if ( arr != null ) {
697
+ if ( isArraylike( Object(arr) ) ) {
698
+ jQuery.merge( ret,
699
+ typeof arr === "string" ?
700
+ [ arr ] : arr
701
+ );
702
+ } else {
703
+ core_push.call( ret, arr );
704
+ }
705
+ }
706
+
707
+ return ret;
708
+ },
709
+
710
+ inArray: function( elem, arr, i ) {
711
+ var len;
712
+
713
+ if ( arr ) {
714
+ if ( core_indexOf ) {
715
+ return core_indexOf.call( arr, elem, i );
716
+ }
717
+
718
+ len = arr.length;
719
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
720
+
721
+ for ( ; i < len; i++ ) {
722
+ // Skip accessing in sparse arrays
723
+ if ( i in arr && arr[ i ] === elem ) {
724
+ return i;
725
+ }
726
+ }
727
+ }
728
+
729
+ return -1;
730
+ },
731
+
732
+ merge: function( first, second ) {
733
+ var l = second.length,
734
+ i = first.length,
735
+ j = 0;
736
+
737
+ if ( typeof l === "number" ) {
738
+ for ( ; j < l; j++ ) {
739
+ first[ i++ ] = second[ j ];
740
+ }
741
+ } else {
742
+ while ( second[j] !== undefined ) {
743
+ first[ i++ ] = second[ j++ ];
744
+ }
745
+ }
746
+
747
+ first.length = i;
748
+
749
+ return first;
750
+ },
751
+
752
+ grep: function( elems, callback, inv ) {
753
+ var retVal,
754
+ ret = [],
755
+ i = 0,
756
+ length = elems.length;
757
+ inv = !!inv;
758
+
759
+ // Go through the array, only saving the items
760
+ // that pass the validator function
761
+ for ( ; i < length; i++ ) {
762
+ retVal = !!callback( elems[ i ], i );
763
+ if ( inv !== retVal ) {
764
+ ret.push( elems[ i ] );
765
+ }
766
+ }
767
+
768
+ return ret;
769
+ },
770
+
771
+ // arg is for internal usage only
772
+ map: function( elems, callback, arg ) {
773
+ var value,
774
+ i = 0,
775
+ length = elems.length,
776
+ isArray = isArraylike( elems ),
777
+ ret = [];
778
+
779
+ // Go through the array, translating each of the items to their
780
+ if ( isArray ) {
781
+ for ( ; i < length; i++ ) {
782
+ value = callback( elems[ i ], i, arg );
783
+
784
+ if ( value != null ) {
785
+ ret[ ret.length ] = value;
786
+ }
787
+ }
788
+
789
+ // Go through every key on the object,
790
+ } else {
791
+ for ( i in elems ) {
792
+ value = callback( elems[ i ], i, arg );
793
+
794
+ if ( value != null ) {
795
+ ret[ ret.length ] = value;
796
+ }
797
+ }
798
+ }
799
+
800
+ // Flatten any nested arrays
801
+ return core_concat.apply( [], ret );
802
+ },
803
+
804
+ // A global GUID counter for objects
805
+ guid: 1,
806
+
807
+ // Bind a function to a context, optionally partially applying any
808
+ // arguments.
809
+ proxy: function( fn, context ) {
810
+ var args, proxy, tmp;
811
+
812
+ if ( typeof context === "string" ) {
813
+ tmp = fn[ context ];
814
+ context = fn;
815
+ fn = tmp;
816
+ }
817
+
818
+ // Quick check to determine if target is callable, in the spec
819
+ // this throws a TypeError, but we will just return undefined.
820
+ if ( !jQuery.isFunction( fn ) ) {
821
+ return undefined;
822
+ }
823
+
824
+ // Simulated bind
825
+ args = core_slice.call( arguments, 2 );
826
+ proxy = function() {
827
+ return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
828
+ };
829
+
830
+ // Set the guid of unique handler to the same of original handler, so it can be removed
831
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
832
+
833
+ return proxy;
834
+ },
835
+
836
+ // Multifunctional method to get and set values of a collection
837
+ // The value/s can optionally be executed if it's a function
838
+ access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
839
+ var i = 0,
840
+ length = elems.length,
841
+ bulk = key == null;
842
+
843
+ // Sets many values
844
+ if ( jQuery.type( key ) === "object" ) {
845
+ chainable = true;
846
+ for ( i in key ) {
847
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
848
+ }
849
+
850
+ // Sets one value
851
+ } else if ( value !== undefined ) {
852
+ chainable = true;
853
+
854
+ if ( !jQuery.isFunction( value ) ) {
855
+ raw = true;
856
+ }
857
+
858
+ if ( bulk ) {
859
+ // Bulk operations run against the entire set
860
+ if ( raw ) {
861
+ fn.call( elems, value );
862
+ fn = null;
863
+
864
+ // ...except when executing function values
865
+ } else {
866
+ bulk = fn;
867
+ fn = function( elem, key, value ) {
868
+ return bulk.call( jQuery( elem ), value );
869
+ };
870
+ }
871
+ }
872
+
873
+ if ( fn ) {
874
+ for ( ; i < length; i++ ) {
875
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
876
+ }
877
+ }
878
+ }
879
+
880
+ return chainable ?
881
+ elems :
882
+
883
+ // Gets
884
+ bulk ?
885
+ fn.call( elems ) :
886
+ length ? fn( elems[0], key ) : emptyGet;
887
+ },
888
+
889
+ now: function() {
890
+ return ( new Date() ).getTime();
891
+ },
892
+
893
+ // A method for quickly swapping in/out CSS properties to get correct calculations.
894
+ // Note: this method belongs to the css module but it's needed here for the support module.
895
+ // If support gets modularized, this method should be moved back to the css module.
896
+ swap: function( elem, options, callback, args ) {
897
+ var ret, name,
898
+ old = {};
899
+
900
+ // Remember the old values, and insert the new ones
901
+ for ( name in options ) {
902
+ old[ name ] = elem.style[ name ];
903
+ elem.style[ name ] = options[ name ];
904
+ }
905
+
906
+ ret = callback.apply( elem, args || [] );
907
+
908
+ // Revert the old values
909
+ for ( name in options ) {
910
+ elem.style[ name ] = old[ name ];
911
+ }
912
+
913
+ return ret;
914
+ }
915
+ });
916
+
917
+ jQuery.ready.promise = function( obj ) {
918
+ if ( !readyList ) {
919
+
920
+ readyList = jQuery.Deferred();
921
+
922
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
923
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
924
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
925
+ if ( document.readyState === "complete" ) {
926
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
927
+ setTimeout( jQuery.ready );
928
+
929
+ // Standards-based browsers support DOMContentLoaded
930
+ } else if ( document.addEventListener ) {
931
+ // Use the handy event callback
932
+ document.addEventListener( "DOMContentLoaded", completed, false );
933
+
934
+ // A fallback to window.onload, that will always work
935
+ window.addEventListener( "load", completed, false );
936
+
937
+ // If IE event model is used
938
+ } else {
939
+ // Ensure firing before onload, maybe late but safe also for iframes
940
+ document.attachEvent( "onreadystatechange", completed );
941
+
942
+ // A fallback to window.onload, that will always work
943
+ window.attachEvent( "onload", completed );
944
+
945
+ // If IE and not a frame
946
+ // continually check to see if the document is ready
947
+ var top = false;
948
+
949
+ try {
950
+ top = window.frameElement == null && document.documentElement;
951
+ } catch(e) {}
952
+
953
+ if ( top && top.doScroll ) {
954
+ (function doScrollCheck() {
955
+ if ( !jQuery.isReady ) {
956
+
957
+ try {
958
+ // Use the trick by Diego Perini
959
+ // http://javascript.nwbox.com/IEContentLoaded/
960
+ top.doScroll("left");
961
+ } catch(e) {
962
+ return setTimeout( doScrollCheck, 50 );
963
+ }
964
+
965
+ // detach all dom ready events
966
+ detach();
967
+
968
+ // and execute any waiting functions
969
+ jQuery.ready();
970
+ }
971
+ })();
972
+ }
973
+ }
974
+ }
975
+ return readyList.promise( obj );
976
+ };
977
+
978
+ // Populate the class2type map
979
+ jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
980
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
981
+ });
982
+
983
+ function isArraylike( obj ) {
984
+ var length = obj.length,
985
+ type = jQuery.type( obj );
986
+
987
+ if ( jQuery.isWindow( obj ) ) {
988
+ return false;
989
+ }
990
+
991
+ if ( obj.nodeType === 1 && length ) {
992
+ return true;
993
+ }
994
+
995
+ return type === "array" || type !== "function" &&
996
+ ( length === 0 ||
997
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj );
998
+ }
999
+
1000
+ // All jQuery objects should point back to these
1001
+ rootjQuery = jQuery(document);
1002
+ /*!
1003
+ * Sizzle CSS Selector Engine v1.10.2
1004
+ * http://sizzlejs.com/
1005
+ *
1006
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
1007
+ * Released under the MIT license
1008
+ * http://jquery.org/license
1009
+ *
1010
+ * Date: 2013-07-03
1011
+ */
1012
+ (function( window, undefined ) {
1013
+
1014
+ var i,
1015
+ support,
1016
+ cachedruns,
1017
+ Expr,
1018
+ getText,
1019
+ isXML,
1020
+ compile,
1021
+ outermostContext,
1022
+ sortInput,
1023
+
1024
+ // Local document vars
1025
+ setDocument,
1026
+ document,
1027
+ docElem,
1028
+ documentIsHTML,
1029
+ rbuggyQSA,
1030
+ rbuggyMatches,
1031
+ matches,
1032
+ contains,
1033
+
1034
+ // Instance-specific data
1035
+ expando = "sizzle" + -(new Date()),
1036
+ preferredDoc = window.document,
1037
+ dirruns = 0,
1038
+ done = 0,
1039
+ classCache = createCache(),
1040
+ tokenCache = createCache(),
1041
+ compilerCache = createCache(),
1042
+ hasDuplicate = false,
1043
+ sortOrder = function( a, b ) {
1044
+ if ( a === b ) {
1045
+ hasDuplicate = true;
1046
+ return 0;
1047
+ }
1048
+ return 0;
1049
+ },
1050
+
1051
+ // General-purpose constants
1052
+ strundefined = typeof undefined,
1053
+ MAX_NEGATIVE = 1 << 31,
1054
+
1055
+ // Instance methods
1056
+ hasOwn = ({}).hasOwnProperty,
1057
+ arr = [],
1058
+ pop = arr.pop,
1059
+ push_native = arr.push,
1060
+ push = arr.push,
1061
+ slice = arr.slice,
1062
+ // Use a stripped-down indexOf if we can't use a native one
1063
+ indexOf = arr.indexOf || function( elem ) {
1064
+ var i = 0,
1065
+ len = this.length;
1066
+ for ( ; i < len; i++ ) {
1067
+ if ( this[i] === elem ) {
1068
+ return i;
1069
+ }
1070
+ }
1071
+ return -1;
1072
+ },
1073
+
1074
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
1075
+
1076
+ // Regular expressions
1077
+
1078
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
1079
+ whitespace = "[\\x20\\t\\r\\n\\f]",
1080
+ // http://www.w3.org/TR/css3-syntax/#characters
1081
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
1082
+
1083
+ // Loosely modeled on CSS identifier characters
1084
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
1085
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
1086
+ identifier = characterEncoding.replace( "w", "w#" ),
1087
+
1088
+ // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
1089
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
1090
+ "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
1091
+
1092
+ // Prefer arguments quoted,
1093
+ // then not containing pseudos/brackets,
1094
+ // then attribute selectors/non-parenthetical expressions,
1095
+ // then anything else
1096
+ // These preferences are here to reduce the number of selectors
1097
+ // needing tokenize in the PSEUDO preFilter
1098
+ pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
1099
+
1100
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
1101
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
1102
+
1103
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
1104
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
1105
+
1106
+ rsibling = new RegExp( whitespace + "*[+~]" ),
1107
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
1108
+
1109
+ rpseudo = new RegExp( pseudos ),
1110
+ ridentifier = new RegExp( "^" + identifier + "$" ),
1111
+
1112
+ matchExpr = {
1113
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
1114
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
1115
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
1116
+ "ATTR": new RegExp( "^" + attributes ),
1117
+ "PSEUDO": new RegExp( "^" + pseudos ),
1118
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
1119
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
1120
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
1121
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
1122
+ // For use in libraries implementing .is()
1123
+ // We use this for POS matching in `select`
1124
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
1125
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
1126
+ },
1127
+
1128
+ rnative = /^[^{]+\{\s*\[native \w/,
1129
+
1130
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
1131
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
1132
+
1133
+ rinputs = /^(?:input|select|textarea|button)$/i,
1134
+ rheader = /^h\d$/i,
1135
+
1136
+ rescape = /'|\\/g,
1137
+
1138
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
1139
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
1140
+ funescape = function( _, escaped, escapedWhitespace ) {
1141
+ var high = "0x" + escaped - 0x10000;
1142
+ // NaN means non-codepoint
1143
+ // Support: Firefox
1144
+ // Workaround erroneous numeric interpretation of +"0x"
1145
+ return high !== high || escapedWhitespace ?
1146
+ escaped :
1147
+ // BMP codepoint
1148
+ high < 0 ?
1149
+ String.fromCharCode( high + 0x10000 ) :
1150
+ // Supplemental Plane codepoint (surrogate pair)
1151
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
1152
+ };
1153
+
1154
+ // Optimize for push.apply( _, NodeList )
1155
+ try {
1156
+ push.apply(
1157
+ (arr = slice.call( preferredDoc.childNodes )),
1158
+ preferredDoc.childNodes
1159
+ );
1160
+ // Support: Android<4.0
1161
+ // Detect silently failing push.apply
1162
+ arr[ preferredDoc.childNodes.length ].nodeType;
1163
+ } catch ( e ) {
1164
+ push = { apply: arr.length ?
1165
+
1166
+ // Leverage slice if possible
1167
+ function( target, els ) {
1168
+ push_native.apply( target, slice.call(els) );
1169
+ } :
1170
+
1171
+ // Support: IE<9
1172
+ // Otherwise append directly
1173
+ function( target, els ) {
1174
+ var j = target.length,
1175
+ i = 0;
1176
+ // Can't trust NodeList.length
1177
+ while ( (target[j++] = els[i++]) ) {}
1178
+ target.length = j - 1;
1179
+ }
1180
+ };
1181
+ }
1182
+
1183
+ function Sizzle( selector, context, results, seed ) {
1184
+ var match, elem, m, nodeType,
1185
+ // QSA vars
1186
+ i, groups, old, nid, newContext, newSelector;
1187
+
1188
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
1189
+ setDocument( context );
1190
+ }
1191
+
1192
+ context = context || document;
1193
+ results = results || [];
1194
+
1195
+ if ( !selector || typeof selector !== "string" ) {
1196
+ return results;
1197
+ }
1198
+
1199
+ if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
1200
+ return [];
1201
+ }
1202
+
1203
+ if ( documentIsHTML && !seed ) {
1204
+
1205
+ // Shortcuts
1206
+ if ( (match = rquickExpr.exec( selector )) ) {
1207
+ // Speed-up: Sizzle("#ID")
1208
+ if ( (m = match[1]) ) {
1209
+ if ( nodeType === 9 ) {
1210
+ elem = context.getElementById( m );
1211
+ // Check parentNode to catch when Blackberry 4.6 returns
1212
+ // nodes that are no longer in the document #6963
1213
+ if ( elem && elem.parentNode ) {
1214
+ // Handle the case where IE, Opera, and Webkit return items
1215
+ // by name instead of ID
1216
+ if ( elem.id === m ) {
1217
+ results.push( elem );
1218
+ return results;
1219
+ }
1220
+ } else {
1221
+ return results;
1222
+ }
1223
+ } else {
1224
+ // Context is not a document
1225
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
1226
+ contains( context, elem ) && elem.id === m ) {
1227
+ results.push( elem );
1228
+ return results;
1229
+ }
1230
+ }
1231
+
1232
+ // Speed-up: Sizzle("TAG")
1233
+ } else if ( match[2] ) {
1234
+ push.apply( results, context.getElementsByTagName( selector ) );
1235
+ return results;
1236
+
1237
+ // Speed-up: Sizzle(".CLASS")
1238
+ } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
1239
+ push.apply( results, context.getElementsByClassName( m ) );
1240
+ return results;
1241
+ }
1242
+ }
1243
+
1244
+ // QSA path
1245
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
1246
+ nid = old = expando;
1247
+ newContext = context;
1248
+ newSelector = nodeType === 9 && selector;
1249
+
1250
+ // qSA works strangely on Element-rooted queries
1251
+ // We can work around this by specifying an extra ID on the root
1252
+ // and working up from there (Thanks to Andrew Dupont for the technique)
1253
+ // IE 8 doesn't work on object elements
1254
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
1255
+ groups = tokenize( selector );
1256
+
1257
+ if ( (old = context.getAttribute("id")) ) {
1258
+ nid = old.replace( rescape, "\\$&" );
1259
+ } else {
1260
+ context.setAttribute( "id", nid );
1261
+ }
1262
+ nid = "[id='" + nid + "'] ";
1263
+
1264
+ i = groups.length;
1265
+ while ( i-- ) {
1266
+ groups[i] = nid + toSelector( groups[i] );
1267
+ }
1268
+ newContext = rsibling.test( selector ) && context.parentNode || context;
1269
+ newSelector = groups.join(",");
1270
+ }
1271
+
1272
+ if ( newSelector ) {
1273
+ try {
1274
+ push.apply( results,
1275
+ newContext.querySelectorAll( newSelector )
1276
+ );
1277
+ return results;
1278
+ } catch(qsaError) {
1279
+ } finally {
1280
+ if ( !old ) {
1281
+ context.removeAttribute("id");
1282
+ }
1283
+ }
1284
+ }
1285
+ }
1286
+ }
1287
+
1288
+ // All others
1289
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
1290
+ }
1291
+
1292
+ /**
1293
+ * Create key-value caches of limited size
1294
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
1295
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
1296
+ * deleting the oldest entry
1297
+ */
1298
+ function createCache() {
1299
+ var keys = [];
1300
+
1301
+ function cache( key, value ) {
1302
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
1303
+ if ( keys.push( key += " " ) > Expr.cacheLength ) {
1304
+ // Only keep the most recent entries
1305
+ delete cache[ keys.shift() ];
1306
+ }
1307
+ return (cache[ key ] = value);
1308
+ }
1309
+ return cache;
1310
+ }
1311
+
1312
+ /**
1313
+ * Mark a function for special use by Sizzle
1314
+ * @param {Function} fn The function to mark
1315
+ */
1316
+ function markFunction( fn ) {
1317
+ fn[ expando ] = true;
1318
+ return fn;
1319
+ }
1320
+
1321
+ /**
1322
+ * Support testing using an element
1323
+ * @param {Function} fn Passed the created div and expects a boolean result
1324
+ */
1325
+ function assert( fn ) {
1326
+ var div = document.createElement("div");
1327
+
1328
+ try {
1329
+ return !!fn( div );
1330
+ } catch (e) {
1331
+ return false;
1332
+ } finally {
1333
+ // Remove from its parent by default
1334
+ if ( div.parentNode ) {
1335
+ div.parentNode.removeChild( div );
1336
+ }
1337
+ // release memory in IE
1338
+ div = null;
1339
+ }
1340
+ }
1341
+
1342
+ /**
1343
+ * Adds the same handler for all of the specified attrs
1344
+ * @param {String} attrs Pipe-separated list of attributes
1345
+ * @param {Function} handler The method that will be applied
1346
+ */
1347
+ function addHandle( attrs, handler ) {
1348
+ var arr = attrs.split("|"),
1349
+ i = attrs.length;
1350
+
1351
+ while ( i-- ) {
1352
+ Expr.attrHandle[ arr[i] ] = handler;
1353
+ }
1354
+ }
1355
+
1356
+ /**
1357
+ * Checks document order of two siblings
1358
+ * @param {Element} a
1359
+ * @param {Element} b
1360
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
1361
+ */
1362
+ function siblingCheck( a, b ) {
1363
+ var cur = b && a,
1364
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
1365
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
1366
+ ( ~a.sourceIndex || MAX_NEGATIVE );
1367
+
1368
+ // Use IE sourceIndex if available on both nodes
1369
+ if ( diff ) {
1370
+ return diff;
1371
+ }
1372
+
1373
+ // Check if b follows a
1374
+ if ( cur ) {
1375
+ while ( (cur = cur.nextSibling) ) {
1376
+ if ( cur === b ) {
1377
+ return -1;
1378
+ }
1379
+ }
1380
+ }
1381
+
1382
+ return a ? 1 : -1;
1383
+ }
1384
+
1385
+ /**
1386
+ * Returns a function to use in pseudos for input types
1387
+ * @param {String} type
1388
+ */
1389
+ function createInputPseudo( type ) {
1390
+ return function( elem ) {
1391
+ var name = elem.nodeName.toLowerCase();
1392
+ return name === "input" && elem.type === type;
1393
+ };
1394
+ }
1395
+
1396
+ /**
1397
+ * Returns a function to use in pseudos for buttons
1398
+ * @param {String} type
1399
+ */
1400
+ function createButtonPseudo( type ) {
1401
+ return function( elem ) {
1402
+ var name = elem.nodeName.toLowerCase();
1403
+ return (name === "input" || name === "button") && elem.type === type;
1404
+ };
1405
+ }
1406
+
1407
+ /**
1408
+ * Returns a function to use in pseudos for positionals
1409
+ * @param {Function} fn
1410
+ */
1411
+ function createPositionalPseudo( fn ) {
1412
+ return markFunction(function( argument ) {
1413
+ argument = +argument;
1414
+ return markFunction(function( seed, matches ) {
1415
+ var j,
1416
+ matchIndexes = fn( [], seed.length, argument ),
1417
+ i = matchIndexes.length;
1418
+
1419
+ // Match elements found at the specified indexes
1420
+ while ( i-- ) {
1421
+ if ( seed[ (j = matchIndexes[i]) ] ) {
1422
+ seed[j] = !(matches[j] = seed[j]);
1423
+ }
1424
+ }
1425
+ });
1426
+ });
1427
+ }
1428
+
1429
+ /**
1430
+ * Detect xml
1431
+ * @param {Element|Object} elem An element or a document
1432
+ */
1433
+ isXML = Sizzle.isXML = function( elem ) {
1434
+ // documentElement is verified for cases where it doesn't yet exist
1435
+ // (such as loading iframes in IE - #4833)
1436
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
1437
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
1438
+ };
1439
+
1440
+ // Expose support vars for convenience
1441
+ support = Sizzle.support = {};
1442
+
1443
+ /**
1444
+ * Sets document-related variables once based on the current document
1445
+ * @param {Element|Object} [doc] An element or document object to use to set the document
1446
+ * @returns {Object} Returns the current document
1447
+ */
1448
+ setDocument = Sizzle.setDocument = function( node ) {
1449
+ var doc = node ? node.ownerDocument || node : preferredDoc,
1450
+ parent = doc.defaultView;
1451
+
1452
+ // If no document and documentElement is available, return
1453
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
1454
+ return document;
1455
+ }
1456
+
1457
+ // Set our document
1458
+ document = doc;
1459
+ docElem = doc.documentElement;
1460
+
1461
+ // Support tests
1462
+ documentIsHTML = !isXML( doc );
1463
+
1464
+ // Support: IE>8
1465
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
1466
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
1467
+ // IE6-8 do not support the defaultView property so parent will be undefined
1468
+ if ( parent && parent.attachEvent && parent !== parent.top ) {
1469
+ parent.attachEvent( "onbeforeunload", function() {
1470
+ setDocument();
1471
+ });
1472
+ }
1473
+
1474
+ /* Attributes
1475
+ ---------------------------------------------------------------------- */
1476
+
1477
+ // Support: IE<8
1478
+ // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
1479
+ support.attributes = assert(function( div ) {
1480
+ div.className = "i";
1481
+ return !div.getAttribute("className");
1482
+ });
1483
+
1484
+ /* getElement(s)By*
1485
+ ---------------------------------------------------------------------- */
1486
+
1487
+ // Check if getElementsByTagName("*") returns only elements
1488
+ support.getElementsByTagName = assert(function( div ) {
1489
+ div.appendChild( doc.createComment("") );
1490
+ return !div.getElementsByTagName("*").length;
1491
+ });
1492
+
1493
+ // Check if getElementsByClassName can be trusted
1494
+ support.getElementsByClassName = assert(function( div ) {
1495
+ div.innerHTML = "<div class='a'></div><div class='a i'></div>";
1496
+
1497
+ // Support: Safari<4
1498
+ // Catch class over-caching
1499
+ div.firstChild.className = "i";
1500
+ // Support: Opera<10
1501
+ // Catch gEBCN failure to find non-leading classes
1502
+ return div.getElementsByClassName("i").length === 2;
1503
+ });
1504
+
1505
+ // Support: IE<10
1506
+ // Check if getElementById returns elements by name
1507
+ // The broken getElementById methods don't pick up programatically-set names,
1508
+ // so use a roundabout getElementsByName test
1509
+ support.getById = assert(function( div ) {
1510
+ docElem.appendChild( div ).id = expando;
1511
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
1512
+ });
1513
+
1514
+ // ID find and filter
1515
+ if ( support.getById ) {
1516
+ Expr.find["ID"] = function( id, context ) {
1517
+ if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
1518
+ var m = context.getElementById( id );
1519
+ // Check parentNode to catch when Blackberry 4.6 returns
1520
+ // nodes that are no longer in the document #6963
1521
+ return m && m.parentNode ? [m] : [];
1522
+ }
1523
+ };
1524
+ Expr.filter["ID"] = function( id ) {
1525
+ var attrId = id.replace( runescape, funescape );
1526
+ return function( elem ) {
1527
+ return elem.getAttribute("id") === attrId;
1528
+ };
1529
+ };
1530
+ } else {
1531
+ // Support: IE6/7
1532
+ // getElementById is not reliable as a find shortcut
1533
+ delete Expr.find["ID"];
1534
+
1535
+ Expr.filter["ID"] = function( id ) {
1536
+ var attrId = id.replace( runescape, funescape );
1537
+ return function( elem ) {
1538
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
1539
+ return node && node.value === attrId;
1540
+ };
1541
+ };
1542
+ }
1543
+
1544
+ // Tag
1545
+ Expr.find["TAG"] = support.getElementsByTagName ?
1546
+ function( tag, context ) {
1547
+ if ( typeof context.getElementsByTagName !== strundefined ) {
1548
+ return context.getElementsByTagName( tag );
1549
+ }
1550
+ } :
1551
+ function( tag, context ) {
1552
+ var elem,
1553
+ tmp = [],
1554
+ i = 0,
1555
+ results = context.getElementsByTagName( tag );
1556
+
1557
+ // Filter out possible comments
1558
+ if ( tag === "*" ) {
1559
+ while ( (elem = results[i++]) ) {
1560
+ if ( elem.nodeType === 1 ) {
1561
+ tmp.push( elem );
1562
+ }
1563
+ }
1564
+
1565
+ return tmp;
1566
+ }
1567
+ return results;
1568
+ };
1569
+
1570
+ // Class
1571
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
1572
+ if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
1573
+ return context.getElementsByClassName( className );
1574
+ }
1575
+ };
1576
+
1577
+ /* QSA/matchesSelector
1578
+ ---------------------------------------------------------------------- */
1579
+
1580
+ // QSA and matchesSelector support
1581
+
1582
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
1583
+ rbuggyMatches = [];
1584
+
1585
+ // qSa(:focus) reports false when true (Chrome 21)
1586
+ // We allow this because of a bug in IE8/9 that throws an error
1587
+ // whenever `document.activeElement` is accessed on an iframe
1588
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
1589
+ // See http://bugs.jquery.com/ticket/13378
1590
+ rbuggyQSA = [];
1591
+
1592
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
1593
+ // Build QSA regex
1594
+ // Regex strategy adopted from Diego Perini
1595
+ assert(function( div ) {
1596
+ // Select is set to empty string on purpose
1597
+ // This is to test IE's treatment of not explicitly
1598
+ // setting a boolean content attribute,
1599
+ // since its presence should be enough
1600
+ // http://bugs.jquery.com/ticket/12359
1601
+ div.innerHTML = "<select><option selected=''></option></select>";
1602
+
1603
+ // Support: IE8
1604
+ // Boolean attributes and "value" are not treated correctly
1605
+ if ( !div.querySelectorAll("[selected]").length ) {
1606
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
1607
+ }
1608
+
1609
+ // Webkit/Opera - :checked should return selected option elements
1610
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1611
+ // IE8 throws error here and will not see later tests
1612
+ if ( !div.querySelectorAll(":checked").length ) {
1613
+ rbuggyQSA.push(":checked");
1614
+ }
1615
+ });
1616
+
1617
+ assert(function( div ) {
1618
+
1619
+ // Support: Opera 10-12/IE8
1620
+ // ^= $= *= and empty values
1621
+ // Should not select anything
1622
+ // Support: Windows 8 Native Apps
1623
+ // The type attribute is restricted during .innerHTML assignment
1624
+ var input = doc.createElement("input");
1625
+ input.setAttribute( "type", "hidden" );
1626
+ div.appendChild( input ).setAttribute( "t", "" );
1627
+
1628
+ if ( div.querySelectorAll("[t^='']").length ) {
1629
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
1630
+ }
1631
+
1632
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
1633
+ // IE8 throws error here and will not see later tests
1634
+ if ( !div.querySelectorAll(":enabled").length ) {
1635
+ rbuggyQSA.push( ":enabled", ":disabled" );
1636
+ }
1637
+
1638
+ // Opera 10-11 does not throw on post-comma invalid pseudos
1639
+ div.querySelectorAll("*,:x");
1640
+ rbuggyQSA.push(",.*:");
1641
+ });
1642
+ }
1643
+
1644
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
1645
+ docElem.mozMatchesSelector ||
1646
+ docElem.oMatchesSelector ||
1647
+ docElem.msMatchesSelector) )) ) {
1648
+
1649
+ assert(function( div ) {
1650
+ // Check to see if it's possible to do matchesSelector
1651
+ // on a disconnected node (IE 9)
1652
+ support.disconnectedMatch = matches.call( div, "div" );
1653
+
1654
+ // This should fail with an exception
1655
+ // Gecko does not error, returns false instead
1656
+ matches.call( div, "[s!='']:x" );
1657
+ rbuggyMatches.push( "!=", pseudos );
1658
+ });
1659
+ }
1660
+
1661
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
1662
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
1663
+
1664
+ /* Contains
1665
+ ---------------------------------------------------------------------- */
1666
+
1667
+ // Element contains another
1668
+ // Purposefully does not implement inclusive descendent
1669
+ // As in, an element does not contain itself
1670
+ contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
1671
+ function( a, b ) {
1672
+ var adown = a.nodeType === 9 ? a.documentElement : a,
1673
+ bup = b && b.parentNode;
1674
+ return a === bup || !!( bup && bup.nodeType === 1 && (
1675
+ adown.contains ?
1676
+ adown.contains( bup ) :
1677
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
1678
+ ));
1679
+ } :
1680
+ function( a, b ) {
1681
+ if ( b ) {
1682
+ while ( (b = b.parentNode) ) {
1683
+ if ( b === a ) {
1684
+ return true;
1685
+ }
1686
+ }
1687
+ }
1688
+ return false;
1689
+ };
1690
+
1691
+ /* Sorting
1692
+ ---------------------------------------------------------------------- */
1693
+
1694
+ // Document order sorting
1695
+ sortOrder = docElem.compareDocumentPosition ?
1696
+ function( a, b ) {
1697
+
1698
+ // Flag for duplicate removal
1699
+ if ( a === b ) {
1700
+ hasDuplicate = true;
1701
+ return 0;
1702
+ }
1703
+
1704
+ var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
1705
+
1706
+ if ( compare ) {
1707
+ // Disconnected nodes
1708
+ if ( compare & 1 ||
1709
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
1710
+
1711
+ // Choose the first element that is related to our preferred document
1712
+ if ( a === doc || contains(preferredDoc, a) ) {
1713
+ return -1;
1714
+ }
1715
+ if ( b === doc || contains(preferredDoc, b) ) {
1716
+ return 1;
1717
+ }
1718
+
1719
+ // Maintain original order
1720
+ return sortInput ?
1721
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
1722
+ 0;
1723
+ }
1724
+
1725
+ return compare & 4 ? -1 : 1;
1726
+ }
1727
+
1728
+ // Not directly comparable, sort on existence of method
1729
+ return a.compareDocumentPosition ? -1 : 1;
1730
+ } :
1731
+ function( a, b ) {
1732
+ var cur,
1733
+ i = 0,
1734
+ aup = a.parentNode,
1735
+ bup = b.parentNode,
1736
+ ap = [ a ],
1737
+ bp = [ b ];
1738
+
1739
+ // Exit early if the nodes are identical
1740
+ if ( a === b ) {
1741
+ hasDuplicate = true;
1742
+ return 0;
1743
+
1744
+ // Parentless nodes are either documents or disconnected
1745
+ } else if ( !aup || !bup ) {
1746
+ return a === doc ? -1 :
1747
+ b === doc ? 1 :
1748
+ aup ? -1 :
1749
+ bup ? 1 :
1750
+ sortInput ?
1751
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
1752
+ 0;
1753
+
1754
+ // If the nodes are siblings, we can do a quick check
1755
+ } else if ( aup === bup ) {
1756
+ return siblingCheck( a, b );
1757
+ }
1758
+
1759
+ // Otherwise we need full lists of their ancestors for comparison
1760
+ cur = a;
1761
+ while ( (cur = cur.parentNode) ) {
1762
+ ap.unshift( cur );
1763
+ }
1764
+ cur = b;
1765
+ while ( (cur = cur.parentNode) ) {
1766
+ bp.unshift( cur );
1767
+ }
1768
+
1769
+ // Walk down the tree looking for a discrepancy
1770
+ while ( ap[i] === bp[i] ) {
1771
+ i++;
1772
+ }
1773
+
1774
+ return i ?
1775
+ // Do a sibling check if the nodes have a common ancestor
1776
+ siblingCheck( ap[i], bp[i] ) :
1777
+
1778
+ // Otherwise nodes in our document sort first
1779
+ ap[i] === preferredDoc ? -1 :
1780
+ bp[i] === preferredDoc ? 1 :
1781
+ 0;
1782
+ };
1783
+
1784
+ return doc;
1785
+ };
1786
+
1787
+ Sizzle.matches = function( expr, elements ) {
1788
+ return Sizzle( expr, null, null, elements );
1789
+ };
1790
+
1791
+ Sizzle.matchesSelector = function( elem, expr ) {
1792
+ // Set document vars if needed
1793
+ if ( ( elem.ownerDocument || elem ) !== document ) {
1794
+ setDocument( elem );
1795
+ }
1796
+
1797
+ // Make sure that attribute selectors are quoted
1798
+ expr = expr.replace( rattributeQuotes, "='$1']" );
1799
+
1800
+ if ( support.matchesSelector && documentIsHTML &&
1801
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
1802
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
1803
+
1804
+ try {
1805
+ var ret = matches.call( elem, expr );
1806
+
1807
+ // IE 9's matchesSelector returns false on disconnected nodes
1808
+ if ( ret || support.disconnectedMatch ||
1809
+ // As well, disconnected nodes are said to be in a document
1810
+ // fragment in IE 9
1811
+ elem.document && elem.document.nodeType !== 11 ) {
1812
+ return ret;
1813
+ }
1814
+ } catch(e) {}
1815
+ }
1816
+
1817
+ return Sizzle( expr, document, null, [elem] ).length > 0;
1818
+ };
1819
+
1820
+ Sizzle.contains = function( context, elem ) {
1821
+ // Set document vars if needed
1822
+ if ( ( context.ownerDocument || context ) !== document ) {
1823
+ setDocument( context );
1824
+ }
1825
+ return contains( context, elem );
1826
+ };
1827
+
1828
+ Sizzle.attr = function( elem, name ) {
1829
+ // Set document vars if needed
1830
+ if ( ( elem.ownerDocument || elem ) !== document ) {
1831
+ setDocument( elem );
1832
+ }
1833
+
1834
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
1835
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
1836
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
1837
+ fn( elem, name, !documentIsHTML ) :
1838
+ undefined;
1839
+
1840
+ return val === undefined ?
1841
+ support.attributes || !documentIsHTML ?
1842
+ elem.getAttribute( name ) :
1843
+ (val = elem.getAttributeNode(name)) && val.specified ?
1844
+ val.value :
1845
+ null :
1846
+ val;
1847
+ };
1848
+
1849
+ Sizzle.error = function( msg ) {
1850
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
1851
+ };
1852
+
1853
+ /**
1854
+ * Document sorting and removing duplicates
1855
+ * @param {ArrayLike} results
1856
+ */
1857
+ Sizzle.uniqueSort = function( results ) {
1858
+ var elem,
1859
+ duplicates = [],
1860
+ j = 0,
1861
+ i = 0;
1862
+
1863
+ // Unless we *know* we can detect duplicates, assume their presence
1864
+ hasDuplicate = !support.detectDuplicates;
1865
+ sortInput = !support.sortStable && results.slice( 0 );
1866
+ results.sort( sortOrder );
1867
+
1868
+ if ( hasDuplicate ) {
1869
+ while ( (elem = results[i++]) ) {
1870
+ if ( elem === results[ i ] ) {
1871
+ j = duplicates.push( i );
1872
+ }
1873
+ }
1874
+ while ( j-- ) {
1875
+ results.splice( duplicates[ j ], 1 );
1876
+ }
1877
+ }
1878
+
1879
+ return results;
1880
+ };
1881
+
1882
+ /**
1883
+ * Utility function for retrieving the text value of an array of DOM nodes
1884
+ * @param {Array|Element} elem
1885
+ */
1886
+ getText = Sizzle.getText = function( elem ) {
1887
+ var node,
1888
+ ret = "",
1889
+ i = 0,
1890
+ nodeType = elem.nodeType;
1891
+
1892
+ if ( !nodeType ) {
1893
+ // If no nodeType, this is expected to be an array
1894
+ for ( ; (node = elem[i]); i++ ) {
1895
+ // Do not traverse comment nodes
1896
+ ret += getText( node );
1897
+ }
1898
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
1899
+ // Use textContent for elements
1900
+ // innerText usage removed for consistency of new lines (see #11153)
1901
+ if ( typeof elem.textContent === "string" ) {
1902
+ return elem.textContent;
1903
+ } else {
1904
+ // Traverse its children
1905
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1906
+ ret += getText( elem );
1907
+ }
1908
+ }
1909
+ } else if ( nodeType === 3 || nodeType === 4 ) {
1910
+ return elem.nodeValue;
1911
+ }
1912
+ // Do not include comment or processing instruction nodes
1913
+
1914
+ return ret;
1915
+ };
1916
+
1917
+ Expr = Sizzle.selectors = {
1918
+
1919
+ // Can be adjusted by the user
1920
+ cacheLength: 50,
1921
+
1922
+ createPseudo: markFunction,
1923
+
1924
+ match: matchExpr,
1925
+
1926
+ attrHandle: {},
1927
+
1928
+ find: {},
1929
+
1930
+ relative: {
1931
+ ">": { dir: "parentNode", first: true },
1932
+ " ": { dir: "parentNode" },
1933
+ "+": { dir: "previousSibling", first: true },
1934
+ "~": { dir: "previousSibling" }
1935
+ },
1936
+
1937
+ preFilter: {
1938
+ "ATTR": function( match ) {
1939
+ match[1] = match[1].replace( runescape, funescape );
1940
+
1941
+ // Move the given value to match[3] whether quoted or unquoted
1942
+ match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
1943
+
1944
+ if ( match[2] === "~=" ) {
1945
+ match[3] = " " + match[3] + " ";
1946
+ }
1947
+
1948
+ return match.slice( 0, 4 );
1949
+ },
1950
+
1951
+ "CHILD": function( match ) {
1952
+ /* matches from matchExpr["CHILD"]
1953
+ 1 type (only|nth|...)
1954
+ 2 what (child|of-type)
1955
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1956
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
1957
+ 5 sign of xn-component
1958
+ 6 x of xn-component
1959
+ 7 sign of y-component
1960
+ 8 y of y-component
1961
+ */
1962
+ match[1] = match[1].toLowerCase();
1963
+
1964
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
1965
+ // nth-* requires argument
1966
+ if ( !match[3] ) {
1967
+ Sizzle.error( match[0] );
1968
+ }
1969
+
1970
+ // numeric x and y parameters for Expr.filter.CHILD
1971
+ // remember that false/true cast respectively to 0/1
1972
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
1973
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
1974
+
1975
+ // other types prohibit arguments
1976
+ } else if ( match[3] ) {
1977
+ Sizzle.error( match[0] );
1978
+ }
1979
+
1980
+ return match;
1981
+ },
1982
+
1983
+ "PSEUDO": function( match ) {
1984
+ var excess,
1985
+ unquoted = !match[5] && match[2];
1986
+
1987
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
1988
+ return null;
1989
+ }
1990
+
1991
+ // Accept quoted arguments as-is
1992
+ if ( match[3] && match[4] !== undefined ) {
1993
+ match[2] = match[4];
1994
+
1995
+ // Strip excess characters from unquoted arguments
1996
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
1997
+ // Get excess from tokenize (recursively)
1998
+ (excess = tokenize( unquoted, true )) &&
1999
+ // advance to the next closing parenthesis
2000
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
2001
+
2002
+ // excess is a negative index
2003
+ match[0] = match[0].slice( 0, excess );
2004
+ match[2] = unquoted.slice( 0, excess );
2005
+ }
2006
+
2007
+ // Return only captures needed by the pseudo filter method (type and argument)
2008
+ return match.slice( 0, 3 );
2009
+ }
2010
+ },
2011
+
2012
+ filter: {
2013
+
2014
+ "TAG": function( nodeNameSelector ) {
2015
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
2016
+ return nodeNameSelector === "*" ?
2017
+ function() { return true; } :
2018
+ function( elem ) {
2019
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
2020
+ };
2021
+ },
2022
+
2023
+ "CLASS": function( className ) {
2024
+ var pattern = classCache[ className + " " ];
2025
+
2026
+ return pattern ||
2027
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
2028
+ classCache( className, function( elem ) {
2029
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
2030
+ });
2031
+ },
2032
+
2033
+ "ATTR": function( name, operator, check ) {
2034
+ return function( elem ) {
2035
+ var result = Sizzle.attr( elem, name );
2036
+
2037
+ if ( result == null ) {
2038
+ return operator === "!=";
2039
+ }
2040
+ if ( !operator ) {
2041
+ return true;
2042
+ }
2043
+
2044
+ result += "";
2045
+
2046
+ return operator === "=" ? result === check :
2047
+ operator === "!=" ? result !== check :
2048
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
2049
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
2050
+ operator === "$=" ? check && result.slice( -check.length ) === check :
2051
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
2052
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
2053
+ false;
2054
+ };
2055
+ },
2056
+
2057
+ "CHILD": function( type, what, argument, first, last ) {
2058
+ var simple = type.slice( 0, 3 ) !== "nth",
2059
+ forward = type.slice( -4 ) !== "last",
2060
+ ofType = what === "of-type";
2061
+
2062
+ return first === 1 && last === 0 ?
2063
+
2064
+ // Shortcut for :nth-*(n)
2065
+ function( elem ) {
2066
+ return !!elem.parentNode;
2067
+ } :
2068
+
2069
+ function( elem, context, xml ) {
2070
+ var cache, outerCache, node, diff, nodeIndex, start,
2071
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
2072
+ parent = elem.parentNode,
2073
+ name = ofType && elem.nodeName.toLowerCase(),
2074
+ useCache = !xml && !ofType;
2075
+
2076
+ if ( parent ) {
2077
+
2078
+ // :(first|last|only)-(child|of-type)
2079
+ if ( simple ) {
2080
+ while ( dir ) {
2081
+ node = elem;
2082
+ while ( (node = node[ dir ]) ) {
2083
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
2084
+ return false;
2085
+ }
2086
+ }
2087
+ // Reverse direction for :only-* (if we haven't yet done so)
2088
+ start = dir = type === "only" && !start && "nextSibling";
2089
+ }
2090
+ return true;
2091
+ }
2092
+
2093
+ start = [ forward ? parent.firstChild : parent.lastChild ];
2094
+
2095
+ // non-xml :nth-child(...) stores cache data on `parent`
2096
+ if ( forward && useCache ) {
2097
+ // Seek `elem` from a previously-cached index
2098
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
2099
+ cache = outerCache[ type ] || [];
2100
+ nodeIndex = cache[0] === dirruns && cache[1];
2101
+ diff = cache[0] === dirruns && cache[2];
2102
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
2103
+
2104
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
2105
+
2106
+ // Fallback to seeking `elem` from the start
2107
+ (diff = nodeIndex = 0) || start.pop()) ) {
2108
+
2109
+ // When found, cache indexes on `parent` and break
2110
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
2111
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
2112
+ break;
2113
+ }
2114
+ }
2115
+
2116
+ // Use previously-cached element index if available
2117
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
2118
+ diff = cache[1];
2119
+
2120
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
2121
+ } else {
2122
+ // Use the same loop as above to seek `elem` from the start
2123
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
2124
+ (diff = nodeIndex = 0) || start.pop()) ) {
2125
+
2126
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
2127
+ // Cache the index of each encountered element
2128
+ if ( useCache ) {
2129
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
2130
+ }
2131
+
2132
+ if ( node === elem ) {
2133
+ break;
2134
+ }
2135
+ }
2136
+ }
2137
+ }
2138
+
2139
+ // Incorporate the offset, then check against cycle size
2140
+ diff -= last;
2141
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
2142
+ }
2143
+ };
2144
+ },
2145
+
2146
+ "PSEUDO": function( pseudo, argument ) {
2147
+ // pseudo-class names are case-insensitive
2148
+ // http://www.w3.org/TR/selectors/#pseudo-classes
2149
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
2150
+ // Remember that setFilters inherits from pseudos
2151
+ var args,
2152
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
2153
+ Sizzle.error( "unsupported pseudo: " + pseudo );
2154
+
2155
+ // The user may use createPseudo to indicate that
2156
+ // arguments are needed to create the filter function
2157
+ // just as Sizzle does
2158
+ if ( fn[ expando ] ) {
2159
+ return fn( argument );
2160
+ }
2161
+
2162
+ // But maintain support for old signatures
2163
+ if ( fn.length > 1 ) {
2164
+ args = [ pseudo, pseudo, "", argument ];
2165
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
2166
+ markFunction(function( seed, matches ) {
2167
+ var idx,
2168
+ matched = fn( seed, argument ),
2169
+ i = matched.length;
2170
+ while ( i-- ) {
2171
+ idx = indexOf.call( seed, matched[i] );
2172
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
2173
+ }
2174
+ }) :
2175
+ function( elem ) {
2176
+ return fn( elem, 0, args );
2177
+ };
2178
+ }
2179
+
2180
+ return fn;
2181
+ }
2182
+ },
2183
+
2184
+ pseudos: {
2185
+ // Potentially complex pseudos
2186
+ "not": markFunction(function( selector ) {
2187
+ // Trim the selector passed to compile
2188
+ // to avoid treating leading and trailing
2189
+ // spaces as combinators
2190
+ var input = [],
2191
+ results = [],
2192
+ matcher = compile( selector.replace( rtrim, "$1" ) );
2193
+
2194
+ return matcher[ expando ] ?
2195
+ markFunction(function( seed, matches, context, xml ) {
2196
+ var elem,
2197
+ unmatched = matcher( seed, null, xml, [] ),
2198
+ i = seed.length;
2199
+
2200
+ // Match elements unmatched by `matcher`
2201
+ while ( i-- ) {
2202
+ if ( (elem = unmatched[i]) ) {
2203
+ seed[i] = !(matches[i] = elem);
2204
+ }
2205
+ }
2206
+ }) :
2207
+ function( elem, context, xml ) {
2208
+ input[0] = elem;
2209
+ matcher( input, null, xml, results );
2210
+ return !results.pop();
2211
+ };
2212
+ }),
2213
+
2214
+ "has": markFunction(function( selector ) {
2215
+ return function( elem ) {
2216
+ return Sizzle( selector, elem ).length > 0;
2217
+ };
2218
+ }),
2219
+
2220
+ "contains": markFunction(function( text ) {
2221
+ return function( elem ) {
2222
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
2223
+ };
2224
+ }),
2225
+
2226
+ // "Whether an element is represented by a :lang() selector
2227
+ // is based solely on the element's language value
2228
+ // being equal to the identifier C,
2229
+ // or beginning with the identifier C immediately followed by "-".
2230
+ // The matching of C against the element's language value is performed case-insensitively.
2231
+ // The identifier C does not have to be a valid language name."
2232
+ // http://www.w3.org/TR/selectors/#lang-pseudo
2233
+ "lang": markFunction( function( lang ) {
2234
+ // lang value must be a valid identifier
2235
+ if ( !ridentifier.test(lang || "") ) {
2236
+ Sizzle.error( "unsupported lang: " + lang );
2237
+ }
2238
+ lang = lang.replace( runescape, funescape ).toLowerCase();
2239
+ return function( elem ) {
2240
+ var elemLang;
2241
+ do {
2242
+ if ( (elemLang = documentIsHTML ?
2243
+ elem.lang :
2244
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
2245
+
2246
+ elemLang = elemLang.toLowerCase();
2247
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
2248
+ }
2249
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
2250
+ return false;
2251
+ };
2252
+ }),
2253
+
2254
+ // Miscellaneous
2255
+ "target": function( elem ) {
2256
+ var hash = window.location && window.location.hash;
2257
+ return hash && hash.slice( 1 ) === elem.id;
2258
+ },
2259
+
2260
+ "root": function( elem ) {
2261
+ return elem === docElem;
2262
+ },
2263
+
2264
+ "focus": function( elem ) {
2265
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
2266
+ },
2267
+
2268
+ // Boolean properties
2269
+ "enabled": function( elem ) {
2270
+ return elem.disabled === false;
2271
+ },
2272
+
2273
+ "disabled": function( elem ) {
2274
+ return elem.disabled === true;
2275
+ },
2276
+
2277
+ "checked": function( elem ) {
2278
+ // In CSS3, :checked should return both checked and selected elements
2279
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
2280
+ var nodeName = elem.nodeName.toLowerCase();
2281
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
2282
+ },
2283
+
2284
+ "selected": function( elem ) {
2285
+ // Accessing this property makes selected-by-default
2286
+ // options in Safari work properly
2287
+ if ( elem.parentNode ) {
2288
+ elem.parentNode.selectedIndex;
2289
+ }
2290
+
2291
+ return elem.selected === true;
2292
+ },
2293
+
2294
+ // Contents
2295
+ "empty": function( elem ) {
2296
+ // http://www.w3.org/TR/selectors/#empty-pseudo
2297
+ // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
2298
+ // not comment, processing instructions, or others
2299
+ // Thanks to Diego Perini for the nodeName shortcut
2300
+ // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
2301
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
2302
+ if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
2303
+ return false;
2304
+ }
2305
+ }
2306
+ return true;
2307
+ },
2308
+
2309
+ "parent": function( elem ) {
2310
+ return !Expr.pseudos["empty"]( elem );
2311
+ },
2312
+
2313
+ // Element/input types
2314
+ "header": function( elem ) {
2315
+ return rheader.test( elem.nodeName );
2316
+ },
2317
+
2318
+ "input": function( elem ) {
2319
+ return rinputs.test( elem.nodeName );
2320
+ },
2321
+
2322
+ "button": function( elem ) {
2323
+ var name = elem.nodeName.toLowerCase();
2324
+ return name === "input" && elem.type === "button" || name === "button";
2325
+ },
2326
+
2327
+ "text": function( elem ) {
2328
+ var attr;
2329
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
2330
+ // use getAttribute instead to test this case
2331
+ return elem.nodeName.toLowerCase() === "input" &&
2332
+ elem.type === "text" &&
2333
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
2334
+ },
2335
+
2336
+ // Position-in-collection
2337
+ "first": createPositionalPseudo(function() {
2338
+ return [ 0 ];
2339
+ }),
2340
+
2341
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
2342
+ return [ length - 1 ];
2343
+ }),
2344
+
2345
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
2346
+ return [ argument < 0 ? argument + length : argument ];
2347
+ }),
2348
+
2349
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
2350
+ var i = 0;
2351
+ for ( ; i < length; i += 2 ) {
2352
+ matchIndexes.push( i );
2353
+ }
2354
+ return matchIndexes;
2355
+ }),
2356
+
2357
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
2358
+ var i = 1;
2359
+ for ( ; i < length; i += 2 ) {
2360
+ matchIndexes.push( i );
2361
+ }
2362
+ return matchIndexes;
2363
+ }),
2364
+
2365
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
2366
+ var i = argument < 0 ? argument + length : argument;
2367
+ for ( ; --i >= 0; ) {
2368
+ matchIndexes.push( i );
2369
+ }
2370
+ return matchIndexes;
2371
+ }),
2372
+
2373
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
2374
+ var i = argument < 0 ? argument + length : argument;
2375
+ for ( ; ++i < length; ) {
2376
+ matchIndexes.push( i );
2377
+ }
2378
+ return matchIndexes;
2379
+ })
2380
+ }
2381
+ };
2382
+
2383
+ Expr.pseudos["nth"] = Expr.pseudos["eq"];
2384
+
2385
+ // Add button/input type pseudos
2386
+ for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
2387
+ Expr.pseudos[ i ] = createInputPseudo( i );
2388
+ }
2389
+ for ( i in { submit: true, reset: true } ) {
2390
+ Expr.pseudos[ i ] = createButtonPseudo( i );
2391
+ }
2392
+
2393
+ // Easy API for creating new setFilters
2394
+ function setFilters() {}
2395
+ setFilters.prototype = Expr.filters = Expr.pseudos;
2396
+ Expr.setFilters = new setFilters();
2397
+
2398
+ function tokenize( selector, parseOnly ) {
2399
+ var matched, match, tokens, type,
2400
+ soFar, groups, preFilters,
2401
+ cached = tokenCache[ selector + " " ];
2402
+
2403
+ if ( cached ) {
2404
+ return parseOnly ? 0 : cached.slice( 0 );
2405
+ }
2406
+
2407
+ soFar = selector;
2408
+ groups = [];
2409
+ preFilters = Expr.preFilter;
2410
+
2411
+ while ( soFar ) {
2412
+
2413
+ // Comma and first run
2414
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
2415
+ if ( match ) {
2416
+ // Don't consume trailing commas as valid
2417
+ soFar = soFar.slice( match[0].length ) || soFar;
2418
+ }
2419
+ groups.push( tokens = [] );
2420
+ }
2421
+
2422
+ matched = false;
2423
+
2424
+ // Combinators
2425
+ if ( (match = rcombinators.exec( soFar )) ) {
2426
+ matched = match.shift();
2427
+ tokens.push({
2428
+ value: matched,
2429
+ // Cast descendant combinators to space
2430
+ type: match[0].replace( rtrim, " " )
2431
+ });
2432
+ soFar = soFar.slice( matched.length );
2433
+ }
2434
+
2435
+ // Filters
2436
+ for ( type in Expr.filter ) {
2437
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
2438
+ (match = preFilters[ type ]( match ))) ) {
2439
+ matched = match.shift();
2440
+ tokens.push({
2441
+ value: matched,
2442
+ type: type,
2443
+ matches: match
2444
+ });
2445
+ soFar = soFar.slice( matched.length );
2446
+ }
2447
+ }
2448
+
2449
+ if ( !matched ) {
2450
+ break;
2451
+ }
2452
+ }
2453
+
2454
+ // Return the length of the invalid excess
2455
+ // if we're just parsing
2456
+ // Otherwise, throw an error or return tokens
2457
+ return parseOnly ?
2458
+ soFar.length :
2459
+ soFar ?
2460
+ Sizzle.error( selector ) :
2461
+ // Cache the tokens
2462
+ tokenCache( selector, groups ).slice( 0 );
2463
+ }
2464
+
2465
+ function toSelector( tokens ) {
2466
+ var i = 0,
2467
+ len = tokens.length,
2468
+ selector = "";
2469
+ for ( ; i < len; i++ ) {
2470
+ selector += tokens[i].value;
2471
+ }
2472
+ return selector;
2473
+ }
2474
+
2475
+ function addCombinator( matcher, combinator, base ) {
2476
+ var dir = combinator.dir,
2477
+ checkNonElements = base && dir === "parentNode",
2478
+ doneName = done++;
2479
+
2480
+ return combinator.first ?
2481
+ // Check against closest ancestor/preceding element
2482
+ function( elem, context, xml ) {
2483
+ while ( (elem = elem[ dir ]) ) {
2484
+ if ( elem.nodeType === 1 || checkNonElements ) {
2485
+ return matcher( elem, context, xml );
2486
+ }
2487
+ }
2488
+ } :
2489
+
2490
+ // Check against all ancestor/preceding elements
2491
+ function( elem, context, xml ) {
2492
+ var data, cache, outerCache,
2493
+ dirkey = dirruns + " " + doneName;
2494
+
2495
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
2496
+ if ( xml ) {
2497
+ while ( (elem = elem[ dir ]) ) {
2498
+ if ( elem.nodeType === 1 || checkNonElements ) {
2499
+ if ( matcher( elem, context, xml ) ) {
2500
+ return true;
2501
+ }
2502
+ }
2503
+ }
2504
+ } else {
2505
+ while ( (elem = elem[ dir ]) ) {
2506
+ if ( elem.nodeType === 1 || checkNonElements ) {
2507
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
2508
+ if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
2509
+ if ( (data = cache[1]) === true || data === cachedruns ) {
2510
+ return data === true;
2511
+ }
2512
+ } else {
2513
+ cache = outerCache[ dir ] = [ dirkey ];
2514
+ cache[1] = matcher( elem, context, xml ) || cachedruns;
2515
+ if ( cache[1] === true ) {
2516
+ return true;
2517
+ }
2518
+ }
2519
+ }
2520
+ }
2521
+ }
2522
+ };
2523
+ }
2524
+
2525
+ function elementMatcher( matchers ) {
2526
+ return matchers.length > 1 ?
2527
+ function( elem, context, xml ) {
2528
+ var i = matchers.length;
2529
+ while ( i-- ) {
2530
+ if ( !matchers[i]( elem, context, xml ) ) {
2531
+ return false;
2532
+ }
2533
+ }
2534
+ return true;
2535
+ } :
2536
+ matchers[0];
2537
+ }
2538
+
2539
+ function condense( unmatched, map, filter, context, xml ) {
2540
+ var elem,
2541
+ newUnmatched = [],
2542
+ i = 0,
2543
+ len = unmatched.length,
2544
+ mapped = map != null;
2545
+
2546
+ for ( ; i < len; i++ ) {
2547
+ if ( (elem = unmatched[i]) ) {
2548
+ if ( !filter || filter( elem, context, xml ) ) {
2549
+ newUnmatched.push( elem );
2550
+ if ( mapped ) {
2551
+ map.push( i );
2552
+ }
2553
+ }
2554
+ }
2555
+ }
2556
+
2557
+ return newUnmatched;
2558
+ }
2559
+
2560
+ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
2561
+ if ( postFilter && !postFilter[ expando ] ) {
2562
+ postFilter = setMatcher( postFilter );
2563
+ }
2564
+ if ( postFinder && !postFinder[ expando ] ) {
2565
+ postFinder = setMatcher( postFinder, postSelector );
2566
+ }
2567
+ return markFunction(function( seed, results, context, xml ) {
2568
+ var temp, i, elem,
2569
+ preMap = [],
2570
+ postMap = [],
2571
+ preexisting = results.length,
2572
+
2573
+ // Get initial elements from seed or context
2574
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
2575
+
2576
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
2577
+ matcherIn = preFilter && ( seed || !selector ) ?
2578
+ condense( elems, preMap, preFilter, context, xml ) :
2579
+ elems,
2580
+
2581
+ matcherOut = matcher ?
2582
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
2583
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
2584
+
2585
+ // ...intermediate processing is necessary
2586
+ [] :
2587
+
2588
+ // ...otherwise use results directly
2589
+ results :
2590
+ matcherIn;
2591
+
2592
+ // Find primary matches
2593
+ if ( matcher ) {
2594
+ matcher( matcherIn, matcherOut, context, xml );
2595
+ }
2596
+
2597
+ // Apply postFilter
2598
+ if ( postFilter ) {
2599
+ temp = condense( matcherOut, postMap );
2600
+ postFilter( temp, [], context, xml );
2601
+
2602
+ // Un-match failing elements by moving them back to matcherIn
2603
+ i = temp.length;
2604
+ while ( i-- ) {
2605
+ if ( (elem = temp[i]) ) {
2606
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
2607
+ }
2608
+ }
2609
+ }
2610
+
2611
+ if ( seed ) {
2612
+ if ( postFinder || preFilter ) {
2613
+ if ( postFinder ) {
2614
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
2615
+ temp = [];
2616
+ i = matcherOut.length;
2617
+ while ( i-- ) {
2618
+ if ( (elem = matcherOut[i]) ) {
2619
+ // Restore matcherIn since elem is not yet a final match
2620
+ temp.push( (matcherIn[i] = elem) );
2621
+ }
2622
+ }
2623
+ postFinder( null, (matcherOut = []), temp, xml );
2624
+ }
2625
+
2626
+ // Move matched elements from seed to results to keep them synchronized
2627
+ i = matcherOut.length;
2628
+ while ( i-- ) {
2629
+ if ( (elem = matcherOut[i]) &&
2630
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
2631
+
2632
+ seed[temp] = !(results[temp] = elem);
2633
+ }
2634
+ }
2635
+ }
2636
+
2637
+ // Add elements to results, through postFinder if defined
2638
+ } else {
2639
+ matcherOut = condense(
2640
+ matcherOut === results ?
2641
+ matcherOut.splice( preexisting, matcherOut.length ) :
2642
+ matcherOut
2643
+ );
2644
+ if ( postFinder ) {
2645
+ postFinder( null, results, matcherOut, xml );
2646
+ } else {
2647
+ push.apply( results, matcherOut );
2648
+ }
2649
+ }
2650
+ });
2651
+ }
2652
+
2653
+ function matcherFromTokens( tokens ) {
2654
+ var checkContext, matcher, j,
2655
+ len = tokens.length,
2656
+ leadingRelative = Expr.relative[ tokens[0].type ],
2657
+ implicitRelative = leadingRelative || Expr.relative[" "],
2658
+ i = leadingRelative ? 1 : 0,
2659
+
2660
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
2661
+ matchContext = addCombinator( function( elem ) {
2662
+ return elem === checkContext;
2663
+ }, implicitRelative, true ),
2664
+ matchAnyContext = addCombinator( function( elem ) {
2665
+ return indexOf.call( checkContext, elem ) > -1;
2666
+ }, implicitRelative, true ),
2667
+ matchers = [ function( elem, context, xml ) {
2668
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
2669
+ (checkContext = context).nodeType ?
2670
+ matchContext( elem, context, xml ) :
2671
+ matchAnyContext( elem, context, xml ) );
2672
+ } ];
2673
+
2674
+ for ( ; i < len; i++ ) {
2675
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
2676
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
2677
+ } else {
2678
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
2679
+
2680
+ // Return special upon seeing a positional matcher
2681
+ if ( matcher[ expando ] ) {
2682
+ // Find the next relative operator (if any) for proper handling
2683
+ j = ++i;
2684
+ for ( ; j < len; j++ ) {
2685
+ if ( Expr.relative[ tokens[j].type ] ) {
2686
+ break;
2687
+ }
2688
+ }
2689
+ return setMatcher(
2690
+ i > 1 && elementMatcher( matchers ),
2691
+ i > 1 && toSelector(
2692
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
2693
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
2694
+ ).replace( rtrim, "$1" ),
2695
+ matcher,
2696
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
2697
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
2698
+ j < len && toSelector( tokens )
2699
+ );
2700
+ }
2701
+ matchers.push( matcher );
2702
+ }
2703
+ }
2704
+
2705
+ return elementMatcher( matchers );
2706
+ }
2707
+
2708
+ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
2709
+ // A counter to specify which element is currently being matched
2710
+ var matcherCachedRuns = 0,
2711
+ bySet = setMatchers.length > 0,
2712
+ byElement = elementMatchers.length > 0,
2713
+ superMatcher = function( seed, context, xml, results, expandContext ) {
2714
+ var elem, j, matcher,
2715
+ setMatched = [],
2716
+ matchedCount = 0,
2717
+ i = "0",
2718
+ unmatched = seed && [],
2719
+ outermost = expandContext != null,
2720
+ contextBackup = outermostContext,
2721
+ // We must always have either seed elements or context
2722
+ elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
2723
+ // Use integer dirruns iff this is the outermost matcher
2724
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
2725
+
2726
+ if ( outermost ) {
2727
+ outermostContext = context !== document && context;
2728
+ cachedruns = matcherCachedRuns;
2729
+ }
2730
+
2731
+ // Add elements passing elementMatchers directly to results
2732
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
2733
+ for ( ; (elem = elems[i]) != null; i++ ) {
2734
+ if ( byElement && elem ) {
2735
+ j = 0;
2736
+ while ( (matcher = elementMatchers[j++]) ) {
2737
+ if ( matcher( elem, context, xml ) ) {
2738
+ results.push( elem );
2739
+ break;
2740
+ }
2741
+ }
2742
+ if ( outermost ) {
2743
+ dirruns = dirrunsUnique;
2744
+ cachedruns = ++matcherCachedRuns;
2745
+ }
2746
+ }
2747
+
2748
+ // Track unmatched elements for set filters
2749
+ if ( bySet ) {
2750
+ // They will have gone through all possible matchers
2751
+ if ( (elem = !matcher && elem) ) {
2752
+ matchedCount--;
2753
+ }
2754
+
2755
+ // Lengthen the array for every element, matched or not
2756
+ if ( seed ) {
2757
+ unmatched.push( elem );
2758
+ }
2759
+ }
2760
+ }
2761
+
2762
+ // Apply set filters to unmatched elements
2763
+ matchedCount += i;
2764
+ if ( bySet && i !== matchedCount ) {
2765
+ j = 0;
2766
+ while ( (matcher = setMatchers[j++]) ) {
2767
+ matcher( unmatched, setMatched, context, xml );
2768
+ }
2769
+
2770
+ if ( seed ) {
2771
+ // Reintegrate element matches to eliminate the need for sorting
2772
+ if ( matchedCount > 0 ) {
2773
+ while ( i-- ) {
2774
+ if ( !(unmatched[i] || setMatched[i]) ) {
2775
+ setMatched[i] = pop.call( results );
2776
+ }
2777
+ }
2778
+ }
2779
+
2780
+ // Discard index placeholder values to get only actual matches
2781
+ setMatched = condense( setMatched );
2782
+ }
2783
+
2784
+ // Add matches to results
2785
+ push.apply( results, setMatched );
2786
+
2787
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
2788
+ if ( outermost && !seed && setMatched.length > 0 &&
2789
+ ( matchedCount + setMatchers.length ) > 1 ) {
2790
+
2791
+ Sizzle.uniqueSort( results );
2792
+ }
2793
+ }
2794
+
2795
+ // Override manipulation of globals by nested matchers
2796
+ if ( outermost ) {
2797
+ dirruns = dirrunsUnique;
2798
+ outermostContext = contextBackup;
2799
+ }
2800
+
2801
+ return unmatched;
2802
+ };
2803
+
2804
+ return bySet ?
2805
+ markFunction( superMatcher ) :
2806
+ superMatcher;
2807
+ }
2808
+
2809
+ compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
2810
+ var i,
2811
+ setMatchers = [],
2812
+ elementMatchers = [],
2813
+ cached = compilerCache[ selector + " " ];
2814
+
2815
+ if ( !cached ) {
2816
+ // Generate a function of recursive functions that can be used to check each element
2817
+ if ( !group ) {
2818
+ group = tokenize( selector );
2819
+ }
2820
+ i = group.length;
2821
+ while ( i-- ) {
2822
+ cached = matcherFromTokens( group[i] );
2823
+ if ( cached[ expando ] ) {
2824
+ setMatchers.push( cached );
2825
+ } else {
2826
+ elementMatchers.push( cached );
2827
+ }
2828
+ }
2829
+
2830
+ // Cache the compiled function
2831
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
2832
+ }
2833
+ return cached;
2834
+ };
2835
+
2836
+ function multipleContexts( selector, contexts, results ) {
2837
+ var i = 0,
2838
+ len = contexts.length;
2839
+ for ( ; i < len; i++ ) {
2840
+ Sizzle( selector, contexts[i], results );
2841
+ }
2842
+ return results;
2843
+ }
2844
+
2845
+ function select( selector, context, results, seed ) {
2846
+ var i, tokens, token, type, find,
2847
+ match = tokenize( selector );
2848
+
2849
+ if ( !seed ) {
2850
+ // Try to minimize operations if there is only one group
2851
+ if ( match.length === 1 ) {
2852
+
2853
+ // Take a shortcut and set the context if the root selector is an ID
2854
+ tokens = match[0] = match[0].slice( 0 );
2855
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
2856
+ support.getById && context.nodeType === 9 && documentIsHTML &&
2857
+ Expr.relative[ tokens[1].type ] ) {
2858
+
2859
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
2860
+ if ( !context ) {
2861
+ return results;
2862
+ }
2863
+ selector = selector.slice( tokens.shift().value.length );
2864
+ }
2865
+
2866
+ // Fetch a seed set for right-to-left matching
2867
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
2868
+ while ( i-- ) {
2869
+ token = tokens[i];
2870
+
2871
+ // Abort if we hit a combinator
2872
+ if ( Expr.relative[ (type = token.type) ] ) {
2873
+ break;
2874
+ }
2875
+ if ( (find = Expr.find[ type ]) ) {
2876
+ // Search, expanding context for leading sibling combinators
2877
+ if ( (seed = find(
2878
+ token.matches[0].replace( runescape, funescape ),
2879
+ rsibling.test( tokens[0].type ) && context.parentNode || context
2880
+ )) ) {
2881
+
2882
+ // If seed is empty or no tokens remain, we can return early
2883
+ tokens.splice( i, 1 );
2884
+ selector = seed.length && toSelector( tokens );
2885
+ if ( !selector ) {
2886
+ push.apply( results, seed );
2887
+ return results;
2888
+ }
2889
+
2890
+ break;
2891
+ }
2892
+ }
2893
+ }
2894
+ }
2895
+ }
2896
+
2897
+ // Compile and execute a filtering function
2898
+ // Provide `match` to avoid retokenization if we modified the selector above
2899
+ compile( selector, match )(
2900
+ seed,
2901
+ context,
2902
+ !documentIsHTML,
2903
+ results,
2904
+ rsibling.test( selector )
2905
+ );
2906
+ return results;
2907
+ }
2908
+
2909
+ // One-time assignments
2910
+
2911
+ // Sort stability
2912
+ support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
2913
+
2914
+ // Support: Chrome<14
2915
+ // Always assume duplicates if they aren't passed to the comparison function
2916
+ support.detectDuplicates = hasDuplicate;
2917
+
2918
+ // Initialize against the default document
2919
+ setDocument();
2920
+
2921
+ // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2922
+ // Detached nodes confoundingly follow *each other*
2923
+ support.sortDetached = assert(function( div1 ) {
2924
+ // Should return 1, but returns 4 (following)
2925
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
2926
+ });
2927
+
2928
+ // Support: IE<8
2929
+ // Prevent attribute/property "interpolation"
2930
+ // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2931
+ if ( !assert(function( div ) {
2932
+ div.innerHTML = "<a href='#'></a>";
2933
+ return div.firstChild.getAttribute("href") === "#" ;
2934
+ }) ) {
2935
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
2936
+ if ( !isXML ) {
2937
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
2938
+ }
2939
+ });
2940
+ }
2941
+
2942
+ // Support: IE<9
2943
+ // Use defaultValue in place of getAttribute("value")
2944
+ if ( !support.attributes || !assert(function( div ) {
2945
+ div.innerHTML = "<input/>";
2946
+ div.firstChild.setAttribute( "value", "" );
2947
+ return div.firstChild.getAttribute( "value" ) === "";
2948
+ }) ) {
2949
+ addHandle( "value", function( elem, name, isXML ) {
2950
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
2951
+ return elem.defaultValue;
2952
+ }
2953
+ });
2954
+ }
2955
+
2956
+ // Support: IE<9
2957
+ // Use getAttributeNode to fetch booleans when getAttribute lies
2958
+ if ( !assert(function( div ) {
2959
+ return div.getAttribute("disabled") == null;
2960
+ }) ) {
2961
+ addHandle( booleans, function( elem, name, isXML ) {
2962
+ var val;
2963
+ if ( !isXML ) {
2964
+ return (val = elem.getAttributeNode( name )) && val.specified ?
2965
+ val.value :
2966
+ elem[ name ] === true ? name.toLowerCase() : null;
2967
+ }
2968
+ });
2969
+ }
2970
+
2971
+ jQuery.find = Sizzle;
2972
+ jQuery.expr = Sizzle.selectors;
2973
+ jQuery.expr[":"] = jQuery.expr.pseudos;
2974
+ jQuery.unique = Sizzle.uniqueSort;
2975
+ jQuery.text = Sizzle.getText;
2976
+ jQuery.isXMLDoc = Sizzle.isXML;
2977
+ jQuery.contains = Sizzle.contains;
2978
+
2979
+
2980
+ })( window );
2981
+ // String to Object options format cache
2982
+ var optionsCache = {};
2983
+
2984
+ // Convert String-formatted options into Object-formatted ones and store in cache
2985
+ function createOptions( options ) {
2986
+ var object = optionsCache[ options ] = {};
2987
+ jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
2988
+ object[ flag ] = true;
2989
+ });
2990
+ return object;
2991
+ }
2992
+
2993
+ /*
2994
+ * Create a callback list using the following parameters:
2995
+ *
2996
+ * options: an optional list of space-separated options that will change how
2997
+ * the callback list behaves or a more traditional option object
2998
+ *
2999
+ * By default a callback list will act like an event callback list and can be
3000
+ * "fired" multiple times.
3001
+ *
3002
+ * Possible options:
3003
+ *
3004
+ * once: will ensure the callback list can only be fired once (like a Deferred)
3005
+ *
3006
+ * memory: will keep track of previous values and will call any callback added
3007
+ * after the list has been fired right away with the latest "memorized"
3008
+ * values (like a Deferred)
3009
+ *
3010
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
3011
+ *
3012
+ * stopOnFalse: interrupt callings when a callback returns false
3013
+ *
3014
+ */
3015
+ jQuery.Callbacks = function( options ) {
3016
+
3017
+ // Convert options from String-formatted to Object-formatted if needed
3018
+ // (we check in cache first)
3019
+ options = typeof options === "string" ?
3020
+ ( optionsCache[ options ] || createOptions( options ) ) :
3021
+ jQuery.extend( {}, options );
3022
+
3023
+ var // Flag to know if list is currently firing
3024
+ firing,
3025
+ // Last fire value (for non-forgettable lists)
3026
+ memory,
3027
+ // Flag to know if list was already fired
3028
+ fired,
3029
+ // End of the loop when firing
3030
+ firingLength,
3031
+ // Index of currently firing callback (modified by remove if needed)
3032
+ firingIndex,
3033
+ // First callback to fire (used internally by add and fireWith)
3034
+ firingStart,
3035
+ // Actual callback list
3036
+ list = [],
3037
+ // Stack of fire calls for repeatable lists
3038
+ stack = !options.once && [],
3039
+ // Fire callbacks
3040
+ fire = function( data ) {
3041
+ memory = options.memory && data;
3042
+ fired = true;
3043
+ firingIndex = firingStart || 0;
3044
+ firingStart = 0;
3045
+ firingLength = list.length;
3046
+ firing = true;
3047
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
3048
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
3049
+ memory = false; // To prevent further calls using add
3050
+ break;
3051
+ }
3052
+ }
3053
+ firing = false;
3054
+ if ( list ) {
3055
+ if ( stack ) {
3056
+ if ( stack.length ) {
3057
+ fire( stack.shift() );
3058
+ }
3059
+ } else if ( memory ) {
3060
+ list = [];
3061
+ } else {
3062
+ self.disable();
3063
+ }
3064
+ }
3065
+ },
3066
+ // Actual Callbacks object
3067
+ self = {
3068
+ // Add a callback or a collection of callbacks to the list
3069
+ add: function() {
3070
+ if ( list ) {
3071
+ // First, we save the current length
3072
+ var start = list.length;
3073
+ (function add( args ) {
3074
+ jQuery.each( args, function( _, arg ) {
3075
+ var type = jQuery.type( arg );
3076
+ if ( type === "function" ) {
3077
+ if ( !options.unique || !self.has( arg ) ) {
3078
+ list.push( arg );
3079
+ }
3080
+ } else if ( arg && arg.length && type !== "string" ) {
3081
+ // Inspect recursively
3082
+ add( arg );
3083
+ }
3084
+ });
3085
+ })( arguments );
3086
+ // Do we need to add the callbacks to the
3087
+ // current firing batch?
3088
+ if ( firing ) {
3089
+ firingLength = list.length;
3090
+ // With memory, if we're not firing then
3091
+ // we should call right away
3092
+ } else if ( memory ) {
3093
+ firingStart = start;
3094
+ fire( memory );
3095
+ }
3096
+ }
3097
+ return this;
3098
+ },
3099
+ // Remove a callback from the list
3100
+ remove: function() {
3101
+ if ( list ) {
3102
+ jQuery.each( arguments, function( _, arg ) {
3103
+ var index;
3104
+ while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
3105
+ list.splice( index, 1 );
3106
+ // Handle firing indexes
3107
+ if ( firing ) {
3108
+ if ( index <= firingLength ) {
3109
+ firingLength--;
3110
+ }
3111
+ if ( index <= firingIndex ) {
3112
+ firingIndex--;
3113
+ }
3114
+ }
3115
+ }
3116
+ });
3117
+ }
3118
+ return this;
3119
+ },
3120
+ // Check if a given callback is in the list.
3121
+ // If no argument is given, return whether or not list has callbacks attached.
3122
+ has: function( fn ) {
3123
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
3124
+ },
3125
+ // Remove all callbacks from the list
3126
+ empty: function() {
3127
+ list = [];
3128
+ firingLength = 0;
3129
+ return this;
3130
+ },
3131
+ // Have the list do nothing anymore
3132
+ disable: function() {
3133
+ list = stack = memory = undefined;
3134
+ return this;
3135
+ },
3136
+ // Is it disabled?
3137
+ disabled: function() {
3138
+ return !list;
3139
+ },
3140
+ // Lock the list in its current state
3141
+ lock: function() {
3142
+ stack = undefined;
3143
+ if ( !memory ) {
3144
+ self.disable();
3145
+ }
3146
+ return this;
3147
+ },
3148
+ // Is it locked?
3149
+ locked: function() {
3150
+ return !stack;
3151
+ },
3152
+ // Call all callbacks with the given context and arguments
3153
+ fireWith: function( context, args ) {
3154
+ if ( list && ( !fired || stack ) ) {
3155
+ args = args || [];
3156
+ args = [ context, args.slice ? args.slice() : args ];
3157
+ if ( firing ) {
3158
+ stack.push( args );
3159
+ } else {
3160
+ fire( args );
3161
+ }
3162
+ }
3163
+ return this;
3164
+ },
3165
+ // Call all the callbacks with the given arguments
3166
+ fire: function() {
3167
+ self.fireWith( this, arguments );
3168
+ return this;
3169
+ },
3170
+ // To know if the callbacks have already been called at least once
3171
+ fired: function() {
3172
+ return !!fired;
3173
+ }
3174
+ };
3175
+
3176
+ return self;
3177
+ };
3178
+ jQuery.extend({
3179
+
3180
+ Deferred: function( func ) {
3181
+ var tuples = [
3182
+ // action, add listener, listener list, final state
3183
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
3184
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
3185
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
3186
+ ],
3187
+ state = "pending",
3188
+ promise = {
3189
+ state: function() {
3190
+ return state;
3191
+ },
3192
+ always: function() {
3193
+ deferred.done( arguments ).fail( arguments );
3194
+ return this;
3195
+ },
3196
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
3197
+ var fns = arguments;
3198
+ return jQuery.Deferred(function( newDefer ) {
3199
+ jQuery.each( tuples, function( i, tuple ) {
3200
+ var action = tuple[ 0 ],
3201
+ fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
3202
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
3203
+ deferred[ tuple[1] ](function() {
3204
+ var returned = fn && fn.apply( this, arguments );
3205
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
3206
+ returned.promise()
3207
+ .done( newDefer.resolve )
3208
+ .fail( newDefer.reject )
3209
+ .progress( newDefer.notify );
3210
+ } else {
3211
+ newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
3212
+ }
3213
+ });
3214
+ });
3215
+ fns = null;
3216
+ }).promise();
3217
+ },
3218
+ // Get a promise for this deferred
3219
+ // If obj is provided, the promise aspect is added to the object
3220
+ promise: function( obj ) {
3221
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
3222
+ }
3223
+ },
3224
+ deferred = {};
3225
+
3226
+ // Keep pipe for back-compat
3227
+ promise.pipe = promise.then;
3228
+
3229
+ // Add list-specific methods
3230
+ jQuery.each( tuples, function( i, tuple ) {
3231
+ var list = tuple[ 2 ],
3232
+ stateString = tuple[ 3 ];
3233
+
3234
+ // promise[ done | fail | progress ] = list.add
3235
+ promise[ tuple[1] ] = list.add;
3236
+
3237
+ // Handle state
3238
+ if ( stateString ) {
3239
+ list.add(function() {
3240
+ // state = [ resolved | rejected ]
3241
+ state = stateString;
3242
+
3243
+ // [ reject_list | resolve_list ].disable; progress_list.lock
3244
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
3245
+ }
3246
+
3247
+ // deferred[ resolve | reject | notify ]
3248
+ deferred[ tuple[0] ] = function() {
3249
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
3250
+ return this;
3251
+ };
3252
+ deferred[ tuple[0] + "With" ] = list.fireWith;
3253
+ });
3254
+
3255
+ // Make the deferred a promise
3256
+ promise.promise( deferred );
3257
+
3258
+ // Call given func if any
3259
+ if ( func ) {
3260
+ func.call( deferred, deferred );
3261
+ }
3262
+
3263
+ // All done!
3264
+ return deferred;
3265
+ },
3266
+
3267
+ // Deferred helper
3268
+ when: function( subordinate /* , ..., subordinateN */ ) {
3269
+ var i = 0,
3270
+ resolveValues = core_slice.call( arguments ),
3271
+ length = resolveValues.length,
3272
+
3273
+ // the count of uncompleted subordinates
3274
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
3275
+
3276
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
3277
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
3278
+
3279
+ // Update function for both resolve and progress values
3280
+ updateFunc = function( i, contexts, values ) {
3281
+ return function( value ) {
3282
+ contexts[ i ] = this;
3283
+ values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
3284
+ if( values === progressValues ) {
3285
+ deferred.notifyWith( contexts, values );
3286
+ } else if ( !( --remaining ) ) {
3287
+ deferred.resolveWith( contexts, values );
3288
+ }
3289
+ };
3290
+ },
3291
+
3292
+ progressValues, progressContexts, resolveContexts;
3293
+
3294
+ // add listeners to Deferred subordinates; treat others as resolved
3295
+ if ( length > 1 ) {
3296
+ progressValues = new Array( length );
3297
+ progressContexts = new Array( length );
3298
+ resolveContexts = new Array( length );
3299
+ for ( ; i < length; i++ ) {
3300
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
3301
+ resolveValues[ i ].promise()
3302
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
3303
+ .fail( deferred.reject )
3304
+ .progress( updateFunc( i, progressContexts, progressValues ) );
3305
+ } else {
3306
+ --remaining;
3307
+ }
3308
+ }
3309
+ }
3310
+
3311
+ // if we're not waiting on anything, resolve the master
3312
+ if ( !remaining ) {
3313
+ deferred.resolveWith( resolveContexts, resolveValues );
3314
+ }
3315
+
3316
+ return deferred.promise();
3317
+ }
3318
+ });
3319
+ jQuery.support = (function( support ) {
3320
+
3321
+ var all, a, input, select, fragment, opt, eventName, isSupported, i,
3322
+ div = document.createElement("div");
3323
+
3324
+ // Setup
3325
+ div.setAttribute( "className", "t" );
3326
+ div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
3327
+
3328
+ // Finish early in limited (non-browser) environments
3329
+ all = div.getElementsByTagName("*") || [];
3330
+ a = div.getElementsByTagName("a")[ 0 ];
3331
+ if ( !a || !a.style || !all.length ) {
3332
+ return support;
3333
+ }
3334
+
3335
+ // First batch of tests
3336
+ select = document.createElement("select");
3337
+ opt = select.appendChild( document.createElement("option") );
3338
+ input = div.getElementsByTagName("input")[ 0 ];
3339
+
3340
+ a.style.cssText = "top:1px;float:left;opacity:.5";
3341
+
3342
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
3343
+ support.getSetAttribute = div.className !== "t";
3344
+
3345
+ // IE strips leading whitespace when .innerHTML is used
3346
+ support.leadingWhitespace = div.firstChild.nodeType === 3;
3347
+
3348
+ // Make sure that tbody elements aren't automatically inserted
3349
+ // IE will insert them into empty tables
3350
+ support.tbody = !div.getElementsByTagName("tbody").length;
3351
+
3352
+ // Make sure that link elements get serialized correctly by innerHTML
3353
+ // This requires a wrapper element in IE
3354
+ support.htmlSerialize = !!div.getElementsByTagName("link").length;
3355
+
3356
+ // Get the style information from getAttribute
3357
+ // (IE uses .cssText instead)
3358
+ support.style = /top/.test( a.getAttribute("style") );
3359
+
3360
+ // Make sure that URLs aren't manipulated
3361
+ // (IE normalizes it by default)
3362
+ support.hrefNormalized = a.getAttribute("href") === "/a";
3363
+
3364
+ // Make sure that element opacity exists
3365
+ // (IE uses filter instead)
3366
+ // Use a regex to work around a WebKit issue. See #5145
3367
+ support.opacity = /^0.5/.test( a.style.opacity );
3368
+
3369
+ // Verify style float existence
3370
+ // (IE uses styleFloat instead of cssFloat)
3371
+ support.cssFloat = !!a.style.cssFloat;
3372
+
3373
+ // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
3374
+ support.checkOn = !!input.value;
3375
+
3376
+ // Make sure that a selected-by-default option has a working selected property.
3377
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
3378
+ support.optSelected = opt.selected;
3379
+
3380
+ // Tests for enctype support on a form (#6743)
3381
+ support.enctype = !!document.createElement("form").enctype;
3382
+
3383
+ // Makes sure cloning an html5 element does not cause problems
3384
+ // Where outerHTML is undefined, this still works
3385
+ support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";
3386
+
3387
+ // Will be defined later
3388
+ support.inlineBlockNeedsLayout = false;
3389
+ support.shrinkWrapBlocks = false;
3390
+ support.pixelPosition = false;
3391
+ support.deleteExpando = true;
3392
+ support.noCloneEvent = true;
3393
+ support.reliableMarginRight = true;
3394
+ support.boxSizingReliable = true;
3395
+
3396
+ // Make sure checked status is properly cloned
3397
+ input.checked = true;
3398
+ support.noCloneChecked = input.cloneNode( true ).checked;
3399
+
3400
+ // Make sure that the options inside disabled selects aren't marked as disabled
3401
+ // (WebKit marks them as disabled)
3402
+ select.disabled = true;
3403
+ support.optDisabled = !opt.disabled;
3404
+
3405
+ // Support: IE<9
3406
+ try {
3407
+ delete div.test;
3408
+ } catch( e ) {
3409
+ support.deleteExpando = false;
3410
+ }
3411
+
3412
+ // Check if we can trust getAttribute("value")
3413
+ input = document.createElement("input");
3414
+ input.setAttribute( "value", "" );
3415
+ support.input = input.getAttribute( "value" ) === "";
3416
+
3417
+ // Check if an input maintains its value after becoming a radio
3418
+ input.value = "t";
3419
+ input.setAttribute( "type", "radio" );
3420
+ support.radioValue = input.value === "t";
3421
+
3422
+ // #11217 - WebKit loses check when the name is after the checked attribute
3423
+ input.setAttribute( "checked", "t" );
3424
+ input.setAttribute( "name", "t" );
3425
+
3426
+ fragment = document.createDocumentFragment();
3427
+ fragment.appendChild( input );
3428
+
3429
+ // Check if a disconnected checkbox will retain its checked
3430
+ // value of true after appended to the DOM (IE6/7)
3431
+ support.appendChecked = input.checked;
3432
+
3433
+ // WebKit doesn't clone checked state correctly in fragments
3434
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
3435
+
3436
+ // Support: IE<9
3437
+ // Opera does not clone events (and typeof div.attachEvent === undefined).
3438
+ // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
3439
+ if ( div.attachEvent ) {
3440
+ div.attachEvent( "onclick", function() {
3441
+ support.noCloneEvent = false;
3442
+ });
3443
+
3444
+ div.cloneNode( true ).click();
3445
+ }
3446
+
3447
+ // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
3448
+ // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
3449
+ for ( i in { submit: true, change: true, focusin: true }) {
3450
+ div.setAttribute( eventName = "on" + i, "t" );
3451
+
3452
+ support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
3453
+ }
3454
+
3455
+ div.style.backgroundClip = "content-box";
3456
+ div.cloneNode( true ).style.backgroundClip = "";
3457
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
3458
+
3459
+ // Support: IE<9
3460
+ // Iteration over object's inherited properties before its own.
3461
+ for ( i in jQuery( support ) ) {
3462
+ break;
3463
+ }
3464
+ support.ownLast = i !== "0";
3465
+
3466
+ // Run tests that need a body at doc ready
3467
+ jQuery(function() {
3468
+ var container, marginDiv, tds,
3469
+ divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
3470
+ body = document.getElementsByTagName("body")[0];
3471
+
3472
+ if ( !body ) {
3473
+ // Return for frameset docs that don't have a body
3474
+ return;
3475
+ }
3476
+
3477
+ container = document.createElement("div");
3478
+ container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
3479
+
3480
+ body.appendChild( container ).appendChild( div );
3481
+
3482
+ // Support: IE8
3483
+ // Check if table cells still have offsetWidth/Height when they are set
3484
+ // to display:none and there are still other visible table cells in a
3485
+ // table row; if so, offsetWidth/Height are not reliable for use when
3486
+ // determining if an element has been hidden directly using
3487
+ // display:none (it is still safe to use offsets if a parent element is
3488
+ // hidden; don safety goggles and see bug #4512 for more information).
3489
+ div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
3490
+ tds = div.getElementsByTagName("td");
3491
+ tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
3492
+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
3493
+
3494
+ tds[ 0 ].style.display = "";
3495
+ tds[ 1 ].style.display = "none";
3496
+
3497
+ // Support: IE8
3498
+ // Check if empty table cells still have offsetWidth/Height
3499
+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
3500
+
3501
+ // Check box-sizing and margin behavior.
3502
+ div.innerHTML = "";
3503
+ 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%;";
3504
+
3505
+ // Workaround failing boxSizing test due to offsetWidth returning wrong value
3506
+ // with some non-1 values of body zoom, ticket #13543
3507
+ jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
3508
+ support.boxSizing = div.offsetWidth === 4;
3509
+ });
3510
+
3511
+ // Use window.getComputedStyle because jsdom on node.js will break without it.
3512
+ if ( window.getComputedStyle ) {
3513
+ support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
3514
+ support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
3515
+
3516
+ // Check if div with explicit width and no margin-right incorrectly
3517
+ // gets computed margin-right based on width of container. (#3333)
3518
+ // Fails in WebKit before Feb 2011 nightlies
3519
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
3520
+ marginDiv = div.appendChild( document.createElement("div") );
3521
+ marginDiv.style.cssText = div.style.cssText = divReset;
3522
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
3523
+ div.style.width = "1px";
3524
+
3525
+ support.reliableMarginRight =
3526
+ !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
3527
+ }
3528
+
3529
+ if ( typeof div.style.zoom !== core_strundefined ) {
3530
+ // Support: IE<8
3531
+ // Check if natively block-level elements act like inline-block
3532
+ // elements when setting their display to 'inline' and giving
3533
+ // them layout
3534
+ div.innerHTML = "";
3535
+ div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
3536
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
3537
+
3538
+ // Support: IE6
3539
+ // Check if elements with layout shrink-wrap their children
3540
+ div.style.display = "block";
3541
+ div.innerHTML = "<div></div>";
3542
+ div.firstChild.style.width = "5px";
3543
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
3544
+
3545
+ if ( support.inlineBlockNeedsLayout ) {
3546
+ // Prevent IE 6 from affecting layout for positioned elements #11048
3547
+ // Prevent IE from shrinking the body in IE 7 mode #12869
3548
+ // Support: IE<8
3549
+ body.style.zoom = 1;
3550
+ }
3551
+ }
3552
+
3553
+ body.removeChild( container );
3554
+
3555
+ // Null elements to avoid leaks in IE
3556
+ container = div = tds = marginDiv = null;
3557
+ });
3558
+
3559
+ // Null elements to avoid leaks in IE
3560
+ all = select = fragment = opt = a = input = null;
3561
+
3562
+ return support;
3563
+ })({});
3564
+
3565
+ var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
3566
+ rmultiDash = /([A-Z])/g;
3567
+
3568
+ function internalData( elem, name, data, pvt /* Internal Use Only */ ){
3569
+ if ( !jQuery.acceptData( elem ) ) {
3570
+ return;
3571
+ }
3572
+
3573
+ var ret, thisCache,
3574
+ internalKey = jQuery.expando,
3575
+
3576
+ // We have to handle DOM nodes and JS objects differently because IE6-7
3577
+ // can't GC object references properly across the DOM-JS boundary
3578
+ isNode = elem.nodeType,
3579
+
3580
+ // Only DOM nodes need the global jQuery cache; JS object data is
3581
+ // attached directly to the object so GC can occur automatically
3582
+ cache = isNode ? jQuery.cache : elem,
3583
+
3584
+ // Only defining an ID for JS objects if its cache already exists allows
3585
+ // the code to shortcut on the same path as a DOM node with no cache
3586
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
3587
+
3588
+ // Avoid doing any more work than we need to when trying to get data on an
3589
+ // object that has no data at all
3590
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
3591
+ return;
3592
+ }
3593
+
3594
+ if ( !id ) {
3595
+ // Only DOM nodes need a new unique ID for each element since their data
3596
+ // ends up in the global cache
3597
+ if ( isNode ) {
3598
+ id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;
3599
+ } else {
3600
+ id = internalKey;
3601
+ }
3602
+ }
3603
+
3604
+ if ( !cache[ id ] ) {
3605
+ // Avoid exposing jQuery metadata on plain JS objects when the object
3606
+ // is serialized using JSON.stringify
3607
+ cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
3608
+ }
3609
+
3610
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
3611
+ // shallow copied over onto the existing cache
3612
+ if ( typeof name === "object" || typeof name === "function" ) {
3613
+ if ( pvt ) {
3614
+ cache[ id ] = jQuery.extend( cache[ id ], name );
3615
+ } else {
3616
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
3617
+ }
3618
+ }
3619
+
3620
+ thisCache = cache[ id ];
3621
+
3622
+ // jQuery data() is stored in a separate object inside the object's internal data
3623
+ // cache in order to avoid key collisions between internal data and user-defined
3624
+ // data.
3625
+ if ( !pvt ) {
3626
+ if ( !thisCache.data ) {
3627
+ thisCache.data = {};
3628
+ }
3629
+
3630
+ thisCache = thisCache.data;
3631
+ }
3632
+
3633
+ if ( data !== undefined ) {
3634
+ thisCache[ jQuery.camelCase( name ) ] = data;
3635
+ }
3636
+
3637
+ // Check for both converted-to-camel and non-converted data property names
3638
+ // If a data property was specified
3639
+ if ( typeof name === "string" ) {
3640
+
3641
+ // First Try to find as-is property data
3642
+ ret = thisCache[ name ];
3643
+
3644
+ // Test for null|undefined property data
3645
+ if ( ret == null ) {
3646
+
3647
+ // Try to find the camelCased property
3648
+ ret = thisCache[ jQuery.camelCase( name ) ];
3649
+ }
3650
+ } else {
3651
+ ret = thisCache;
3652
+ }
3653
+
3654
+ return ret;
3655
+ }
3656
+
3657
+ function internalRemoveData( elem, name, pvt ) {
3658
+ if ( !jQuery.acceptData( elem ) ) {
3659
+ return;
3660
+ }
3661
+
3662
+ var thisCache, i,
3663
+ isNode = elem.nodeType,
3664
+
3665
+ // See jQuery.data for more information
3666
+ cache = isNode ? jQuery.cache : elem,
3667
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
3668
+
3669
+ // If there is already no cache entry for this object, there is no
3670
+ // purpose in continuing
3671
+ if ( !cache[ id ] ) {
3672
+ return;
3673
+ }
3674
+
3675
+ if ( name ) {
3676
+
3677
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
3678
+
3679
+ if ( thisCache ) {
3680
+
3681
+ // Support array or space separated string names for data keys
3682
+ if ( !jQuery.isArray( name ) ) {
3683
+
3684
+ // try the string as a key before any manipulation
3685
+ if ( name in thisCache ) {
3686
+ name = [ name ];
3687
+ } else {
3688
+
3689
+ // split the camel cased version by spaces unless a key with the spaces exists
3690
+ name = jQuery.camelCase( name );
3691
+ if ( name in thisCache ) {
3692
+ name = [ name ];
3693
+ } else {
3694
+ name = name.split(" ");
3695
+ }
3696
+ }
3697
+ } else {
3698
+ // If "name" is an array of keys...
3699
+ // When data is initially created, via ("key", "val") signature,
3700
+ // keys will be converted to camelCase.
3701
+ // Since there is no way to tell _how_ a key was added, remove
3702
+ // both plain key and camelCase key. #12786
3703
+ // This will only penalize the array argument path.
3704
+ name = name.concat( jQuery.map( name, jQuery.camelCase ) );
3705
+ }
3706
+
3707
+ i = name.length;
3708
+ while ( i-- ) {
3709
+ delete thisCache[ name[i] ];
3710
+ }
3711
+
3712
+ // If there is no data left in the cache, we want to continue
3713
+ // and let the cache object itself get destroyed
3714
+ if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
3715
+ return;
3716
+ }
3717
+ }
3718
+ }
3719
+
3720
+ // See jQuery.data for more information
3721
+ if ( !pvt ) {
3722
+ delete cache[ id ].data;
3723
+
3724
+ // Don't destroy the parent cache unless the internal data object
3725
+ // had been the only thing left in it
3726
+ if ( !isEmptyDataObject( cache[ id ] ) ) {
3727
+ return;
3728
+ }
3729
+ }
3730
+
3731
+ // Destroy the cache
3732
+ if ( isNode ) {
3733
+ jQuery.cleanData( [ elem ], true );
3734
+
3735
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
3736
+ /* jshint eqeqeq: false */
3737
+ } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
3738
+ /* jshint eqeqeq: true */
3739
+ delete cache[ id ];
3740
+
3741
+ // When all else fails, null
3742
+ } else {
3743
+ cache[ id ] = null;
3744
+ }
3745
+ }
3746
+
3747
+ jQuery.extend({
3748
+ cache: {},
3749
+
3750
+ // The following elements throw uncatchable exceptions if you
3751
+ // attempt to add expando properties to them.
3752
+ noData: {
3753
+ "applet": true,
3754
+ "embed": true,
3755
+ // Ban all objects except for Flash (which handle expandos)
3756
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
3757
+ },
3758
+
3759
+ hasData: function( elem ) {
3760
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
3761
+ return !!elem && !isEmptyDataObject( elem );
3762
+ },
3763
+
3764
+ data: function( elem, name, data ) {
3765
+ return internalData( elem, name, data );
3766
+ },
3767
+
3768
+ removeData: function( elem, name ) {
3769
+ return internalRemoveData( elem, name );
3770
+ },
3771
+
3772
+ // For internal use only.
3773
+ _data: function( elem, name, data ) {
3774
+ return internalData( elem, name, data, true );
3775
+ },
3776
+
3777
+ _removeData: function( elem, name ) {
3778
+ return internalRemoveData( elem, name, true );
3779
+ },
3780
+
3781
+ // A method for determining if a DOM node can handle the data expando
3782
+ acceptData: function( elem ) {
3783
+ // Do not set data on non-element because it will not be cleared (#8335).
3784
+ if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
3785
+ return false;
3786
+ }
3787
+
3788
+ var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
3789
+
3790
+ // nodes accept data unless otherwise specified; rejection can be conditional
3791
+ return !noData || noData !== true && elem.getAttribute("classid") === noData;
3792
+ }
3793
+ });
3794
+
3795
+ jQuery.fn.extend({
3796
+ data: function( key, value ) {
3797
+ var attrs, name,
3798
+ data = null,
3799
+ i = 0,
3800
+ elem = this[0];
3801
+
3802
+ // Special expections of .data basically thwart jQuery.access,
3803
+ // so implement the relevant behavior ourselves
3804
+
3805
+ // Gets all values
3806
+ if ( key === undefined ) {
3807
+ if ( this.length ) {
3808
+ data = jQuery.data( elem );
3809
+
3810
+ if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
3811
+ attrs = elem.attributes;
3812
+ for ( ; i < attrs.length; i++ ) {
3813
+ name = attrs[i].name;
3814
+
3815
+ if ( name.indexOf("data-") === 0 ) {
3816
+ name = jQuery.camelCase( name.slice(5) );
3817
+
3818
+ dataAttr( elem, name, data[ name ] );
3819
+ }
3820
+ }
3821
+ jQuery._data( elem, "parsedAttrs", true );
3822
+ }
3823
+ }
3824
+
3825
+ return data;
3826
+ }
3827
+
3828
+ // Sets multiple values
3829
+ if ( typeof key === "object" ) {
3830
+ return this.each(function() {
3831
+ jQuery.data( this, key );
3832
+ });
3833
+ }
3834
+
3835
+ return arguments.length > 1 ?
3836
+
3837
+ // Sets one value
3838
+ this.each(function() {
3839
+ jQuery.data( this, key, value );
3840
+ }) :
3841
+
3842
+ // Gets one value
3843
+ // Try to fetch any internally stored data first
3844
+ elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
3845
+ },
3846
+
3847
+ removeData: function( key ) {
3848
+ return this.each(function() {
3849
+ jQuery.removeData( this, key );
3850
+ });
3851
+ }
3852
+ });
3853
+
3854
+ function dataAttr( elem, key, data ) {
3855
+ // If nothing was found internally, try to fetch any
3856
+ // data from the HTML5 data-* attribute
3857
+ if ( data === undefined && elem.nodeType === 1 ) {
3858
+
3859
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
3860
+
3861
+ data = elem.getAttribute( name );
3862
+
3863
+ if ( typeof data === "string" ) {
3864
+ try {
3865
+ data = data === "true" ? true :
3866
+ data === "false" ? false :
3867
+ data === "null" ? null :
3868
+ // Only convert to a number if it doesn't change the string
3869
+ +data + "" === data ? +data :
3870
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
3871
+ data;
3872
+ } catch( e ) {}
3873
+
3874
+ // Make sure we set the data so it isn't changed later
3875
+ jQuery.data( elem, key, data );
3876
+
3877
+ } else {
3878
+ data = undefined;
3879
+ }
3880
+ }
3881
+
3882
+ return data;
3883
+ }
3884
+
3885
+ // checks a cache object for emptiness
3886
+ function isEmptyDataObject( obj ) {
3887
+ var name;
3888
+ for ( name in obj ) {
3889
+
3890
+ // if the public data object is empty, the private is still empty
3891
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
3892
+ continue;
3893
+ }
3894
+ if ( name !== "toJSON" ) {
3895
+ return false;
3896
+ }
3897
+ }
3898
+
3899
+ return true;
3900
+ }
3901
+ jQuery.extend({
3902
+ queue: function( elem, type, data ) {
3903
+ var queue;
3904
+
3905
+ if ( elem ) {
3906
+ type = ( type || "fx" ) + "queue";
3907
+ queue = jQuery._data( elem, type );
3908
+
3909
+ // Speed up dequeue by getting out quickly if this is just a lookup
3910
+ if ( data ) {
3911
+ if ( !queue || jQuery.isArray(data) ) {
3912
+ queue = jQuery._data( elem, type, jQuery.makeArray(data) );
3913
+ } else {
3914
+ queue.push( data );
3915
+ }
3916
+ }
3917
+ return queue || [];
3918
+ }
3919
+ },
3920
+
3921
+ dequeue: function( elem, type ) {
3922
+ type = type || "fx";
3923
+
3924
+ var queue = jQuery.queue( elem, type ),
3925
+ startLength = queue.length,
3926
+ fn = queue.shift(),
3927
+ hooks = jQuery._queueHooks( elem, type ),
3928
+ next = function() {
3929
+ jQuery.dequeue( elem, type );
3930
+ };
3931
+
3932
+ // If the fx queue is dequeued, always remove the progress sentinel
3933
+ if ( fn === "inprogress" ) {
3934
+ fn = queue.shift();
3935
+ startLength--;
3936
+ }
3937
+
3938
+ if ( fn ) {
3939
+
3940
+ // Add a progress sentinel to prevent the fx queue from being
3941
+ // automatically dequeued
3942
+ if ( type === "fx" ) {
3943
+ queue.unshift( "inprogress" );
3944
+ }
3945
+
3946
+ // clear up the last queue stop function
3947
+ delete hooks.stop;
3948
+ fn.call( elem, next, hooks );
3949
+ }
3950
+
3951
+ if ( !startLength && hooks ) {
3952
+ hooks.empty.fire();
3953
+ }
3954
+ },
3955
+
3956
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
3957
+ _queueHooks: function( elem, type ) {
3958
+ var key = type + "queueHooks";
3959
+ return jQuery._data( elem, key ) || jQuery._data( elem, key, {
3960
+ empty: jQuery.Callbacks("once memory").add(function() {
3961
+ jQuery._removeData( elem, type + "queue" );
3962
+ jQuery._removeData( elem, key );
3963
+ })
3964
+ });
3965
+ }
3966
+ });
3967
+
3968
+ jQuery.fn.extend({
3969
+ queue: function( type, data ) {
3970
+ var setter = 2;
3971
+
3972
+ if ( typeof type !== "string" ) {
3973
+ data = type;
3974
+ type = "fx";
3975
+ setter--;
3976
+ }
3977
+
3978
+ if ( arguments.length < setter ) {
3979
+ return jQuery.queue( this[0], type );
3980
+ }
3981
+
3982
+ return data === undefined ?
3983
+ this :
3984
+ this.each(function() {
3985
+ var queue = jQuery.queue( this, type, data );
3986
+
3987
+ // ensure a hooks for this queue
3988
+ jQuery._queueHooks( this, type );
3989
+
3990
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
3991
+ jQuery.dequeue( this, type );
3992
+ }
3993
+ });
3994
+ },
3995
+ dequeue: function( type ) {
3996
+ return this.each(function() {
3997
+ jQuery.dequeue( this, type );
3998
+ });
3999
+ },
4000
+ // Based off of the plugin by Clint Helfers, with permission.
4001
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
4002
+ delay: function( time, type ) {
4003
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
4004
+ type = type || "fx";
4005
+
4006
+ return this.queue( type, function( next, hooks ) {
4007
+ var timeout = setTimeout( next, time );
4008
+ hooks.stop = function() {
4009
+ clearTimeout( timeout );
4010
+ };
4011
+ });
4012
+ },
4013
+ clearQueue: function( type ) {
4014
+ return this.queue( type || "fx", [] );
4015
+ },
4016
+ // Get a promise resolved when queues of a certain type
4017
+ // are emptied (fx is the type by default)
4018
+ promise: function( type, obj ) {
4019
+ var tmp,
4020
+ count = 1,
4021
+ defer = jQuery.Deferred(),
4022
+ elements = this,
4023
+ i = this.length,
4024
+ resolve = function() {
4025
+ if ( !( --count ) ) {
4026
+ defer.resolveWith( elements, [ elements ] );
4027
+ }
4028
+ };
4029
+
4030
+ if ( typeof type !== "string" ) {
4031
+ obj = type;
4032
+ type = undefined;
4033
+ }
4034
+ type = type || "fx";
4035
+
4036
+ while( i-- ) {
4037
+ tmp = jQuery._data( elements[ i ], type + "queueHooks" );
4038
+ if ( tmp && tmp.empty ) {
4039
+ count++;
4040
+ tmp.empty.add( resolve );
4041
+ }
4042
+ }
4043
+ resolve();
4044
+ return defer.promise( obj );
4045
+ }
4046
+ });
4047
+ var nodeHook, boolHook,
4048
+ rclass = /[\t\r\n\f]/g,
4049
+ rreturn = /\r/g,
4050
+ rfocusable = /^(?:input|select|textarea|button|object)$/i,
4051
+ rclickable = /^(?:a|area)$/i,
4052
+ ruseDefault = /^(?:checked|selected)$/i,
4053
+ getSetAttribute = jQuery.support.getSetAttribute,
4054
+ getSetInput = jQuery.support.input;
4055
+
4056
+ jQuery.fn.extend({
4057
+ attr: function( name, value ) {
4058
+ return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
4059
+ },
4060
+
4061
+ removeAttr: function( name ) {
4062
+ return this.each(function() {
4063
+ jQuery.removeAttr( this, name );
4064
+ });
4065
+ },
4066
+
4067
+ prop: function( name, value ) {
4068
+ return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
4069
+ },
4070
+
4071
+ removeProp: function( name ) {
4072
+ name = jQuery.propFix[ name ] || name;
4073
+ return this.each(function() {
4074
+ // try/catch handles cases where IE balks (such as removing a property on window)
4075
+ try {
4076
+ this[ name ] = undefined;
4077
+ delete this[ name ];
4078
+ } catch( e ) {}
4079
+ });
4080
+ },
4081
+
4082
+ addClass: function( value ) {
4083
+ var classes, elem, cur, clazz, j,
4084
+ i = 0,
4085
+ len = this.length,
4086
+ proceed = typeof value === "string" && value;
4087
+
4088
+ if ( jQuery.isFunction( value ) ) {
4089
+ return this.each(function( j ) {
4090
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
4091
+ });
4092
+ }
4093
+
4094
+ if ( proceed ) {
4095
+ // The disjunction here is for better compressibility (see removeClass)
4096
+ classes = ( value || "" ).match( core_rnotwhite ) || [];
4097
+
4098
+ for ( ; i < len; i++ ) {
4099
+ elem = this[ i ];
4100
+ cur = elem.nodeType === 1 && ( elem.className ?
4101
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
4102
+ " "
4103
+ );
4104
+
4105
+ if ( cur ) {
4106
+ j = 0;
4107
+ while ( (clazz = classes[j++]) ) {
4108
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
4109
+ cur += clazz + " ";
4110
+ }
4111
+ }
4112
+ elem.className = jQuery.trim( cur );
4113
+
4114
+ }
4115
+ }
4116
+ }
4117
+
4118
+ return this;
4119
+ },
4120
+
4121
+ removeClass: function( value ) {
4122
+ var classes, elem, cur, clazz, j,
4123
+ i = 0,
4124
+ len = this.length,
4125
+ proceed = arguments.length === 0 || typeof value === "string" && value;
4126
+
4127
+ if ( jQuery.isFunction( value ) ) {
4128
+ return this.each(function( j ) {
4129
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
4130
+ });
4131
+ }
4132
+ if ( proceed ) {
4133
+ classes = ( value || "" ).match( core_rnotwhite ) || [];
4134
+
4135
+ for ( ; i < len; i++ ) {
4136
+ elem = this[ i ];
4137
+ // This expression is here for better compressibility (see addClass)
4138
+ cur = elem.nodeType === 1 && ( elem.className ?
4139
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
4140
+ ""
4141
+ );
4142
+
4143
+ if ( cur ) {
4144
+ j = 0;
4145
+ while ( (clazz = classes[j++]) ) {
4146
+ // Remove *all* instances
4147
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
4148
+ cur = cur.replace( " " + clazz + " ", " " );
4149
+ }
4150
+ }
4151
+ elem.className = value ? jQuery.trim( cur ) : "";
4152
+ }
4153
+ }
4154
+ }
4155
+
4156
+ return this;
4157
+ },
4158
+
4159
+ toggleClass: function( value, stateVal ) {
4160
+ var type = typeof value;
4161
+
4162
+ if ( typeof stateVal === "boolean" && type === "string" ) {
4163
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
4164
+ }
4165
+
4166
+ if ( jQuery.isFunction( value ) ) {
4167
+ return this.each(function( i ) {
4168
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
4169
+ });
4170
+ }
4171
+
4172
+ return this.each(function() {
4173
+ if ( type === "string" ) {
4174
+ // toggle individual class names
4175
+ var className,
4176
+ i = 0,
4177
+ self = jQuery( this ),
4178
+ classNames = value.match( core_rnotwhite ) || [];
4179
+
4180
+ while ( (className = classNames[ i++ ]) ) {
4181
+ // check each className given, space separated list
4182
+ if ( self.hasClass( className ) ) {
4183
+ self.removeClass( className );
4184
+ } else {
4185
+ self.addClass( className );
4186
+ }
4187
+ }
4188
+
4189
+ // Toggle whole class name
4190
+ } else if ( type === core_strundefined || type === "boolean" ) {
4191
+ if ( this.className ) {
4192
+ // store className if set
4193
+ jQuery._data( this, "__className__", this.className );
4194
+ }
4195
+
4196
+ // If the element has a class name or if we're passed "false",
4197
+ // then remove the whole classname (if there was one, the above saved it).
4198
+ // Otherwise bring back whatever was previously saved (if anything),
4199
+ // falling back to the empty string if nothing was stored.
4200
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
4201
+ }
4202
+ });
4203
+ },
4204
+
4205
+ hasClass: function( selector ) {
4206
+ var className = " " + selector + " ",
4207
+ i = 0,
4208
+ l = this.length;
4209
+ for ( ; i < l; i++ ) {
4210
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
4211
+ return true;
4212
+ }
4213
+ }
4214
+
4215
+ return false;
4216
+ },
4217
+
4218
+ val: function( value ) {
4219
+ var ret, hooks, isFunction,
4220
+ elem = this[0];
4221
+
4222
+ if ( !arguments.length ) {
4223
+ if ( elem ) {
4224
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
4225
+
4226
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
4227
+ return ret;
4228
+ }
4229
+
4230
+ ret = elem.value;
4231
+
4232
+ return typeof ret === "string" ?
4233
+ // handle most common string cases
4234
+ ret.replace(rreturn, "") :
4235
+ // handle cases where value is null/undef or number
4236
+ ret == null ? "" : ret;
4237
+ }
4238
+
4239
+ return;
4240
+ }
4241
+
4242
+ isFunction = jQuery.isFunction( value );
4243
+
4244
+ return this.each(function( i ) {
4245
+ var val;
4246
+
4247
+ if ( this.nodeType !== 1 ) {
4248
+ return;
4249
+ }
4250
+
4251
+ if ( isFunction ) {
4252
+ val = value.call( this, i, jQuery( this ).val() );
4253
+ } else {
4254
+ val = value;
4255
+ }
4256
+
4257
+ // Treat null/undefined as ""; convert numbers to string
4258
+ if ( val == null ) {
4259
+ val = "";
4260
+ } else if ( typeof val === "number" ) {
4261
+ val += "";
4262
+ } else if ( jQuery.isArray( val ) ) {
4263
+ val = jQuery.map(val, function ( value ) {
4264
+ return value == null ? "" : value + "";
4265
+ });
4266
+ }
4267
+
4268
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
4269
+
4270
+ // If set returns undefined, fall back to normal setting
4271
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
4272
+ this.value = val;
4273
+ }
4274
+ });
4275
+ }
4276
+ });
4277
+
4278
+ jQuery.extend({
4279
+ valHooks: {
4280
+ option: {
4281
+ get: function( elem ) {
4282
+ // Use proper attribute retrieval(#6932, #12072)
4283
+ var val = jQuery.find.attr( elem, "value" );
4284
+ return val != null ?
4285
+ val :
4286
+ elem.text;
4287
+ }
4288
+ },
4289
+ select: {
4290
+ get: function( elem ) {
4291
+ var value, option,
4292
+ options = elem.options,
4293
+ index = elem.selectedIndex,
4294
+ one = elem.type === "select-one" || index < 0,
4295
+ values = one ? null : [],
4296
+ max = one ? index + 1 : options.length,
4297
+ i = index < 0 ?
4298
+ max :
4299
+ one ? index : 0;
4300
+
4301
+ // Loop through all the selected options
4302
+ for ( ; i < max; i++ ) {
4303
+ option = options[ i ];
4304
+
4305
+ // oldIE doesn't update selected after form reset (#2551)
4306
+ if ( ( option.selected || i === index ) &&
4307
+ // Don't return options that are disabled or in a disabled optgroup
4308
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
4309
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
4310
+
4311
+ // Get the specific value for the option
4312
+ value = jQuery( option ).val();
4313
+
4314
+ // We don't need an array for one selects
4315
+ if ( one ) {
4316
+ return value;
4317
+ }
4318
+
4319
+ // Multi-Selects return an array
4320
+ values.push( value );
4321
+ }
4322
+ }
4323
+
4324
+ return values;
4325
+ },
4326
+
4327
+ set: function( elem, value ) {
4328
+ var optionSet, option,
4329
+ options = elem.options,
4330
+ values = jQuery.makeArray( value ),
4331
+ i = options.length;
4332
+
4333
+ while ( i-- ) {
4334
+ option = options[ i ];
4335
+ if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
4336
+ optionSet = true;
4337
+ }
4338
+ }
4339
+
4340
+ // force browsers to behave consistently when non-matching value is set
4341
+ if ( !optionSet ) {
4342
+ elem.selectedIndex = -1;
4343
+ }
4344
+ return values;
4345
+ }
4346
+ }
4347
+ },
4348
+
4349
+ attr: function( elem, name, value ) {
4350
+ var hooks, ret,
4351
+ nType = elem.nodeType;
4352
+
4353
+ // don't get/set attributes on text, comment and attribute nodes
4354
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
4355
+ return;
4356
+ }
4357
+
4358
+ // Fallback to prop when attributes are not supported
4359
+ if ( typeof elem.getAttribute === core_strundefined ) {
4360
+ return jQuery.prop( elem, name, value );
4361
+ }
4362
+
4363
+ // All attributes are lowercase
4364
+ // Grab necessary hook if one is defined
4365
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
4366
+ name = name.toLowerCase();
4367
+ hooks = jQuery.attrHooks[ name ] ||
4368
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
4369
+ }
4370
+
4371
+ if ( value !== undefined ) {
4372
+
4373
+ if ( value === null ) {
4374
+ jQuery.removeAttr( elem, name );
4375
+
4376
+ } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
4377
+ return ret;
4378
+
4379
+ } else {
4380
+ elem.setAttribute( name, value + "" );
4381
+ return value;
4382
+ }
4383
+
4384
+ } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
4385
+ return ret;
4386
+
4387
+ } else {
4388
+ ret = jQuery.find.attr( elem, name );
4389
+
4390
+ // Non-existent attributes return null, we normalize to undefined
4391
+ return ret == null ?
4392
+ undefined :
4393
+ ret;
4394
+ }
4395
+ },
4396
+
4397
+ removeAttr: function( elem, value ) {
4398
+ var name, propName,
4399
+ i = 0,
4400
+ attrNames = value && value.match( core_rnotwhite );
4401
+
4402
+ if ( attrNames && elem.nodeType === 1 ) {
4403
+ while ( (name = attrNames[i++]) ) {
4404
+ propName = jQuery.propFix[ name ] || name;
4405
+
4406
+ // Boolean attributes get special treatment (#10870)
4407
+ if ( jQuery.expr.match.bool.test( name ) ) {
4408
+ // Set corresponding property to false
4409
+ if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
4410
+ elem[ propName ] = false;
4411
+ // Support: IE<9
4412
+ // Also clear defaultChecked/defaultSelected (if appropriate)
4413
+ } else {
4414
+ elem[ jQuery.camelCase( "default-" + name ) ] =
4415
+ elem[ propName ] = false;
4416
+ }
4417
+
4418
+ // See #9699 for explanation of this approach (setting first, then removal)
4419
+ } else {
4420
+ jQuery.attr( elem, name, "" );
4421
+ }
4422
+
4423
+ elem.removeAttribute( getSetAttribute ? name : propName );
4424
+ }
4425
+ }
4426
+ },
4427
+
4428
+ attrHooks: {
4429
+ type: {
4430
+ set: function( elem, value ) {
4431
+ if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
4432
+ // Setting the type on a radio button after the value resets the value in IE6-9
4433
+ // Reset value to default in case type is set after value during creation
4434
+ var val = elem.value;
4435
+ elem.setAttribute( "type", value );
4436
+ if ( val ) {
4437
+ elem.value = val;
4438
+ }
4439
+ return value;
4440
+ }
4441
+ }
4442
+ }
4443
+ },
4444
+
4445
+ propFix: {
4446
+ "for": "htmlFor",
4447
+ "class": "className"
4448
+ },
4449
+
4450
+ prop: function( elem, name, value ) {
4451
+ var ret, hooks, notxml,
4452
+ nType = elem.nodeType;
4453
+
4454
+ // don't get/set properties on text, comment and attribute nodes
4455
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
4456
+ return;
4457
+ }
4458
+
4459
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
4460
+
4461
+ if ( notxml ) {
4462
+ // Fix name and attach hooks
4463
+ name = jQuery.propFix[ name ] || name;
4464
+ hooks = jQuery.propHooks[ name ];
4465
+ }
4466
+
4467
+ if ( value !== undefined ) {
4468
+ return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
4469
+ ret :
4470
+ ( elem[ name ] = value );
4471
+
4472
+ } else {
4473
+ return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
4474
+ ret :
4475
+ elem[ name ];
4476
+ }
4477
+ },
4478
+
4479
+ propHooks: {
4480
+ tabIndex: {
4481
+ get: function( elem ) {
4482
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
4483
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
4484
+ // Use proper attribute retrieval(#12072)
4485
+ var tabindex = jQuery.find.attr( elem, "tabindex" );
4486
+
4487
+ return tabindex ?
4488
+ parseInt( tabindex, 10 ) :
4489
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
4490
+ 0 :
4491
+ -1;
4492
+ }
4493
+ }
4494
+ }
4495
+ });
4496
+
4497
+ // Hooks for boolean attributes
4498
+ boolHook = {
4499
+ set: function( elem, value, name ) {
4500
+ if ( value === false ) {
4501
+ // Remove boolean attributes when set to false
4502
+ jQuery.removeAttr( elem, name );
4503
+ } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
4504
+ // IE<8 needs the *property* name
4505
+ elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
4506
+
4507
+ // Use defaultChecked and defaultSelected for oldIE
4508
+ } else {
4509
+ elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
4510
+ }
4511
+
4512
+ return name;
4513
+ }
4514
+ };
4515
+ jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
4516
+ var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
4517
+
4518
+ jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
4519
+ function( elem, name, isXML ) {
4520
+ var fn = jQuery.expr.attrHandle[ name ],
4521
+ ret = isXML ?
4522
+ undefined :
4523
+ /* jshint eqeqeq: false */
4524
+ (jQuery.expr.attrHandle[ name ] = undefined) !=
4525
+ getter( elem, name, isXML ) ?
4526
+
4527
+ name.toLowerCase() :
4528
+ null;
4529
+ jQuery.expr.attrHandle[ name ] = fn;
4530
+ return ret;
4531
+ } :
4532
+ function( elem, name, isXML ) {
4533
+ return isXML ?
4534
+ undefined :
4535
+ elem[ jQuery.camelCase( "default-" + name ) ] ?
4536
+ name.toLowerCase() :
4537
+ null;
4538
+ };
4539
+ });
4540
+
4541
+ // fix oldIE attroperties
4542
+ if ( !getSetInput || !getSetAttribute ) {
4543
+ jQuery.attrHooks.value = {
4544
+ set: function( elem, value, name ) {
4545
+ if ( jQuery.nodeName( elem, "input" ) ) {
4546
+ // Does not return so that setAttribute is also used
4547
+ elem.defaultValue = value;
4548
+ } else {
4549
+ // Use nodeHook if defined (#1954); otherwise setAttribute is fine
4550
+ return nodeHook && nodeHook.set( elem, value, name );
4551
+ }
4552
+ }
4553
+ };
4554
+ }
4555
+
4556
+ // IE6/7 do not support getting/setting some attributes with get/setAttribute
4557
+ if ( !getSetAttribute ) {
4558
+
4559
+ // Use this for any attribute in IE6/7
4560
+ // This fixes almost every IE6/7 issue
4561
+ nodeHook = {
4562
+ set: function( elem, value, name ) {
4563
+ // Set the existing or create a new attribute node
4564
+ var ret = elem.getAttributeNode( name );
4565
+ if ( !ret ) {
4566
+ elem.setAttributeNode(
4567
+ (ret = elem.ownerDocument.createAttribute( name ))
4568
+ );
4569
+ }
4570
+
4571
+ ret.value = value += "";
4572
+
4573
+ // Break association with cloned elements by also using setAttribute (#9646)
4574
+ return name === "value" || value === elem.getAttribute( name ) ?
4575
+ value :
4576
+ undefined;
4577
+ }
4578
+ };
4579
+ jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
4580
+ // Some attributes are constructed with empty-string values when not defined
4581
+ function( elem, name, isXML ) {
4582
+ var ret;
4583
+ return isXML ?
4584
+ undefined :
4585
+ (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
4586
+ ret.value :
4587
+ null;
4588
+ };
4589
+ jQuery.valHooks.button = {
4590
+ get: function( elem, name ) {
4591
+ var ret = elem.getAttributeNode( name );
4592
+ return ret && ret.specified ?
4593
+ ret.value :
4594
+ undefined;
4595
+ },
4596
+ set: nodeHook.set
4597
+ };
4598
+
4599
+ // Set contenteditable to false on removals(#10429)
4600
+ // Setting to empty string throws an error as an invalid value
4601
+ jQuery.attrHooks.contenteditable = {
4602
+ set: function( elem, value, name ) {
4603
+ nodeHook.set( elem, value === "" ? false : value, name );
4604
+ }
4605
+ };
4606
+
4607
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
4608
+ // This is for removals
4609
+ jQuery.each([ "width", "height" ], function( i, name ) {
4610
+ jQuery.attrHooks[ name ] = {
4611
+ set: function( elem, value ) {
4612
+ if ( value === "" ) {
4613
+ elem.setAttribute( name, "auto" );
4614
+ return value;
4615
+ }
4616
+ }
4617
+ };
4618
+ });
4619
+ }
4620
+
4621
+
4622
+ // Some attributes require a special call on IE
4623
+ // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
4624
+ if ( !jQuery.support.hrefNormalized ) {
4625
+ // href/src property should get the full normalized URL (#10299/#12915)
4626
+ jQuery.each([ "href", "src" ], function( i, name ) {
4627
+ jQuery.propHooks[ name ] = {
4628
+ get: function( elem ) {
4629
+ return elem.getAttribute( name, 4 );
4630
+ }
4631
+ };
4632
+ });
4633
+ }
4634
+
4635
+ if ( !jQuery.support.style ) {
4636
+ jQuery.attrHooks.style = {
4637
+ get: function( elem ) {
4638
+ // Return undefined in the case of empty string
4639
+ // Note: IE uppercases css property names, but if we were to .toLowerCase()
4640
+ // .cssText, that would destroy case senstitivity in URL's, like in "background"
4641
+ return elem.style.cssText || undefined;
4642
+ },
4643
+ set: function( elem, value ) {
4644
+ return ( elem.style.cssText = value + "" );
4645
+ }
4646
+ };
4647
+ }
4648
+
4649
+ // Safari mis-reports the default selected property of an option
4650
+ // Accessing the parent's selectedIndex property fixes it
4651
+ if ( !jQuery.support.optSelected ) {
4652
+ jQuery.propHooks.selected = {
4653
+ get: function( elem ) {
4654
+ var parent = elem.parentNode;
4655
+
4656
+ if ( parent ) {
4657
+ parent.selectedIndex;
4658
+
4659
+ // Make sure that it also works with optgroups, see #5701
4660
+ if ( parent.parentNode ) {
4661
+ parent.parentNode.selectedIndex;
4662
+ }
4663
+ }
4664
+ return null;
4665
+ }
4666
+ };
4667
+ }
4668
+
4669
+ jQuery.each([
4670
+ "tabIndex",
4671
+ "readOnly",
4672
+ "maxLength",
4673
+ "cellSpacing",
4674
+ "cellPadding",
4675
+ "rowSpan",
4676
+ "colSpan",
4677
+ "useMap",
4678
+ "frameBorder",
4679
+ "contentEditable"
4680
+ ], function() {
4681
+ jQuery.propFix[ this.toLowerCase() ] = this;
4682
+ });
4683
+
4684
+ // IE6/7 call enctype encoding
4685
+ if ( !jQuery.support.enctype ) {
4686
+ jQuery.propFix.enctype = "encoding";
4687
+ }
4688
+
4689
+ // Radios and checkboxes getter/setter
4690
+ jQuery.each([ "radio", "checkbox" ], function() {
4691
+ jQuery.valHooks[ this ] = {
4692
+ set: function( elem, value ) {
4693
+ if ( jQuery.isArray( value ) ) {
4694
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
4695
+ }
4696
+ }
4697
+ };
4698
+ if ( !jQuery.support.checkOn ) {
4699
+ jQuery.valHooks[ this ].get = function( elem ) {
4700
+ // Support: Webkit
4701
+ // "" is returned instead of "on" if a value isn't specified
4702
+ return elem.getAttribute("value") === null ? "on" : elem.value;
4703
+ };
4704
+ }
4705
+ });
4706
+ var rformElems = /^(?:input|select|textarea)$/i,
4707
+ rkeyEvent = /^key/,
4708
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
4709
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
4710
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
4711
+
4712
+ function returnTrue() {
4713
+ return true;
4714
+ }
4715
+
4716
+ function returnFalse() {
4717
+ return false;
4718
+ }
4719
+
4720
+ function safeActiveElement() {
4721
+ try {
4722
+ return document.activeElement;
4723
+ } catch ( err ) { }
4724
+ }
4725
+
4726
+ /*
4727
+ * Helper functions for managing events -- not part of the public interface.
4728
+ * Props to Dean Edwards' addEvent library for many of the ideas.
4729
+ */
4730
+ jQuery.event = {
4731
+
4732
+ global: {},
4733
+
4734
+ add: function( elem, types, handler, data, selector ) {
4735
+ var tmp, events, t, handleObjIn,
4736
+ special, eventHandle, handleObj,
4737
+ handlers, type, namespaces, origType,
4738
+ elemData = jQuery._data( elem );
4739
+
4740
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
4741
+ if ( !elemData ) {
4742
+ return;
4743
+ }
4744
+
4745
+ // Caller can pass in an object of custom data in lieu of the handler
4746
+ if ( handler.handler ) {
4747
+ handleObjIn = handler;
4748
+ handler = handleObjIn.handler;
4749
+ selector = handleObjIn.selector;
4750
+ }
4751
+
4752
+ // Make sure that the handler has a unique ID, used to find/remove it later
4753
+ if ( !handler.guid ) {
4754
+ handler.guid = jQuery.guid++;
4755
+ }
4756
+
4757
+ // Init the element's event structure and main handler, if this is the first
4758
+ if ( !(events = elemData.events) ) {
4759
+ events = elemData.events = {};
4760
+ }
4761
+ if ( !(eventHandle = elemData.handle) ) {
4762
+ eventHandle = elemData.handle = function( e ) {
4763
+ // Discard the second event of a jQuery.event.trigger() and
4764
+ // when an event is called after a page has unloaded
4765
+ return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
4766
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
4767
+ undefined;
4768
+ };
4769
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
4770
+ eventHandle.elem = elem;
4771
+ }
4772
+
4773
+ // Handle multiple events separated by a space
4774
+ types = ( types || "" ).match( core_rnotwhite ) || [""];
4775
+ t = types.length;
4776
+ while ( t-- ) {
4777
+ tmp = rtypenamespace.exec( types[t] ) || [];
4778
+ type = origType = tmp[1];
4779
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
4780
+
4781
+ // There *must* be a type, no attaching namespace-only handlers
4782
+ if ( !type ) {
4783
+ continue;
4784
+ }
4785
+
4786
+ // If event changes its type, use the special event handlers for the changed type
4787
+ special = jQuery.event.special[ type ] || {};
4788
+
4789
+ // If selector defined, determine special event api type, otherwise given type
4790
+ type = ( selector ? special.delegateType : special.bindType ) || type;
4791
+
4792
+ // Update special based on newly reset type
4793
+ special = jQuery.event.special[ type ] || {};
4794
+
4795
+ // handleObj is passed to all event handlers
4796
+ handleObj = jQuery.extend({
4797
+ type: type,
4798
+ origType: origType,
4799
+ data: data,
4800
+ handler: handler,
4801
+ guid: handler.guid,
4802
+ selector: selector,
4803
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
4804
+ namespace: namespaces.join(".")
4805
+ }, handleObjIn );
4806
+
4807
+ // Init the event handler queue if we're the first
4808
+ if ( !(handlers = events[ type ]) ) {
4809
+ handlers = events[ type ] = [];
4810
+ handlers.delegateCount = 0;
4811
+
4812
+ // Only use addEventListener/attachEvent if the special events handler returns false
4813
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
4814
+ // Bind the global event handler to the element
4815
+ if ( elem.addEventListener ) {
4816
+ elem.addEventListener( type, eventHandle, false );
4817
+
4818
+ } else if ( elem.attachEvent ) {
4819
+ elem.attachEvent( "on" + type, eventHandle );
4820
+ }
4821
+ }
4822
+ }
4823
+
4824
+ if ( special.add ) {
4825
+ special.add.call( elem, handleObj );
4826
+
4827
+ if ( !handleObj.handler.guid ) {
4828
+ handleObj.handler.guid = handler.guid;
4829
+ }
4830
+ }
4831
+
4832
+ // Add to the element's handler list, delegates in front
4833
+ if ( selector ) {
4834
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
4835
+ } else {
4836
+ handlers.push( handleObj );
4837
+ }
4838
+
4839
+ // Keep track of which events have ever been used, for event optimization
4840
+ jQuery.event.global[ type ] = true;
4841
+ }
4842
+
4843
+ // Nullify elem to prevent memory leaks in IE
4844
+ elem = null;
4845
+ },
4846
+
4847
+ // Detach an event or set of events from an element
4848
+ remove: function( elem, types, handler, selector, mappedTypes ) {
4849
+ var j, handleObj, tmp,
4850
+ origCount, t, events,
4851
+ special, handlers, type,
4852
+ namespaces, origType,
4853
+ elemData = jQuery.hasData( elem ) && jQuery._data( elem );
4854
+
4855
+ if ( !elemData || !(events = elemData.events) ) {
4856
+ return;
4857
+ }
4858
+
4859
+ // Once for each type.namespace in types; type may be omitted
4860
+ types = ( types || "" ).match( core_rnotwhite ) || [""];
4861
+ t = types.length;
4862
+ while ( t-- ) {
4863
+ tmp = rtypenamespace.exec( types[t] ) || [];
4864
+ type = origType = tmp[1];
4865
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
4866
+
4867
+ // Unbind all events (on this namespace, if provided) for the element
4868
+ if ( !type ) {
4869
+ for ( type in events ) {
4870
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
4871
+ }
4872
+ continue;
4873
+ }
4874
+
4875
+ special = jQuery.event.special[ type ] || {};
4876
+ type = ( selector ? special.delegateType : special.bindType ) || type;
4877
+ handlers = events[ type ] || [];
4878
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
4879
+
4880
+ // Remove matching events
4881
+ origCount = j = handlers.length;
4882
+ while ( j-- ) {
4883
+ handleObj = handlers[ j ];
4884
+
4885
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
4886
+ ( !handler || handler.guid === handleObj.guid ) &&
4887
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
4888
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
4889
+ handlers.splice( j, 1 );
4890
+
4891
+ if ( handleObj.selector ) {
4892
+ handlers.delegateCount--;
4893
+ }
4894
+ if ( special.remove ) {
4895
+ special.remove.call( elem, handleObj );
4896
+ }
4897
+ }
4898
+ }
4899
+
4900
+ // Remove generic event handler if we removed something and no more handlers exist
4901
+ // (avoids potential for endless recursion during removal of special event handlers)
4902
+ if ( origCount && !handlers.length ) {
4903
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
4904
+ jQuery.removeEvent( elem, type, elemData.handle );
4905
+ }
4906
+
4907
+ delete events[ type ];
4908
+ }
4909
+ }
4910
+
4911
+ // Remove the expando if it's no longer used
4912
+ if ( jQuery.isEmptyObject( events ) ) {
4913
+ delete elemData.handle;
4914
+
4915
+ // removeData also checks for emptiness and clears the expando if empty
4916
+ // so use it instead of delete
4917
+ jQuery._removeData( elem, "events" );
4918
+ }
4919
+ },
4920
+
4921
+ trigger: function( event, data, elem, onlyHandlers ) {
4922
+ var handle, ontype, cur,
4923
+ bubbleType, special, tmp, i,
4924
+ eventPath = [ elem || document ],
4925
+ type = core_hasOwn.call( event, "type" ) ? event.type : event,
4926
+ namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
4927
+
4928
+ cur = tmp = elem = elem || document;
4929
+
4930
+ // Don't do events on text and comment nodes
4931
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
4932
+ return;
4933
+ }
4934
+
4935
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
4936
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
4937
+ return;
4938
+ }
4939
+
4940
+ if ( type.indexOf(".") >= 0 ) {
4941
+ // Namespaced trigger; create a regexp to match event type in handle()
4942
+ namespaces = type.split(".");
4943
+ type = namespaces.shift();
4944
+ namespaces.sort();
4945
+ }
4946
+ ontype = type.indexOf(":") < 0 && "on" + type;
4947
+
4948
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
4949
+ event = event[ jQuery.expando ] ?
4950
+ event :
4951
+ new jQuery.Event( type, typeof event === "object" && event );
4952
+
4953
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
4954
+ event.isTrigger = onlyHandlers ? 2 : 3;
4955
+ event.namespace = namespaces.join(".");
4956
+ event.namespace_re = event.namespace ?
4957
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
4958
+ null;
4959
+
4960
+ // Clean up the event in case it is being reused
4961
+ event.result = undefined;
4962
+ if ( !event.target ) {
4963
+ event.target = elem;
4964
+ }
4965
+
4966
+ // Clone any incoming data and prepend the event, creating the handler arg list
4967
+ data = data == null ?
4968
+ [ event ] :
4969
+ jQuery.makeArray( data, [ event ] );
4970
+
4971
+ // Allow special events to draw outside the lines
4972
+ special = jQuery.event.special[ type ] || {};
4973
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
4974
+ return;
4975
+ }
4976
+
4977
+ // Determine event propagation path in advance, per W3C events spec (#9951)
4978
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
4979
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
4980
+
4981
+ bubbleType = special.delegateType || type;
4982
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
4983
+ cur = cur.parentNode;
4984
+ }
4985
+ for ( ; cur; cur = cur.parentNode ) {
4986
+ eventPath.push( cur );
4987
+ tmp = cur;
4988
+ }
4989
+
4990
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
4991
+ if ( tmp === (elem.ownerDocument || document) ) {
4992
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
4993
+ }
4994
+ }
4995
+
4996
+ // Fire handlers on the event path
4997
+ i = 0;
4998
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
4999
+
5000
+ event.type = i > 1 ?
5001
+ bubbleType :
5002
+ special.bindType || type;
5003
+
5004
+ // jQuery handler
5005
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
5006
+ if ( handle ) {
5007
+ handle.apply( cur, data );
5008
+ }
5009
+
5010
+ // Native handler
5011
+ handle = ontype && cur[ ontype ];
5012
+ if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
5013
+ event.preventDefault();
5014
+ }
5015
+ }
5016
+ event.type = type;
5017
+
5018
+ // If nobody prevented the default action, do it now
5019
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
5020
+
5021
+ if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
5022
+ jQuery.acceptData( elem ) ) {
5023
+
5024
+ // Call a native DOM method on the target with the same name name as the event.
5025
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
5026
+ // Don't do default actions on window, that's where global variables be (#6170)
5027
+ if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
5028
+
5029
+ // Don't re-trigger an onFOO event when we call its FOO() method
5030
+ tmp = elem[ ontype ];
5031
+
5032
+ if ( tmp ) {
5033
+ elem[ ontype ] = null;
5034
+ }
5035
+
5036
+ // Prevent re-triggering of the same event, since we already bubbled it above
5037
+ jQuery.event.triggered = type;
5038
+ try {
5039
+ elem[ type ]();
5040
+ } catch ( e ) {
5041
+ // IE<9 dies on focus/blur to hidden element (#1486,#12518)
5042
+ // only reproducible on winXP IE8 native, not IE9 in IE8 mode
5043
+ }
5044
+ jQuery.event.triggered = undefined;
5045
+
5046
+ if ( tmp ) {
5047
+ elem[ ontype ] = tmp;
5048
+ }
5049
+ }
5050
+ }
5051
+ }
5052
+
5053
+ return event.result;
5054
+ },
5055
+
5056
+ dispatch: function( event ) {
5057
+
5058
+ // Make a writable jQuery.Event from the native event object
5059
+ event = jQuery.event.fix( event );
5060
+
5061
+ var i, ret, handleObj, matched, j,
5062
+ handlerQueue = [],
5063
+ args = core_slice.call( arguments ),
5064
+ handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
5065
+ special = jQuery.event.special[ event.type ] || {};
5066
+
5067
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
5068
+ args[0] = event;
5069
+ event.delegateTarget = this;
5070
+
5071
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
5072
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
5073
+ return;
5074
+ }
5075
+
5076
+ // Determine handlers
5077
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
5078
+
5079
+ // Run delegates first; they may want to stop propagation beneath us
5080
+ i = 0;
5081
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
5082
+ event.currentTarget = matched.elem;
5083
+
5084
+ j = 0;
5085
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
5086
+
5087
+ // Triggered event must either 1) have no namespace, or
5088
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
5089
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
5090
+
5091
+ event.handleObj = handleObj;
5092
+ event.data = handleObj.data;
5093
+
5094
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
5095
+ .apply( matched.elem, args );
5096
+
5097
+ if ( ret !== undefined ) {
5098
+ if ( (event.result = ret) === false ) {
5099
+ event.preventDefault();
5100
+ event.stopPropagation();
5101
+ }
5102
+ }
5103
+ }
5104
+ }
5105
+ }
5106
+
5107
+ // Call the postDispatch hook for the mapped type
5108
+ if ( special.postDispatch ) {
5109
+ special.postDispatch.call( this, event );
5110
+ }
5111
+
5112
+ return event.result;
5113
+ },
5114
+
5115
+ handlers: function( event, handlers ) {
5116
+ var sel, handleObj, matches, i,
5117
+ handlerQueue = [],
5118
+ delegateCount = handlers.delegateCount,
5119
+ cur = event.target;
5120
+
5121
+ // Find delegate handlers
5122
+ // Black-hole SVG <use> instance trees (#13180)
5123
+ // Avoid non-left-click bubbling in Firefox (#3861)
5124
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
5125
+
5126
+ /* jshint eqeqeq: false */
5127
+ for ( ; cur != this; cur = cur.parentNode || this ) {
5128
+ /* jshint eqeqeq: true */
5129
+
5130
+ // Don't check non-elements (#13208)
5131
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
5132
+ if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
5133
+ matches = [];
5134
+ for ( i = 0; i < delegateCount; i++ ) {
5135
+ handleObj = handlers[ i ];
5136
+
5137
+ // Don't conflict with Object.prototype properties (#13203)
5138
+ sel = handleObj.selector + " ";
5139
+
5140
+ if ( matches[ sel ] === undefined ) {
5141
+ matches[ sel ] = handleObj.needsContext ?
5142
+ jQuery( sel, this ).index( cur ) >= 0 :
5143
+ jQuery.find( sel, this, null, [ cur ] ).length;
5144
+ }
5145
+ if ( matches[ sel ] ) {
5146
+ matches.push( handleObj );
5147
+ }
5148
+ }
5149
+ if ( matches.length ) {
5150
+ handlerQueue.push({ elem: cur, handlers: matches });
5151
+ }
5152
+ }
5153
+ }
5154
+ }
5155
+
5156
+ // Add the remaining (directly-bound) handlers
5157
+ if ( delegateCount < handlers.length ) {
5158
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
5159
+ }
5160
+
5161
+ return handlerQueue;
5162
+ },
5163
+
5164
+ fix: function( event ) {
5165
+ if ( event[ jQuery.expando ] ) {
5166
+ return event;
5167
+ }
5168
+
5169
+ // Create a writable copy of the event object and normalize some properties
5170
+ var i, prop, copy,
5171
+ type = event.type,
5172
+ originalEvent = event,
5173
+ fixHook = this.fixHooks[ type ];
5174
+
5175
+ if ( !fixHook ) {
5176
+ this.fixHooks[ type ] = fixHook =
5177
+ rmouseEvent.test( type ) ? this.mouseHooks :
5178
+ rkeyEvent.test( type ) ? this.keyHooks :
5179
+ {};
5180
+ }
5181
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
5182
+
5183
+ event = new jQuery.Event( originalEvent );
5184
+
5185
+ i = copy.length;
5186
+ while ( i-- ) {
5187
+ prop = copy[ i ];
5188
+ event[ prop ] = originalEvent[ prop ];
5189
+ }
5190
+
5191
+ // Support: IE<9
5192
+ // Fix target property (#1925)
5193
+ if ( !event.target ) {
5194
+ event.target = originalEvent.srcElement || document;
5195
+ }
5196
+
5197
+ // Support: Chrome 23+, Safari?
5198
+ // Target should not be a text node (#504, #13143)
5199
+ if ( event.target.nodeType === 3 ) {
5200
+ event.target = event.target.parentNode;
5201
+ }
5202
+
5203
+ // Support: IE<9
5204
+ // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
5205
+ event.metaKey = !!event.metaKey;
5206
+
5207
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
5208
+ },
5209
+
5210
+ // Includes some event props shared by KeyEvent and MouseEvent
5211
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
5212
+
5213
+ fixHooks: {},
5214
+
5215
+ keyHooks: {
5216
+ props: "char charCode key keyCode".split(" "),
5217
+ filter: function( event, original ) {
5218
+
5219
+ // Add which for key events
5220
+ if ( event.which == null ) {
5221
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
5222
+ }
5223
+
5224
+ return event;
5225
+ }
5226
+ },
5227
+
5228
+ mouseHooks: {
5229
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
5230
+ filter: function( event, original ) {
5231
+ var body, eventDoc, doc,
5232
+ button = original.button,
5233
+ fromElement = original.fromElement;
5234
+
5235
+ // Calculate pageX/Y if missing and clientX/Y available
5236
+ if ( event.pageX == null && original.clientX != null ) {
5237
+ eventDoc = event.target.ownerDocument || document;
5238
+ doc = eventDoc.documentElement;
5239
+ body = eventDoc.body;
5240
+
5241
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
5242
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
5243
+ }
5244
+
5245
+ // Add relatedTarget, if necessary
5246
+ if ( !event.relatedTarget && fromElement ) {
5247
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
5248
+ }
5249
+
5250
+ // Add which for click: 1 === left; 2 === middle; 3 === right
5251
+ // Note: button is not normalized, so don't use it
5252
+ if ( !event.which && button !== undefined ) {
5253
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
5254
+ }
5255
+
5256
+ return event;
5257
+ }
5258
+ },
5259
+
5260
+ special: {
5261
+ load: {
5262
+ // Prevent triggered image.load events from bubbling to window.load
5263
+ noBubble: true
5264
+ },
5265
+ focus: {
5266
+ // Fire native event if possible so blur/focus sequence is correct
5267
+ trigger: function() {
5268
+ if ( this !== safeActiveElement() && this.focus ) {
5269
+ try {
5270
+ this.focus();
5271
+ return false;
5272
+ } catch ( e ) {
5273
+ // Support: IE<9
5274
+ // If we error on focus to hidden element (#1486, #12518),
5275
+ // let .trigger() run the handlers
5276
+ }
5277
+ }
5278
+ },
5279
+ delegateType: "focusin"
5280
+ },
5281
+ blur: {
5282
+ trigger: function() {
5283
+ if ( this === safeActiveElement() && this.blur ) {
5284
+ this.blur();
5285
+ return false;
5286
+ }
5287
+ },
5288
+ delegateType: "focusout"
5289
+ },
5290
+ click: {
5291
+ // For checkbox, fire native event so checked state will be right
5292
+ trigger: function() {
5293
+ if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
5294
+ this.click();
5295
+ return false;
5296
+ }
5297
+ },
5298
+
5299
+ // For cross-browser consistency, don't fire native .click() on links
5300
+ _default: function( event ) {
5301
+ return jQuery.nodeName( event.target, "a" );
5302
+ }
5303
+ },
5304
+
5305
+ beforeunload: {
5306
+ postDispatch: function( event ) {
5307
+
5308
+ // Even when returnValue equals to undefined Firefox will still show alert
5309
+ if ( event.result !== undefined ) {
5310
+ event.originalEvent.returnValue = event.result;
5311
+ }
5312
+ }
5313
+ }
5314
+ },
5315
+
5316
+ simulate: function( type, elem, event, bubble ) {
5317
+ // Piggyback on a donor event to simulate a different one.
5318
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
5319
+ // simulated event prevents default then we do the same on the donor.
5320
+ var e = jQuery.extend(
5321
+ new jQuery.Event(),
5322
+ event,
5323
+ {
5324
+ type: type,
5325
+ isSimulated: true,
5326
+ originalEvent: {}
5327
+ }
5328
+ );
5329
+ if ( bubble ) {
5330
+ jQuery.event.trigger( e, null, elem );
5331
+ } else {
5332
+ jQuery.event.dispatch.call( elem, e );
5333
+ }
5334
+ if ( e.isDefaultPrevented() ) {
5335
+ event.preventDefault();
5336
+ }
5337
+ }
5338
+ };
5339
+
5340
+ jQuery.removeEvent = document.removeEventListener ?
5341
+ function( elem, type, handle ) {
5342
+ if ( elem.removeEventListener ) {
5343
+ elem.removeEventListener( type, handle, false );
5344
+ }
5345
+ } :
5346
+ function( elem, type, handle ) {
5347
+ var name = "on" + type;
5348
+
5349
+ if ( elem.detachEvent ) {
5350
+
5351
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
5352
+ // detachEvent needed property on element, by name of that event, to properly expose it to GC
5353
+ if ( typeof elem[ name ] === core_strundefined ) {
5354
+ elem[ name ] = null;
5355
+ }
5356
+
5357
+ elem.detachEvent( name, handle );
5358
+ }
5359
+ };
5360
+
5361
+ jQuery.Event = function( src, props ) {
5362
+ // Allow instantiation without the 'new' keyword
5363
+ if ( !(this instanceof jQuery.Event) ) {
5364
+ return new jQuery.Event( src, props );
5365
+ }
5366
+
5367
+ // Event object
5368
+ if ( src && src.type ) {
5369
+ this.originalEvent = src;
5370
+ this.type = src.type;
5371
+
5372
+ // Events bubbling up the document may have been marked as prevented
5373
+ // by a handler lower down the tree; reflect the correct value.
5374
+ this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
5375
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
5376
+
5377
+ // Event type
5378
+ } else {
5379
+ this.type = src;
5380
+ }
5381
+
5382
+ // Put explicitly provided properties onto the event object
5383
+ if ( props ) {
5384
+ jQuery.extend( this, props );
5385
+ }
5386
+
5387
+ // Create a timestamp if incoming event doesn't have one
5388
+ this.timeStamp = src && src.timeStamp || jQuery.now();
5389
+
5390
+ // Mark it as fixed
5391
+ this[ jQuery.expando ] = true;
5392
+ };
5393
+
5394
+ // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
5395
+ // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
5396
+ jQuery.Event.prototype = {
5397
+ isDefaultPrevented: returnFalse,
5398
+ isPropagationStopped: returnFalse,
5399
+ isImmediatePropagationStopped: returnFalse,
5400
+
5401
+ preventDefault: function() {
5402
+ var e = this.originalEvent;
5403
+
5404
+ this.isDefaultPrevented = returnTrue;
5405
+ if ( !e ) {
5406
+ return;
5407
+ }
5408
+
5409
+ // If preventDefault exists, run it on the original event
5410
+ if ( e.preventDefault ) {
5411
+ e.preventDefault();
5412
+
5413
+ // Support: IE
5414
+ // Otherwise set the returnValue property of the original event to false
5415
+ } else {
5416
+ e.returnValue = false;
5417
+ }
5418
+ },
5419
+ stopPropagation: function() {
5420
+ var e = this.originalEvent;
5421
+
5422
+ this.isPropagationStopped = returnTrue;
5423
+ if ( !e ) {
5424
+ return;
5425
+ }
5426
+ // If stopPropagation exists, run it on the original event
5427
+ if ( e.stopPropagation ) {
5428
+ e.stopPropagation();
5429
+ }
5430
+
5431
+ // Support: IE
5432
+ // Set the cancelBubble property of the original event to true
5433
+ e.cancelBubble = true;
5434
+ },
5435
+ stopImmediatePropagation: function() {
5436
+ this.isImmediatePropagationStopped = returnTrue;
5437
+ this.stopPropagation();
5438
+ }
5439
+ };
5440
+
5441
+ // Create mouseenter/leave events using mouseover/out and event-time checks
5442
+ jQuery.each({
5443
+ mouseenter: "mouseover",
5444
+ mouseleave: "mouseout"
5445
+ }, function( orig, fix ) {
5446
+ jQuery.event.special[ orig ] = {
5447
+ delegateType: fix,
5448
+ bindType: fix,
5449
+
5450
+ handle: function( event ) {
5451
+ var ret,
5452
+ target = this,
5453
+ related = event.relatedTarget,
5454
+ handleObj = event.handleObj;
5455
+
5456
+ // For mousenter/leave call the handler if related is outside the target.
5457
+ // NB: No relatedTarget if the mouse left/entered the browser window
5458
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
5459
+ event.type = handleObj.origType;
5460
+ ret = handleObj.handler.apply( this, arguments );
5461
+ event.type = fix;
5462
+ }
5463
+ return ret;
5464
+ }
5465
+ };
5466
+ });
5467
+
5468
+ // IE submit delegation
5469
+ if ( !jQuery.support.submitBubbles ) {
5470
+
5471
+ jQuery.event.special.submit = {
5472
+ setup: function() {
5473
+ // Only need this for delegated form submit events
5474
+ if ( jQuery.nodeName( this, "form" ) ) {
5475
+ return false;
5476
+ }
5477
+
5478
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
5479
+ jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
5480
+ // Node name check avoids a VML-related crash in IE (#9807)
5481
+ var elem = e.target,
5482
+ form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
5483
+ if ( form && !jQuery._data( form, "submitBubbles" ) ) {
5484
+ jQuery.event.add( form, "submit._submit", function( event ) {
5485
+ event._submit_bubble = true;
5486
+ });
5487
+ jQuery._data( form, "submitBubbles", true );
5488
+ }
5489
+ });
5490
+ // return undefined since we don't need an event listener
5491
+ },
5492
+
5493
+ postDispatch: function( event ) {
5494
+ // If form was submitted by the user, bubble the event up the tree
5495
+ if ( event._submit_bubble ) {
5496
+ delete event._submit_bubble;
5497
+ if ( this.parentNode && !event.isTrigger ) {
5498
+ jQuery.event.simulate( "submit", this.parentNode, event, true );
5499
+ }
5500
+ }
5501
+ },
5502
+
5503
+ teardown: function() {
5504
+ // Only need this for delegated form submit events
5505
+ if ( jQuery.nodeName( this, "form" ) ) {
5506
+ return false;
5507
+ }
5508
+
5509
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
5510
+ jQuery.event.remove( this, "._submit" );
5511
+ }
5512
+ };
5513
+ }
5514
+
5515
+ // IE change delegation and checkbox/radio fix
5516
+ if ( !jQuery.support.changeBubbles ) {
5517
+
5518
+ jQuery.event.special.change = {
5519
+
5520
+ setup: function() {
5521
+
5522
+ if ( rformElems.test( this.nodeName ) ) {
5523
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
5524
+ // after a propertychange. Eat the blur-change in special.change.handle.
5525
+ // This still fires onchange a second time for check/radio after blur.
5526
+ if ( this.type === "checkbox" || this.type === "radio" ) {
5527
+ jQuery.event.add( this, "propertychange._change", function( event ) {
5528
+ if ( event.originalEvent.propertyName === "checked" ) {
5529
+ this._just_changed = true;
5530
+ }
5531
+ });
5532
+ jQuery.event.add( this, "click._change", function( event ) {
5533
+ if ( this._just_changed && !event.isTrigger ) {
5534
+ this._just_changed = false;
5535
+ }
5536
+ // Allow triggered, simulated change events (#11500)
5537
+ jQuery.event.simulate( "change", this, event, true );
5538
+ });
5539
+ }
5540
+ return false;
5541
+ }
5542
+ // Delegated event; lazy-add a change handler on descendant inputs
5543
+ jQuery.event.add( this, "beforeactivate._change", function( e ) {
5544
+ var elem = e.target;
5545
+
5546
+ if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
5547
+ jQuery.event.add( elem, "change._change", function( event ) {
5548
+ if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
5549
+ jQuery.event.simulate( "change", this.parentNode, event, true );
5550
+ }
5551
+ });
5552
+ jQuery._data( elem, "changeBubbles", true );
5553
+ }
5554
+ });
5555
+ },
5556
+
5557
+ handle: function( event ) {
5558
+ var elem = event.target;
5559
+
5560
+ // Swallow native change events from checkbox/radio, we already triggered them above
5561
+ if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
5562
+ return event.handleObj.handler.apply( this, arguments );
5563
+ }
5564
+ },
5565
+
5566
+ teardown: function() {
5567
+ jQuery.event.remove( this, "._change" );
5568
+
5569
+ return !rformElems.test( this.nodeName );
5570
+ }
5571
+ };
5572
+ }
5573
+
5574
+ // Create "bubbling" focus and blur events
5575
+ if ( !jQuery.support.focusinBubbles ) {
5576
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
5577
+
5578
+ // Attach a single capturing handler while someone wants focusin/focusout
5579
+ var attaches = 0,
5580
+ handler = function( event ) {
5581
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
5582
+ };
5583
+
5584
+ jQuery.event.special[ fix ] = {
5585
+ setup: function() {
5586
+ if ( attaches++ === 0 ) {
5587
+ document.addEventListener( orig, handler, true );
5588
+ }
5589
+ },
5590
+ teardown: function() {
5591
+ if ( --attaches === 0 ) {
5592
+ document.removeEventListener( orig, handler, true );
5593
+ }
5594
+ }
5595
+ };
5596
+ });
5597
+ }
5598
+
5599
+ jQuery.fn.extend({
5600
+
5601
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
5602
+ var type, origFn;
5603
+
5604
+ // Types can be a map of types/handlers
5605
+ if ( typeof types === "object" ) {
5606
+ // ( types-Object, selector, data )
5607
+ if ( typeof selector !== "string" ) {
5608
+ // ( types-Object, data )
5609
+ data = data || selector;
5610
+ selector = undefined;
5611
+ }
5612
+ for ( type in types ) {
5613
+ this.on( type, selector, data, types[ type ], one );
5614
+ }
5615
+ return this;
5616
+ }
5617
+
5618
+ if ( data == null && fn == null ) {
5619
+ // ( types, fn )
5620
+ fn = selector;
5621
+ data = selector = undefined;
5622
+ } else if ( fn == null ) {
5623
+ if ( typeof selector === "string" ) {
5624
+ // ( types, selector, fn )
5625
+ fn = data;
5626
+ data = undefined;
5627
+ } else {
5628
+ // ( types, data, fn )
5629
+ fn = data;
5630
+ data = selector;
5631
+ selector = undefined;
5632
+ }
5633
+ }
5634
+ if ( fn === false ) {
5635
+ fn = returnFalse;
5636
+ } else if ( !fn ) {
5637
+ return this;
5638
+ }
5639
+
5640
+ if ( one === 1 ) {
5641
+ origFn = fn;
5642
+ fn = function( event ) {
5643
+ // Can use an empty set, since event contains the info
5644
+ jQuery().off( event );
5645
+ return origFn.apply( this, arguments );
5646
+ };
5647
+ // Use same guid so caller can remove using origFn
5648
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
5649
+ }
5650
+ return this.each( function() {
5651
+ jQuery.event.add( this, types, fn, data, selector );
5652
+ });
5653
+ },
5654
+ one: function( types, selector, data, fn ) {
5655
+ return this.on( types, selector, data, fn, 1 );
5656
+ },
5657
+ off: function( types, selector, fn ) {
5658
+ var handleObj, type;
5659
+ if ( types && types.preventDefault && types.handleObj ) {
5660
+ // ( event ) dispatched jQuery.Event
5661
+ handleObj = types.handleObj;
5662
+ jQuery( types.delegateTarget ).off(
5663
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
5664
+ handleObj.selector,
5665
+ handleObj.handler
5666
+ );
5667
+ return this;
5668
+ }
5669
+ if ( typeof types === "object" ) {
5670
+ // ( types-object [, selector] )
5671
+ for ( type in types ) {
5672
+ this.off( type, selector, types[ type ] );
5673
+ }
5674
+ return this;
5675
+ }
5676
+ if ( selector === false || typeof selector === "function" ) {
5677
+ // ( types [, fn] )
5678
+ fn = selector;
5679
+ selector = undefined;
5680
+ }
5681
+ if ( fn === false ) {
5682
+ fn = returnFalse;
5683
+ }
5684
+ return this.each(function() {
5685
+ jQuery.event.remove( this, types, fn, selector );
5686
+ });
5687
+ },
5688
+
5689
+ trigger: function( type, data ) {
5690
+ return this.each(function() {
5691
+ jQuery.event.trigger( type, data, this );
5692
+ });
5693
+ },
5694
+ triggerHandler: function( type, data ) {
5695
+ var elem = this[0];
5696
+ if ( elem ) {
5697
+ return jQuery.event.trigger( type, data, elem, true );
5698
+ }
5699
+ }
5700
+ });
5701
+ var isSimple = /^.[^:#\[\.,]*$/,
5702
+ rparentsprev = /^(?:parents|prev(?:Until|All))/,
5703
+ rneedsContext = jQuery.expr.match.needsContext,
5704
+ // methods guaranteed to produce a unique set when starting from a unique set
5705
+ guaranteedUnique = {
5706
+ children: true,
5707
+ contents: true,
5708
+ next: true,
5709
+ prev: true
5710
+ };
5711
+
5712
+ jQuery.fn.extend({
5713
+ find: function( selector ) {
5714
+ var i,
5715
+ ret = [],
5716
+ self = this,
5717
+ len = self.length;
5718
+
5719
+ if ( typeof selector !== "string" ) {
5720
+ return this.pushStack( jQuery( selector ).filter(function() {
5721
+ for ( i = 0; i < len; i++ ) {
5722
+ if ( jQuery.contains( self[ i ], this ) ) {
5723
+ return true;
5724
+ }
5725
+ }
5726
+ }) );
5727
+ }
5728
+
5729
+ for ( i = 0; i < len; i++ ) {
5730
+ jQuery.find( selector, self[ i ], ret );
5731
+ }
5732
+
5733
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
5734
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
5735
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
5736
+ return ret;
5737
+ },
5738
+
5739
+ has: function( target ) {
5740
+ var i,
5741
+ targets = jQuery( target, this ),
5742
+ len = targets.length;
5743
+
5744
+ return this.filter(function() {
5745
+ for ( i = 0; i < len; i++ ) {
5746
+ if ( jQuery.contains( this, targets[i] ) ) {
5747
+ return true;
5748
+ }
5749
+ }
5750
+ });
5751
+ },
5752
+
5753
+ not: function( selector ) {
5754
+ return this.pushStack( winnow(this, selector || [], true) );
5755
+ },
5756
+
5757
+ filter: function( selector ) {
5758
+ return this.pushStack( winnow(this, selector || [], false) );
5759
+ },
5760
+
5761
+ is: function( selector ) {
5762
+ return !!winnow(
5763
+ this,
5764
+
5765
+ // If this is a positional/relative selector, check membership in the returned set
5766
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
5767
+ typeof selector === "string" && rneedsContext.test( selector ) ?
5768
+ jQuery( selector ) :
5769
+ selector || [],
5770
+ false
5771
+ ).length;
5772
+ },
5773
+
5774
+ closest: function( selectors, context ) {
5775
+ var cur,
5776
+ i = 0,
5777
+ l = this.length,
5778
+ ret = [],
5779
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
5780
+ jQuery( selectors, context || this.context ) :
5781
+ 0;
5782
+
5783
+ for ( ; i < l; i++ ) {
5784
+ for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
5785
+ // Always skip document fragments
5786
+ if ( cur.nodeType < 11 && (pos ?
5787
+ pos.index(cur) > -1 :
5788
+
5789
+ // Don't pass non-elements to Sizzle
5790
+ cur.nodeType === 1 &&
5791
+ jQuery.find.matchesSelector(cur, selectors)) ) {
5792
+
5793
+ cur = ret.push( cur );
5794
+ break;
5795
+ }
5796
+ }
5797
+ }
5798
+
5799
+ return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
5800
+ },
5801
+
5802
+ // Determine the position of an element within
5803
+ // the matched set of elements
5804
+ index: function( elem ) {
5805
+
5806
+ // No argument, return index in parent
5807
+ if ( !elem ) {
5808
+ return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
5809
+ }
5810
+
5811
+ // index in selector
5812
+ if ( typeof elem === "string" ) {
5813
+ return jQuery.inArray( this[0], jQuery( elem ) );
5814
+ }
5815
+
5816
+ // Locate the position of the desired element
5817
+ return jQuery.inArray(
5818
+ // If it receives a jQuery object, the first element is used
5819
+ elem.jquery ? elem[0] : elem, this );
5820
+ },
5821
+
5822
+ add: function( selector, context ) {
5823
+ var set = typeof selector === "string" ?
5824
+ jQuery( selector, context ) :
5825
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
5826
+ all = jQuery.merge( this.get(), set );
5827
+
5828
+ return this.pushStack( jQuery.unique(all) );
5829
+ },
5830
+
5831
+ addBack: function( selector ) {
5832
+ return this.add( selector == null ?
5833
+ this.prevObject : this.prevObject.filter(selector)
5834
+ );
5835
+ }
5836
+ });
5837
+
5838
+ function sibling( cur, dir ) {
5839
+ do {
5840
+ cur = cur[ dir ];
5841
+ } while ( cur && cur.nodeType !== 1 );
5842
+
5843
+ return cur;
5844
+ }
5845
+
5846
+ jQuery.each({
5847
+ parent: function( elem ) {
5848
+ var parent = elem.parentNode;
5849
+ return parent && parent.nodeType !== 11 ? parent : null;
5850
+ },
5851
+ parents: function( elem ) {
5852
+ return jQuery.dir( elem, "parentNode" );
5853
+ },
5854
+ parentsUntil: function( elem, i, until ) {
5855
+ return jQuery.dir( elem, "parentNode", until );
5856
+ },
5857
+ next: function( elem ) {
5858
+ return sibling( elem, "nextSibling" );
5859
+ },
5860
+ prev: function( elem ) {
5861
+ return sibling( elem, "previousSibling" );
5862
+ },
5863
+ nextAll: function( elem ) {
5864
+ return jQuery.dir( elem, "nextSibling" );
5865
+ },
5866
+ prevAll: function( elem ) {
5867
+ return jQuery.dir( elem, "previousSibling" );
5868
+ },
5869
+ nextUntil: function( elem, i, until ) {
5870
+ return jQuery.dir( elem, "nextSibling", until );
5871
+ },
5872
+ prevUntil: function( elem, i, until ) {
5873
+ return jQuery.dir( elem, "previousSibling", until );
5874
+ },
5875
+ siblings: function( elem ) {
5876
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
5877
+ },
5878
+ children: function( elem ) {
5879
+ return jQuery.sibling( elem.firstChild );
5880
+ },
5881
+ contents: function( elem ) {
5882
+ return jQuery.nodeName( elem, "iframe" ) ?
5883
+ elem.contentDocument || elem.contentWindow.document :
5884
+ jQuery.merge( [], elem.childNodes );
5885
+ }
5886
+ }, function( name, fn ) {
5887
+ jQuery.fn[ name ] = function( until, selector ) {
5888
+ var ret = jQuery.map( this, fn, until );
5889
+
5890
+ if ( name.slice( -5 ) !== "Until" ) {
5891
+ selector = until;
5892
+ }
5893
+
5894
+ if ( selector && typeof selector === "string" ) {
5895
+ ret = jQuery.filter( selector, ret );
5896
+ }
5897
+
5898
+ if ( this.length > 1 ) {
5899
+ // Remove duplicates
5900
+ if ( !guaranteedUnique[ name ] ) {
5901
+ ret = jQuery.unique( ret );
5902
+ }
5903
+
5904
+ // Reverse order for parents* and prev-derivatives
5905
+ if ( rparentsprev.test( name ) ) {
5906
+ ret = ret.reverse();
5907
+ }
5908
+ }
5909
+
5910
+ return this.pushStack( ret );
5911
+ };
5912
+ });
5913
+
5914
+ jQuery.extend({
5915
+ filter: function( expr, elems, not ) {
5916
+ var elem = elems[ 0 ];
5917
+
5918
+ if ( not ) {
5919
+ expr = ":not(" + expr + ")";
5920
+ }
5921
+
5922
+ return elems.length === 1 && elem.nodeType === 1 ?
5923
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
5924
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
5925
+ return elem.nodeType === 1;
5926
+ }));
5927
+ },
5928
+
5929
+ dir: function( elem, dir, until ) {
5930
+ var matched = [],
5931
+ cur = elem[ dir ];
5932
+
5933
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
5934
+ if ( cur.nodeType === 1 ) {
5935
+ matched.push( cur );
5936
+ }
5937
+ cur = cur[dir];
5938
+ }
5939
+ return matched;
5940
+ },
5941
+
5942
+ sibling: function( n, elem ) {
5943
+ var r = [];
5944
+
5945
+ for ( ; n; n = n.nextSibling ) {
5946
+ if ( n.nodeType === 1 && n !== elem ) {
5947
+ r.push( n );
5948
+ }
5949
+ }
5950
+
5951
+ return r;
5952
+ }
5953
+ });
5954
+
5955
+ // Implement the identical functionality for filter and not
5956
+ function winnow( elements, qualifier, not ) {
5957
+ if ( jQuery.isFunction( qualifier ) ) {
5958
+ return jQuery.grep( elements, function( elem, i ) {
5959
+ /* jshint -W018 */
5960
+ return !!qualifier.call( elem, i, elem ) !== not;
5961
+ });
5962
+
5963
+ }
5964
+
5965
+ if ( qualifier.nodeType ) {
5966
+ return jQuery.grep( elements, function( elem ) {
5967
+ return ( elem === qualifier ) !== not;
5968
+ });
5969
+
5970
+ }
5971
+
5972
+ if ( typeof qualifier === "string" ) {
5973
+ if ( isSimple.test( qualifier ) ) {
5974
+ return jQuery.filter( qualifier, elements, not );
5975
+ }
5976
+
5977
+ qualifier = jQuery.filter( qualifier, elements );
5978
+ }
5979
+
5980
+ return jQuery.grep( elements, function( elem ) {
5981
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
5982
+ });
5983
+ }
5984
+ function createSafeFragment( document ) {
5985
+ var list = nodeNames.split( "|" ),
5986
+ safeFrag = document.createDocumentFragment();
5987
+
5988
+ if ( safeFrag.createElement ) {
5989
+ while ( list.length ) {
5990
+ safeFrag.createElement(
5991
+ list.pop()
5992
+ );
5993
+ }
5994
+ }
5995
+ return safeFrag;
5996
+ }
5997
+
5998
+ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
5999
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
6000
+ rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
6001
+ rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
6002
+ rleadingWhitespace = /^\s+/,
6003
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
6004
+ rtagName = /<([\w:]+)/,
6005
+ rtbody = /<tbody/i,
6006
+ rhtml = /<|&#?\w+;/,
6007
+ rnoInnerhtml = /<(?:script|style|link)/i,
6008
+ manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
6009
+ // checked="checked" or checked
6010
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
6011
+ rscriptType = /^$|\/(?:java|ecma)script/i,
6012
+ rscriptTypeMasked = /^true\/(.*)/,
6013
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
6014
+
6015
+ // We have to close these tags to support XHTML (#13200)
6016
+ wrapMap = {
6017
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
6018
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
6019
+ area: [ 1, "<map>", "</map>" ],
6020
+ param: [ 1, "<object>", "</object>" ],
6021
+ thead: [ 1, "<table>", "</table>" ],
6022
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
6023
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
6024
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
6025
+
6026
+ // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
6027
+ // unless wrapped in a div with non-breaking characters in front of it.
6028
+ _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
6029
+ },
6030
+ safeFragment = createSafeFragment( document ),
6031
+ fragmentDiv = safeFragment.appendChild( document.createElement("div") );
6032
+
6033
+ wrapMap.optgroup = wrapMap.option;
6034
+ wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
6035
+ wrapMap.th = wrapMap.td;
6036
+
6037
+ jQuery.fn.extend({
6038
+ text: function( value ) {
6039
+ return jQuery.access( this, function( value ) {
6040
+ return value === undefined ?
6041
+ jQuery.text( this ) :
6042
+ this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
6043
+ }, null, value, arguments.length );
6044
+ },
6045
+
6046
+ append: function() {
6047
+ return this.domManip( arguments, function( elem ) {
6048
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6049
+ var target = manipulationTarget( this, elem );
6050
+ target.appendChild( elem );
6051
+ }
6052
+ });
6053
+ },
6054
+
6055
+ prepend: function() {
6056
+ return this.domManip( arguments, function( elem ) {
6057
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6058
+ var target = manipulationTarget( this, elem );
6059
+ target.insertBefore( elem, target.firstChild );
6060
+ }
6061
+ });
6062
+ },
6063
+
6064
+ before: function() {
6065
+ return this.domManip( arguments, function( elem ) {
6066
+ if ( this.parentNode ) {
6067
+ this.parentNode.insertBefore( elem, this );
6068
+ }
6069
+ });
6070
+ },
6071
+
6072
+ after: function() {
6073
+ return this.domManip( arguments, function( elem ) {
6074
+ if ( this.parentNode ) {
6075
+ this.parentNode.insertBefore( elem, this.nextSibling );
6076
+ }
6077
+ });
6078
+ },
6079
+
6080
+ // keepData is for internal use only--do not document
6081
+ remove: function( selector, keepData ) {
6082
+ var elem,
6083
+ elems = selector ? jQuery.filter( selector, this ) : this,
6084
+ i = 0;
6085
+
6086
+ for ( ; (elem = elems[i]) != null; i++ ) {
6087
+
6088
+ if ( !keepData && elem.nodeType === 1 ) {
6089
+ jQuery.cleanData( getAll( elem ) );
6090
+ }
6091
+
6092
+ if ( elem.parentNode ) {
6093
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
6094
+ setGlobalEval( getAll( elem, "script" ) );
6095
+ }
6096
+ elem.parentNode.removeChild( elem );
6097
+ }
6098
+ }
6099
+
6100
+ return this;
6101
+ },
6102
+
6103
+ empty: function() {
6104
+ var elem,
6105
+ i = 0;
6106
+
6107
+ for ( ; (elem = this[i]) != null; i++ ) {
6108
+ // Remove element nodes and prevent memory leaks
6109
+ if ( elem.nodeType === 1 ) {
6110
+ jQuery.cleanData( getAll( elem, false ) );
6111
+ }
6112
+
6113
+ // Remove any remaining nodes
6114
+ while ( elem.firstChild ) {
6115
+ elem.removeChild( elem.firstChild );
6116
+ }
6117
+
6118
+ // If this is a select, ensure that it displays empty (#12336)
6119
+ // Support: IE<9
6120
+ if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
6121
+ elem.options.length = 0;
6122
+ }
6123
+ }
6124
+
6125
+ return this;
6126
+ },
6127
+
6128
+ clone: function( dataAndEvents, deepDataAndEvents ) {
6129
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
6130
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
6131
+
6132
+ return this.map( function () {
6133
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
6134
+ });
6135
+ },
6136
+
6137
+ html: function( value ) {
6138
+ return jQuery.access( this, function( value ) {
6139
+ var elem = this[0] || {},
6140
+ i = 0,
6141
+ l = this.length;
6142
+
6143
+ if ( value === undefined ) {
6144
+ return elem.nodeType === 1 ?
6145
+ elem.innerHTML.replace( rinlinejQuery, "" ) :
6146
+ undefined;
6147
+ }
6148
+
6149
+ // See if we can take a shortcut and just use innerHTML
6150
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
6151
+ ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
6152
+ ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
6153
+ !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
6154
+
6155
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
6156
+
6157
+ try {
6158
+ for (; i < l; i++ ) {
6159
+ // Remove element nodes and prevent memory leaks
6160
+ elem = this[i] || {};
6161
+ if ( elem.nodeType === 1 ) {
6162
+ jQuery.cleanData( getAll( elem, false ) );
6163
+ elem.innerHTML = value;
6164
+ }
6165
+ }
6166
+
6167
+ elem = 0;
6168
+
6169
+ // If using innerHTML throws an exception, use the fallback method
6170
+ } catch(e) {}
6171
+ }
6172
+
6173
+ if ( elem ) {
6174
+ this.empty().append( value );
6175
+ }
6176
+ }, null, value, arguments.length );
6177
+ },
6178
+
6179
+ replaceWith: function() {
6180
+ var
6181
+ // Snapshot the DOM in case .domManip sweeps something relevant into its fragment
6182
+ args = jQuery.map( this, function( elem ) {
6183
+ return [ elem.nextSibling, elem.parentNode ];
6184
+ }),
6185
+ i = 0;
6186
+
6187
+ // Make the changes, replacing each context element with the new content
6188
+ this.domManip( arguments, function( elem ) {
6189
+ var next = args[ i++ ],
6190
+ parent = args[ i++ ];
6191
+
6192
+ if ( parent ) {
6193
+ // Don't use the snapshot next if it has moved (#13810)
6194
+ if ( next && next.parentNode !== parent ) {
6195
+ next = this.nextSibling;
6196
+ }
6197
+ jQuery( this ).remove();
6198
+ parent.insertBefore( elem, next );
6199
+ }
6200
+ // Allow new content to include elements from the context set
6201
+ }, true );
6202
+
6203
+ // Force removal if there was no new content (e.g., from empty arguments)
6204
+ return i ? this : this.remove();
6205
+ },
6206
+
6207
+ detach: function( selector ) {
6208
+ return this.remove( selector, true );
6209
+ },
6210
+
6211
+ domManip: function( args, callback, allowIntersection ) {
6212
+
6213
+ // Flatten any nested arrays
6214
+ args = core_concat.apply( [], args );
6215
+
6216
+ var first, node, hasScripts,
6217
+ scripts, doc, fragment,
6218
+ i = 0,
6219
+ l = this.length,
6220
+ set = this,
6221
+ iNoClone = l - 1,
6222
+ value = args[0],
6223
+ isFunction = jQuery.isFunction( value );
6224
+
6225
+ // We can't cloneNode fragments that contain checked, in WebKit
6226
+ if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
6227
+ return this.each(function( index ) {
6228
+ var self = set.eq( index );
6229
+ if ( isFunction ) {
6230
+ args[0] = value.call( this, index, self.html() );
6231
+ }
6232
+ self.domManip( args, callback, allowIntersection );
6233
+ });
6234
+ }
6235
+
6236
+ if ( l ) {
6237
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
6238
+ first = fragment.firstChild;
6239
+
6240
+ if ( fragment.childNodes.length === 1 ) {
6241
+ fragment = first;
6242
+ }
6243
+
6244
+ if ( first ) {
6245
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
6246
+ hasScripts = scripts.length;
6247
+
6248
+ // Use the original fragment for the last item instead of the first because it can end up
6249
+ // being emptied incorrectly in certain situations (#8070).
6250
+ for ( ; i < l; i++ ) {
6251
+ node = fragment;
6252
+
6253
+ if ( i !== iNoClone ) {
6254
+ node = jQuery.clone( node, true, true );
6255
+
6256
+ // Keep references to cloned scripts for later restoration
6257
+ if ( hasScripts ) {
6258
+ jQuery.merge( scripts, getAll( node, "script" ) );
6259
+ }
6260
+ }
6261
+
6262
+ callback.call( this[i], node, i );
6263
+ }
6264
+
6265
+ if ( hasScripts ) {
6266
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
6267
+
6268
+ // Reenable scripts
6269
+ jQuery.map( scripts, restoreScript );
6270
+
6271
+ // Evaluate executable scripts on first document insertion
6272
+ for ( i = 0; i < hasScripts; i++ ) {
6273
+ node = scripts[ i ];
6274
+ if ( rscriptType.test( node.type || "" ) &&
6275
+ !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
6276
+
6277
+ if ( node.src ) {
6278
+ // Hope ajax is available...
6279
+ jQuery._evalUrl( node.src );
6280
+ } else {
6281
+ jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
6282
+ }
6283
+ }
6284
+ }
6285
+ }
6286
+
6287
+ // Fix #11809: Avoid leaking memory
6288
+ fragment = first = null;
6289
+ }
6290
+ }
6291
+
6292
+ return this;
6293
+ }
6294
+ });
6295
+
6296
+ // Support: IE<8
6297
+ // Manipulating tables requires a tbody
6298
+ function manipulationTarget( elem, content ) {
6299
+ return jQuery.nodeName( elem, "table" ) &&
6300
+ jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
6301
+
6302
+ elem.getElementsByTagName("tbody")[0] ||
6303
+ elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
6304
+ elem;
6305
+ }
6306
+
6307
+ // Replace/restore the type attribute of script elements for safe DOM manipulation
6308
+ function disableScript( elem ) {
6309
+ elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
6310
+ return elem;
6311
+ }
6312
+ function restoreScript( elem ) {
6313
+ var match = rscriptTypeMasked.exec( elem.type );
6314
+ if ( match ) {
6315
+ elem.type = match[1];
6316
+ } else {
6317
+ elem.removeAttribute("type");
6318
+ }
6319
+ return elem;
6320
+ }
6321
+
6322
+ // Mark scripts as having already been evaluated
6323
+ function setGlobalEval( elems, refElements ) {
6324
+ var elem,
6325
+ i = 0;
6326
+ for ( ; (elem = elems[i]) != null; i++ ) {
6327
+ jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
6328
+ }
6329
+ }
6330
+
6331
+ function cloneCopyEvent( src, dest ) {
6332
+
6333
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
6334
+ return;
6335
+ }
6336
+
6337
+ var type, i, l,
6338
+ oldData = jQuery._data( src ),
6339
+ curData = jQuery._data( dest, oldData ),
6340
+ events = oldData.events;
6341
+
6342
+ if ( events ) {
6343
+ delete curData.handle;
6344
+ curData.events = {};
6345
+
6346
+ for ( type in events ) {
6347
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
6348
+ jQuery.event.add( dest, type, events[ type ][ i ] );
6349
+ }
6350
+ }
6351
+ }
6352
+
6353
+ // make the cloned public data object a copy from the original
6354
+ if ( curData.data ) {
6355
+ curData.data = jQuery.extend( {}, curData.data );
6356
+ }
6357
+ }
6358
+
6359
+ function fixCloneNodeIssues( src, dest ) {
6360
+ var nodeName, e, data;
6361
+
6362
+ // We do not need to do anything for non-Elements
6363
+ if ( dest.nodeType !== 1 ) {
6364
+ return;
6365
+ }
6366
+
6367
+ nodeName = dest.nodeName.toLowerCase();
6368
+
6369
+ // IE6-8 copies events bound via attachEvent when using cloneNode.
6370
+ if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
6371
+ data = jQuery._data( dest );
6372
+
6373
+ for ( e in data.events ) {
6374
+ jQuery.removeEvent( dest, e, data.handle );
6375
+ }
6376
+
6377
+ // Event data gets referenced instead of copied if the expando gets copied too
6378
+ dest.removeAttribute( jQuery.expando );
6379
+ }
6380
+
6381
+ // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
6382
+ if ( nodeName === "script" && dest.text !== src.text ) {
6383
+ disableScript( dest ).text = src.text;
6384
+ restoreScript( dest );
6385
+
6386
+ // IE6-10 improperly clones children of object elements using classid.
6387
+ // IE10 throws NoModificationAllowedError if parent is null, #12132.
6388
+ } else if ( nodeName === "object" ) {
6389
+ if ( dest.parentNode ) {
6390
+ dest.outerHTML = src.outerHTML;
6391
+ }
6392
+
6393
+ // This path appears unavoidable for IE9. When cloning an object
6394
+ // element in IE9, the outerHTML strategy above is not sufficient.
6395
+ // If the src has innerHTML and the destination does not,
6396
+ // copy the src.innerHTML into the dest.innerHTML. #10324
6397
+ if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
6398
+ dest.innerHTML = src.innerHTML;
6399
+ }
6400
+
6401
+ } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
6402
+ // IE6-8 fails to persist the checked state of a cloned checkbox
6403
+ // or radio button. Worse, IE6-7 fail to give the cloned element
6404
+ // a checked appearance if the defaultChecked value isn't also set
6405
+
6406
+ dest.defaultChecked = dest.checked = src.checked;
6407
+
6408
+ // IE6-7 get confused and end up setting the value of a cloned
6409
+ // checkbox/radio button to an empty string instead of "on"
6410
+ if ( dest.value !== src.value ) {
6411
+ dest.value = src.value;
6412
+ }
6413
+
6414
+ // IE6-8 fails to return the selected option to the default selected
6415
+ // state when cloning options
6416
+ } else if ( nodeName === "option" ) {
6417
+ dest.defaultSelected = dest.selected = src.defaultSelected;
6418
+
6419
+ // IE6-8 fails to set the defaultValue to the correct value when
6420
+ // cloning other types of input fields
6421
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
6422
+ dest.defaultValue = src.defaultValue;
6423
+ }
6424
+ }
6425
+
6426
+ jQuery.each({
6427
+ appendTo: "append",
6428
+ prependTo: "prepend",
6429
+ insertBefore: "before",
6430
+ insertAfter: "after",
6431
+ replaceAll: "replaceWith"
6432
+ }, function( name, original ) {
6433
+ jQuery.fn[ name ] = function( selector ) {
6434
+ var elems,
6435
+ i = 0,
6436
+ ret = [],
6437
+ insert = jQuery( selector ),
6438
+ last = insert.length - 1;
6439
+
6440
+ for ( ; i <= last; i++ ) {
6441
+ elems = i === last ? this : this.clone(true);
6442
+ jQuery( insert[i] )[ original ]( elems );
6443
+
6444
+ // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
6445
+ core_push.apply( ret, elems.get() );
6446
+ }
6447
+
6448
+ return this.pushStack( ret );
6449
+ };
6450
+ });
6451
+
6452
+ function getAll( context, tag ) {
6453
+ var elems, elem,
6454
+ i = 0,
6455
+ found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
6456
+ typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
6457
+ undefined;
6458
+
6459
+ if ( !found ) {
6460
+ for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
6461
+ if ( !tag || jQuery.nodeName( elem, tag ) ) {
6462
+ found.push( elem );
6463
+ } else {
6464
+ jQuery.merge( found, getAll( elem, tag ) );
6465
+ }
6466
+ }
6467
+ }
6468
+
6469
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
6470
+ jQuery.merge( [ context ], found ) :
6471
+ found;
6472
+ }
6473
+
6474
+ // Used in buildFragment, fixes the defaultChecked property
6475
+ function fixDefaultChecked( elem ) {
6476
+ if ( manipulation_rcheckableType.test( elem.type ) ) {
6477
+ elem.defaultChecked = elem.checked;
6478
+ }
6479
+ }
6480
+
6481
+ jQuery.extend({
6482
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
6483
+ var destElements, node, clone, i, srcElements,
6484
+ inPage = jQuery.contains( elem.ownerDocument, elem );
6485
+
6486
+ if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
6487
+ clone = elem.cloneNode( true );
6488
+
6489
+ // IE<=8 does not properly clone detached, unknown element nodes
6490
+ } else {
6491
+ fragmentDiv.innerHTML = elem.outerHTML;
6492
+ fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
6493
+ }
6494
+
6495
+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
6496
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
6497
+
6498
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
6499
+ destElements = getAll( clone );
6500
+ srcElements = getAll( elem );
6501
+
6502
+ // Fix all IE cloning issues
6503
+ for ( i = 0; (node = srcElements[i]) != null; ++i ) {
6504
+ // Ensure that the destination node is not null; Fixes #9587
6505
+ if ( destElements[i] ) {
6506
+ fixCloneNodeIssues( node, destElements[i] );
6507
+ }
6508
+ }
6509
+ }
6510
+
6511
+ // Copy the events from the original to the clone
6512
+ if ( dataAndEvents ) {
6513
+ if ( deepDataAndEvents ) {
6514
+ srcElements = srcElements || getAll( elem );
6515
+ destElements = destElements || getAll( clone );
6516
+
6517
+ for ( i = 0; (node = srcElements[i]) != null; i++ ) {
6518
+ cloneCopyEvent( node, destElements[i] );
6519
+ }
6520
+ } else {
6521
+ cloneCopyEvent( elem, clone );
6522
+ }
6523
+ }
6524
+
6525
+ // Preserve script evaluation history
6526
+ destElements = getAll( clone, "script" );
6527
+ if ( destElements.length > 0 ) {
6528
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
6529
+ }
6530
+
6531
+ destElements = srcElements = node = null;
6532
+
6533
+ // Return the cloned set
6534
+ return clone;
6535
+ },
6536
+
6537
+ buildFragment: function( elems, context, scripts, selection ) {
6538
+ var j, elem, contains,
6539
+ tmp, tag, tbody, wrap,
6540
+ l = elems.length,
6541
+
6542
+ // Ensure a safe fragment
6543
+ safe = createSafeFragment( context ),
6544
+
6545
+ nodes = [],
6546
+ i = 0;
6547
+
6548
+ for ( ; i < l; i++ ) {
6549
+ elem = elems[ i ];
6550
+
6551
+ if ( elem || elem === 0 ) {
6552
+
6553
+ // Add nodes directly
6554
+ if ( jQuery.type( elem ) === "object" ) {
6555
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
6556
+
6557
+ // Convert non-html into a text node
6558
+ } else if ( !rhtml.test( elem ) ) {
6559
+ nodes.push( context.createTextNode( elem ) );
6560
+
6561
+ // Convert html into DOM nodes
6562
+ } else {
6563
+ tmp = tmp || safe.appendChild( context.createElement("div") );
6564
+
6565
+ // Deserialize a standard representation
6566
+ tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
6567
+ wrap = wrapMap[ tag ] || wrapMap._default;
6568
+
6569
+ tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
6570
+
6571
+ // Descend through wrappers to the right content
6572
+ j = wrap[0];
6573
+ while ( j-- ) {
6574
+ tmp = tmp.lastChild;
6575
+ }
6576
+
6577
+ // Manually add leading whitespace removed by IE
6578
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
6579
+ nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
6580
+ }
6581
+
6582
+ // Remove IE's autoinserted <tbody> from table fragments
6583
+ if ( !jQuery.support.tbody ) {
6584
+
6585
+ // String was a <table>, *may* have spurious <tbody>
6586
+ elem = tag === "table" && !rtbody.test( elem ) ?
6587
+ tmp.firstChild :
6588
+
6589
+ // String was a bare <thead> or <tfoot>
6590
+ wrap[1] === "<table>" && !rtbody.test( elem ) ?
6591
+ tmp :
6592
+ 0;
6593
+
6594
+ j = elem && elem.childNodes.length;
6595
+ while ( j-- ) {
6596
+ if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
6597
+ elem.removeChild( tbody );
6598
+ }
6599
+ }
6600
+ }
6601
+
6602
+ jQuery.merge( nodes, tmp.childNodes );
6603
+
6604
+ // Fix #12392 for WebKit and IE > 9
6605
+ tmp.textContent = "";
6606
+
6607
+ // Fix #12392 for oldIE
6608
+ while ( tmp.firstChild ) {
6609
+ tmp.removeChild( tmp.firstChild );
6610
+ }
6611
+
6612
+ // Remember the top-level container for proper cleanup
6613
+ tmp = safe.lastChild;
6614
+ }
6615
+ }
6616
+ }
6617
+
6618
+ // Fix #11356: Clear elements from fragment
6619
+ if ( tmp ) {
6620
+ safe.removeChild( tmp );
6621
+ }
6622
+
6623
+ // Reset defaultChecked for any radios and checkboxes
6624
+ // about to be appended to the DOM in IE 6/7 (#8060)
6625
+ if ( !jQuery.support.appendChecked ) {
6626
+ jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
6627
+ }
6628
+
6629
+ i = 0;
6630
+ while ( (elem = nodes[ i++ ]) ) {
6631
+
6632
+ // #4087 - If origin and destination elements are the same, and this is
6633
+ // that element, do not do anything
6634
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
6635
+ continue;
6636
+ }
6637
+
6638
+ contains = jQuery.contains( elem.ownerDocument, elem );
6639
+
6640
+ // Append to fragment
6641
+ tmp = getAll( safe.appendChild( elem ), "script" );
6642
+
6643
+ // Preserve script evaluation history
6644
+ if ( contains ) {
6645
+ setGlobalEval( tmp );
6646
+ }
6647
+
6648
+ // Capture executables
6649
+ if ( scripts ) {
6650
+ j = 0;
6651
+ while ( (elem = tmp[ j++ ]) ) {
6652
+ if ( rscriptType.test( elem.type || "" ) ) {
6653
+ scripts.push( elem );
6654
+ }
6655
+ }
6656
+ }
6657
+ }
6658
+
6659
+ tmp = null;
6660
+
6661
+ return safe;
6662
+ },
6663
+
6664
+ cleanData: function( elems, /* internal */ acceptData ) {
6665
+ var elem, type, id, data,
6666
+ i = 0,
6667
+ internalKey = jQuery.expando,
6668
+ cache = jQuery.cache,
6669
+ deleteExpando = jQuery.support.deleteExpando,
6670
+ special = jQuery.event.special;
6671
+
6672
+ for ( ; (elem = elems[i]) != null; i++ ) {
6673
+
6674
+ if ( acceptData || jQuery.acceptData( elem ) ) {
6675
+
6676
+ id = elem[ internalKey ];
6677
+ data = id && cache[ id ];
6678
+
6679
+ if ( data ) {
6680
+ if ( data.events ) {
6681
+ for ( type in data.events ) {
6682
+ if ( special[ type ] ) {
6683
+ jQuery.event.remove( elem, type );
6684
+
6685
+ // This is a shortcut to avoid jQuery.event.remove's overhead
6686
+ } else {
6687
+ jQuery.removeEvent( elem, type, data.handle );
6688
+ }
6689
+ }
6690
+ }
6691
+
6692
+ // Remove cache only if it was not already removed by jQuery.event.remove
6693
+ if ( cache[ id ] ) {
6694
+
6695
+ delete cache[ id ];
6696
+
6697
+ // IE does not allow us to delete expando properties from nodes,
6698
+ // nor does it have a removeAttribute function on Document nodes;
6699
+ // we must handle all of these cases
6700
+ if ( deleteExpando ) {
6701
+ delete elem[ internalKey ];
6702
+
6703
+ } else if ( typeof elem.removeAttribute !== core_strundefined ) {
6704
+ elem.removeAttribute( internalKey );
6705
+
6706
+ } else {
6707
+ elem[ internalKey ] = null;
6708
+ }
6709
+
6710
+ core_deletedIds.push( id );
6711
+ }
6712
+ }
6713
+ }
6714
+ }
6715
+ },
6716
+
6717
+ _evalUrl: function( url ) {
6718
+ return jQuery.ajax({
6719
+ url: url,
6720
+ type: "GET",
6721
+ dataType: "script",
6722
+ async: false,
6723
+ global: false,
6724
+ "throws": true
6725
+ });
6726
+ }
6727
+ });
6728
+ jQuery.fn.extend({
6729
+ wrapAll: function( html ) {
6730
+ if ( jQuery.isFunction( html ) ) {
6731
+ return this.each(function(i) {
6732
+ jQuery(this).wrapAll( html.call(this, i) );
6733
+ });
6734
+ }
6735
+
6736
+ if ( this[0] ) {
6737
+ // The elements to wrap the target around
6738
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
6739
+
6740
+ if ( this[0].parentNode ) {
6741
+ wrap.insertBefore( this[0] );
6742
+ }
6743
+
6744
+ wrap.map(function() {
6745
+ var elem = this;
6746
+
6747
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
6748
+ elem = elem.firstChild;
6749
+ }
6750
+
6751
+ return elem;
6752
+ }).append( this );
6753
+ }
6754
+
6755
+ return this;
6756
+ },
6757
+
6758
+ wrapInner: function( html ) {
6759
+ if ( jQuery.isFunction( html ) ) {
6760
+ return this.each(function(i) {
6761
+ jQuery(this).wrapInner( html.call(this, i) );
6762
+ });
6763
+ }
6764
+
6765
+ return this.each(function() {
6766
+ var self = jQuery( this ),
6767
+ contents = self.contents();
6768
+
6769
+ if ( contents.length ) {
6770
+ contents.wrapAll( html );
6771
+
6772
+ } else {
6773
+ self.append( html );
6774
+ }
6775
+ });
6776
+ },
6777
+
6778
+ wrap: function( html ) {
6779
+ var isFunction = jQuery.isFunction( html );
6780
+
6781
+ return this.each(function(i) {
6782
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
6783
+ });
6784
+ },
6785
+
6786
+ unwrap: function() {
6787
+ return this.parent().each(function() {
6788
+ if ( !jQuery.nodeName( this, "body" ) ) {
6789
+ jQuery( this ).replaceWith( this.childNodes );
6790
+ }
6791
+ }).end();
6792
+ }
6793
+ });
6794
+ var iframe, getStyles, curCSS,
6795
+ ralpha = /alpha\([^)]*\)/i,
6796
+ ropacity = /opacity\s*=\s*([^)]*)/,
6797
+ rposition = /^(top|right|bottom|left)$/,
6798
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
6799
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
6800
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6801
+ rmargin = /^margin/,
6802
+ rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
6803
+ rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
6804
+ rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
6805
+ elemdisplay = { BODY: "block" },
6806
+
6807
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6808
+ cssNormalTransform = {
6809
+ letterSpacing: 0,
6810
+ fontWeight: 400
6811
+ },
6812
+
6813
+ cssExpand = [ "Top", "Right", "Bottom", "Left" ],
6814
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
6815
+
6816
+ // return a css property mapped to a potentially vendor prefixed property
6817
+ function vendorPropName( style, name ) {
6818
+
6819
+ // shortcut for names that are not vendor prefixed
6820
+ if ( name in style ) {
6821
+ return name;
6822
+ }
6823
+
6824
+ // check for vendor prefixed names
6825
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
6826
+ origName = name,
6827
+ i = cssPrefixes.length;
6828
+
6829
+ while ( i-- ) {
6830
+ name = cssPrefixes[ i ] + capName;
6831
+ if ( name in style ) {
6832
+ return name;
6833
+ }
6834
+ }
6835
+
6836
+ return origName;
6837
+ }
6838
+
6839
+ function isHidden( elem, el ) {
6840
+ // isHidden might be called from jQuery#filter function;
6841
+ // in that case, element will be second argument
6842
+ elem = el || elem;
6843
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
6844
+ }
6845
+
6846
+ function showHide( elements, show ) {
6847
+ var display, elem, hidden,
6848
+ values = [],
6849
+ index = 0,
6850
+ length = elements.length;
6851
+
6852
+ for ( ; index < length; index++ ) {
6853
+ elem = elements[ index ];
6854
+ if ( !elem.style ) {
6855
+ continue;
6856
+ }
6857
+
6858
+ values[ index ] = jQuery._data( elem, "olddisplay" );
6859
+ display = elem.style.display;
6860
+ if ( show ) {
6861
+ // Reset the inline display of this element to learn if it is
6862
+ // being hidden by cascaded rules or not
6863
+ if ( !values[ index ] && display === "none" ) {
6864
+ elem.style.display = "";
6865
+ }
6866
+
6867
+ // Set elements which have been overridden with display: none
6868
+ // in a stylesheet to whatever the default browser style is
6869
+ // for such an element
6870
+ if ( elem.style.display === "" && isHidden( elem ) ) {
6871
+ values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
6872
+ }
6873
+ } else {
6874
+
6875
+ if ( !values[ index ] ) {
6876
+ hidden = isHidden( elem );
6877
+
6878
+ if ( display && display !== "none" || !hidden ) {
6879
+ jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
6880
+ }
6881
+ }
6882
+ }
6883
+ }
6884
+
6885
+ // Set the display of most of the elements in a second loop
6886
+ // to avoid the constant reflow
6887
+ for ( index = 0; index < length; index++ ) {
6888
+ elem = elements[ index ];
6889
+ if ( !elem.style ) {
6890
+ continue;
6891
+ }
6892
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
6893
+ elem.style.display = show ? values[ index ] || "" : "none";
6894
+ }
6895
+ }
6896
+
6897
+ return elements;
6898
+ }
6899
+
6900
+ jQuery.fn.extend({
6901
+ css: function( name, value ) {
6902
+ return jQuery.access( this, function( elem, name, value ) {
6903
+ var len, styles,
6904
+ map = {},
6905
+ i = 0;
6906
+
6907
+ if ( jQuery.isArray( name ) ) {
6908
+ styles = getStyles( elem );
6909
+ len = name.length;
6910
+
6911
+ for ( ; i < len; i++ ) {
6912
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
6913
+ }
6914
+
6915
+ return map;
6916
+ }
6917
+
6918
+ return value !== undefined ?
6919
+ jQuery.style( elem, name, value ) :
6920
+ jQuery.css( elem, name );
6921
+ }, name, value, arguments.length > 1 );
6922
+ },
6923
+ show: function() {
6924
+ return showHide( this, true );
6925
+ },
6926
+ hide: function() {
6927
+ return showHide( this );
6928
+ },
6929
+ toggle: function( state ) {
6930
+ if ( typeof state === "boolean" ) {
6931
+ return state ? this.show() : this.hide();
6932
+ }
6933
+
6934
+ return this.each(function() {
6935
+ if ( isHidden( this ) ) {
6936
+ jQuery( this ).show();
6937
+ } else {
6938
+ jQuery( this ).hide();
6939
+ }
6940
+ });
6941
+ }
6942
+ });
6943
+
6944
+ jQuery.extend({
6945
+ // Add in style property hooks for overriding the default
6946
+ // behavior of getting and setting a style property
6947
+ cssHooks: {
6948
+ opacity: {
6949
+ get: function( elem, computed ) {
6950
+ if ( computed ) {
6951
+ // We should always get a number back from opacity
6952
+ var ret = curCSS( elem, "opacity" );
6953
+ return ret === "" ? "1" : ret;
6954
+ }
6955
+ }
6956
+ }
6957
+ },
6958
+
6959
+ // Don't automatically add "px" to these possibly-unitless properties
6960
+ cssNumber: {
6961
+ "columnCount": true,
6962
+ "fillOpacity": true,
6963
+ "fontWeight": true,
6964
+ "lineHeight": true,
6965
+ "opacity": true,
6966
+ "order": true,
6967
+ "orphans": true,
6968
+ "widows": true,
6969
+ "zIndex": true,
6970
+ "zoom": true
6971
+ },
6972
+
6973
+ // Add in properties whose names you wish to fix before
6974
+ // setting or getting the value
6975
+ cssProps: {
6976
+ // normalize float css property
6977
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
6978
+ },
6979
+
6980
+ // Get and set the style property on a DOM Node
6981
+ style: function( elem, name, value, extra ) {
6982
+ // Don't set styles on text and comment nodes
6983
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6984
+ return;
6985
+ }
6986
+
6987
+ // Make sure that we're working with the right name
6988
+ var ret, type, hooks,
6989
+ origName = jQuery.camelCase( name ),
6990
+ style = elem.style;
6991
+
6992
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
6993
+
6994
+ // gets hook for the prefixed version
6995
+ // followed by the unprefixed version
6996
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6997
+
6998
+ // Check if we're setting a value
6999
+ if ( value !== undefined ) {
7000
+ type = typeof value;
7001
+
7002
+ // convert relative number strings (+= or -=) to relative numbers. #7345
7003
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
7004
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
7005
+ // Fixes bug #9237
7006
+ type = "number";
7007
+ }
7008
+
7009
+ // Make sure that NaN and null values aren't set. See: #7116
7010
+ if ( value == null || type === "number" && isNaN( value ) ) {
7011
+ return;
7012
+ }
7013
+
7014
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
7015
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
7016
+ value += "px";
7017
+ }
7018
+
7019
+ // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
7020
+ // but it would mean to define eight (for every problematic property) identical functions
7021
+ if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
7022
+ style[ name ] = "inherit";
7023
+ }
7024
+
7025
+ // If a hook was provided, use that value, otherwise just set the specified value
7026
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
7027
+
7028
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
7029
+ // Fixes bug #5509
7030
+ try {
7031
+ style[ name ] = value;
7032
+ } catch(e) {}
7033
+ }
7034
+
7035
+ } else {
7036
+ // If a hook was provided get the non-computed value from there
7037
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
7038
+ return ret;
7039
+ }
7040
+
7041
+ // Otherwise just get the value from the style object
7042
+ return style[ name ];
7043
+ }
7044
+ },
7045
+
7046
+ css: function( elem, name, extra, styles ) {
7047
+ var num, val, hooks,
7048
+ origName = jQuery.camelCase( name );
7049
+
7050
+ // Make sure that we're working with the right name
7051
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
7052
+
7053
+ // gets hook for the prefixed version
7054
+ // followed by the unprefixed version
7055
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
7056
+
7057
+ // If a hook was provided get the computed value from there
7058
+ if ( hooks && "get" in hooks ) {
7059
+ val = hooks.get( elem, true, extra );
7060
+ }
7061
+
7062
+ // Otherwise, if a way to get the computed value exists, use that
7063
+ if ( val === undefined ) {
7064
+ val = curCSS( elem, name, styles );
7065
+ }
7066
+
7067
+ //convert "normal" to computed value
7068
+ if ( val === "normal" && name in cssNormalTransform ) {
7069
+ val = cssNormalTransform[ name ];
7070
+ }
7071
+
7072
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
7073
+ if ( extra === "" || extra ) {
7074
+ num = parseFloat( val );
7075
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
7076
+ }
7077
+ return val;
7078
+ }
7079
+ });
7080
+
7081
+ // NOTE: we've included the "window" in window.getComputedStyle
7082
+ // because jsdom on node.js will break without it.
7083
+ if ( window.getComputedStyle ) {
7084
+ getStyles = function( elem ) {
7085
+ return window.getComputedStyle( elem, null );
7086
+ };
7087
+
7088
+ curCSS = function( elem, name, _computed ) {
7089
+ var width, minWidth, maxWidth,
7090
+ computed = _computed || getStyles( elem ),
7091
+
7092
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
7093
+ ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
7094
+ style = elem.style;
7095
+
7096
+ if ( computed ) {
7097
+
7098
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
7099
+ ret = jQuery.style( elem, name );
7100
+ }
7101
+
7102
+ // A tribute to the "awesome hack by Dean Edwards"
7103
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
7104
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
7105
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
7106
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
7107
+
7108
+ // Remember the original values
7109
+ width = style.width;
7110
+ minWidth = style.minWidth;
7111
+ maxWidth = style.maxWidth;
7112
+
7113
+ // Put in the new values to get a computed value out
7114
+ style.minWidth = style.maxWidth = style.width = ret;
7115
+ ret = computed.width;
7116
+
7117
+ // Revert the changed values
7118
+ style.width = width;
7119
+ style.minWidth = minWidth;
7120
+ style.maxWidth = maxWidth;
7121
+ }
7122
+ }
7123
+
7124
+ return ret;
7125
+ };
7126
+ } else if ( document.documentElement.currentStyle ) {
7127
+ getStyles = function( elem ) {
7128
+ return elem.currentStyle;
7129
+ };
7130
+
7131
+ curCSS = function( elem, name, _computed ) {
7132
+ var left, rs, rsLeft,
7133
+ computed = _computed || getStyles( elem ),
7134
+ ret = computed ? computed[ name ] : undefined,
7135
+ style = elem.style;
7136
+
7137
+ // Avoid setting ret to empty string here
7138
+ // so we don't default to auto
7139
+ if ( ret == null && style && style[ name ] ) {
7140
+ ret = style[ name ];
7141
+ }
7142
+
7143
+ // From the awesome hack by Dean Edwards
7144
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
7145
+
7146
+ // If we're not dealing with a regular pixel number
7147
+ // but a number that has a weird ending, we need to convert it to pixels
7148
+ // but not position css attributes, as those are proportional to the parent element instead
7149
+ // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
7150
+ if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
7151
+
7152
+ // Remember the original values
7153
+ left = style.left;
7154
+ rs = elem.runtimeStyle;
7155
+ rsLeft = rs && rs.left;
7156
+
7157
+ // Put in the new values to get a computed value out
7158
+ if ( rsLeft ) {
7159
+ rs.left = elem.currentStyle.left;
7160
+ }
7161
+ style.left = name === "fontSize" ? "1em" : ret;
7162
+ ret = style.pixelLeft + "px";
7163
+
7164
+ // Revert the changed values
7165
+ style.left = left;
7166
+ if ( rsLeft ) {
7167
+ rs.left = rsLeft;
7168
+ }
7169
+ }
7170
+
7171
+ return ret === "" ? "auto" : ret;
7172
+ };
7173
+ }
7174
+
7175
+ function setPositiveNumber( elem, value, subtract ) {
7176
+ var matches = rnumsplit.exec( value );
7177
+ return matches ?
7178
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
7179
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
7180
+ value;
7181
+ }
7182
+
7183
+ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
7184
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
7185
+ // If we already have the right measurement, avoid augmentation
7186
+ 4 :
7187
+ // Otherwise initialize for horizontal or vertical properties
7188
+ name === "width" ? 1 : 0,
7189
+
7190
+ val = 0;
7191
+
7192
+ for ( ; i < 4; i += 2 ) {
7193
+ // both box models exclude margin, so add it if we want it
7194
+ if ( extra === "margin" ) {
7195
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
7196
+ }
7197
+
7198
+ if ( isBorderBox ) {
7199
+ // border-box includes padding, so remove it if we want content
7200
+ if ( extra === "content" ) {
7201
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
7202
+ }
7203
+
7204
+ // at this point, extra isn't border nor margin, so remove border
7205
+ if ( extra !== "margin" ) {
7206
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
7207
+ }
7208
+ } else {
7209
+ // at this point, extra isn't content, so add padding
7210
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
7211
+
7212
+ // at this point, extra isn't content nor padding, so add border
7213
+ if ( extra !== "padding" ) {
7214
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
7215
+ }
7216
+ }
7217
+ }
7218
+
7219
+ return val;
7220
+ }
7221
+
7222
+ function getWidthOrHeight( elem, name, extra ) {
7223
+
7224
+ // Start with offset property, which is equivalent to the border-box value
7225
+ var valueIsBorderBox = true,
7226
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
7227
+ styles = getStyles( elem ),
7228
+ isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
7229
+
7230
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
7231
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
7232
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
7233
+ if ( val <= 0 || val == null ) {
7234
+ // Fall back to computed then uncomputed css if necessary
7235
+ val = curCSS( elem, name, styles );
7236
+ if ( val < 0 || val == null ) {
7237
+ val = elem.style[ name ];
7238
+ }
7239
+
7240
+ // Computed unit is not pixels. Stop here and return.
7241
+ if ( rnumnonpx.test(val) ) {
7242
+ return val;
7243
+ }
7244
+
7245
+ // we need the check for style in case a browser which returns unreliable values
7246
+ // for getComputedStyle silently falls back to the reliable elem.style
7247
+ valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
7248
+
7249
+ // Normalize "", auto, and prepare for extra
7250
+ val = parseFloat( val ) || 0;
7251
+ }
7252
+
7253
+ // use the active box-sizing model to add/subtract irrelevant styles
7254
+ return ( val +
7255
+ augmentWidthOrHeight(
7256
+ elem,
7257
+ name,
7258
+ extra || ( isBorderBox ? "border" : "content" ),
7259
+ valueIsBorderBox,
7260
+ styles
7261
+ )
7262
+ ) + "px";
7263
+ }
7264
+
7265
+ // Try to determine the default display value of an element
7266
+ function css_defaultDisplay( nodeName ) {
7267
+ var doc = document,
7268
+ display = elemdisplay[ nodeName ];
7269
+
7270
+ if ( !display ) {
7271
+ display = actualDisplay( nodeName, doc );
7272
+
7273
+ // If the simple way fails, read from inside an iframe
7274
+ if ( display === "none" || !display ) {
7275
+ // Use the already-created iframe if possible
7276
+ iframe = ( iframe ||
7277
+ jQuery("<iframe frameborder='0' width='0' height='0'/>")
7278
+ .css( "cssText", "display:block !important" )
7279
+ ).appendTo( doc.documentElement );
7280
+
7281
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
7282
+ doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
7283
+ doc.write("<!doctype html><html><body>");
7284
+ doc.close();
7285
+
7286
+ display = actualDisplay( nodeName, doc );
7287
+ iframe.detach();
7288
+ }
7289
+
7290
+ // Store the correct default display
7291
+ elemdisplay[ nodeName ] = display;
7292
+ }
7293
+
7294
+ return display;
7295
+ }
7296
+
7297
+ // Called ONLY from within css_defaultDisplay
7298
+ function actualDisplay( name, doc ) {
7299
+ var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
7300
+ display = jQuery.css( elem[0], "display" );
7301
+ elem.remove();
7302
+ return display;
7303
+ }
7304
+
7305
+ jQuery.each([ "height", "width" ], function( i, name ) {
7306
+ jQuery.cssHooks[ name ] = {
7307
+ get: function( elem, computed, extra ) {
7308
+ if ( computed ) {
7309
+ // certain elements can have dimension info if we invisibly show them
7310
+ // however, it must have a current display style that would benefit from this
7311
+ return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
7312
+ jQuery.swap( elem, cssShow, function() {
7313
+ return getWidthOrHeight( elem, name, extra );
7314
+ }) :
7315
+ getWidthOrHeight( elem, name, extra );
7316
+ }
7317
+ },
7318
+
7319
+ set: function( elem, value, extra ) {
7320
+ var styles = extra && getStyles( elem );
7321
+ return setPositiveNumber( elem, value, extra ?
7322
+ augmentWidthOrHeight(
7323
+ elem,
7324
+ name,
7325
+ extra,
7326
+ jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
7327
+ styles
7328
+ ) : 0
7329
+ );
7330
+ }
7331
+ };
7332
+ });
7333
+
7334
+ if ( !jQuery.support.opacity ) {
7335
+ jQuery.cssHooks.opacity = {
7336
+ get: function( elem, computed ) {
7337
+ // IE uses filters for opacity
7338
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
7339
+ ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
7340
+ computed ? "1" : "";
7341
+ },
7342
+
7343
+ set: function( elem, value ) {
7344
+ var style = elem.style,
7345
+ currentStyle = elem.currentStyle,
7346
+ opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
7347
+ filter = currentStyle && currentStyle.filter || style.filter || "";
7348
+
7349
+ // IE has trouble with opacity if it does not have layout
7350
+ // Force it by setting the zoom level
7351
+ style.zoom = 1;
7352
+
7353
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
7354
+ // if value === "", then remove inline opacity #12685
7355
+ if ( ( value >= 1 || value === "" ) &&
7356
+ jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
7357
+ style.removeAttribute ) {
7358
+
7359
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
7360
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
7361
+ // style.removeAttribute is IE Only, but so apparently is this code path...
7362
+ style.removeAttribute( "filter" );
7363
+
7364
+ // if there is no filter style applied in a css rule or unset inline opacity, we are done
7365
+ if ( value === "" || currentStyle && !currentStyle.filter ) {
7366
+ return;
7367
+ }
7368
+ }
7369
+
7370
+ // otherwise, set new filter values
7371
+ style.filter = ralpha.test( filter ) ?
7372
+ filter.replace( ralpha, opacity ) :
7373
+ filter + " " + opacity;
7374
+ }
7375
+ };
7376
+ }
7377
+
7378
+ // These hooks cannot be added until DOM ready because the support test
7379
+ // for it is not run until after DOM ready
7380
+ jQuery(function() {
7381
+ if ( !jQuery.support.reliableMarginRight ) {
7382
+ jQuery.cssHooks.marginRight = {
7383
+ get: function( elem, computed ) {
7384
+ if ( computed ) {
7385
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
7386
+ // Work around by temporarily setting element display to inline-block
7387
+ return jQuery.swap( elem, { "display": "inline-block" },
7388
+ curCSS, [ elem, "marginRight" ] );
7389
+ }
7390
+ }
7391
+ };
7392
+ }
7393
+
7394
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
7395
+ // getComputedStyle returns percent when specified for top/left/bottom/right
7396
+ // rather than make the css module depend on the offset module, we just check for it here
7397
+ if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
7398
+ jQuery.each( [ "top", "left" ], function( i, prop ) {
7399
+ jQuery.cssHooks[ prop ] = {
7400
+ get: function( elem, computed ) {
7401
+ if ( computed ) {
7402
+ computed = curCSS( elem, prop );
7403
+ // if curCSS returns percentage, fallback to offset
7404
+ return rnumnonpx.test( computed ) ?
7405
+ jQuery( elem ).position()[ prop ] + "px" :
7406
+ computed;
7407
+ }
7408
+ }
7409
+ };
7410
+ });
7411
+ }
7412
+
7413
+ });
7414
+
7415
+ if ( jQuery.expr && jQuery.expr.filters ) {
7416
+ jQuery.expr.filters.hidden = function( elem ) {
7417
+ // Support: Opera <= 12.12
7418
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
7419
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
7420
+ (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
7421
+ };
7422
+
7423
+ jQuery.expr.filters.visible = function( elem ) {
7424
+ return !jQuery.expr.filters.hidden( elem );
7425
+ };
7426
+ }
7427
+
7428
+ // These hooks are used by animate to expand properties
7429
+ jQuery.each({
7430
+ margin: "",
7431
+ padding: "",
7432
+ border: "Width"
7433
+ }, function( prefix, suffix ) {
7434
+ jQuery.cssHooks[ prefix + suffix ] = {
7435
+ expand: function( value ) {
7436
+ var i = 0,
7437
+ expanded = {},
7438
+
7439
+ // assumes a single number if not a string
7440
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
7441
+
7442
+ for ( ; i < 4; i++ ) {
7443
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
7444
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
7445
+ }
7446
+
7447
+ return expanded;
7448
+ }
7449
+ };
7450
+
7451
+ if ( !rmargin.test( prefix ) ) {
7452
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
7453
+ }
7454
+ });
7455
+ var r20 = /%20/g,
7456
+ rbracket = /\[\]$/,
7457
+ rCRLF = /\r?\n/g,
7458
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
7459
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
7460
+
7461
+ jQuery.fn.extend({
7462
+ serialize: function() {
7463
+ return jQuery.param( this.serializeArray() );
7464
+ },
7465
+ serializeArray: function() {
7466
+ return this.map(function(){
7467
+ // Can add propHook for "elements" to filter or add form elements
7468
+ var elements = jQuery.prop( this, "elements" );
7469
+ return elements ? jQuery.makeArray( elements ) : this;
7470
+ })
7471
+ .filter(function(){
7472
+ var type = this.type;
7473
+ // Use .is(":disabled") so that fieldset[disabled] works
7474
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
7475
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
7476
+ ( this.checked || !manipulation_rcheckableType.test( type ) );
7477
+ })
7478
+ .map(function( i, elem ){
7479
+ var val = jQuery( this ).val();
7480
+
7481
+ return val == null ?
7482
+ null :
7483
+ jQuery.isArray( val ) ?
7484
+ jQuery.map( val, function( val ){
7485
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
7486
+ }) :
7487
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
7488
+ }).get();
7489
+ }
7490
+ });
7491
+
7492
+ //Serialize an array of form elements or a set of
7493
+ //key/values into a query string
7494
+ jQuery.param = function( a, traditional ) {
7495
+ var prefix,
7496
+ s = [],
7497
+ add = function( key, value ) {
7498
+ // If value is a function, invoke it and return its value
7499
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
7500
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
7501
+ };
7502
+
7503
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
7504
+ if ( traditional === undefined ) {
7505
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
7506
+ }
7507
+
7508
+ // If an array was passed in, assume that it is an array of form elements.
7509
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
7510
+ // Serialize the form elements
7511
+ jQuery.each( a, function() {
7512
+ add( this.name, this.value );
7513
+ });
7514
+
7515
+ } else {
7516
+ // If traditional, encode the "old" way (the way 1.3.2 or older
7517
+ // did it), otherwise encode params recursively.
7518
+ for ( prefix in a ) {
7519
+ buildParams( prefix, a[ prefix ], traditional, add );
7520
+ }
7521
+ }
7522
+
7523
+ // Return the resulting serialization
7524
+ return s.join( "&" ).replace( r20, "+" );
7525
+ };
7526
+
7527
+ function buildParams( prefix, obj, traditional, add ) {
7528
+ var name;
7529
+
7530
+ if ( jQuery.isArray( obj ) ) {
7531
+ // Serialize array item.
7532
+ jQuery.each( obj, function( i, v ) {
7533
+ if ( traditional || rbracket.test( prefix ) ) {
7534
+ // Treat each array item as a scalar.
7535
+ add( prefix, v );
7536
+
7537
+ } else {
7538
+ // Item is non-scalar (array or object), encode its numeric index.
7539
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
7540
+ }
7541
+ });
7542
+
7543
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
7544
+ // Serialize object item.
7545
+ for ( name in obj ) {
7546
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
7547
+ }
7548
+
7549
+ } else {
7550
+ // Serialize scalar item.
7551
+ add( prefix, obj );
7552
+ }
7553
+ }
7554
+ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
7555
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
7556
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
7557
+
7558
+ // Handle event binding
7559
+ jQuery.fn[ name ] = function( data, fn ) {
7560
+ return arguments.length > 0 ?
7561
+ this.on( name, null, data, fn ) :
7562
+ this.trigger( name );
7563
+ };
7564
+ });
7565
+
7566
+ jQuery.fn.extend({
7567
+ hover: function( fnOver, fnOut ) {
7568
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
7569
+ },
7570
+
7571
+ bind: function( types, data, fn ) {
7572
+ return this.on( types, null, data, fn );
7573
+ },
7574
+ unbind: function( types, fn ) {
7575
+ return this.off( types, null, fn );
7576
+ },
7577
+
7578
+ delegate: function( selector, types, data, fn ) {
7579
+ return this.on( types, selector, data, fn );
7580
+ },
7581
+ undelegate: function( selector, types, fn ) {
7582
+ // ( namespace ) or ( selector, types [, fn] )
7583
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
7584
+ }
7585
+ });
7586
+ var
7587
+ // Document location
7588
+ ajaxLocParts,
7589
+ ajaxLocation,
7590
+ ajax_nonce = jQuery.now(),
7591
+
7592
+ ajax_rquery = /\?/,
7593
+ rhash = /#.*$/,
7594
+ rts = /([?&])_=[^&]*/,
7595
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
7596
+ // #7653, #8125, #8152: local protocol detection
7597
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
7598
+ rnoContent = /^(?:GET|HEAD)$/,
7599
+ rprotocol = /^\/\//,
7600
+ rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
7601
+
7602
+ // Keep a copy of the old load method
7603
+ _load = jQuery.fn.load,
7604
+
7605
+ /* Prefilters
7606
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
7607
+ * 2) These are called:
7608
+ * - BEFORE asking for a transport
7609
+ * - AFTER param serialization (s.data is a string if s.processData is true)
7610
+ * 3) key is the dataType
7611
+ * 4) the catchall symbol "*" can be used
7612
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
7613
+ */
7614
+ prefilters = {},
7615
+
7616
+ /* Transports bindings
7617
+ * 1) key is the dataType
7618
+ * 2) the catchall symbol "*" can be used
7619
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
7620
+ */
7621
+ transports = {},
7622
+
7623
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
7624
+ allTypes = "*/".concat("*");
7625
+
7626
+ // #8138, IE may throw an exception when accessing
7627
+ // a field from window.location if document.domain has been set
7628
+ try {
7629
+ ajaxLocation = location.href;
7630
+ } catch( e ) {
7631
+ // Use the href attribute of an A element
7632
+ // since IE will modify it given document.location
7633
+ ajaxLocation = document.createElement( "a" );
7634
+ ajaxLocation.href = "";
7635
+ ajaxLocation = ajaxLocation.href;
7636
+ }
7637
+
7638
+ // Segment location into parts
7639
+ ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
7640
+
7641
+ // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
7642
+ function addToPrefiltersOrTransports( structure ) {
7643
+
7644
+ // dataTypeExpression is optional and defaults to "*"
7645
+ return function( dataTypeExpression, func ) {
7646
+
7647
+ if ( typeof dataTypeExpression !== "string" ) {
7648
+ func = dataTypeExpression;
7649
+ dataTypeExpression = "*";
7650
+ }
7651
+
7652
+ var dataType,
7653
+ i = 0,
7654
+ dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
7655
+
7656
+ if ( jQuery.isFunction( func ) ) {
7657
+ // For each dataType in the dataTypeExpression
7658
+ while ( (dataType = dataTypes[i++]) ) {
7659
+ // Prepend if requested
7660
+ if ( dataType[0] === "+" ) {
7661
+ dataType = dataType.slice( 1 ) || "*";
7662
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
7663
+
7664
+ // Otherwise append
7665
+ } else {
7666
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
7667
+ }
7668
+ }
7669
+ }
7670
+ };
7671
+ }
7672
+
7673
+ // Base inspection function for prefilters and transports
7674
+ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
7675
+
7676
+ var inspected = {},
7677
+ seekingTransport = ( structure === transports );
7678
+
7679
+ function inspect( dataType ) {
7680
+ var selected;
7681
+ inspected[ dataType ] = true;
7682
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
7683
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
7684
+ if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
7685
+ options.dataTypes.unshift( dataTypeOrTransport );
7686
+ inspect( dataTypeOrTransport );
7687
+ return false;
7688
+ } else if ( seekingTransport ) {
7689
+ return !( selected = dataTypeOrTransport );
7690
+ }
7691
+ });
7692
+ return selected;
7693
+ }
7694
+
7695
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
7696
+ }
7697
+
7698
+ // A special extend for ajax options
7699
+ // that takes "flat" options (not to be deep extended)
7700
+ // Fixes #9887
7701
+ function ajaxExtend( target, src ) {
7702
+ var deep, key,
7703
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
7704
+
7705
+ for ( key in src ) {
7706
+ if ( src[ key ] !== undefined ) {
7707
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
7708
+ }
7709
+ }
7710
+ if ( deep ) {
7711
+ jQuery.extend( true, target, deep );
7712
+ }
7713
+
7714
+ return target;
7715
+ }
7716
+
7717
+ jQuery.fn.load = function( url, params, callback ) {
7718
+ if ( typeof url !== "string" && _load ) {
7719
+ return _load.apply( this, arguments );
7720
+ }
7721
+
7722
+ var selector, response, type,
7723
+ self = this,
7724
+ off = url.indexOf(" ");
7725
+
7726
+ if ( off >= 0 ) {
7727
+ selector = url.slice( off, url.length );
7728
+ url = url.slice( 0, off );
7729
+ }
7730
+
7731
+ // If it's a function
7732
+ if ( jQuery.isFunction( params ) ) {
7733
+
7734
+ // We assume that it's the callback
7735
+ callback = params;
7736
+ params = undefined;
7737
+
7738
+ // Otherwise, build a param string
7739
+ } else if ( params && typeof params === "object" ) {
7740
+ type = "POST";
7741
+ }
7742
+
7743
+ // If we have elements to modify, make the request
7744
+ if ( self.length > 0 ) {
7745
+ jQuery.ajax({
7746
+ url: url,
7747
+
7748
+ // if "type" variable is undefined, then "GET" method will be used
7749
+ type: type,
7750
+ dataType: "html",
7751
+ data: params
7752
+ }).done(function( responseText ) {
7753
+
7754
+ // Save response for use in complete callback
7755
+ response = arguments;
7756
+
7757
+ self.html( selector ?
7758
+
7759
+ // If a selector was specified, locate the right elements in a dummy div
7760
+ // Exclude scripts to avoid IE 'Permission Denied' errors
7761
+ jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
7762
+
7763
+ // Otherwise use the full result
7764
+ responseText );
7765
+
7766
+ }).complete( callback && function( jqXHR, status ) {
7767
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
7768
+ });
7769
+ }
7770
+
7771
+ return this;
7772
+ };
7773
+
7774
+ // Attach a bunch of functions for handling common AJAX events
7775
+ jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
7776
+ jQuery.fn[ type ] = function( fn ){
7777
+ return this.on( type, fn );
7778
+ };
7779
+ });
7780
+
7781
+ jQuery.extend({
7782
+
7783
+ // Counter for holding the number of active queries
7784
+ active: 0,
7785
+
7786
+ // Last-Modified header cache for next request
7787
+ lastModified: {},
7788
+ etag: {},
7789
+
7790
+ ajaxSettings: {
7791
+ url: ajaxLocation,
7792
+ type: "GET",
7793
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
7794
+ global: true,
7795
+ processData: true,
7796
+ async: true,
7797
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
7798
+ /*
7799
+ timeout: 0,
7800
+ data: null,
7801
+ dataType: null,
7802
+ username: null,
7803
+ password: null,
7804
+ cache: null,
7805
+ throws: false,
7806
+ traditional: false,
7807
+ headers: {},
7808
+ */
7809
+
7810
+ accepts: {
7811
+ "*": allTypes,
7812
+ text: "text/plain",
7813
+ html: "text/html",
7814
+ xml: "application/xml, text/xml",
7815
+ json: "application/json, text/javascript"
7816
+ },
7817
+
7818
+ contents: {
7819
+ xml: /xml/,
7820
+ html: /html/,
7821
+ json: /json/
7822
+ },
7823
+
7824
+ responseFields: {
7825
+ xml: "responseXML",
7826
+ text: "responseText",
7827
+ json: "responseJSON"
7828
+ },
7829
+
7830
+ // Data converters
7831
+ // Keys separate source (or catchall "*") and destination types with a single space
7832
+ converters: {
7833
+
7834
+ // Convert anything to text
7835
+ "* text": String,
7836
+
7837
+ // Text to html (true = no transformation)
7838
+ "text html": true,
7839
+
7840
+ // Evaluate text as a json expression
7841
+ "text json": jQuery.parseJSON,
7842
+
7843
+ // Parse text as xml
7844
+ "text xml": jQuery.parseXML
7845
+ },
7846
+
7847
+ // For options that shouldn't be deep extended:
7848
+ // you can add your own custom options here if
7849
+ // and when you create one that shouldn't be
7850
+ // deep extended (see ajaxExtend)
7851
+ flatOptions: {
7852
+ url: true,
7853
+ context: true
7854
+ }
7855
+ },
7856
+
7857
+ // Creates a full fledged settings object into target
7858
+ // with both ajaxSettings and settings fields.
7859
+ // If target is omitted, writes into ajaxSettings.
7860
+ ajaxSetup: function( target, settings ) {
7861
+ return settings ?
7862
+
7863
+ // Building a settings object
7864
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
7865
+
7866
+ // Extending ajaxSettings
7867
+ ajaxExtend( jQuery.ajaxSettings, target );
7868
+ },
7869
+
7870
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
7871
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
7872
+
7873
+ // Main method
7874
+ ajax: function( url, options ) {
7875
+
7876
+ // If url is an object, simulate pre-1.5 signature
7877
+ if ( typeof url === "object" ) {
7878
+ options = url;
7879
+ url = undefined;
7880
+ }
7881
+
7882
+ // Force options to be an object
7883
+ options = options || {};
7884
+
7885
+ var // Cross-domain detection vars
7886
+ parts,
7887
+ // Loop variable
7888
+ i,
7889
+ // URL without anti-cache param
7890
+ cacheURL,
7891
+ // Response headers as string
7892
+ responseHeadersString,
7893
+ // timeout handle
7894
+ timeoutTimer,
7895
+
7896
+ // To know if global events are to be dispatched
7897
+ fireGlobals,
7898
+
7899
+ transport,
7900
+ // Response headers
7901
+ responseHeaders,
7902
+ // Create the final options object
7903
+ s = jQuery.ajaxSetup( {}, options ),
7904
+ // Callbacks context
7905
+ callbackContext = s.context || s,
7906
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
7907
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
7908
+ jQuery( callbackContext ) :
7909
+ jQuery.event,
7910
+ // Deferreds
7911
+ deferred = jQuery.Deferred(),
7912
+ completeDeferred = jQuery.Callbacks("once memory"),
7913
+ // Status-dependent callbacks
7914
+ statusCode = s.statusCode || {},
7915
+ // Headers (they are sent all at once)
7916
+ requestHeaders = {},
7917
+ requestHeadersNames = {},
7918
+ // The jqXHR state
7919
+ state = 0,
7920
+ // Default abort message
7921
+ strAbort = "canceled",
7922
+ // Fake xhr
7923
+ jqXHR = {
7924
+ readyState: 0,
7925
+
7926
+ // Builds headers hashtable if needed
7927
+ getResponseHeader: function( key ) {
7928
+ var match;
7929
+ if ( state === 2 ) {
7930
+ if ( !responseHeaders ) {
7931
+ responseHeaders = {};
7932
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
7933
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
7934
+ }
7935
+ }
7936
+ match = responseHeaders[ key.toLowerCase() ];
7937
+ }
7938
+ return match == null ? null : match;
7939
+ },
7940
+
7941
+ // Raw string
7942
+ getAllResponseHeaders: function() {
7943
+ return state === 2 ? responseHeadersString : null;
7944
+ },
7945
+
7946
+ // Caches the header
7947
+ setRequestHeader: function( name, value ) {
7948
+ var lname = name.toLowerCase();
7949
+ if ( !state ) {
7950
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
7951
+ requestHeaders[ name ] = value;
7952
+ }
7953
+ return this;
7954
+ },
7955
+
7956
+ // Overrides response content-type header
7957
+ overrideMimeType: function( type ) {
7958
+ if ( !state ) {
7959
+ s.mimeType = type;
7960
+ }
7961
+ return this;
7962
+ },
7963
+
7964
+ // Status-dependent callbacks
7965
+ statusCode: function( map ) {
7966
+ var code;
7967
+ if ( map ) {
7968
+ if ( state < 2 ) {
7969
+ for ( code in map ) {
7970
+ // Lazy-add the new callback in a way that preserves old ones
7971
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
7972
+ }
7973
+ } else {
7974
+ // Execute the appropriate callbacks
7975
+ jqXHR.always( map[ jqXHR.status ] );
7976
+ }
7977
+ }
7978
+ return this;
7979
+ },
7980
+
7981
+ // Cancel the request
7982
+ abort: function( statusText ) {
7983
+ var finalText = statusText || strAbort;
7984
+ if ( transport ) {
7985
+ transport.abort( finalText );
7986
+ }
7987
+ done( 0, finalText );
7988
+ return this;
7989
+ }
7990
+ };
7991
+
7992
+ // Attach deferreds
7993
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
7994
+ jqXHR.success = jqXHR.done;
7995
+ jqXHR.error = jqXHR.fail;
7996
+
7997
+ // Remove hash character (#7531: and string promotion)
7998
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
7999
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
8000
+ // We also use the url parameter if available
8001
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
8002
+
8003
+ // Alias method option to type as per ticket #12004
8004
+ s.type = options.method || options.type || s.method || s.type;
8005
+
8006
+ // Extract dataTypes list
8007
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
8008
+
8009
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
8010
+ if ( s.crossDomain == null ) {
8011
+ parts = rurl.exec( s.url.toLowerCase() );
8012
+ s.crossDomain = !!( parts &&
8013
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
8014
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
8015
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
8016
+ );
8017
+ }
8018
+
8019
+ // Convert data if not already a string
8020
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
8021
+ s.data = jQuery.param( s.data, s.traditional );
8022
+ }
8023
+
8024
+ // Apply prefilters
8025
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
8026
+
8027
+ // If request was aborted inside a prefilter, stop there
8028
+ if ( state === 2 ) {
8029
+ return jqXHR;
8030
+ }
8031
+
8032
+ // We can fire global events as of now if asked to
8033
+ fireGlobals = s.global;
8034
+
8035
+ // Watch for a new set of requests
8036
+ if ( fireGlobals && jQuery.active++ === 0 ) {
8037
+ jQuery.event.trigger("ajaxStart");
8038
+ }
8039
+
8040
+ // Uppercase the type
8041
+ s.type = s.type.toUpperCase();
8042
+
8043
+ // Determine if request has content
8044
+ s.hasContent = !rnoContent.test( s.type );
8045
+
8046
+ // Save the URL in case we're toying with the If-Modified-Since
8047
+ // and/or If-None-Match header later on
8048
+ cacheURL = s.url;
8049
+
8050
+ // More options handling for requests with no content
8051
+ if ( !s.hasContent ) {
8052
+
8053
+ // If data is available, append data to url
8054
+ if ( s.data ) {
8055
+ cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
8056
+ // #9682: remove data so that it's not used in an eventual retry
8057
+ delete s.data;
8058
+ }
8059
+
8060
+ // Add anti-cache in url if needed
8061
+ if ( s.cache === false ) {
8062
+ s.url = rts.test( cacheURL ) ?
8063
+
8064
+ // If there is already a '_' parameter, set its value
8065
+ cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
8066
+
8067
+ // Otherwise add one to the end
8068
+ cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
8069
+ }
8070
+ }
8071
+
8072
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
8073
+ if ( s.ifModified ) {
8074
+ if ( jQuery.lastModified[ cacheURL ] ) {
8075
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
8076
+ }
8077
+ if ( jQuery.etag[ cacheURL ] ) {
8078
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
8079
+ }
8080
+ }
8081
+
8082
+ // Set the correct header, if data is being sent
8083
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
8084
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
8085
+ }
8086
+
8087
+ // Set the Accepts header for the server, depending on the dataType
8088
+ jqXHR.setRequestHeader(
8089
+ "Accept",
8090
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
8091
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
8092
+ s.accepts[ "*" ]
8093
+ );
8094
+
8095
+ // Check for headers option
8096
+ for ( i in s.headers ) {
8097
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
8098
+ }
8099
+
8100
+ // Allow custom headers/mimetypes and early abort
8101
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
8102
+ // Abort if not done already and return
8103
+ return jqXHR.abort();
8104
+ }
8105
+
8106
+ // aborting is no longer a cancellation
8107
+ strAbort = "abort";
8108
+
8109
+ // Install callbacks on deferreds
8110
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
8111
+ jqXHR[ i ]( s[ i ] );
8112
+ }
8113
+
8114
+ // Get transport
8115
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
8116
+
8117
+ // If no transport, we auto-abort
8118
+ if ( !transport ) {
8119
+ done( -1, "No Transport" );
8120
+ } else {
8121
+ jqXHR.readyState = 1;
8122
+
8123
+ // Send global event
8124
+ if ( fireGlobals ) {
8125
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
8126
+ }
8127
+ // Timeout
8128
+ if ( s.async && s.timeout > 0 ) {
8129
+ timeoutTimer = setTimeout(function() {
8130
+ jqXHR.abort("timeout");
8131
+ }, s.timeout );
8132
+ }
8133
+
8134
+ try {
8135
+ state = 1;
8136
+ transport.send( requestHeaders, done );
8137
+ } catch ( e ) {
8138
+ // Propagate exception as error if not done
8139
+ if ( state < 2 ) {
8140
+ done( -1, e );
8141
+ // Simply rethrow otherwise
8142
+ } else {
8143
+ throw e;
8144
+ }
8145
+ }
8146
+ }
8147
+
8148
+ // Callback for when everything is done
8149
+ function done( status, nativeStatusText, responses, headers ) {
8150
+ var isSuccess, success, error, response, modified,
8151
+ statusText = nativeStatusText;
8152
+
8153
+ // Called once
8154
+ if ( state === 2 ) {
8155
+ return;
8156
+ }
8157
+
8158
+ // State is "done" now
8159
+ state = 2;
8160
+
8161
+ // Clear timeout if it exists
8162
+ if ( timeoutTimer ) {
8163
+ clearTimeout( timeoutTimer );
8164
+ }
8165
+
8166
+ // Dereference transport for early garbage collection
8167
+ // (no matter how long the jqXHR object will be used)
8168
+ transport = undefined;
8169
+
8170
+ // Cache response headers
8171
+ responseHeadersString = headers || "";
8172
+
8173
+ // Set readyState
8174
+ jqXHR.readyState = status > 0 ? 4 : 0;
8175
+
8176
+ // Determine if successful
8177
+ isSuccess = status >= 200 && status < 300 || status === 304;
8178
+
8179
+ // Get response data
8180
+ if ( responses ) {
8181
+ response = ajaxHandleResponses( s, jqXHR, responses );
8182
+ }
8183
+
8184
+ // Convert no matter what (that way responseXXX fields are always set)
8185
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
8186
+
8187
+ // If successful, handle type chaining
8188
+ if ( isSuccess ) {
8189
+
8190
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
8191
+ if ( s.ifModified ) {
8192
+ modified = jqXHR.getResponseHeader("Last-Modified");
8193
+ if ( modified ) {
8194
+ jQuery.lastModified[ cacheURL ] = modified;
8195
+ }
8196
+ modified = jqXHR.getResponseHeader("etag");
8197
+ if ( modified ) {
8198
+ jQuery.etag[ cacheURL ] = modified;
8199
+ }
8200
+ }
8201
+
8202
+ // if no content
8203
+ if ( status === 204 || s.type === "HEAD" ) {
8204
+ statusText = "nocontent";
8205
+
8206
+ // if not modified
8207
+ } else if ( status === 304 ) {
8208
+ statusText = "notmodified";
8209
+
8210
+ // If we have data, let's convert it
8211
+ } else {
8212
+ statusText = response.state;
8213
+ success = response.data;
8214
+ error = response.error;
8215
+ isSuccess = !error;
8216
+ }
8217
+ } else {
8218
+ // We extract error from statusText
8219
+ // then normalize statusText and status for non-aborts
8220
+ error = statusText;
8221
+ if ( status || !statusText ) {
8222
+ statusText = "error";
8223
+ if ( status < 0 ) {
8224
+ status = 0;
8225
+ }
8226
+ }
8227
+ }
8228
+
8229
+ // Set data for the fake xhr object
8230
+ jqXHR.status = status;
8231
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
8232
+
8233
+ // Success/Error
8234
+ if ( isSuccess ) {
8235
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
8236
+ } else {
8237
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
8238
+ }
8239
+
8240
+ // Status-dependent callbacks
8241
+ jqXHR.statusCode( statusCode );
8242
+ statusCode = undefined;
8243
+
8244
+ if ( fireGlobals ) {
8245
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
8246
+ [ jqXHR, s, isSuccess ? success : error ] );
8247
+ }
8248
+
8249
+ // Complete
8250
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
8251
+
8252
+ if ( fireGlobals ) {
8253
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
8254
+ // Handle the global AJAX counter
8255
+ if ( !( --jQuery.active ) ) {
8256
+ jQuery.event.trigger("ajaxStop");
8257
+ }
8258
+ }
8259
+ }
8260
+
8261
+ return jqXHR;
8262
+ },
8263
+
8264
+ getJSON: function( url, data, callback ) {
8265
+ return jQuery.get( url, data, callback, "json" );
8266
+ },
8267
+
8268
+ getScript: function( url, callback ) {
8269
+ return jQuery.get( url, undefined, callback, "script" );
8270
+ }
8271
+ });
8272
+
8273
+ jQuery.each( [ "get", "post" ], function( i, method ) {
8274
+ jQuery[ method ] = function( url, data, callback, type ) {
8275
+ // shift arguments if data argument was omitted
8276
+ if ( jQuery.isFunction( data ) ) {
8277
+ type = type || callback;
8278
+ callback = data;
8279
+ data = undefined;
8280
+ }
8281
+
8282
+ return jQuery.ajax({
8283
+ url: url,
8284
+ type: method,
8285
+ dataType: type,
8286
+ data: data,
8287
+ success: callback
8288
+ });
8289
+ };
8290
+ });
8291
+
8292
+ /* Handles responses to an ajax request:
8293
+ * - finds the right dataType (mediates between content-type and expected dataType)
8294
+ * - returns the corresponding response
8295
+ */
8296
+ function ajaxHandleResponses( s, jqXHR, responses ) {
8297
+ var firstDataType, ct, finalDataType, type,
8298
+ contents = s.contents,
8299
+ dataTypes = s.dataTypes;
8300
+
8301
+ // Remove auto dataType and get content-type in the process
8302
+ while( dataTypes[ 0 ] === "*" ) {
8303
+ dataTypes.shift();
8304
+ if ( ct === undefined ) {
8305
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
8306
+ }
8307
+ }
8308
+
8309
+ // Check if we're dealing with a known content-type
8310
+ if ( ct ) {
8311
+ for ( type in contents ) {
8312
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
8313
+ dataTypes.unshift( type );
8314
+ break;
8315
+ }
8316
+ }
8317
+ }
8318
+
8319
+ // Check to see if we have a response for the expected dataType
8320
+ if ( dataTypes[ 0 ] in responses ) {
8321
+ finalDataType = dataTypes[ 0 ];
8322
+ } else {
8323
+ // Try convertible dataTypes
8324
+ for ( type in responses ) {
8325
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
8326
+ finalDataType = type;
8327
+ break;
8328
+ }
8329
+ if ( !firstDataType ) {
8330
+ firstDataType = type;
8331
+ }
8332
+ }
8333
+ // Or just use first one
8334
+ finalDataType = finalDataType || firstDataType;
8335
+ }
8336
+
8337
+ // If we found a dataType
8338
+ // We add the dataType to the list if needed
8339
+ // and return the corresponding response
8340
+ if ( finalDataType ) {
8341
+ if ( finalDataType !== dataTypes[ 0 ] ) {
8342
+ dataTypes.unshift( finalDataType );
8343
+ }
8344
+ return responses[ finalDataType ];
8345
+ }
8346
+ }
8347
+
8348
+ /* Chain conversions given the request and the original response
8349
+ * Also sets the responseXXX fields on the jqXHR instance
8350
+ */
8351
+ function ajaxConvert( s, response, jqXHR, isSuccess ) {
8352
+ var conv2, current, conv, tmp, prev,
8353
+ converters = {},
8354
+ // Work with a copy of dataTypes in case we need to modify it for conversion
8355
+ dataTypes = s.dataTypes.slice();
8356
+
8357
+ // Create converters map with lowercased keys
8358
+ if ( dataTypes[ 1 ] ) {
8359
+ for ( conv in s.converters ) {
8360
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
8361
+ }
8362
+ }
8363
+
8364
+ current = dataTypes.shift();
8365
+
8366
+ // Convert to each sequential dataType
8367
+ while ( current ) {
8368
+
8369
+ if ( s.responseFields[ current ] ) {
8370
+ jqXHR[ s.responseFields[ current ] ] = response;
8371
+ }
8372
+
8373
+ // Apply the dataFilter if provided
8374
+ if ( !prev && isSuccess && s.dataFilter ) {
8375
+ response = s.dataFilter( response, s.dataType );
8376
+ }
8377
+
8378
+ prev = current;
8379
+ current = dataTypes.shift();
8380
+
8381
+ if ( current ) {
8382
+
8383
+ // There's only work to do if current dataType is non-auto
8384
+ if ( current === "*" ) {
8385
+
8386
+ current = prev;
8387
+
8388
+ // Convert response if prev dataType is non-auto and differs from current
8389
+ } else if ( prev !== "*" && prev !== current ) {
8390
+
8391
+ // Seek a direct converter
8392
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
8393
+
8394
+ // If none found, seek a pair
8395
+ if ( !conv ) {
8396
+ for ( conv2 in converters ) {
8397
+
8398
+ // If conv2 outputs current
8399
+ tmp = conv2.split( " " );
8400
+ if ( tmp[ 1 ] === current ) {
8401
+
8402
+ // If prev can be converted to accepted input
8403
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
8404
+ converters[ "* " + tmp[ 0 ] ];
8405
+ if ( conv ) {
8406
+ // Condense equivalence converters
8407
+ if ( conv === true ) {
8408
+ conv = converters[ conv2 ];
8409
+
8410
+ // Otherwise, insert the intermediate dataType
8411
+ } else if ( converters[ conv2 ] !== true ) {
8412
+ current = tmp[ 0 ];
8413
+ dataTypes.unshift( tmp[ 1 ] );
8414
+ }
8415
+ break;
8416
+ }
8417
+ }
8418
+ }
8419
+ }
8420
+
8421
+ // Apply converter (if not an equivalence)
8422
+ if ( conv !== true ) {
8423
+
8424
+ // Unless errors are allowed to bubble, catch and return them
8425
+ if ( conv && s[ "throws" ] ) {
8426
+ response = conv( response );
8427
+ } else {
8428
+ try {
8429
+ response = conv( response );
8430
+ } catch ( e ) {
8431
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
8432
+ }
8433
+ }
8434
+ }
8435
+ }
8436
+ }
8437
+ }
8438
+
8439
+ return { state: "success", data: response };
8440
+ }
8441
+ // Install script dataType
8442
+ jQuery.ajaxSetup({
8443
+ accepts: {
8444
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
8445
+ },
8446
+ contents: {
8447
+ script: /(?:java|ecma)script/
8448
+ },
8449
+ converters: {
8450
+ "text script": function( text ) {
8451
+ jQuery.globalEval( text );
8452
+ return text;
8453
+ }
8454
+ }
8455
+ });
8456
+
8457
+ // Handle cache's special case and global
8458
+ jQuery.ajaxPrefilter( "script", function( s ) {
8459
+ if ( s.cache === undefined ) {
8460
+ s.cache = false;
8461
+ }
8462
+ if ( s.crossDomain ) {
8463
+ s.type = "GET";
8464
+ s.global = false;
8465
+ }
8466
+ });
8467
+
8468
+ // Bind script tag hack transport
8469
+ jQuery.ajaxTransport( "script", function(s) {
8470
+
8471
+ // This transport only deals with cross domain requests
8472
+ if ( s.crossDomain ) {
8473
+
8474
+ var script,
8475
+ head = document.head || jQuery("head")[0] || document.documentElement;
8476
+
8477
+ return {
8478
+
8479
+ send: function( _, callback ) {
8480
+
8481
+ script = document.createElement("script");
8482
+
8483
+ script.async = true;
8484
+
8485
+ if ( s.scriptCharset ) {
8486
+ script.charset = s.scriptCharset;
8487
+ }
8488
+
8489
+ script.src = s.url;
8490
+
8491
+ // Attach handlers for all browsers
8492
+ script.onload = script.onreadystatechange = function( _, isAbort ) {
8493
+
8494
+ if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
8495
+
8496
+ // Handle memory leak in IE
8497
+ script.onload = script.onreadystatechange = null;
8498
+
8499
+ // Remove the script
8500
+ if ( script.parentNode ) {
8501
+ script.parentNode.removeChild( script );
8502
+ }
8503
+
8504
+ // Dereference the script
8505
+ script = null;
8506
+
8507
+ // Callback if not abort
8508
+ if ( !isAbort ) {
8509
+ callback( 200, "success" );
8510
+ }
8511
+ }
8512
+ };
8513
+
8514
+ // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
8515
+ // Use native DOM manipulation to avoid our domManip AJAX trickery
8516
+ head.insertBefore( script, head.firstChild );
8517
+ },
8518
+
8519
+ abort: function() {
8520
+ if ( script ) {
8521
+ script.onload( undefined, true );
8522
+ }
8523
+ }
8524
+ };
8525
+ }
8526
+ });
8527
+ var oldCallbacks = [],
8528
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
8529
+
8530
+ // Default jsonp settings
8531
+ jQuery.ajaxSetup({
8532
+ jsonp: "callback",
8533
+ jsonpCallback: function() {
8534
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
8535
+ this[ callback ] = true;
8536
+ return callback;
8537
+ }
8538
+ });
8539
+
8540
+ // Detect, normalize options and install callbacks for jsonp requests
8541
+ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
8542
+
8543
+ var callbackName, overwritten, responseContainer,
8544
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
8545
+ "url" :
8546
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
8547
+ );
8548
+
8549
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
8550
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
8551
+
8552
+ // Get callback name, remembering preexisting value associated with it
8553
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
8554
+ s.jsonpCallback() :
8555
+ s.jsonpCallback;
8556
+
8557
+ // Insert callback into url or form data
8558
+ if ( jsonProp ) {
8559
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
8560
+ } else if ( s.jsonp !== false ) {
8561
+ s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
8562
+ }
8563
+
8564
+ // Use data converter to retrieve json after script execution
8565
+ s.converters["script json"] = function() {
8566
+ if ( !responseContainer ) {
8567
+ jQuery.error( callbackName + " was not called" );
8568
+ }
8569
+ return responseContainer[ 0 ];
8570
+ };
8571
+
8572
+ // force json dataType
8573
+ s.dataTypes[ 0 ] = "json";
8574
+
8575
+ // Install callback
8576
+ overwritten = window[ callbackName ];
8577
+ window[ callbackName ] = function() {
8578
+ responseContainer = arguments;
8579
+ };
8580
+
8581
+ // Clean-up function (fires after converters)
8582
+ jqXHR.always(function() {
8583
+ // Restore preexisting value
8584
+ window[ callbackName ] = overwritten;
8585
+
8586
+ // Save back as free
8587
+ if ( s[ callbackName ] ) {
8588
+ // make sure that re-using the options doesn't screw things around
8589
+ s.jsonpCallback = originalSettings.jsonpCallback;
8590
+
8591
+ // save the callback name for future use
8592
+ oldCallbacks.push( callbackName );
8593
+ }
8594
+
8595
+ // Call if it was a function and we have a response
8596
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
8597
+ overwritten( responseContainer[ 0 ] );
8598
+ }
8599
+
8600
+ responseContainer = overwritten = undefined;
8601
+ });
8602
+
8603
+ // Delegate to script
8604
+ return "script";
8605
+ }
8606
+ });
8607
+ var xhrCallbacks, xhrSupported,
8608
+ xhrId = 0,
8609
+ // #5280: Internet Explorer will keep connections alive if we don't abort on unload
8610
+ xhrOnUnloadAbort = window.ActiveXObject && function() {
8611
+ // Abort all pending requests
8612
+ var key;
8613
+ for ( key in xhrCallbacks ) {
8614
+ xhrCallbacks[ key ]( undefined, true );
8615
+ }
8616
+ };
8617
+
8618
+ // Functions to create xhrs
8619
+ function createStandardXHR() {
8620
+ try {
8621
+ return new window.XMLHttpRequest();
8622
+ } catch( e ) {}
8623
+ }
8624
+
8625
+ function createActiveXHR() {
8626
+ try {
8627
+ return new window.ActiveXObject("Microsoft.XMLHTTP");
8628
+ } catch( e ) {}
8629
+ }
8630
+
8631
+ // Create the request object
8632
+ // (This is still attached to ajaxSettings for backward compatibility)
8633
+ jQuery.ajaxSettings.xhr = window.ActiveXObject ?
8634
+ /* Microsoft failed to properly
8635
+ * implement the XMLHttpRequest in IE7 (can't request local files),
8636
+ * so we use the ActiveXObject when it is available
8637
+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
8638
+ * we need a fallback.
8639
+ */
8640
+ function() {
8641
+ return !this.isLocal && createStandardXHR() || createActiveXHR();
8642
+ } :
8643
+ // For all other browsers, use the standard XMLHttpRequest object
8644
+ createStandardXHR;
8645
+
8646
+ // Determine support properties
8647
+ xhrSupported = jQuery.ajaxSettings.xhr();
8648
+ jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
8649
+ xhrSupported = jQuery.support.ajax = !!xhrSupported;
8650
+
8651
+ // Create transport if the browser can provide an xhr
8652
+ if ( xhrSupported ) {
8653
+
8654
+ jQuery.ajaxTransport(function( s ) {
8655
+ // Cross domain only allowed if supported through XMLHttpRequest
8656
+ if ( !s.crossDomain || jQuery.support.cors ) {
8657
+
8658
+ var callback;
8659
+
8660
+ return {
8661
+ send: function( headers, complete ) {
8662
+
8663
+ // Get a new xhr
8664
+ var handle, i,
8665
+ xhr = s.xhr();
8666
+
8667
+ // Open the socket
8668
+ // Passing null username, generates a login popup on Opera (#2865)
8669
+ if ( s.username ) {
8670
+ xhr.open( s.type, s.url, s.async, s.username, s.password );
8671
+ } else {
8672
+ xhr.open( s.type, s.url, s.async );
8673
+ }
8674
+
8675
+ // Apply custom fields if provided
8676
+ if ( s.xhrFields ) {
8677
+ for ( i in s.xhrFields ) {
8678
+ xhr[ i ] = s.xhrFields[ i ];
8679
+ }
8680
+ }
8681
+
8682
+ // Override mime type if needed
8683
+ if ( s.mimeType && xhr.overrideMimeType ) {
8684
+ xhr.overrideMimeType( s.mimeType );
8685
+ }
8686
+
8687
+ // X-Requested-With header
8688
+ // For cross-domain requests, seeing as conditions for a preflight are
8689
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
8690
+ // (it can always be set on a per-request basis or even using ajaxSetup)
8691
+ // For same-domain requests, won't change header if already provided.
8692
+ if ( !s.crossDomain && !headers["X-Requested-With"] ) {
8693
+ headers["X-Requested-With"] = "XMLHttpRequest";
8694
+ }
8695
+
8696
+ // Need an extra try/catch for cross domain requests in Firefox 3
8697
+ try {
8698
+ for ( i in headers ) {
8699
+ xhr.setRequestHeader( i, headers[ i ] );
8700
+ }
8701
+ } catch( err ) {}
8702
+
8703
+ // Do send the request
8704
+ // This may raise an exception which is actually
8705
+ // handled in jQuery.ajax (so no try/catch here)
8706
+ xhr.send( ( s.hasContent && s.data ) || null );
8707
+
8708
+ // Listener
8709
+ callback = function( _, isAbort ) {
8710
+ var status, responseHeaders, statusText, responses;
8711
+
8712
+ // Firefox throws exceptions when accessing properties
8713
+ // of an xhr when a network error occurred
8714
+ // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
8715
+ try {
8716
+
8717
+ // Was never called and is aborted or complete
8718
+ if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
8719
+
8720
+ // Only called once
8721
+ callback = undefined;
8722
+
8723
+ // Do not keep as active anymore
8724
+ if ( handle ) {
8725
+ xhr.onreadystatechange = jQuery.noop;
8726
+ if ( xhrOnUnloadAbort ) {
8727
+ delete xhrCallbacks[ handle ];
8728
+ }
8729
+ }
8730
+
8731
+ // If it's an abort
8732
+ if ( isAbort ) {
8733
+ // Abort it manually if needed
8734
+ if ( xhr.readyState !== 4 ) {
8735
+ xhr.abort();
8736
+ }
8737
+ } else {
8738
+ responses = {};
8739
+ status = xhr.status;
8740
+ responseHeaders = xhr.getAllResponseHeaders();
8741
+
8742
+ // When requesting binary data, IE6-9 will throw an exception
8743
+ // on any attempt to access responseText (#11426)
8744
+ if ( typeof xhr.responseText === "string" ) {
8745
+ responses.text = xhr.responseText;
8746
+ }
8747
+
8748
+ // Firefox throws an exception when accessing
8749
+ // statusText for faulty cross-domain requests
8750
+ try {
8751
+ statusText = xhr.statusText;
8752
+ } catch( e ) {
8753
+ // We normalize with Webkit giving an empty statusText
8754
+ statusText = "";
8755
+ }
8756
+
8757
+ // Filter status for non standard behaviors
8758
+
8759
+ // If the request is local and we have data: assume a success
8760
+ // (success with no data won't get notified, that's the best we
8761
+ // can do given current implementations)
8762
+ if ( !status && s.isLocal && !s.crossDomain ) {
8763
+ status = responses.text ? 200 : 404;
8764
+ // IE - #1450: sometimes returns 1223 when it should be 204
8765
+ } else if ( status === 1223 ) {
8766
+ status = 204;
8767
+ }
8768
+ }
8769
+ }
8770
+ } catch( firefoxAccessException ) {
8771
+ if ( !isAbort ) {
8772
+ complete( -1, firefoxAccessException );
8773
+ }
8774
+ }
8775
+
8776
+ // Call complete if needed
8777
+ if ( responses ) {
8778
+ complete( status, statusText, responses, responseHeaders );
8779
+ }
8780
+ };
8781
+
8782
+ if ( !s.async ) {
8783
+ // if we're in sync mode we fire the callback
8784
+ callback();
8785
+ } else if ( xhr.readyState === 4 ) {
8786
+ // (IE6 & IE7) if it's in cache and has been
8787
+ // retrieved directly we need to fire the callback
8788
+ setTimeout( callback );
8789
+ } else {
8790
+ handle = ++xhrId;
8791
+ if ( xhrOnUnloadAbort ) {
8792
+ // Create the active xhrs callbacks list if needed
8793
+ // and attach the unload handler
8794
+ if ( !xhrCallbacks ) {
8795
+ xhrCallbacks = {};
8796
+ jQuery( window ).unload( xhrOnUnloadAbort );
8797
+ }
8798
+ // Add to list of active xhrs callbacks
8799
+ xhrCallbacks[ handle ] = callback;
8800
+ }
8801
+ xhr.onreadystatechange = callback;
8802
+ }
8803
+ },
8804
+
8805
+ abort: function() {
8806
+ if ( callback ) {
8807
+ callback( undefined, true );
8808
+ }
8809
+ }
8810
+ };
8811
+ }
8812
+ });
8813
+ }
8814
+ var fxNow, timerId,
8815
+ rfxtypes = /^(?:toggle|show|hide)$/,
8816
+ rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
8817
+ rrun = /queueHooks$/,
8818
+ animationPrefilters = [ defaultPrefilter ],
8819
+ tweeners = {
8820
+ "*": [function( prop, value ) {
8821
+ var tween = this.createTween( prop, value ),
8822
+ target = tween.cur(),
8823
+ parts = rfxnum.exec( value ),
8824
+ unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
8825
+
8826
+ // Starting value computation is required for potential unit mismatches
8827
+ start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
8828
+ rfxnum.exec( jQuery.css( tween.elem, prop ) ),
8829
+ scale = 1,
8830
+ maxIterations = 20;
8831
+
8832
+ if ( start && start[ 3 ] !== unit ) {
8833
+ // Trust units reported by jQuery.css
8834
+ unit = unit || start[ 3 ];
8835
+
8836
+ // Make sure we update the tween properties later on
8837
+ parts = parts || [];
8838
+
8839
+ // Iteratively approximate from a nonzero starting point
8840
+ start = +target || 1;
8841
+
8842
+ do {
8843
+ // If previous iteration zeroed out, double until we get *something*
8844
+ // Use a string for doubling factor so we don't accidentally see scale as unchanged below
8845
+ scale = scale || ".5";
8846
+
8847
+ // Adjust and apply
8848
+ start = start / scale;
8849
+ jQuery.style( tween.elem, prop, start + unit );
8850
+
8851
+ // Update scale, tolerating zero or NaN from tween.cur()
8852
+ // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
8853
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
8854
+ }
8855
+
8856
+ // Update tween properties
8857
+ if ( parts ) {
8858
+ start = tween.start = +start || +target || 0;
8859
+ tween.unit = unit;
8860
+ // If a +=/-= token was provided, we're doing a relative animation
8861
+ tween.end = parts[ 1 ] ?
8862
+ start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
8863
+ +parts[ 2 ];
8864
+ }
8865
+
8866
+ return tween;
8867
+ }]
8868
+ };
8869
+
8870
+ // Animations created synchronously will run synchronously
8871
+ function createFxNow() {
8872
+ setTimeout(function() {
8873
+ fxNow = undefined;
8874
+ });
8875
+ return ( fxNow = jQuery.now() );
8876
+ }
8877
+
8878
+ function createTween( value, prop, animation ) {
8879
+ var tween,
8880
+ collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
8881
+ index = 0,
8882
+ length = collection.length;
8883
+ for ( ; index < length; index++ ) {
8884
+ if ( (tween = collection[ index ].call( animation, prop, value )) ) {
8885
+
8886
+ // we're done with this property
8887
+ return tween;
8888
+ }
8889
+ }
8890
+ }
8891
+
8892
+ function Animation( elem, properties, options ) {
8893
+ var result,
8894
+ stopped,
8895
+ index = 0,
8896
+ length = animationPrefilters.length,
8897
+ deferred = jQuery.Deferred().always( function() {
8898
+ // don't match elem in the :animated selector
8899
+ delete tick.elem;
8900
+ }),
8901
+ tick = function() {
8902
+ if ( stopped ) {
8903
+ return false;
8904
+ }
8905
+ var currentTime = fxNow || createFxNow(),
8906
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
8907
+ // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
8908
+ temp = remaining / animation.duration || 0,
8909
+ percent = 1 - temp,
8910
+ index = 0,
8911
+ length = animation.tweens.length;
8912
+
8913
+ for ( ; index < length ; index++ ) {
8914
+ animation.tweens[ index ].run( percent );
8915
+ }
8916
+
8917
+ deferred.notifyWith( elem, [ animation, percent, remaining ]);
8918
+
8919
+ if ( percent < 1 && length ) {
8920
+ return remaining;
8921
+ } else {
8922
+ deferred.resolveWith( elem, [ animation ] );
8923
+ return false;
8924
+ }
8925
+ },
8926
+ animation = deferred.promise({
8927
+ elem: elem,
8928
+ props: jQuery.extend( {}, properties ),
8929
+ opts: jQuery.extend( true, { specialEasing: {} }, options ),
8930
+ originalProperties: properties,
8931
+ originalOptions: options,
8932
+ startTime: fxNow || createFxNow(),
8933
+ duration: options.duration,
8934
+ tweens: [],
8935
+ createTween: function( prop, end ) {
8936
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
8937
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
8938
+ animation.tweens.push( tween );
8939
+ return tween;
8940
+ },
8941
+ stop: function( gotoEnd ) {
8942
+ var index = 0,
8943
+ // if we are going to the end, we want to run all the tweens
8944
+ // otherwise we skip this part
8945
+ length = gotoEnd ? animation.tweens.length : 0;
8946
+ if ( stopped ) {
8947
+ return this;
8948
+ }
8949
+ stopped = true;
8950
+ for ( ; index < length ; index++ ) {
8951
+ animation.tweens[ index ].run( 1 );
8952
+ }
8953
+
8954
+ // resolve when we played the last frame
8955
+ // otherwise, reject
8956
+ if ( gotoEnd ) {
8957
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
8958
+ } else {
8959
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
8960
+ }
8961
+ return this;
8962
+ }
8963
+ }),
8964
+ props = animation.props;
8965
+
8966
+ propFilter( props, animation.opts.specialEasing );
8967
+
8968
+ for ( ; index < length ; index++ ) {
8969
+ result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
8970
+ if ( result ) {
8971
+ return result;
8972
+ }
8973
+ }
8974
+
8975
+ jQuery.map( props, createTween, animation );
8976
+
8977
+ if ( jQuery.isFunction( animation.opts.start ) ) {
8978
+ animation.opts.start.call( elem, animation );
8979
+ }
8980
+
8981
+ jQuery.fx.timer(
8982
+ jQuery.extend( tick, {
8983
+ elem: elem,
8984
+ anim: animation,
8985
+ queue: animation.opts.queue
8986
+ })
8987
+ );
8988
+
8989
+ // attach callbacks from options
8990
+ return animation.progress( animation.opts.progress )
8991
+ .done( animation.opts.done, animation.opts.complete )
8992
+ .fail( animation.opts.fail )
8993
+ .always( animation.opts.always );
8994
+ }
8995
+
8996
+ function propFilter( props, specialEasing ) {
8997
+ var index, name, easing, value, hooks;
8998
+
8999
+ // camelCase, specialEasing and expand cssHook pass
9000
+ for ( index in props ) {
9001
+ name = jQuery.camelCase( index );
9002
+ easing = specialEasing[ name ];
9003
+ value = props[ index ];
9004
+ if ( jQuery.isArray( value ) ) {
9005
+ easing = value[ 1 ];
9006
+ value = props[ index ] = value[ 0 ];
9007
+ }
9008
+
9009
+ if ( index !== name ) {
9010
+ props[ name ] = value;
9011
+ delete props[ index ];
9012
+ }
9013
+
9014
+ hooks = jQuery.cssHooks[ name ];
9015
+ if ( hooks && "expand" in hooks ) {
9016
+ value = hooks.expand( value );
9017
+ delete props[ name ];
9018
+
9019
+ // not quite $.extend, this wont overwrite keys already present.
9020
+ // also - reusing 'index' from above because we have the correct "name"
9021
+ for ( index in value ) {
9022
+ if ( !( index in props ) ) {
9023
+ props[ index ] = value[ index ];
9024
+ specialEasing[ index ] = easing;
9025
+ }
9026
+ }
9027
+ } else {
9028
+ specialEasing[ name ] = easing;
9029
+ }
9030
+ }
9031
+ }
9032
+
9033
+ jQuery.Animation = jQuery.extend( Animation, {
9034
+
9035
+ tweener: function( props, callback ) {
9036
+ if ( jQuery.isFunction( props ) ) {
9037
+ callback = props;
9038
+ props = [ "*" ];
9039
+ } else {
9040
+ props = props.split(" ");
9041
+ }
9042
+
9043
+ var prop,
9044
+ index = 0,
9045
+ length = props.length;
9046
+
9047
+ for ( ; index < length ; index++ ) {
9048
+ prop = props[ index ];
9049
+ tweeners[ prop ] = tweeners[ prop ] || [];
9050
+ tweeners[ prop ].unshift( callback );
9051
+ }
9052
+ },
9053
+
9054
+ prefilter: function( callback, prepend ) {
9055
+ if ( prepend ) {
9056
+ animationPrefilters.unshift( callback );
9057
+ } else {
9058
+ animationPrefilters.push( callback );
9059
+ }
9060
+ }
9061
+ });
9062
+
9063
+ function defaultPrefilter( elem, props, opts ) {
9064
+ /* jshint validthis: true */
9065
+ var prop, value, toggle, tween, hooks, oldfire,
9066
+ anim = this,
9067
+ orig = {},
9068
+ style = elem.style,
9069
+ hidden = elem.nodeType && isHidden( elem ),
9070
+ dataShow = jQuery._data( elem, "fxshow" );
9071
+
9072
+ // handle queue: false promises
9073
+ if ( !opts.queue ) {
9074
+ hooks = jQuery._queueHooks( elem, "fx" );
9075
+ if ( hooks.unqueued == null ) {
9076
+ hooks.unqueued = 0;
9077
+ oldfire = hooks.empty.fire;
9078
+ hooks.empty.fire = function() {
9079
+ if ( !hooks.unqueued ) {
9080
+ oldfire();
9081
+ }
9082
+ };
9083
+ }
9084
+ hooks.unqueued++;
9085
+
9086
+ anim.always(function() {
9087
+ // doing this makes sure that the complete handler will be called
9088
+ // before this completes
9089
+ anim.always(function() {
9090
+ hooks.unqueued--;
9091
+ if ( !jQuery.queue( elem, "fx" ).length ) {
9092
+ hooks.empty.fire();
9093
+ }
9094
+ });
9095
+ });
9096
+ }
9097
+
9098
+ // height/width overflow pass
9099
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
9100
+ // Make sure that nothing sneaks out
9101
+ // Record all 3 overflow attributes because IE does not
9102
+ // change the overflow attribute when overflowX and
9103
+ // overflowY are set to the same value
9104
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
9105
+
9106
+ // Set display property to inline-block for height/width
9107
+ // animations on inline elements that are having width/height animated
9108
+ if ( jQuery.css( elem, "display" ) === "inline" &&
9109
+ jQuery.css( elem, "float" ) === "none" ) {
9110
+
9111
+ // inline-level elements accept inline-block;
9112
+ // block-level elements need to be inline with layout
9113
+ if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
9114
+ style.display = "inline-block";
9115
+
9116
+ } else {
9117
+ style.zoom = 1;
9118
+ }
9119
+ }
9120
+ }
9121
+
9122
+ if ( opts.overflow ) {
9123
+ style.overflow = "hidden";
9124
+ if ( !jQuery.support.shrinkWrapBlocks ) {
9125
+ anim.always(function() {
9126
+ style.overflow = opts.overflow[ 0 ];
9127
+ style.overflowX = opts.overflow[ 1 ];
9128
+ style.overflowY = opts.overflow[ 2 ];
9129
+ });
9130
+ }
9131
+ }
9132
+
9133
+
9134
+ // show/hide pass
9135
+ for ( prop in props ) {
9136
+ value = props[ prop ];
9137
+ if ( rfxtypes.exec( value ) ) {
9138
+ delete props[ prop ];
9139
+ toggle = toggle || value === "toggle";
9140
+ if ( value === ( hidden ? "hide" : "show" ) ) {
9141
+ continue;
9142
+ }
9143
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
9144
+ }
9145
+ }
9146
+
9147
+ if ( !jQuery.isEmptyObject( orig ) ) {
9148
+ if ( dataShow ) {
9149
+ if ( "hidden" in dataShow ) {
9150
+ hidden = dataShow.hidden;
9151
+ }
9152
+ } else {
9153
+ dataShow = jQuery._data( elem, "fxshow", {} );
9154
+ }
9155
+
9156
+ // store state if its toggle - enables .stop().toggle() to "reverse"
9157
+ if ( toggle ) {
9158
+ dataShow.hidden = !hidden;
9159
+ }
9160
+ if ( hidden ) {
9161
+ jQuery( elem ).show();
9162
+ } else {
9163
+ anim.done(function() {
9164
+ jQuery( elem ).hide();
9165
+ });
9166
+ }
9167
+ anim.done(function() {
9168
+ var prop;
9169
+ jQuery._removeData( elem, "fxshow" );
9170
+ for ( prop in orig ) {
9171
+ jQuery.style( elem, prop, orig[ prop ] );
9172
+ }
9173
+ });
9174
+ for ( prop in orig ) {
9175
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
9176
+
9177
+ if ( !( prop in dataShow ) ) {
9178
+ dataShow[ prop ] = tween.start;
9179
+ if ( hidden ) {
9180
+ tween.end = tween.start;
9181
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
9182
+ }
9183
+ }
9184
+ }
9185
+ }
9186
+ }
9187
+
9188
+ function Tween( elem, options, prop, end, easing ) {
9189
+ return new Tween.prototype.init( elem, options, prop, end, easing );
9190
+ }
9191
+ jQuery.Tween = Tween;
9192
+
9193
+ Tween.prototype = {
9194
+ constructor: Tween,
9195
+ init: function( elem, options, prop, end, easing, unit ) {
9196
+ this.elem = elem;
9197
+ this.prop = prop;
9198
+ this.easing = easing || "swing";
9199
+ this.options = options;
9200
+ this.start = this.now = this.cur();
9201
+ this.end = end;
9202
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
9203
+ },
9204
+ cur: function() {
9205
+ var hooks = Tween.propHooks[ this.prop ];
9206
+
9207
+ return hooks && hooks.get ?
9208
+ hooks.get( this ) :
9209
+ Tween.propHooks._default.get( this );
9210
+ },
9211
+ run: function( percent ) {
9212
+ var eased,
9213
+ hooks = Tween.propHooks[ this.prop ];
9214
+
9215
+ if ( this.options.duration ) {
9216
+ this.pos = eased = jQuery.easing[ this.easing ](
9217
+ percent, this.options.duration * percent, 0, 1, this.options.duration
9218
+ );
9219
+ } else {
9220
+ this.pos = eased = percent;
9221
+ }
9222
+ this.now = ( this.end - this.start ) * eased + this.start;
9223
+
9224
+ if ( this.options.step ) {
9225
+ this.options.step.call( this.elem, this.now, this );
9226
+ }
9227
+
9228
+ if ( hooks && hooks.set ) {
9229
+ hooks.set( this );
9230
+ } else {
9231
+ Tween.propHooks._default.set( this );
9232
+ }
9233
+ return this;
9234
+ }
9235
+ };
9236
+
9237
+ Tween.prototype.init.prototype = Tween.prototype;
9238
+
9239
+ Tween.propHooks = {
9240
+ _default: {
9241
+ get: function( tween ) {
9242
+ var result;
9243
+
9244
+ if ( tween.elem[ tween.prop ] != null &&
9245
+ (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
9246
+ return tween.elem[ tween.prop ];
9247
+ }
9248
+
9249
+ // passing an empty string as a 3rd parameter to .css will automatically
9250
+ // attempt a parseFloat and fallback to a string if the parse fails
9251
+ // so, simple values such as "10px" are parsed to Float.
9252
+ // complex values such as "rotate(1rad)" are returned as is.
9253
+ result = jQuery.css( tween.elem, tween.prop, "" );
9254
+ // Empty strings, null, undefined and "auto" are converted to 0.
9255
+ return !result || result === "auto" ? 0 : result;
9256
+ },
9257
+ set: function( tween ) {
9258
+ // use step hook for back compat - use cssHook if its there - use .style if its
9259
+ // available and use plain properties where available
9260
+ if ( jQuery.fx.step[ tween.prop ] ) {
9261
+ jQuery.fx.step[ tween.prop ]( tween );
9262
+ } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
9263
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
9264
+ } else {
9265
+ tween.elem[ tween.prop ] = tween.now;
9266
+ }
9267
+ }
9268
+ }
9269
+ };
9270
+
9271
+ // Support: IE <=9
9272
+ // Panic based approach to setting things on disconnected nodes
9273
+
9274
+ Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
9275
+ set: function( tween ) {
9276
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
9277
+ tween.elem[ tween.prop ] = tween.now;
9278
+ }
9279
+ }
9280
+ };
9281
+
9282
+ jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
9283
+ var cssFn = jQuery.fn[ name ];
9284
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
9285
+ return speed == null || typeof speed === "boolean" ?
9286
+ cssFn.apply( this, arguments ) :
9287
+ this.animate( genFx( name, true ), speed, easing, callback );
9288
+ };
9289
+ });
9290
+
9291
+ jQuery.fn.extend({
9292
+ fadeTo: function( speed, to, easing, callback ) {
9293
+
9294
+ // show any hidden elements after setting opacity to 0
9295
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
9296
+
9297
+ // animate to the value specified
9298
+ .end().animate({ opacity: to }, speed, easing, callback );
9299
+ },
9300
+ animate: function( prop, speed, easing, callback ) {
9301
+ var empty = jQuery.isEmptyObject( prop ),
9302
+ optall = jQuery.speed( speed, easing, callback ),
9303
+ doAnimation = function() {
9304
+ // Operate on a copy of prop so per-property easing won't be lost
9305
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
9306
+
9307
+ // Empty animations, or finishing resolves immediately
9308
+ if ( empty || jQuery._data( this, "finish" ) ) {
9309
+ anim.stop( true );
9310
+ }
9311
+ };
9312
+ doAnimation.finish = doAnimation;
9313
+
9314
+ return empty || optall.queue === false ?
9315
+ this.each( doAnimation ) :
9316
+ this.queue( optall.queue, doAnimation );
9317
+ },
9318
+ stop: function( type, clearQueue, gotoEnd ) {
9319
+ var stopQueue = function( hooks ) {
9320
+ var stop = hooks.stop;
9321
+ delete hooks.stop;
9322
+ stop( gotoEnd );
9323
+ };
9324
+
9325
+ if ( typeof type !== "string" ) {
9326
+ gotoEnd = clearQueue;
9327
+ clearQueue = type;
9328
+ type = undefined;
9329
+ }
9330
+ if ( clearQueue && type !== false ) {
9331
+ this.queue( type || "fx", [] );
9332
+ }
9333
+
9334
+ return this.each(function() {
9335
+ var dequeue = true,
9336
+ index = type != null && type + "queueHooks",
9337
+ timers = jQuery.timers,
9338
+ data = jQuery._data( this );
9339
+
9340
+ if ( index ) {
9341
+ if ( data[ index ] && data[ index ].stop ) {
9342
+ stopQueue( data[ index ] );
9343
+ }
9344
+ } else {
9345
+ for ( index in data ) {
9346
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
9347
+ stopQueue( data[ index ] );
9348
+ }
9349
+ }
9350
+ }
9351
+
9352
+ for ( index = timers.length; index--; ) {
9353
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
9354
+ timers[ index ].anim.stop( gotoEnd );
9355
+ dequeue = false;
9356
+ timers.splice( index, 1 );
9357
+ }
9358
+ }
9359
+
9360
+ // start the next in the queue if the last step wasn't forced
9361
+ // timers currently will call their complete callbacks, which will dequeue
9362
+ // but only if they were gotoEnd
9363
+ if ( dequeue || !gotoEnd ) {
9364
+ jQuery.dequeue( this, type );
9365
+ }
9366
+ });
9367
+ },
9368
+ finish: function( type ) {
9369
+ if ( type !== false ) {
9370
+ type = type || "fx";
9371
+ }
9372
+ return this.each(function() {
9373
+ var index,
9374
+ data = jQuery._data( this ),
9375
+ queue = data[ type + "queue" ],
9376
+ hooks = data[ type + "queueHooks" ],
9377
+ timers = jQuery.timers,
9378
+ length = queue ? queue.length : 0;
9379
+
9380
+ // enable finishing flag on private data
9381
+ data.finish = true;
9382
+
9383
+ // empty the queue first
9384
+ jQuery.queue( this, type, [] );
9385
+
9386
+ if ( hooks && hooks.stop ) {
9387
+ hooks.stop.call( this, true );
9388
+ }
9389
+
9390
+ // look for any active animations, and finish them
9391
+ for ( index = timers.length; index--; ) {
9392
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
9393
+ timers[ index ].anim.stop( true );
9394
+ timers.splice( index, 1 );
9395
+ }
9396
+ }
9397
+
9398
+ // look for any animations in the old queue and finish them
9399
+ for ( index = 0; index < length; index++ ) {
9400
+ if ( queue[ index ] && queue[ index ].finish ) {
9401
+ queue[ index ].finish.call( this );
9402
+ }
9403
+ }
9404
+
9405
+ // turn off finishing flag
9406
+ delete data.finish;
9407
+ });
9408
+ }
9409
+ });
9410
+
9411
+ // Generate parameters to create a standard animation
9412
+ function genFx( type, includeWidth ) {
9413
+ var which,
9414
+ attrs = { height: type },
9415
+ i = 0;
9416
+
9417
+ // if we include width, step value is 1 to do all cssExpand values,
9418
+ // if we don't include width, step value is 2 to skip over Left and Right
9419
+ includeWidth = includeWidth? 1 : 0;
9420
+ for( ; i < 4 ; i += 2 - includeWidth ) {
9421
+ which = cssExpand[ i ];
9422
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
9423
+ }
9424
+
9425
+ if ( includeWidth ) {
9426
+ attrs.opacity = attrs.width = type;
9427
+ }
9428
+
9429
+ return attrs;
9430
+ }
9431
+
9432
+ // Generate shortcuts for custom animations
9433
+ jQuery.each({
9434
+ slideDown: genFx("show"),
9435
+ slideUp: genFx("hide"),
9436
+ slideToggle: genFx("toggle"),
9437
+ fadeIn: { opacity: "show" },
9438
+ fadeOut: { opacity: "hide" },
9439
+ fadeToggle: { opacity: "toggle" }
9440
+ }, function( name, props ) {
9441
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
9442
+ return this.animate( props, speed, easing, callback );
9443
+ };
9444
+ });
9445
+
9446
+ jQuery.speed = function( speed, easing, fn ) {
9447
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
9448
+ complete: fn || !fn && easing ||
9449
+ jQuery.isFunction( speed ) && speed,
9450
+ duration: speed,
9451
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
9452
+ };
9453
+
9454
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
9455
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
9456
+
9457
+ // normalize opt.queue - true/undefined/null -> "fx"
9458
+ if ( opt.queue == null || opt.queue === true ) {
9459
+ opt.queue = "fx";
9460
+ }
9461
+
9462
+ // Queueing
9463
+ opt.old = opt.complete;
9464
+
9465
+ opt.complete = function() {
9466
+ if ( jQuery.isFunction( opt.old ) ) {
9467
+ opt.old.call( this );
9468
+ }
9469
+
9470
+ if ( opt.queue ) {
9471
+ jQuery.dequeue( this, opt.queue );
9472
+ }
9473
+ };
9474
+
9475
+ return opt;
9476
+ };
9477
+
9478
+ jQuery.easing = {
9479
+ linear: function( p ) {
9480
+ return p;
9481
+ },
9482
+ swing: function( p ) {
9483
+ return 0.5 - Math.cos( p*Math.PI ) / 2;
9484
+ }
9485
+ };
9486
+
9487
+ jQuery.timers = [];
9488
+ jQuery.fx = Tween.prototype.init;
9489
+ jQuery.fx.tick = function() {
9490
+ var timer,
9491
+ timers = jQuery.timers,
9492
+ i = 0;
9493
+
9494
+ fxNow = jQuery.now();
9495
+
9496
+ for ( ; i < timers.length; i++ ) {
9497
+ timer = timers[ i ];
9498
+ // Checks the timer has not already been removed
9499
+ if ( !timer() && timers[ i ] === timer ) {
9500
+ timers.splice( i--, 1 );
9501
+ }
9502
+ }
9503
+
9504
+ if ( !timers.length ) {
9505
+ jQuery.fx.stop();
9506
+ }
9507
+ fxNow = undefined;
9508
+ };
9509
+
9510
+ jQuery.fx.timer = function( timer ) {
9511
+ if ( timer() && jQuery.timers.push( timer ) ) {
9512
+ jQuery.fx.start();
9513
+ }
9514
+ };
9515
+
9516
+ jQuery.fx.interval = 13;
9517
+
9518
+ jQuery.fx.start = function() {
9519
+ if ( !timerId ) {
9520
+ timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
9521
+ }
9522
+ };
9523
+
9524
+ jQuery.fx.stop = function() {
9525
+ clearInterval( timerId );
9526
+ timerId = null;
9527
+ };
9528
+
9529
+ jQuery.fx.speeds = {
9530
+ slow: 600,
9531
+ fast: 200,
9532
+ // Default speed
9533
+ _default: 400
9534
+ };
9535
+
9536
+ // Back Compat <1.8 extension point
9537
+ jQuery.fx.step = {};
9538
+
9539
+ if ( jQuery.expr && jQuery.expr.filters ) {
9540
+ jQuery.expr.filters.animated = function( elem ) {
9541
+ return jQuery.grep(jQuery.timers, function( fn ) {
9542
+ return elem === fn.elem;
9543
+ }).length;
9544
+ };
9545
+ }
9546
+ jQuery.fn.offset = function( options ) {
9547
+ if ( arguments.length ) {
9548
+ return options === undefined ?
9549
+ this :
9550
+ this.each(function( i ) {
9551
+ jQuery.offset.setOffset( this, options, i );
9552
+ });
9553
+ }
9554
+
9555
+ var docElem, win,
9556
+ box = { top: 0, left: 0 },
9557
+ elem = this[ 0 ],
9558
+ doc = elem && elem.ownerDocument;
9559
+
9560
+ if ( !doc ) {
9561
+ return;
9562
+ }
9563
+
9564
+ docElem = doc.documentElement;
9565
+
9566
+ // Make sure it's not a disconnected DOM node
9567
+ if ( !jQuery.contains( docElem, elem ) ) {
9568
+ return box;
9569
+ }
9570
+
9571
+ // If we don't have gBCR, just use 0,0 rather than error
9572
+ // BlackBerry 5, iOS 3 (original iPhone)
9573
+ if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
9574
+ box = elem.getBoundingClientRect();
9575
+ }
9576
+ win = getWindow( doc );
9577
+ return {
9578
+ top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
9579
+ left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
9580
+ };
9581
+ };
9582
+
9583
+ jQuery.offset = {
9584
+
9585
+ setOffset: function( elem, options, i ) {
9586
+ var position = jQuery.css( elem, "position" );
9587
+
9588
+ // set position first, in-case top/left are set even on static elem
9589
+ if ( position === "static" ) {
9590
+ elem.style.position = "relative";
9591
+ }
9592
+
9593
+ var curElem = jQuery( elem ),
9594
+ curOffset = curElem.offset(),
9595
+ curCSSTop = jQuery.css( elem, "top" ),
9596
+ curCSSLeft = jQuery.css( elem, "left" ),
9597
+ calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
9598
+ props = {}, curPosition = {}, curTop, curLeft;
9599
+
9600
+ // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
9601
+ if ( calculatePosition ) {
9602
+ curPosition = curElem.position();
9603
+ curTop = curPosition.top;
9604
+ curLeft = curPosition.left;
9605
+ } else {
9606
+ curTop = parseFloat( curCSSTop ) || 0;
9607
+ curLeft = parseFloat( curCSSLeft ) || 0;
9608
+ }
9609
+
9610
+ if ( jQuery.isFunction( options ) ) {
9611
+ options = options.call( elem, i, curOffset );
9612
+ }
9613
+
9614
+ if ( options.top != null ) {
9615
+ props.top = ( options.top - curOffset.top ) + curTop;
9616
+ }
9617
+ if ( options.left != null ) {
9618
+ props.left = ( options.left - curOffset.left ) + curLeft;
9619
+ }
9620
+
9621
+ if ( "using" in options ) {
9622
+ options.using.call( elem, props );
9623
+ } else {
9624
+ curElem.css( props );
9625
+ }
9626
+ }
9627
+ };
9628
+
9629
+
9630
+ jQuery.fn.extend({
9631
+
9632
+ position: function() {
9633
+ if ( !this[ 0 ] ) {
9634
+ return;
9635
+ }
9636
+
9637
+ var offsetParent, offset,
9638
+ parentOffset = { top: 0, left: 0 },
9639
+ elem = this[ 0 ];
9640
+
9641
+ // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
9642
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
9643
+ // we assume that getBoundingClientRect is available when computed position is fixed
9644
+ offset = elem.getBoundingClientRect();
9645
+ } else {
9646
+ // Get *real* offsetParent
9647
+ offsetParent = this.offsetParent();
9648
+
9649
+ // Get correct offsets
9650
+ offset = this.offset();
9651
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
9652
+ parentOffset = offsetParent.offset();
9653
+ }
9654
+
9655
+ // Add offsetParent borders
9656
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
9657
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
9658
+ }
9659
+
9660
+ // Subtract parent offsets and element margins
9661
+ // note: when an element has margin: auto the offsetLeft and marginLeft
9662
+ // are the same in Safari causing offset.left to incorrectly be 0
9663
+ return {
9664
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
9665
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
9666
+ };
9667
+ },
9668
+
9669
+ offsetParent: function() {
9670
+ return this.map(function() {
9671
+ var offsetParent = this.offsetParent || docElem;
9672
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
9673
+ offsetParent = offsetParent.offsetParent;
9674
+ }
9675
+ return offsetParent || docElem;
9676
+ });
9677
+ }
9678
+ });
9679
+
9680
+
9681
+ // Create scrollLeft and scrollTop methods
9682
+ jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
9683
+ var top = /Y/.test( prop );
9684
+
9685
+ jQuery.fn[ method ] = function( val ) {
9686
+ return jQuery.access( this, function( elem, method, val ) {
9687
+ var win = getWindow( elem );
9688
+
9689
+ if ( val === undefined ) {
9690
+ return win ? (prop in win) ? win[ prop ] :
9691
+ win.document.documentElement[ method ] :
9692
+ elem[ method ];
9693
+ }
9694
+
9695
+ if ( win ) {
9696
+ win.scrollTo(
9697
+ !top ? val : jQuery( win ).scrollLeft(),
9698
+ top ? val : jQuery( win ).scrollTop()
9699
+ );
9700
+
9701
+ } else {
9702
+ elem[ method ] = val;
9703
+ }
9704
+ }, method, val, arguments.length, null );
9705
+ };
9706
+ });
9707
+
9708
+ function getWindow( elem ) {
9709
+ return jQuery.isWindow( elem ) ?
9710
+ elem :
9711
+ elem.nodeType === 9 ?
9712
+ elem.defaultView || elem.parentWindow :
9713
+ false;
9714
+ }
9715
+ // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
9716
+ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
9717
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
9718
+ // margin is only for outerHeight, outerWidth
9719
+ jQuery.fn[ funcName ] = function( margin, value ) {
9720
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
9721
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
9722
+
9723
+ return jQuery.access( this, function( elem, type, value ) {
9724
+ var doc;
9725
+
9726
+ if ( jQuery.isWindow( elem ) ) {
9727
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
9728
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
9729
+ // https://github.com/jquery/jquery/pull/764
9730
+ return elem.document.documentElement[ "client" + name ];
9731
+ }
9732
+
9733
+ // Get document width or height
9734
+ if ( elem.nodeType === 9 ) {
9735
+ doc = elem.documentElement;
9736
+
9737
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
9738
+ // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
9739
+ return Math.max(
9740
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
9741
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
9742
+ doc[ "client" + name ]
9743
+ );
9744
+ }
9745
+
9746
+ return value === undefined ?
9747
+ // Get width or height on the element, requesting but not forcing parseFloat
9748
+ jQuery.css( elem, type, extra ) :
9749
+
9750
+ // Set width or height on the element
9751
+ jQuery.style( elem, type, value, extra );
9752
+ }, type, chainable ? margin : undefined, chainable, null );
9753
+ };
9754
+ });
9755
+ });
9756
+ // Limit scope pollution from any deprecated API
9757
+ // (function() {
9758
+
9759
+ // The number of elements contained in the matched element set
9760
+ jQuery.fn.size = function() {
9761
+ return this.length;
9762
+ };
9763
+
9764
+ jQuery.fn.andSelf = jQuery.fn.addBack;
9765
+
9766
+ // })();
9767
+ if ( typeof module === "object" && module && typeof module.exports === "object" ) {
9768
+ // Expose jQuery as module.exports in loaders that implement the Node
9769
+ // module pattern (including browserify). Do not create the global, since
9770
+ // the user will be storing it themselves locally, and globals are frowned
9771
+ // upon in the Node module world.
9772
+ module.exports = jQuery;
9773
+ } else {
9774
+ // Otherwise expose jQuery to the global object as usual
9775
+ window.jQuery = window.$ = jQuery;
9776
+
9777
+ // Register as a named AMD module, since jQuery can be concatenated with other
9778
+ // files that may use define, but not via a proper concatenation script that
9779
+ // understands anonymous AMD modules. A named AMD is safest and most robust
9780
+ // way to register. Lowercase jquery is used because AMD module names are
9781
+ // derived from file names, and jQuery is normally delivered in a lowercase
9782
+ // file name. Do this after creating the global so that if an AMD module wants
9783
+ // to call noConflict to hide this version of jQuery, it will work.
9784
+ if ( typeof define === "function" && define.amd ) {
9785
+ define( "jquery", [], function () { return jQuery; } );
9786
+ }
9787
+ }
9788
+
9789
+ })( window );
js/bancasellapro/jquery/jquery-1.10.2.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
2
+ //@ sourceMappingURL=jquery-1.10.2.min.map
3
+ */
4
+ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.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%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
5
+ }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
6
+ u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
js/bancasellapro/jquery/jquery-1.10.2.min.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"jquery-1.10.2.min.js","sources":["jquery-1.10.2.js"],"names":["window","undefined","readyList","rootjQuery","core_strundefined","location","document","docElem","documentElement","_jQuery","jQuery","_$","$","class2type","core_deletedIds","core_version","core_concat","concat","core_push","push","core_slice","slice","core_indexOf","indexOf","core_toString","toString","core_hasOwn","hasOwnProperty","core_trim","trim","selector","context","fn","init","core_pnum","source","core_rnotwhite","rtrim","rquickExpr","rsingleTag","rvalidchars","rvalidbraces","rvalidescape","rvalidtokens","rmsPrefix","rdashAlpha","fcamelCase","all","letter","toUpperCase","completed","event","addEventListener","type","readyState","detach","ready","removeEventListener","detachEvent","prototype","jquery","constructor","match","elem","this","charAt","length","exec","find","merge","parseHTML","nodeType","ownerDocument","test","isPlainObject","isFunction","attr","getElementById","parentNode","id","makeArray","toArray","call","get","num","pushStack","elems","ret","prevObject","each","callback","args","promise","done","apply","arguments","first","eq","last","i","len","j","map","end","sort","splice","extend","src","copyIsArray","copy","name","options","clone","target","deep","isArray","expando","Math","random","replace","noConflict","isReady","readyWait","holdReady","hold","wait","body","setTimeout","resolveWith","trigger","off","obj","Array","isWindow","isNumeric","isNaN","parseFloat","isFinite","String","key","e","support","ownLast","isEmptyObject","error","msg","Error","data","keepScripts","parsed","scripts","createElement","buildFragment","remove","childNodes","parseJSON","JSON","parse","Function","parseXML","xml","tmp","DOMParser","parseFromString","ActiveXObject","async","loadXML","getElementsByTagName","noop","globalEval","execScript","camelCase","string","nodeName","toLowerCase","value","isArraylike","text","arr","results","Object","inArray","max","second","l","grep","inv","retVal","arg","guid","proxy","access","chainable","emptyGet","raw","bulk","now","Date","getTime","swap","old","style","Deferred","attachEvent","top","frameElement","doScroll","doScrollCheck","split","cachedruns","Expr","getText","isXML","compile","outermostContext","sortInput","setDocument","documentIsHTML","rbuggyQSA","rbuggyMatches","matches","contains","preferredDoc","dirruns","classCache","createCache","tokenCache","compilerCache","hasDuplicate","sortOrder","a","b","strundefined","MAX_NEGATIVE","hasOwn","pop","push_native","booleans","whitespace","characterEncoding","identifier","attributes","pseudos","RegExp","rcomma","rcombinators","rsibling","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rnative","rinputs","rheader","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","fromCharCode","els","Sizzle","seed","m","groups","nid","newContext","newSelector","getElementsByClassName","qsa","tokenize","getAttribute","setAttribute","toSelector","join","querySelectorAll","qsaError","removeAttribute","select","keys","cache","cacheLength","shift","markFunction","assert","div","removeChild","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","node","doc","parent","defaultView","className","appendChild","createComment","innerHTML","firstChild","getById","getElementsByName","filter","attrId","getAttributeNode","tag","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","val","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","nodeValue","selectors","createPseudo","relative",">","dir"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","outerCache","nodeIndex","start","useCache","lastChild","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","dirkey","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","matcherCachedRuns","bySet","byElement","superMatcher","expandContext","setMatched","matchedCount","outermost","contextBackup","dirrunsUnique","group","contexts","token","div1","defaultValue","unique","isXMLDoc","optionsCache","createOptions","object","flag","Callbacks","firing","memory","fired","firingLength","firingIndex","firingStart","list","stack","once","fire","stopOnFalse","self","disable","add","index","lock","locked","fireWith","func","tuples","state","always","deferred","fail","then","fns","newDefer","tuple","action","returned","resolve","reject","progress","notify","pipe","stateString","when","subordinate","resolveValues","remaining","updateFunc","values","progressValues","notifyWith","progressContexts","resolveContexts","fragment","opt","eventName","isSupported","cssText","getSetAttribute","leadingWhitespace","tbody","htmlSerialize","hrefNormalized","opacity","cssFloat","checkOn","optSelected","enctype","html5Clone","cloneNode","outerHTML","inlineBlockNeedsLayout","shrinkWrapBlocks","pixelPosition","deleteExpando","noCloneEvent","reliableMarginRight","boxSizingReliable","noCloneChecked","optDisabled","radioValue","createDocumentFragment","appendChecked","checkClone","click","change","focusin","backgroundClip","clearCloneStyle","container","marginDiv","tds","divReset","offsetHeight","display","reliableHiddenOffsets","zoom","boxSizing","offsetWidth","getComputedStyle","width","marginRight","rbrace","rmultiDash","internalData","pvt","acceptData","thisCache","internalKey","isNode","toJSON","internalRemoveData","isEmptyDataObject","cleanData","noData","applet","embed","hasData","removeData","_data","_removeData","dataAttr","queue","dequeue","startLength","hooks","_queueHooks","next","stop","setter","delay","time","fx","speeds","timeout","clearTimeout","clearQueue","count","defer","nodeHook","boolHook","rclass","rreturn","rfocusable","rclickable","ruseDefault","getSetInput","removeAttr","prop","removeProp","propFix","addClass","classes","clazz","proceed","removeClass","toggleClass","stateVal","classNames","hasClass","valHooks","set","option","one","optionSet","nType","attrHooks","propName","attrNames","for","class","notxml","propHooks","tabindex","parseInt","getter","setAttributeNode","createAttribute","coords","contenteditable","rformElems","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","global","types","events","t","handleObjIn","special","eventHandle","handleObj","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","onlyHandlers","ontype","bubbleType","eventPath","Event","isTrigger","namespace_re","noBubble","parentWindow","isPropagationStopped","preventDefault","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","stopPropagation","postDispatch","sel","originalEvent","fixHook","fixHooks","mouseHooks","keyHooks","props","srcElement","metaKey","original","which","charCode","keyCode","eventDoc","fromElement","pageX","clientX","scrollLeft","clientLeft","pageY","clientY","scrollTop","clientTop","relatedTarget","toElement","load","blur","beforeunload","returnValue","simulate","bubble","isSimulated","defaultPrevented","getPreventDefault","timeStamp","cancelBubble","stopImmediatePropagation","mouseenter","mouseleave","orig","related","submitBubbles","form","_submit_bubble","changeBubbles","propertyName","_just_changed","focusinBubbles","attaches","on","origFn","triggerHandler","isSimple","rparentsprev","rneedsContext","guaranteedUnique","children","contents","prev","targets","winnow","is","closest","pos","prevAll","addBack","sibling","parents","parentsUntil","until","nextAll","nextUntil","prevUntil","siblings","contentDocument","contentWindow","reverse","n","r","qualifier","createSafeFragment","nodeNames","safeFrag","rinlinejQuery","rnoshimcache","rleadingWhitespace","rxhtmlTag","rtagName","rtbody","rhtml","rnoInnerhtml","manipulation_rcheckableType","rchecked","rscriptType","rscriptTypeMasked","rcleanScript","wrapMap","legend","area","param","thead","tr","col","td","safeFragment","fragmentDiv","optgroup","tfoot","colgroup","caption","th","append","createTextNode","domManip","manipulationTarget","prepend","insertBefore","before","after","keepData","getAll","setGlobalEval","dataAndEvents","deepDataAndEvents","html","replaceWith","allowIntersection","hasScripts","iNoClone","disableScript","restoreScript","_evalUrl","content","refElements","cloneCopyEvent","dest","oldData","curData","fixCloneNodeIssues","defaultChecked","defaultSelected","appendTo","prependTo","insertAfter","replaceAll","insert","found","fixDefaultChecked","destElements","srcElements","inPage","selection","wrap","safe","nodes","url","ajax","dataType","throws","wrapAll","wrapInner","unwrap","iframe","getStyles","curCSS","ralpha","ropacity","rposition","rdisplayswap","rmargin","rnumsplit","rnumnonpx","rrelNum","elemdisplay","BODY","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","cssExpand","cssPrefixes","vendorPropName","capName","origName","isHidden","el","css","showHide","show","hidden","css_defaultDisplay","styles","hide","toggle","cssHooks","computed","cssNumber","columnCount","fillOpacity","lineHeight","order","orphans","widows","zIndex","cssProps","float","extra","_computed","minWidth","maxWidth","getPropertyValue","currentStyle","left","rs","rsLeft","runtimeStyle","pixelLeft","setPositiveNumber","subtract","augmentWidthOrHeight","isBorderBox","getWidthOrHeight","valueIsBorderBox","actualDisplay","write","close","$1","visible","margin","padding","border","prefix","suffix","expand","expanded","parts","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","serialize","serializeArray","traditional","s","encodeURIComponent","ajaxSettings","buildParams","v","hover","fnOver","fnOut","bind","unbind","delegate","undelegate","ajaxLocParts","ajaxLocation","ajax_nonce","ajax_rquery","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","_load","prefilters","transports","allTypes","addToPrefiltersOrTransports","structure","dataTypeExpression","dataTypes","inspectPrefiltersOrTransports","originalOptions","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","params","response","responseText","complete","status","active","lastModified","etag","isLocal","processData","contentType","accepts","*","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","cacheURL","responseHeadersString","timeoutTimer","fireGlobals","transport","responseHeaders","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","mimeType","code","abort","statusText","finalText","success","method","crossDomain","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","responses","isSuccess","modified","ajaxHandleResponses","ajaxConvert","rejectWith","getJSON","getScript","firstDataType","ct","finalDataType","conv2","current","conv","dataFilter","script","text script","head","scriptCharset","charset","onload","onreadystatechange","isAbort","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","xhrCallbacks","xhrSupported","xhrId","xhrOnUnloadAbort","createStandardXHR","XMLHttpRequest","createActiveXHR","xhr","cors","username","open","xhrFields","firefoxAccessException","unload","fxNow","timerId","rfxtypes","rfxnum","rrun","animationPrefilters","defaultPrefilter","tweeners","tween","createTween","unit","scale","maxIterations","createFxNow","animation","collection","Animation","properties","stopped","tick","currentTime","startTime","duration","percent","tweens","run","opts","specialEasing","originalProperties","Tween","easing","gotoEnd","propFilter","timer","anim","tweener","prefilter","oldfire","dataShow","unqueued","overflow","overflowX","overflowY","eased","step","cssFn","speed","animate","genFx","fadeTo","to","optall","doAnimation","finish","stopQueue","timers","includeWidth","height","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","linear","p","swing","cos","PI","interval","setInterval","clearInterval","slow","fast","animated","offset","setOffset","win","box","getBoundingClientRect","getWindow","pageYOffset","pageXOffset","curElem","curOffset","curCSSTop","curCSSLeft","calculatePosition","curPosition","curTop","curLeft","using","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","size","andSelf","module","exports","define","amd"],"mappings":";;;CAaA,SAAWA,EAAQC,GAOnB,GAECC,GAGAC,EAIAC,QAA2BH,GAG3BI,EAAWL,EAAOK,SAClBC,EAAWN,EAAOM,SAClBC,EAAUD,EAASE,gBAGnBC,EAAUT,EAAOU,OAGjBC,EAAKX,EAAOY,EAGZC,KAGAC,KAEAC,EAAe,SAGfC,EAAcF,EAAgBG,OAC9BC,EAAYJ,EAAgBK,KAC5BC,EAAaN,EAAgBO,MAC7BC,EAAeR,EAAgBS,QAC/BC,EAAgBX,EAAWY,SAC3BC,EAAcb,EAAWc,eACzBC,EAAYb,EAAac,KAGzBnB,EAAS,SAAUoB,EAAUC,GAE5B,MAAO,IAAIrB,GAAOsB,GAAGC,KAAMH,EAAUC,EAAS5B,IAI/C+B,EAAY,sCAAsCC,OAGlDC,EAAiB,OAGjBC,EAAQ,qCAKRC,EAAa,sCAGbC,EAAa,6BAGbC,EAAc,gBACdC,EAAe,uBACfC,EAAe,qCACfC,EAAe,kEAGfC,EAAY,QACZC,EAAa,eAGbC,EAAa,SAAUC,EAAKC,GAC3B,MAAOA,GAAOC,eAIfC,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AAO,SAAW,SAE1E,OAAOrK,GAAOqL,OAAQ/H,KAAM,SAAUD,EAAMV,EAAM0H,GACjD,GAAIyI,EAEJ,OAAK9S,GAAO2H,SAAUtE,GAIdA,EAAKzD,SAASE,gBAAiB,SAAWsG,GAI3B,IAAlB/C,EAAKQ,UACTiP,EAAMzP,EAAKvD,gBAIJ6G,KAAKiE,IACXvH,EAAK+D,KAAM,SAAWhB,GAAQ0M,EAAK,SAAW1M,GAC9C/C,EAAK+D,KAAM,SAAWhB,GAAQ0M,EAAK,SAAW1M,GAC9C0M,EAAK,SAAW1M,KAIXiE,IAAU9K,EAEhBS,EAAO82B,IAAKzzB,EAAMV,EAAMu1B,GAGxBl4B,EAAO+L,MAAO1I,EAAMV,EAAM0H,EAAO6tB,IAChCv1B,EAAM2I,EAAYkuB,EAASj6B,EAAW+L,EAAW,WAQvDtL,EAAOsB,GAAGooC,KAAO,WAChB,MAAOpmC,MAAKE,QAGbxD,EAAOsB,GAAGqoC,QAAU3pC,EAAOsB,GAAG6tB,QAGP,gBAAXya,SAAuBA,QAAoC,gBAAnBA,QAAOC,QAK1DD,OAAOC,QAAU7pC,GAGjBV,EAAOU,OAASV,EAAOY,EAAIF,EASJ,kBAAX8pC,SAAyBA,OAAOC,KAC3CD,OAAQ,YAAc,WAAc,MAAO9pC,QAIzCV"}
js/bancasellapro/jquery/noconflict.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Magento
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the Academic Free License (AFL 3.0)
7
+ * that is bundled with this package in the file LICENSE_AFL.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/afl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to license@magento.com so we can send you a copy immediately.
13
+ *
14
+ * DISCLAIMER
15
+ *
16
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
17
+ * versions in the future. If you wish to customize Magento for your
18
+ * needs please refer to http://www.magento.com for more information.
19
+ *
20
+ * @category Mage
21
+ * @package js
22
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
23
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
24
+ */
25
+
26
+ // Avoid PrototypeJS conflicts, assign jQuery to $j instead of $
27
+ var $j = jQuery.noConflict();
28
+ var $ji = $j;
{app/code/community/EasyNolo/BancaSellaPro/_additional_structure/js → js}/bancasellapro/newtoken.js RENAMED
@@ -1,3 +1,4 @@
 
1
  if (typeof EasyNoloTokenization == 'undefined') {
2
 
3
  var EasyNoloTokenization = {
1
+ ;
2
  if (typeof EasyNoloTokenization == 'undefined') {
3
 
4
  var EasyNoloTokenization = {
{app/code/community/EasyNolo/BancaSellaPro/_additional_structure/js → js}/bancasellapro/red_blackbox.js RENAMED
@@ -1,3 +1,4 @@
 
1
  /**
2
  * Created by Massimo Maino on 31/10/16.
3
  */
1
+ ;
2
  /**
3
  * Created by Massimo Maino on 31/10/16.
4
  */
{app/code/community/EasyNolo/BancaSellaPro/_additional_structure/js → js}/bancasellapro/riskified.js RENAMED
File without changes
package.xml CHANGED
@@ -1,69 +1,110 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>EASYNOLOBANCASELLAPRO</name>
4
- <version>1.4.6.2</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>OFFICIAL extension for Magento that allow customers to pay through the GestPay payment gateway by Banca Sella</summary>
10
  <description>&lt;p&gt;This module, provided by Easy Nolo (&lt;a href="https://www.easynolo.it"&gt;www.easynolo.it&lt;/a&gt;), is the OFFICIAL extension for Magento to enable in your online store a payment method that allow users to pay through credit cards supported by payment gateway GestPay of Banca Sella (&lt;a href="http://www.sella.it/"&gt;www.sella.it&lt;/a&gt;). The integration method implemented provide:&#xD;
11
- &lt;ul&gt;&#xD;
12
- &lt;li&gt;credit card payment through the redirection of the user to the page of Banca Sella payment gateway "GestPay" and subsequent return to the online store at the end of the transaction;&lt;/li&gt;&#xD;
13
- &lt;li&gt;payment through iFrame Payent Page, in this case the Credit Card data will be send to Banca Sella from the Store Checkout Page, without redirection to the Banca Sella payment gateway.&lt;/li&gt;&#xD;
14
- &lt;/ul&gt;&lt;/p&gt;&#xD;
15
- &#xD;
16
- &lt;h2&gt;Features&lt;/h2&gt;&#xD;
17
- &lt;ul&gt;&#xD;
18
- &lt;li&gt;Redirection of the user on the payment page of Banca Sella&lt;/li&gt;&#xD;
19
- &lt;li&gt;iFrame Payment Page integration *&lt;/li&gt;&#xD;
20
- &lt;li&gt;Magento built-in Recurring Profile Payments *&lt;/li&gt;&#xD;
21
- &lt;li&gt;ReD fraud prevention *&lt;/li&gt;&#xD;
22
- &lt;li&gt;Riskified fraud prevention *&lt;/li&gt;&#xD;
23
- &lt;li&gt;One click payment with tokenization *&lt;/li&gt;&#xD;
24
- &lt;li&gt;Account section for credit cards management *&lt;/li&gt;&#xD;
25
- &lt;li&gt;Capture, Void, Refund through Magento built-in Invoicing system *&lt;/li&gt;&#xD;
26
- &lt;li&gt;Ability to configure the Status of the order in case of payment is confirmed/canceled by Banca Sella or canceled by the user&lt;/li&gt;&#xD;
27
- &lt;li&gt;Test Mode: payments will be send to https://testecomm.sella.it&lt;/li&gt;&#xD;
28
- &lt;li&gt;Debug Mode: ability to turn on logging of the activities of the module. The logs are saved in the folder var/log of Magento installation&lt;/li&gt;&#xD;
29
- &lt;/ul&gt;&#xD;
30
- &#xD;
31
- &lt;p&gt;* available only if configured on GestPay backend as well.&lt;/p&gt;&#xD;
32
- &#xD;
33
- &lt;h2&gt;Compatibility&lt;/h2&gt;&#xD;
34
- &lt;p&gt;This module is compatible with these major Magento versions:&lt;/p&gt;&#xD;
35
- &lt;ul&gt;&#xD;
36
- &lt;li&gt;CE 1.7.0.2&lt;/li&gt;&#xD;
37
- &lt;li&gt;CE 1.8.1.0&lt;/li&gt;&#xD;
38
- &lt;li&gt;CE 1.9.2.4&lt;/li&gt;&#xD;
39
- &lt;li&gt;CE 1.9.3.0&lt;/li&gt;&#xD;
40
- &lt;/ul&gt;&#xD;
41
- &#xD;
42
- &lt;h2&gt;System Requirements&lt;/h2&gt;&#xD;
43
- &lt;ul&gt;&#xD;
44
- &lt;li&gt;PHP &gt;= 5.2.0&lt;/li&gt;&#xD;
45
- &lt;li&gt;OpenSSL PHP extension&lt;/li&gt;&#xD;
46
- &lt;li&gt;Curl PHP extension&lt;/li&gt;&#xD;
47
- &lt;/ul&gt;&#xD;
48
- &#xD;
49
- &lt;h2&gt;Documentation&lt;/h2&gt;&#xD;
50
- &lt;p&gt;If you have any issues with this extension, please refer to the &lt;a href="https://www.sella.it/gestpay/assets/pdf/EasyNolo_BancaSellaPro_v1.4.0.0_finale.pdf"&gt;Documentation&lt;/a&gt;&lt;/p&gt;&#xD;
51
- &#xD;
52
- &lt;h2&gt;Support&lt;/h2&gt;&#xD;
53
- &lt;p /&gt;If you have any issues with this extension, please send an email to &lt;a href="mailto:ecommerce@sella.it"&gt;ecommerce@sella.it&lt;/a&gt;</description>
54
- <notes>New features&#xD;
55
- &lt;ul&gt;&#xD;
56
- &lt;li&gt;ReD fraud prevention&lt;/li&gt;&#xD;
57
- &lt;li&gt;Riskified fraud prevention&lt;/li&gt;&#xD;
58
- &lt;li&gt;One click payment with tokenization&lt;/li&gt;&#xD;
59
- &lt;li&gt;Account section for credit cards management&lt;/li&gt;&#xD;
60
- &lt;/ul&gt;&#xD;
61
- &#xD;
62
- Please note: with this release the support for IWD one page checkout is unstable.</notes>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  <authors><author><name>Easy Nolo SpA</name><user>easy_nolo</user><email>alessio.damonti@sella.it</email></author></authors>
64
- <date>2017-03-27</date>
65
- <time>17:54:06</time>
66
- <contents><target name="magecommunity"><dir name="EasyNolo"><dir name="BancaSellaPro"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Gestpayinfo.php" hash="757a9fcc598903ef14f65ea60346973c"/><file name="Redinfo.php" hash="04e51c6969ae71afa2d97ea83a53c46a"/><file name="Riskifiedinfo.php" hash="be096697a36f22dd3e8b3a9aaad71437"/></dir></dir></dir><file name="Confirm3d.php" hash="1748f46552f38387d9ef7a206ef64994"/><file name="Form.php" hash="a8e2f0736a7753ab0b71855d0d40d68a"/><file name="Newroot.php" hash="37bd80f36e789a5337a3daff1d2cf7ff"/><file name="Redirect.php" hash="97ab12024835edc02493de228d57947c"/><dir name="Tokenization"><file name="List.php" hash="c429369a6bc2da9a21288339627c01aa"/><file name="Newtoken.php" hash="79340d48c433c20b8f920811aa14e8ac"/></dir><dir name="Utility"><file name="Text.php" hash="8453faf49af4d416492f98aa65b9868d"/></dir></dir><file name="Exception.php" hash="9de691c89f0eb1c280ef92c31d2aa6a8"/><dir name="Helper"><dir name="AlternativePayments"><file name="Ideal.php" hash="3fa26538914d9b088ba05d2c1361fef2"/><file name="Mybank.php" hash="599bb3d3f3ba6ea3b26f1e29f97bd52a"/><file name="Paypal.php" hash="8a02cea05c5c7c942858c774e9f32b03"/><file name="Sofort.php" hash="e715ba758ffebadbdef6122f6691993a"/></dir><file name="Baseclient.php" hash="9467261ed60b06ec2880741100c2c340"/><file name="Crypt.php" hash="2426982616bbabd8e472215ef467d1ab"/><file name="Data.php" hash="25c108a2cf883a8ca109c95cbcf89eb9"/><file name="Recurringprofile.php" hash="19300223aaa39527a9105fdc11a2dd7d"/><file name="Red.php" hash="d493b6a060a72e0c0ec5f432b96ab945"/><file name="Riskified.php" hash="ede6cc0d78d4f9506c553fdd190b63a2"/><file name="S2s.php" hash="834d7a8bf15e56c97657e06df0ba93d1"/></dir><dir name="Model"><file name="Gestpay.php" hash="bb6784bda7698e47e1c101450d03bdf8"/><file name="Observer.php" hash="6d7d95bf760a965f2daa0bface974390"/><dir name="Resource"><dir name="Sales"><dir name="Order"><dir name="FingerPrint"><file name="Collection.php" hash="f7a7a232e6151cb83034281f843fba92"/></dir><file name="FingerPrint.php" hash="ffc79ae2661bc2afe460678de49c4248"/></dir></dir><dir name="Token"><file name="Collection.php" hash="e6b6104f94e9dcd2d28927090552ee61"/></dir><file name="Token.php" hash="3539976882da08550b612ae0316c7628"/></dir><dir name="Sales"><dir name="Order"><file name="FingerPrint.php" hash="a101ec48a1016362d8ac7ba8cc127939"/></dir><dir name="Recurring"><file name="Profile.php" hash="644520b275a0f535eb6b881d50a2e708"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Currency.php" hash="098d64776e12ec7599ff9339e5c504b5"/><file name="FraudOrderStatus.php" hash="a1217938da5d7e1a305d5c746e3ac16e"/><file name="Language.php" hash="92f4275a8911cf9e22fda7e22596fdd0"/><file name="OrderStatus.php" hash="00a4cad29a4de65b1129f38496b057b7"/><file name="PaymentAction.php" hash="c78defcf9655741b2c8423eee7f3fbeb"/><file name="TokenizationContext.php" hash="dfba2748ab39b4e47ddfafca6dce8363"/></dir></dir></dir><file name="Token.php" hash="24af355118b97004990358e5128ca56e"/><dir name="Webservice"><file name="Abstract.php" hash="3edc6e1eca436b52b74b080071326d01"/><file name="Wscryptdecrypt.php" hash="0da6aa1d6cba7e18720ad70f9ea4f2f5"/><file name="Wss2s.php" hash="64ae83ababa31e05e44160bc58763d92"/></dir></dir><dir name="_additional_structure"><dir name="js"><dir name="bancasellapro"><file name="gestpayform.js" hash="d0f1c5a486b66a0cd2b348ecf4b04e0b"/><file name="newtoken.js" hash="98bb4c44bf502c53159fe6314d7f84b5"/><file name="red_blackbox.js" hash="d6ced1d3b0aaca6b763b7c47b804cee2"/><file name="riskified.js" hash="b944efe6f4ff018dcc1cd51c65fc3962"/></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><file name=".DS_Store" hash="6532038dadb62592144f6493050d41a4"/></dir><file name=".DS_Store" hash="6532038dadb62592144f6493050d41a4"/></dir><file name=".DS_Store" hash="45d69d6eb93bfa61459ebff9cbabcca1"/></dir><file name=".DS_Store" hash="5035bbba8a0f9b65ba299644037d06e4"/></dir><dir name="controllers"><file name="GestpayController.php" hash="dcac2e7116c5df57836ad7882656509e"/><file name="JsonController.php" hash="161a211f82dc838561250e071d6a0adb"/><file name="TokenizationController.php" hash="c6f33d49764033dc800186f764924802"/></dir><dir name="etc"><file name="config.xml" hash="e49c28a61e9aa647ede810bdcbb02862"/><file name="jstranslator.xml" hash="920aae1d6d4503df794d8830b60e500e"/><file name="system.xml" hash="0f460e922490122b3c8c73394902584a"/></dir><dir name="sql"><dir name="easynolo_bancasellapro_setup"><file name="install-1.3.0.php" hash="aa542fc162f55557dbaf3f93165b6944"/><file name="upgrade-1.3.0-1.3.1.php" hash="43f9171d7beeaf6b350f76778bb2eb35"/><file name="upgrade-1.4.2-1.4.3.php" hash="8b37559eb7129dab7705d4a0a9729d6a"/><file name="upgrade-1.4.3-1.4.4.php" hash="0b51164f6b9433ff3d51b7e3257025f4"/><file name="upgrade-1.4.4-1.4.5.php" hash="abb3f09e985c6911b0576a16812242ee"/><file name="upgrade-1.4.5-1.4.6.php" hash="aa1878bb0a9970e68fa9502e4380981a"/></dir></dir><file name=".DS_Store" hash="52cbad6360a0516bba6a86a3187846e7"/><file name=".project" hash="95ae41fab13d551617313d17856e6998"/></dir><file name=".DS_Store" hash="bd0431031c619d454dca8c687aaf9254"/></dir></target></contents>
67
  <compatible/>
68
- <dependencies><required><php><min>5.2.0</min><max>5.6.0</max></php></required></dependencies>
69
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>EASYNOLOBANCASELLAPRO</name>
4
+ <version>1.4.6.3</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>OFFICIAL extension for Magento that allow customers to pay through the GestPay payment gateway by Banca Sella</summary>
10
  <description>&lt;p&gt;This module, provided by Easy Nolo (&lt;a href="https://www.easynolo.it"&gt;www.easynolo.it&lt;/a&gt;), is the OFFICIAL extension for Magento to enable in your online store a payment method that allow users to pay through credit cards supported by payment gateway GestPay of Banca Sella (&lt;a href="http://www.sella.it/"&gt;www.sella.it&lt;/a&gt;). The integration method implemented provide:&#xD;
11
+ &#xD;
12
+ &lt;ul&gt;&#xD;
13
+ &#xD;
14
+ &lt;li&gt;credit card payment through the redirection of the user to the page of Banca Sella payment gateway "GestPay" and subsequent return to the online store at the end of the transaction;&lt;/li&gt;&#xD;
15
+ &#xD;
16
+ &lt;li&gt;payment through iFrame Payent Page, in this case the Credit Card data will be send to Banca Sella from the Store Checkout Page, without redirection to the Banca Sella payment gateway.&lt;/li&gt;&#xD;
17
+ &#xD;
18
+ &lt;/ul&gt;&lt;/p&gt;&#xD;
19
+ &#xD;
20
+ &#xD;
21
+ &#xD;
22
+ &lt;h2&gt;Features&lt;/h2&gt;&#xD;
23
+ &#xD;
24
+ &lt;ul&gt;&#xD;
25
+ &#xD;
26
+ &lt;li&gt;Redirection of the user on the payment page of Banca Sella&lt;/li&gt;&#xD;
27
+ &#xD;
28
+ &lt;li&gt;iFrame Payment Page integration *&lt;/li&gt;&#xD;
29
+ &#xD;
30
+ &lt;li&gt;Magento built-in Recurring Profile Payments *&lt;/li&gt;&#xD;
31
+ &#xD;
32
+ &lt;li&gt;ReD fraud prevention *&lt;/li&gt;&#xD;
33
+ &#xD;
34
+ &lt;li&gt;Riskified fraud prevention *&lt;/li&gt;&#xD;
35
+ &#xD;
36
+ &lt;li&gt;One click payment with tokenization *&lt;/li&gt;&#xD;
37
+ &#xD;
38
+ &lt;li&gt;Account section for credit cards management *&lt;/li&gt;&#xD;
39
+ &#xD;
40
+ &lt;li&gt;Capture, Void, Refund through Magento built-in Invoicing system *&lt;/li&gt;&#xD;
41
+ &#xD;
42
+ &lt;li&gt;Ability to configure the Status of the order in case of payment is confirmed/canceled by Banca Sella or canceled by the user&lt;/li&gt;&#xD;
43
+ &#xD;
44
+ &lt;li&gt;Test Mode: payments will be send to https://testecomm.sella.it&lt;/li&gt;&#xD;
45
+ &#xD;
46
+ &lt;li&gt;Debug Mode: ability to turn on logging of the activities of the module. The logs are saved in the folder var/log of Magento installation&lt;/li&gt;&#xD;
47
+ &#xD;
48
+ &lt;/ul&gt;&#xD;
49
+ &#xD;
50
+ &#xD;
51
+ &#xD;
52
+ &lt;p&gt;* available only if configured on GestPay backend as well.&lt;/p&gt;&#xD;
53
+ &#xD;
54
+ &#xD;
55
+ &#xD;
56
+ &lt;h2&gt;Compatibility&lt;/h2&gt;&#xD;
57
+ &#xD;
58
+ &lt;p&gt;This module is compatible with these major Magento versions:&lt;/p&gt;&#xD;
59
+ &#xD;
60
+ &lt;ul&gt;&#xD;
61
+ &#xD;
62
+ &lt;li&gt;CE 1.7.0.2&lt;/li&gt;&#xD;
63
+ &#xD;
64
+ &lt;li&gt;CE 1.8.1.0&lt;/li&gt;&#xD;
65
+ &#xD;
66
+ &lt;li&gt;CE 1.9.2.4&lt;/li&gt;&#xD;
67
+ &#xD;
68
+ &lt;li&gt;CE 1.9.3.0&lt;/li&gt;&#xD;
69
+ &#xD;
70
+ &lt;/ul&gt;&#xD;
71
+ &#xD;
72
+ &#xD;
73
+ &#xD;
74
+ &lt;h2&gt;System Requirements&lt;/h2&gt;&#xD;
75
+ &#xD;
76
+ &lt;ul&gt;&#xD;
77
+ &#xD;
78
+ &lt;li&gt;PHP &gt;= 5.2.0&lt;/li&gt;&#xD;
79
+ &#xD;
80
+ &lt;li&gt;OpenSSL PHP extension&lt;/li&gt;&#xD;
81
+ &#xD;
82
+ &lt;li&gt;Curl PHP extension&lt;/li&gt;&#xD;
83
+ &#xD;
84
+ &lt;/ul&gt;&#xD;
85
+ &#xD;
86
+ &#xD;
87
+ &#xD;
88
+ &lt;h2&gt;Documentation&lt;/h2&gt;&#xD;
89
+ &#xD;
90
+ &lt;p&gt;If you have any issues with this extension, please refer to the &lt;a href="https://www.sella.it/gestpay/assets/pdf/EasyNolo_BancaSellaPro_v1.4.0.0_finale.pdf"&gt;Documentation&lt;/a&gt;&lt;/p&gt;&#xD;
91
+ &#xD;
92
+ &#xD;
93
+ &#xD;
94
+ &lt;h2&gt;Support&lt;/h2&gt;&#xD;
95
+ &#xD;
96
+ &lt;p /&gt;If you have any issues with this extension, please send an email to &lt;a href="mailto:ecommerce@sella.it"&gt;ecommerce@sella.it&lt;/a&gt;</description>
97
+ <notes>- fixed some bugs&#xD;
98
+ &#xD;
99
+ - support for IWD one page checkout&#xD;
100
+ &#xD;
101
+ - support for Idev one step checkout&#xD;
102
+ &#xD;
103
+ - external payments</notes>
104
  <authors><author><name>Easy Nolo SpA</name><user>easy_nolo</user><email>alessio.damonti@sella.it</email></author></authors>
105
+ <date>2017-04-26</date>
106
+ <time>12:15:27</time>
107
+ <contents><target name="magecommunity"><dir name="EasyNolo"><dir name="BancaSellaPro"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Gestpayinfo.php" hash="757a9fcc598903ef14f65ea60346973c"/><file name="Redinfo.php" hash="04e51c6969ae71afa2d97ea83a53c46a"/><file name="Riskifiedinfo.php" hash="be096697a36f22dd3e8b3a9aaad71437"/></dir></dir></dir><dir name="AlternativePayments"><file name="Info.php" hash="97f64fcf29287039bbe1a2227add99cd"/></dir><file name="Confirm3d.php" hash="1748f46552f38387d9ef7a206ef64994"/><file name="Form.php" hash="4832d1508d7677d09cd8bd0ddf775742"/><file name="Newroot.php" hash="37bd80f36e789a5337a3daff1d2cf7ff"/><file name="Redirect.php" hash="97ab12024835edc02493de228d57947c"/><dir name="Tokenization"><file name="List.php" hash="c429369a6bc2da9a21288339627c01aa"/><file name="Newtoken.php" hash="79340d48c433c20b8f920811aa14e8ac"/></dir><dir name="Utility"><file name="Text.php" hash="8453faf49af4d416492f98aa65b9868d"/></dir></dir><file name="Exception.php" hash="9de691c89f0eb1c280ef92c31d2aa6a8"/><dir name="Helper"><dir name="AlternativePayments"><file name="Ideal.php" hash="665649c92f5ee8425788a7e2ed484b66"/><file name="Interface.php" hash="840bec54c97d95e6c94f2ee92564c265"/><file name="Klarna.php" hash="5c0333e229f437c88d9398a4d331f3a3"/><file name="Mybank.php" hash="b8fb96d3b0992de6bd5e76d8b8518274"/><file name="Paypal.php" hash="43a65a6a06c8b00591b33a97adf60845"/><file name="Qiwi.php" hash="12b573a68716ddb4a414017f91f0a483"/><file name="Sofort.php" hash="e715ba758ffebadbdef6122f6691993a"/><file name="UnionPay.php" hash="b0fcd2af36ea3eb0a565a868a69738b0"/></dir><file name="AlternativePayments.php" hash="c835994d54cb90176e1a9f20612aec80"/><file name="Baseclient.php" hash="9467261ed60b06ec2880741100c2c340"/><file name="Crypt.php" hash="ca1a2b546f7df83776e69593ba39101b"/><file name="Data.php" hash="e34a57818c77eb55664db910ec6ff2f3"/><file name="Recurringprofile.php" hash="19300223aaa39527a9105fdc11a2dd7d"/><file name="Red.php" hash="d493b6a060a72e0c0ec5f432b96ab945"/><file name="Riskified.php" hash="ede6cc0d78d4f9506c553fdd190b63a2"/><file name="S2s.php" hash="05e9807bee20ca4b4b85757cd977331c"/></dir><dir name="Model"><file name="Gestpay.php" hash="1f41795c656ce6cdd3fa4794605de46b"/><file name="Observer.php" hash="2d4936d8d6bb4102727311ca8c80af04"/><dir name="Resource"><dir name="Sales"><dir name="Order"><dir name="FingerPrint"><file name="Collection.php" hash="f7a7a232e6151cb83034281f843fba92"/></dir><file name="FingerPrint.php" hash="ffc79ae2661bc2afe460678de49c4248"/></dir></dir><dir name="Token"><file name="Collection.php" hash="e6b6104f94e9dcd2d28927090552ee61"/></dir><file name="Token.php" hash="3539976882da08550b612ae0316c7628"/></dir><dir name="Sales"><dir name="Order"><file name="FingerPrint.php" hash="a101ec48a1016362d8ac7ba8cc127939"/></dir><dir name="Recurring"><file name="Profile.php" hash="644520b275a0f535eb6b881d50a2e708"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Currency.php" hash="098d64776e12ec7599ff9339e5c504b5"/><file name="FraudOrderStatus.php" hash="a1217938da5d7e1a305d5c746e3ac16e"/><file name="Language.php" hash="92f4275a8911cf9e22fda7e22596fdd0"/><file name="OrderStatus.php" hash="00a4cad29a4de65b1129f38496b057b7"/><file name="PaymentAction.php" hash="c78defcf9655741b2c8423eee7f3fbeb"/><file name="TokenizationContext.php" hash="dfba2748ab39b4e47ddfafca6dce8363"/></dir></dir></dir><file name="Token.php" hash="24af355118b97004990358e5128ca56e"/><dir name="Webservice"><file name="Abstract.php" hash="3edc6e1eca436b52b74b080071326d01"/><file name="Wscryptdecrypt.php" hash="c138ea1b28022cdf2a56c322bd848be1"/><file name="Wss2s.php" hash="5e46361da8cfdb262c06e2f5174eab19"/></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="0f3b33e51c1f7db4799cf9a58fb3d04a"/><dir name="Checkout"><file name="OnepageController.php" hash="af22c6cc81d0ce00fdf9555e0038c8c1"/></dir><file name="GestpayController.php" hash="fe7e9f928cef54e1f8081bbd44d7071a"/><file name="JsonController.php" hash="161a211f82dc838561250e071d6a0adb"/><file name="TokenizationController.php" hash="c6f33d49764033dc800186f764924802"/></dir><dir name="etc"><file name="config.xml" hash="606f9976c1d425daeab7c14048135d18"/><file name="jstranslator.xml" hash="920aae1d6d4503df794d8830b60e500e"/><file name="system.xml" hash="28d732fa87564e9a5c77aba6f4cd2e4c"/></dir><dir name="sql"><dir name="easynolo_bancasellapro_setup"><file name="install-1.3.0.php" hash="aa542fc162f55557dbaf3f93165b6944"/><file name="upgrade-1.3.0-1.3.1.php" hash="43f9171d7beeaf6b350f76778bb2eb35"/><file name="upgrade-1.4.2-1.4.3.php" hash="8b37559eb7129dab7705d4a0a9729d6a"/><file name="upgrade-1.4.3-1.4.4.php" hash="0b51164f6b9433ff3d51b7e3257025f4"/><file name="upgrade-1.4.4-1.4.5.php" hash="abb3f09e985c6911b0576a16812242ee"/><file name="upgrade-1.4.5-1.4.6.php" hash="aa1878bb0a9970e68fa9502e4380981a"/></dir></dir><file name=".project" hash="95ae41fab13d551617313d17856e6998"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="easynolo_bancasellapro.xml" hash="646ef5d889dffc1a3f94b53dc359d42d"/></dir><dir name="template"><dir name="easynolo"><dir name="bancasellapro"><dir name="gestpay"><dir name="alternative_payments"><file name="default.phtml" hash="9200b8e5cfaf76a4f845850d98653f35"/><file name="js.phtml" hash="b89773fc46fb64118c8494e24423a818"/><file name="klarna.phtml" hash="f5bd1397714a88bd4c957f3eae7f4532"/><file name="nojs.phtml" hash="111db1b174f952fe104d9df09830e96a"/></dir><file name="alternative_payments.phtml" hash="4c7d871827996fb30b6e0127f4ffea41"/><file name="confirm3d.phtml" hash="8b7a1172989831dd741cd24608d4dce6"/><file name="form.phtml" hash="a8e712e5f1eda97c676fb23b122aa4e9"/><file name="form_idev.phtml" hash="6a14807cb9354f90d59afd7c9482a354"/><file name="form_onepagecheckout.phtml" hash="b512480ed21e4d5529c1d29263afb315"/><file name="iframe.phtml" hash="f16b5506d89cf244bda22cac5c79c355"/><file name="newtoken.phtml" hash="b9b6b99fcd4968961b42339ba9536429"/><file name="redirect.phtml" hash="16fc850ca5955abf0a13ad9e0feb5d47"/><file name="riskified.phtml" hash="4bea89e99f538e568b9243534f4f0a2e"/><dir name="token"><file name="list.phtml" hash="be694e81b2da8d1827ce11a84f980ff6"/></dir></dir><dir name="page"><file name="redirect.phtml" hash="b4355d7f50036ac9bbe065c797466edb"/></dir></dir></dir></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="layout"><file name="easynolo_bancasellapro.xml" hash="bfd503f91a9592e74f4e388ce02c86ca"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="EasyNolo_BancaSellaPro.xml" hash="822546906a1d54b670c2610cab8761fb"/><file name="EasyNolo_BancaSellaPro.xml.Onepage.txt" hash="08b9164dcc646e2629907b5e90b43fff"/></dir></target><target name="magelocale"><dir name="en_US"><file name="EasyNolo_BancaSellaPro.csv" hash="1a6de8af46571d3f12bb4ce82da04029"/></dir><dir name="it_IT"><file name="EasyNolo_BancaSellaPro.csv" hash="0a5a3a4e2bb19b1bfb89dbca7f4850de"/></dir></target><target name="mage"><dir name="js"><dir name="bancasellapro"><file name="gestpayform.js" hash="2010993468039be8b6dfeca9d0dc3018"/><file name="gestpayform_idev_onestepcheckout.js" hash="ad72abe5f978b9558e2dbef9e8148966"/><file name="gestpayform_onepagecheckout.js" hash="4d82a92d9a398a5a7f3180cde6cb39c4"/><file name="gestpayform_onepagecheckout_jquery.js" hash="4acf39c43ab474631c49816e74789dbc"/><dir name="jquery"><file name="jquery-1.10.2.js" hash="91515770ce8c55de23b306444d8ea998"/><file name="jquery-1.10.2.min.js" hash="841dc30647f93349b7d8ef61deebe411"/><file name="jquery-1.10.2.min.map" hash="6c3ccfc221d36777d383b6e04d0b8af9"/><file name="noconflict.js" hash="8643b330825b639a858b4033d4667786"/></dir><file name="newtoken.js" hash="8c1905c3e2260ce22f575390f05597c2"/><file name="red_blackbox.js" hash="c73d804209823be115f8420eff0b62d2"/><file name="riskified.js" hash="b944efe6f4ff018dcc1cd51c65fc3962"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="bancasellapro"><file name="gestpay.png" hash="55262a719e16c5c430e9e5b3c9514ce8"/><file name="red.png" hash="8d66e8c43c23f2665a85da5cc8287f0a"/><file name="riskified.png" hash="fb954640772e6e5f086541af5a99933c"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="easynolo_bancasella"><file name="gestpay.css" hash="b2678b4fc95c114508e94240a290a280"/></dir></dir><dir name="images"><dir name="easynolo_bancasella"><file name="wait.gif" hash="c717328261f92d92c1b1f550d222e0e4"/></dir></dir></dir></dir></dir></target></contents>
108
  <compatible/>
109
+ <dependencies><required><php><min>5.2.0</min><max>5.7.0</max></php></required></dependencies>
110
  </package>
{app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin → skin}/adminhtml/default/default/images/bancasellapro/gestpay.png RENAMED
File without changes
{app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin → skin}/adminhtml/default/default/images/bancasellapro/red.png RENAMED
File without changes
{app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin → skin}/adminhtml/default/default/images/bancasellapro/riskified.png RENAMED
File without changes
skin/frontend/base/default/css/easynolo_bancasella/gestpay.css ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #gestpay_window {
2
+ position: fixed;
3
+ left: 0 !important;
4
+ top: 0 !important;
5
+ width: 100% !important;
6
+ height: 100% !important;
7
+ }
8
+
9
+ #gestpay_window .top.table_window{
10
+ width: 100%;
11
+ display: none;
12
+ }
13
+
14
+ #gestpay_window table,
15
+ #gestpay_window iframe{
16
+ width: 100% !important;
17
+ height: 100% !important;
18
+ }
19
+
20
+ #gestpay_window #gestpay_window_table_content{
21
+ background: #fff !important;
22
+ overflow: hidden;
23
+ }
24
+
25
+ .scroll-wrapper {
26
+ display: inline-block;
27
+ -webkit-overflow-scrolling: touch;
28
+ overflow: scroll;
29
+ width: 100%;
30
+ height: 100%;
31
+ }
{app/code/community/EasyNolo/BancaSellaPro/_additional_structure/skin → skin}/frontend/base/default/images/easynolo_bancasella/wait.gif RENAMED
File without changes