Clexchange_Funding - Version 2.0

Version Notes

Stable Module

Download this release

Release Info

Developer Dhananjay Goel
Extension Clexchange_Funding
Version 2.0
Comparing to
See all releases


Version 2.0

Files changed (70) hide show
  1. app/code/community/CLExchange/Clexchangefunding/ApprovalRequired.php +13 -0
  2. app/code/community/CLExchange/Clexchangefunding/Block/Form/Clxfunding.php +10 -0
  3. app/code/community/CLExchange/Clexchangefunding/Block/Form/Clxfunding.php~ +11 -0
  4. app/code/community/CLExchange/Clexchangefunding/CronExpressionList.php +14 -0
  5. app/code/community/CLExchange/Clexchangefunding/CronExpressionList.php~ +16 -0
  6. app/code/community/CLExchange/Clexchangefunding/Helper/Data.php +139 -0
  7. app/code/community/CLExchange/Clexchangefunding/Helper/Data.php~ +140 -0
  8. app/code/community/CLExchange/Clexchangefunding/IsBestOffer.php +13 -0
  9. app/code/community/CLExchange/Clexchangefunding/Model/AccountIdV.php +12 -0
  10. app/code/community/CLExchange/Clexchangefunding/Model/AuthorizationKeyV.php +12 -0
  11. app/code/community/CLExchange/Clexchangefunding/Model/ClxEmail.php +22 -0
  12. app/code/community/CLExchange/Clexchangefunding/Model/Clxloanappdtls.php +10 -0
  13. app/code/community/CLExchange/Clexchangefunding/Model/Clxloanofferdetails.php +10 -0
  14. app/code/community/CLExchange/Clexchangefunding/Model/CronOrderStatusUpdate.php +334 -0
  15. app/code/community/CLExchange/Clexchangefunding/Model/Mysql4/Clxloanappdtls.php +9 -0
  16. app/code/community/CLExchange/Clexchangefunding/Model/Mysql4/Clxloanappdtls/Collection.php +10 -0
  17. app/code/community/CLExchange/Clexchangefunding/Model/Mysql4/Clxloanofferdetails.php +9 -0
  18. app/code/community/CLExchange/Clexchangefunding/Model/Mysql4/Clxloanofferdetails/Collection.php +10 -0
  19. app/code/community/CLExchange/Clexchangefunding/Model/Observer.php +44 -0
  20. app/code/community/CLExchange/Clexchangefunding/Model/Observer.php~ +48 -0
  21. app/code/community/CLExchange/Clexchangefunding/Model/PaymentMethodTitle.php +12 -0
  22. app/code/community/CLExchange/Clexchangefunding/Model/Paymentmethod.php +12 -0
  23. app/code/community/CLExchange/Clexchangefunding/Model/QueueAuthKeyV.php +12 -0
  24. app/code/community/CLExchange/Clexchangefunding/Model/QueueEndpointV.php +12 -0
  25. app/code/community/CLExchange/Clexchangefunding/Model/Resource/Setup.php +4 -0
  26. app/code/community/CLExchange/Clexchangefunding/TimeFrames.php +17 -0
  27. app/code/community/CLExchange/Clexchangefunding/controllers/ClxAPIController.php +1070 -0
  28. app/code/community/CLExchange/Clexchangefunding/controllers/ClxAPIController.php~ +1032 -0
  29. app/code/community/CLExchange/Clexchangefunding/controllers/PaymentController.php +38 -0
  30. app/code/community/CLExchange/Clexchangefunding/etc/config.xml +194 -0
  31. app/code/community/CLExchange/Clexchangefunding/etc/config.xml~ +194 -0
  32. app/code/community/CLExchange/Clexchangefunding/etc/system.xml +149 -0
  33. app/code/community/CLExchange/Clexchangefunding/sql/clxfunding_setup/mysql4-install-1.0.0.0.php +70 -0
  34. app/design/frontend/base/default/layout/clxblock.xml +58 -0
  35. app/design/frontend/base/default/template/clxfunding/form/aboutCLXFunding.phtml +3 -0
  36. app/design/frontend/base/default/template/clxfunding/form/clxfunding.phtml +660 -0
  37. app/design/frontend/base/default/template/clxfunding/form/confirm_user_acceptance.phtml +21 -0
  38. app/design/frontend/base/default/template/clxfunding/form/custompaymentmethod.phtml~ +118 -0
  39. app/design/frontend/base/default/template/clxfunding/form/link_Expire.phtml +15 -0
  40. app/design/frontend/base/default/template/clxfunding/form/loan_offer_response.phtml +79 -0
  41. app/design/frontend/base/default/template/clxfunding/form/loan_offer_response.phtml~ +75 -0
  42. app/design/frontend/base/default/template/clxfunding/form/loanapplicationstatus.phtml +45 -0
  43. app/design/frontend/base/default/template/clxfunding/form/modal_clxfunding.phtml +409 -0
  44. app/design/frontend/base/default/template/clxfunding/form/modal_clxfunding.phtml~ +398 -0
  45. app/design/frontend/base/default/template/clxfunding/form/modal_custompaymentmethod.phtml~ +353 -0
  46. app/design/frontend/base/default/template/clxfunding/form/user_loan_offer_accept.phtml +32 -0
  47. app/design/frontend/base/default/template/clxfunding/form/user_loan_offer_reject.phtml +15 -0
  48. app/design/frontend/base/default/template/clxfunding/form/user_loan_offer_status.phtml +34 -0
  49. app/etc/modules/CLExchange_Clexchangefunding.xml +18 -0
  50. app/locale/en_US/template/email/CLX/email-template/clx_error.html +39 -0
  51. app/locale/en_US/template/email/CLX/email-template/clx_loan_approved.html +37 -0
  52. app/locale/en_US/template/email/CLX/email-template/clx_loan_funded.html +38 -0
  53. app/locale/en_US/template/email/CLX/email-template/clx_loan_offer.html +108 -0
  54. app/locale/en_US/template/email/CLX/email-template/clx_loan_offer_reject.html +39 -0
  55. package.xml +18 -0
  56. skin/frontend/base/default/css/Clx/bootstrap-datepicker.min.css +8 -0
  57. skin/frontend/base/default/css/Clx/bootstrap.min.css +6291 -0
  58. skin/frontend/base/default/css/Clx/clx_custom.css +62 -0
  59. skin/frontend/base/default/css/Clx/clxloanofferdata.php~ +78 -0
  60. skin/frontend/base/default/css/Clx/clxloantabledata.php~ +131 -0
  61. skin/frontend/base/default/css/Clx/cron_status.php~ +114 -0
  62. skin/frontend/base/default/css/Clx/help.png +0 -0
  63. skin/frontend/base/default/css/Clx/loading.gif +0 -0
  64. skin/frontend/base/default/css/Clx/loading11.gif +0 -0
  65. skin/frontend/base/default/js/Clx/bootbox.min.js +6 -0
  66. skin/frontend/base/default/js/Clx/bootstrap-datepicker.min.js +8 -0
  67. skin/frontend/base/default/js/Clx/bootstrap.min.js +11 -0
  68. skin/frontend/base/default/js/Clx/jquery-1.11.3.min.js +6 -0
  69. skin/frontend/base/default/js/Clx/jquery-migrate-1.2.1.min.js +2 -0
  70. skin/frontend/base/default/js/Clx/noConflict.js +1 -0
app/code/community/CLExchange/Clexchangefunding/ApprovalRequired.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_ApprovalRequired {
4
+ /* here we can update select field values of Approval Required in admin panel under our CLExchange Payment Module tab */
5
+
6
+ public function toOptionArray() {
7
+ return array(
8
+ array('value' => '1', 'label' => Mage::helper('adminhtml')->__('true')),
9
+ array('value' => '0', 'label' => Mage::helper('adminhtml')->__('false'))
10
+ );
11
+ }
12
+
13
+ }
app/code/community/CLExchange/Clexchangefunding/Block/Form/Clxfunding.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Block_Form_Clxfunding extends Mage_Payment_Block_Form {
4
+
5
+ protected function _construct() {
6
+ parent::_construct();
7
+ $this->setTemplate('clxfunding/form/clxfunding.phtml');
8
+ }
9
+
10
+ }
app/code/community/CLExchange/Clexchangefunding/Block/Form/Clxfunding.php~ ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // app/code/local/Envato/Clexchangefunding/Block/Form/Clexchangefunding.php
4
+ class CLExchange_Clexchangefunding_Block_Form_Clexchangefunding extends Mage_Payment_Block_Form {
5
+
6
+ protected function _construct() {
7
+ parent::_construct();
8
+ $this->setTemplate('clxfunding/form/clxfunding.phtml');
9
+ }
10
+
11
+ }
app/code/community/CLExchange/Clexchangefunding/CronExpressionList.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class CLExchange_Clexchangefunding_CronExpressionList
3
+ {
4
+ /* here we can update select field values of Cron Expression in admin panel under CLExchange Payment Module tab*/
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => '*/5 * * * *', 'label'=>Mage::helper('adminhtml')->__('Every 5 minutes')),
9
+ array('value' => '*/10 * * * *', 'label'=>Mage::helper('adminhtml')->__('Every 10 minutes')),
10
+ array('value' => '30 * * * *', 'label'=>Mage::helper('adminhtml')->__('Every 30 minutes')),
11
+ );
12
+ }
13
+ }
14
+
app/code/community/CLExchange/Clexchangefunding/CronExpressionList.php~ ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class CLExchange_Clexchangefunding_CronExpressionList
3
+ {
4
+ /* here we can update select field values of Cron Expression in admin panel under CLExchange Payment Module tab*/
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => '*/5 * * * *', 'label'=>Mage::helper('adminhtml')->__('Every 5 minutes')),
9
+ array('value' => '*/10 * * * *', 'label'=>Mage::helper('adminhtml')->__('Every 10 minutes')),
10
+ array('value' => '30 * * * *', 'label'=>Mage::helper('adminhtml')->__('Every 30 minutes')),
11
+ array('value' => '0 0 */1 * * *', 'label'=>Mage::helper('adminhtml')->__('Every Hours')),
12
+ array('value' => '0 0 */2 * * *', 'label'=>Mage::helper('adminhtml')->__('Every 2 Hours')),
13
+ array('value' => '0 0 */3 * * *', 'label'=>Mage::helper('adminhtml')->__('Every 3 Hours')),
14
+ );
15
+ }
16
+ }
app/code/community/CLExchange/Clexchangefunding/Helper/Data.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Helper_Data extends Mage_Core_Helper_Abstract {
4
+
5
+ function getPaymentGatewayUrl() {
6
+ return Mage::getUrl('clxfunding/payment/gateway', array('_secure' => false));
7
+ }
8
+ /* Real time loan offer API */
9
+ function mastercurlRequestToClxLoanOfferApi($url, $page, $data, $authorizationField) {
10
+
11
+ $headers = array(
12
+ "POST " . $page . " HTTP/1.1",
13
+ "Host:portal.clexchange.io",
14
+ "Content-type: application/json",
15
+ "Cache-Control: no-cache",
16
+ "Authorization: " . $authorizationField,
17
+ "Content-length: " . strlen(json_encode($data)),
18
+ );
19
+
20
+ $ch = curl_init();
21
+ curl_setopt($ch, CURLOPT_URL, $url); //setup curl url
22
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); //setup auth to basic
23
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
24
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
25
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); //setup request header
26
+ curl_setopt($ch, CURLOPT_POST, 1); //setup type post
27
+ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); //post parameters in json format
28
+
29
+ $info = curl_exec($ch);
30
+
31
+ if (curl_errno($ch)) {
32
+ return array('valid' => FALSE, 'Error' => curl_error($ch));
33
+ } else {
34
+ curl_close($ch);
35
+ return array('valid' => TRUE, 'result' => $info);
36
+ }
37
+ }
38
+ /* Create loan Application API */
39
+ function mastercurlRequestToClxLoanApplicationApi($url, $page, $data, $authorizationField) {
40
+
41
+ $headers = array(
42
+ "POST " . $page . " HTTP/1.1",
43
+ "Host:portal.clexchange.io",
44
+ "Content-type: application/json",
45
+ "Cache-Control: no-cache",
46
+ "Authorization: " . $authorizationField,
47
+ "Content-length: " . strlen(json_encode($data)),
48
+ );
49
+
50
+ $ch = curl_init();
51
+ curl_setopt($ch, CURLOPT_URL, $url);
52
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
53
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
54
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
55
+ curl_setopt($ch, CURLOPT_POST, 1);
56
+ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
57
+
58
+ $info = curl_exec($ch);
59
+ if (curl_errno($ch)) {
60
+ return array('valid' => FALSE, 'Error' => curl_error($ch));
61
+ } else {
62
+ curl_close($ch);
63
+ return array('valid' => TRUE, 'result' => $info);
64
+ }
65
+ }
66
+
67
+ function mastercurlRequestToClxOfferAcceptenceApi($url, $page, $data, $authorizationField) {
68
+ $headers = array(
69
+ "POST " . $page . " HTTP/1.1",
70
+ "Host:portal.clexchange.io",
71
+ "Content-type: application/json",
72
+ "Cache-Control: no-cache",
73
+ "Authorization: " . $authorizationField,
74
+ "Content-length: " . strlen(json_encode($data)),
75
+ );
76
+
77
+ $ch = curl_init();
78
+ curl_setopt($ch, CURLOPT_URL, $url);
79
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
80
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
81
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
82
+ curl_setopt($ch, CURLOPT_POST, 1);
83
+ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
84
+
85
+ $info = curl_exec($ch);
86
+
87
+ if (curl_errno($ch)) {
88
+ return array('valid' => FALSE, 'Error' => curl_error($ch));
89
+ } else {
90
+ curl_close($ch);
91
+ return array('valid' => TRUE, 'result' => $info);
92
+ }
93
+ }
94
+
95
+ function clxQueueingSystem() {
96
+
97
+ $Queue_Authentication_Key = Mage::getStoreConfig('payment/clxfunding/queue_authentication_key');
98
+ $Queue_Endpoint = Mage::getStoreConfig('payment/clxfunding/queue_endpoint');
99
+ if (isset($Queue_Authentication_Key) && !empty($Queue_Authentication_Key) && isset($Queue_Endpoint) && !empty($Queue_Endpoint)) {
100
+ $headers = array(
101
+ "Content-type: application/json",
102
+ "Authorization: OAuth " . $Queue_Authentication_Key
103
+ );
104
+
105
+ $ch = curl_init();
106
+ curl_setopt($ch, CURLOPT_URL, $Queue_Endpoint);
107
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
108
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
109
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
110
+
111
+ $info = curl_exec($ch);
112
+
113
+ if (curl_errno($ch)) {
114
+ return FALSE;
115
+ } else {
116
+ curl_close($ch);
117
+ $reponse_data = json_decode($info);
118
+ if (isset($reponse_data) && !empty($reponse_data)) {
119
+ return $reponse_data;
120
+ } else {
121
+ return FALSE;
122
+ }
123
+ }
124
+ } else {
125
+ Mage::log('Clx Error : Missing queue authentication key or queue endpoint ');
126
+ }
127
+ }
128
+
129
+ function getAge($date1, $date2) {
130
+ $date1 = strtotime($date1);
131
+ $date2 = strtotime($date2);
132
+ $age = 0;
133
+ while ($date2 > $date1 = strtotime('+1 year', $date1)) {
134
+ ++$age;
135
+ }
136
+ return $age;
137
+ }
138
+
139
+ }
app/code/community/CLExchange/Clexchangefunding/Helper/Data.php~ ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Helper_Data extends Mage_Core_Helper_Abstract {
4
+
5
+ function getPaymentGatewayUrl() {
6
+ return Mage::getUrl('clxfunding/payment/gateway', array('_secure' => false));
7
+ }
8
+ /* Real time loan offer API */
9
+ function mastercurlRequestToClxLoanOfferApi($url, $page, $data, $authorizationField) {
10
+ $headers = array(
11
+ "POST " . $page . " HTTP/1.1",
12
+ "Host:portal.clexchange.io",
13
+ "Content-type: application/json",
14
+ "Cache-Control: no-cache",
15
+ "Authorization: " . $authorizationField,
16
+ "Content-length: " . strlen(json_encode($data)),
17
+ );
18
+
19
+ $ch = curl_init();
20
+ curl_setopt($ch, CURLOPT_URL, $url); //setup curl url
21
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); //setup auth to basic
22
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
23
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
24
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); //setup request header
25
+ curl_setopt($ch, CURLOPT_POST, 1); //setup type post
26
+ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); //post parameters in json format
27
+
28
+ $info = curl_exec($ch);
29
+
30
+ if (curl_errno($ch)) {
31
+ return array('valid' => FALSE, 'Error' => curl_error($ch));
32
+ } else {
33
+ curl_close($ch);
34
+ return array('valid' => TRUE, 'result' => $info);
35
+ }
36
+ }
37
+ /* Create loan Application API */
38
+ function mastercurlRequestToClxLoanApplicationApi($url, $page, $data, $authorizationField) {
39
+ $headers = array(
40
+ "POST " . $page . " HTTP/1.1",
41
+ "Host:portal.clexchange.io",
42
+ "Content-type: application/json",
43
+ "Cache-Control: no-cache",
44
+ "Authorization: " . $authorizationField,
45
+ "Content-length: " . strlen(json_encode($data)),
46
+ );
47
+
48
+ $ch = curl_init();
49
+ curl_setopt($ch, CURLOPT_URL, $url);
50
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
51
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
52
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
53
+ curl_setopt($ch, CURLOPT_POST, 1);
54
+ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
55
+
56
+ $info = curl_exec($ch);
57
+ if (curl_errno($ch)) {
58
+ return array('valid' => FALSE, 'Error' => curl_error($ch));
59
+ } else {
60
+ curl_close($ch);
61
+ return array('valid' => TRUE, 'result' => $info);
62
+ }
63
+ }
64
+
65
+ function mastercurlRequestToClxOfferAcceptenceApi($url, $page, $data, $authorizationField) {
66
+
67
+ $headers = array(
68
+ "POST " . $page . " HTTP/1.1",
69
+ "Host:portal.clexchange.io",
70
+ "Content-type: application/json",
71
+ "Cache-Control: no-cache",
72
+ "Authorization: " . $authorizationField,
73
+ "Content-length: " . strlen(json_encode($data)),
74
+ );
75
+
76
+ $ch = curl_init();
77
+ curl_setopt($ch, CURLOPT_URL, $url);
78
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
79
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
80
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
81
+ curl_setopt($ch, CURLOPT_POST, 1);
82
+ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
83
+
84
+
85
+ $info = curl_exec($ch);
86
+
87
+ if (curl_errno($ch)) {
88
+ return array('valid' => FALSE, 'Error' => curl_error($ch));
89
+ } else {
90
+ curl_close($ch);
91
+ return array('valid' => TRUE, 'result' => $info);
92
+ }
93
+
94
+ }
95
+
96
+ function clxQueueingSystem() {
97
+
98
+ $Queue_Authentication_Key = Mage::getStoreConfig('payment/clxfunding/queue_authentication_key');
99
+ $Queue_Endpoint = Mage::getStoreConfig('payment/clxfunding/queue_endpoint');
100
+ if (isset($Queue_Authentication_Key) && !empty($Queue_Authentication_Key) && isset($Queue_Endpoint) && !empty($Queue_Endpoint)) {
101
+ $headers = array(
102
+ "Content-type: application/json",
103
+ "Authorization: OAuth " . $Queue_Authentication_Key
104
+ );
105
+
106
+ $ch = curl_init();
107
+ curl_setopt($ch, CURLOPT_URL, $Queue_Endpoint);
108
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
109
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
110
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
111
+
112
+ $info = curl_exec($ch);
113
+
114
+ if (curl_errno($ch)) {
115
+ return FALSE;
116
+ } else {
117
+ curl_close($ch);
118
+ $reponse_data = json_decode($info);
119
+ if (isset($reponse_data) && !empty($reponse_data)) {
120
+ return $reponse_data;
121
+ } else {
122
+ return FALSE;
123
+ }
124
+ }
125
+ } else {
126
+ Mage::log('Clx Error : Missing queue authentication key or queue endpoint ');
127
+ }
128
+ }
129
+
130
+ function getAge($date1, $date2) {
131
+ $date1 = strtotime($date1);
132
+ $date2 = strtotime($date2);
133
+ $age = 0;
134
+ while ($date2 > $date1 = strtotime('+1 year', $date1)) {
135
+ ++$age;
136
+ }
137
+ return $age;
138
+ }
139
+
140
+ }
app/code/community/CLExchange/Clexchangefunding/IsBestOffer.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_IsBestOffer {
4
+ /* here we can update select field values of is Best Offer in admin panel under CLExchange Payment Module tab */
5
+
6
+ public function toOptionArray() {
7
+ return array(
8
+ array('value' => '1', 'label' => Mage::helper('adminhtml')->__('true')),
9
+ array('value' => '0', 'label' => Mage::helper('adminhtml')->__('false'))
10
+ );
11
+ }
12
+
13
+ }
app/code/community/CLExchange/Clexchangefunding/Model/AccountIdV.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* This is to restrict merchant to change title of payment method */
3
+ class CLExchange_Clexchangefunding_Model_AccountIdV extends Mage_Core_Model_Config_Data {
4
+ /* save config in admin panel */
5
+ public function save() {
6
+ $accountId = $this->getValue(); //get the value from our config
7
+ if (!isset($accountId) || empty($accountId)) {
8
+ Mage::throwException("CLExchange Payment Module - AccountId is required");
9
+ }
10
+ return parent::save(); //call original save method so whatever happened
11
+ }
12
+ }
app/code/community/CLExchange/Clexchangefunding/Model/AuthorizationKeyV.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* This is to restrict merchant to change title of payment method */
3
+ class CLExchange_Clexchangefunding_Model_AuthorizationKeyV extends Mage_Core_Model_Config_Data {
4
+ /* save config in admin panel */
5
+ public function save() {
6
+ $authkey_v = $this->getValue(); //get the value from our config
7
+ if (!isset($authkey_v) || empty($authkey_v)) {
8
+ Mage::throwException("CLExchange Payment Module - Authentication Key is required");
9
+ }
10
+ return parent::save(); //call original save method so whatever happened
11
+ }
12
+ }
app/code/community/CLExchange/Clexchangefunding/Model/ClxEmail.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_ClxEmail extends Mage_Core_Model_Email_Template {
4
+ /* send mail function */
5
+
6
+ public function sendEmail($templateId, $email, $name, $subject, $params = array()) {
7
+ /* send mail sender details */
8
+ // ident_sales - sales representative
9
+ // ident_general - Owner
10
+ // $email - customer email
11
+ // $name - customer name
12
+ // $params - pass parameters to template
13
+ $sender = array('name' => Mage::getStoreConfig('trans_email/ident_sales/name'), 'email' => Mage::getStoreConfig('trans_email/ident_sales/email'));
14
+
15
+ $this->setDesignConfig(array('area' => 'frontend', 'store' => $this->getDesignConfig()->getStore()))
16
+ ->setTemplateSubject($subject)
17
+ ->sendTransactional(
18
+ $templateId, $sender, $email, $name, $params
19
+ );
20
+ }
21
+
22
+ }
app/code/community/CLExchange/Clexchangefunding/Model/Clxloanappdtls.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_Clxloanappdtls extends Mage_Core_Model_Abstract {
4
+
5
+ public function _construct() {
6
+ parent::_construct();
7
+ $this->_init('clxfunding/clxloanappdtls');
8
+ }
9
+
10
+ }
app/code/community/CLExchange/Clexchangefunding/Model/Clxloanofferdetails.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_Clxloanofferdetails extends Mage_Core_Model_Abstract {
4
+
5
+ public function _construct() {
6
+ parent::_construct();
7
+ $this->_init('clxfunding/clxloanofferdetails');
8
+ }
9
+
10
+ }
app/code/community/CLExchange/Clexchangefunding/Model/CronOrderStatusUpdate.php ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_CronOrderStatusUpdate {
4
+
5
+ public function updateClxOrderStatus() {
6
+ $QueueResponse = Mage::helper('clxfunding')->clxQueueingSystem(); //this will call queueing system to get loan application status
7
+
8
+ if(isset($QueueResponse) && $QueueResponse && isset($QueueResponse->messages) && is_array($QueueResponse->messages))
9
+ {
10
+ foreach($QueueResponse->messages as $res)
11
+ {
12
+ $body = json_decode('{'.$res->body.'}');
13
+ if (isset($body->application_status) && isset($body->source_application_Id) && !is_null($body->source_application_Id)) {
14
+ $this->commonFunctionToUpdateStatus($body);
15
+ }
16
+ }
17
+ }
18
+ }
19
+
20
+ public function commonFunctionToUpdateStatus($QueueResponse) {
21
+ $table_prefix = Mage::getConfig()->getTablePrefix();
22
+ $clx_table = $table_prefix . 'clx_loan_application_detail';
23
+ $applicationId = $QueueResponse->source_application_Id;
24
+ $tmpvar = explode('-',$applicationId);
25
+ $applicationId = $tmpvar[0].'-'.ltrim($tmpvar[1], '0');
26
+ $clxOrderStatus = $QueueResponse->application_status;
27
+ if (isset($applicationId) && !empty($applicationId) && isset($clxOrderStatus) && !empty($clxOrderStatus)) {
28
+ $connectionRead = Mage::getSingleton('core/resource')->getConnection('core_read');
29
+ $select = $connectionRead->select()
30
+ ->from($clx_table, array('*'))
31
+ ->where('application_id=? and status!="FUNDED" and status!="LENDER_REJECTED" and status!="REJECTED" and status!="CUSTOMER_REJECTED" and status!="MERCHANT_REJECTED"', $applicationId);
32
+ $row = $connectionRead->fetchRow($select); //return rows
33
+ if (isset($row) && !empty($row) && is_array($row) && isset($row['clx_loan_application_detail_id'])) {
34
+ if (isset($QueueResponse->loan_offers[0]) && !empty($QueueResponse->loan_offers[0]) && count($QueueResponse->loan_offers[0]) && $row['approvalRequired_flag'] && $row['mail_sent'] != 1 && $row['status'] != 'CUSTOMER_ACCEPTED') {
35
+ if (isset($row['order_id']) && $row['order_id']) {
36
+ $order = Mage::getModel('sales/order')->loadByIncrementId($row['order_id']);//This will fetch order details & $row['order_id'] is order number
37
+ if (isset($order) && !empty($order)) {
38
+ if (isset($order['customer_email']) && !empty($order['customer_email']) && isset($order['customer_firstname']) && !empty($order['customer_firstname']) && isset($order['customer_lastname']) && !empty($order['customer_lastname'])) {
39
+ /* save loan offer details */
40
+ $loan_offer_data = array();
41
+ if (isset($QueueResponse->loan_offers[0]->id) && !empty($QueueResponse->loan_offers[0]->id)) {
42
+ $loan_offer_data['offerId'] = $QueueResponse->loan_offers[0]->id;
43
+ }
44
+ if (isset($QueueResponse->loan_offers[0]->loanRate) && !empty($QueueResponse->loan_offers[0]->loanRate)) {
45
+ $loan_offer_data['loanRate'] = $QueueResponse->loan_offers[0]->loanRate;
46
+ }
47
+ if (isset($QueueResponse->loan_offers[0]->loanTerm) && !empty($QueueResponse->loan_offers[0]->loanTerm)) {
48
+ $loan_offer_data['loanTerm'] = $QueueResponse->loan_offers[0]->loanTerm;
49
+ }
50
+ if (isset($QueueResponse->loan_offers[0]->loanAPR) && !empty($QueueResponse->loan_offers[0]->loanAPR)) {
51
+ $loan_offer_data['loanAPR'] = $QueueResponse->loan_offers[0]->loanAPR;
52
+ }
53
+ if (isset($QueueResponse->loan_offers[0]->paymentFrequency) && !empty($QueueResponse->loan_offers[0]->paymentFrequency)) {
54
+ $loan_offer_data['paymentFrequency'] = $QueueResponse->loan_offers[0]->paymentFrequency;
55
+ }
56
+ if (isset($QueueResponse->loan_offers[0]->paymentAmount) && !empty($QueueResponse->loan_offers[0]->paymentAmount)) {
57
+ $loan_offer_data['paymentAmount'] = $QueueResponse->loan_offers[0]->paymentAmount;
58
+ }
59
+ if (isset($QueueResponse->loan_offers[0]->downPayment) && !empty($QueueResponse->loan_offers[0]->downPayment)) {
60
+ $loan_offer_data['downPayment'] = $QueueResponse->loan_offers[0]->downPayment;
61
+ }
62
+ if (isset($QueueResponse->loan_offers[0]->showSelectedOfferUrl) && !empty($QueueResponse->loan_offers[0]->showSelectedOfferUrl)) {
63
+ $loan_offer_data['showSelectedOfferUrl'] = $QueueResponse->loan_offers[0]->showSelectedOfferUrl;
64
+ }
65
+ if (isset($QueueResponse->loan_offers[0]->lenderName) && !empty($QueueResponse->loan_offers[0]->lenderName)) {
66
+ $loan_offer_data['lenderName'] = $QueueResponse->loan_offers[0]->lenderName;
67
+ }
68
+ $loan_offer_data['loan_application_id'] = $row['clx_loan_application_detail_id'];
69
+ if (isset($loan_offer_data) && !empty($loan_offer_data)) {
70
+ $new_model = Mage::getModel('clxfunding/clxloanofferdetails')->setData($loan_offer_data);
71
+ try {
72
+ $new_model->save();
73
+ } catch (Exception $e) {
74
+ Mage::logException($e);
75
+ }
76
+ }
77
+ /* save loan offer details */
78
+
79
+ $e_applicationId = base64_encode(Mage::helper('core')->encrypt($applicationId));
80
+ $e_offerId = base64_encode(Mage::helper('core')->encrypt($QueueResponse->loan_offers[0]->id));
81
+ $templateData = array(
82
+ 'firstName' => uc_words(strtolower($order['customer_firstname'])),
83
+ 'lastName' => uc_words(strtolower($order['customer_lastname'])),
84
+ 'MonthlyPayment' => $QueueResponse->loan_offers[0]->paymentAmount,
85
+ 'APR' => $QueueResponse->loan_offers[0]->loanAPR,
86
+ 'Terms' => $QueueResponse->loan_offers[0]->loanTerm,
87
+ 'orderNumber' => $row['order_id'],
88
+ 'offerAcceptRedirectUrl' => Mage::getBaseUrl() . 'clxfunding/ClxAPI/loanOfferAccept/applicationId/' . $e_applicationId . '/loanOfferId/' . $e_offerId,
89
+ 'offerRejectRedirectUrl' => Mage::getBaseUrl() . 'clxfunding/ClxAPI/loanOfferReject/applicationId/' . $e_applicationId . '/loanOfferId/' . $e_offerId
90
+ );
91
+ if (isset($QueueResponse->loan_offers[0]->lenderName) && $QueueResponse->loan_offers[0]->lenderName) {
92
+ $templateData['lenderName'] = $QueueResponse->loan_offers[0]->lenderName;
93
+ } else {
94
+ $templateData['lenderName'] = 'Lender';
95
+ }
96
+ if (isset($QueueResponse->loan_offers[0]->ShowSelectedOfferUrl) && $QueueResponse->loan_offers[0]->ShowSelectedOfferUrl) {
97
+ $templateData['MoreDetails'] = '<a href=' . $QueueResponse->loan_offers[0]->ShowSelectedOfferUrl . ' target="_blank">More details</a>';
98
+ } else {
99
+ $templateData['MoreDetails'] = '-';
100
+ }
101
+ if (isset($QueueResponse->loan_offers[0]->loanRate) && !empty($QueueResponse->loan_offers[0]->loanRate)) {
102
+ $templateData['loanRate'] = $QueueResponse->loan_offers[0]->loanRate.'%';
103
+ } else {
104
+ $templateData['loanRate'] = '-';
105
+ }
106
+
107
+
108
+ /* send loan offer mail notification to customer */
109
+ try {
110
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
111
+ 'clx_loan_offerdetail_email_template', $order['customer_email'], uc_words(strtolower($order['customer_firstname'])) . ' ' . uc_words(strtolower($order['customer_lastname'])), 'Loan Offer Details', $templateData
112
+ );
113
+
114
+ $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
115
+ $connectionWrite->beginTransaction();
116
+ $data = array();
117
+ $data['status'] = $clxOrderStatus;
118
+ $data['update_time'] = date('Y-m-d H:i:s');
119
+ $data['offer_mail_sent_time'] = date('Y-m-d H:i:s');
120
+ $data['prev_offer_mail_sent_time'] = date('Y-m-d H:i:s');
121
+ $data['mail_sent'] = 1;
122
+ $where = $connectionWrite->quoteInto('clx_loan_application_detail_id =?', $row['clx_loan_application_detail_id']);
123
+ $connectionWrite->update($clx_table, $data, $where);
124
+ $connectionWrite->commit();
125
+ } catch (Exception $ex) {
126
+ Mage::logException($ex);
127
+ }
128
+ /* send loan offer mail notification to customer */
129
+ }
130
+ }
131
+ }
132
+ } else /* response without loan offer */ {
133
+ if (isset($row['order_id']) && $row['order_id']) {
134
+ $order = Mage::getModel('sales/order')->loadByIncrementId($row['order_id']);
135
+ if (isset($order) && !empty($order)) {
136
+ if ($clxOrderStatus == "FUNDED") {
137
+ $parameters1 = array(
138
+ 'applicationID' => $applicationId,
139
+ 'orderNumber' => $row['order_id'], //$row['order_id'] is order number
140
+ );
141
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
142
+ 'clx_loan_funded_email_template', Mage::getStoreConfig('trans_email/ident_sales/email'), Mage::getStoreConfig('trans_email/ident_sales/name'), 'Loan Offer Funded', $parameters1
143
+ );
144
+ }
145
+ if (($clxOrderStatus == "REJECTED") || ($clxOrderStatus == "LENDER_REJECTED")) {
146
+ /* Mail notification to Merchant about loan offer rejection */
147
+ $parameters = array('applicationId' => $applicationId, 'orderNumber' => $row['order_id'], 'customerName' => ucfirst(strtolower($row['firstName'])) . ' ' . ucfirst(strtolower($row['lastName'])));
148
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
149
+ 'clx_loan_offerreject_email_template', Mage::getStoreConfig('trans_email/ident_sales/email'), Mage::getStoreConfig('trans_email/ident_sales/name'), 'Loan Application Rejected', $parameters
150
+ );
151
+
152
+ /* Order Cancel */
153
+ if (isset($row['order_id']) && !empty($row['order_id'])) {
154
+ $orderModel = Mage::getModel('sales/order');
155
+ $orderModel->loadByIncrementId($row['order_id']);
156
+ if ($orderModel->canCancel()) {
157
+ $orderModel->cancel();
158
+ $orderModel->setStatus('Reason for cancellation : Lender rejected the loan offer');
159
+ $orderModel->save();
160
+ }
161
+ }
162
+ /* Order Cancel */
163
+ }
164
+ /* update custom table with current application status */
165
+ $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
166
+ $connectionWrite->beginTransaction();
167
+ $data = array();
168
+ $data['status'] = $clxOrderStatus;
169
+ $data['update_time'] = date('Y-m-d H:i:s');
170
+ $where = $connectionWrite->quoteInto('clx_loan_application_detail_id =?', $row['clx_loan_application_detail_id']);
171
+ $connectionWrite->update($clx_table, $data, $where);
172
+ $connectionWrite->commit();
173
+ }
174
+ }
175
+ }
176
+ }
177
+ } else {
178
+ Mage::log("CLX Message : Invalid reponse");
179
+ }
180
+ }
181
+
182
+ /* this function is store loan application details on order save after create loan application or loan offer accept */
183
+
184
+ public function saveLoanApplicationDetails($data) {
185
+ $data['created_time'] = date('Y-m-d H:i:s');
186
+ $data['update_time'] = date('Y-m-d H:i:s');
187
+ $model = Mage::getModel('clxfunding/clxloanappdtls')->setData($data);
188
+ try {
189
+ $model->save();
190
+ if (isset($data['offer_acceptance_flag']) && !empty($data['offer_acceptance_flag']) && $data['offer_acceptance_flag']) {
191
+ $last_insert_id = $model->getId();
192
+ if (isset($last_insert_id) && !empty($last_insert_id)) {
193
+ $loan_offer_details = array();
194
+ $loan_offer_details['loanTerm'] = $data['loanTerms'];
195
+ $loan_offer_details['loanAPR'] = $data['loanAPR'];
196
+ $loan_offer_details['loanRate'] = $data['loanRate'];
197
+ $loan_offer_details['paymentFrequency'] = $data['paymentFrequency'];
198
+ $loan_offer_details['paymentAmount'] = $data['paymentAmount'];
199
+ $loan_offer_details['downPayment'] = $data['downPayment'];
200
+ $loan_offer_details['offerId'] = $data['loanOfferId'];
201
+ $loan_offer_details['showSelectedOfferUrl'] = $data['showSelectedOfferUrl'];
202
+ $loan_offer_details['lenderName'] = $data['lenderName'];
203
+ $loan_offer_details['loan_application_id'] = $last_insert_id;
204
+
205
+ $loan_offer_model = Mage::getModel('clxfunding/clxloanofferdetails')->setData($loan_offer_details);
206
+ try {
207
+ $loan_offer_model->save();
208
+ } catch (Exception $e) {
209
+ Mage::logException($e);
210
+ }
211
+ } else {
212
+ Mage::log('Clx Error : unable to save loan application details');
213
+ }
214
+ }
215
+ } catch (Exception $e) {
216
+ Mage::logException($e);
217
+ }
218
+ }
219
+
220
+ public function cancelOrderAfterTimeExpire() {
221
+ $table_prefix = Mage::getConfig()->getTablePrefix();
222
+ $clx_table = $table_prefix . 'clx_loan_application_detail';
223
+ $connectionRead = Mage::getSingleton('core/resource')->getConnection('core_read');
224
+ $select = $connectionRead->select()
225
+ ->from($clx_table, array('*'))
226
+ ->where('approvalRequired_flag=1 and status!="FUNDED" and status!="LENDER_REJECTED" and status!="CUSTOMER_REJECTED" and status!="CUSTOMER_ACCEPTED" and status!="MERCHANT_REJECTED" and status!="REJECTED" and mail_sent=1');
227
+ $row = $connectionRead->fetchAll($select); //return rows
228
+
229
+ if (isset($row) && !empty($row) && is_array($row)) {
230
+ for ($i = 0; $i < count($row); $i++) {
231
+ if (isset($row[$i]['offer_mail_sent_time']) && !is_null($row[$i]['offer_mail_sent_time']) && isset($row[$i]['prev_offer_mail_sent_time']) && !is_null($row[$i]['prev_offer_mail_sent_time']) && isset($row[$i]['approvalRequired_flag']) && isset($row[$i]['status']) && $row[$i]['approvalRequired_flag'] == 1 && $row[$i]['status'] != 'CUSTOMER_REJECTED' && isset($row[$i]['order_id']) && !empty($row[$i]['order_id'])) {
232
+ $timeframe = Mage::getStoreConfig('payment/clxfunding/loan_offer_time_frame');
233
+ $daily_mails_per_day = 1;
234
+
235
+ ($daily_mails_per_day > 0) ? $daily_mails_per_day = round($daily_mails_per_day) : $daily_mails_per_day = 1; //Value should not be less than 1
236
+
237
+ $time_frame_in_hours = $timeframe * 24;
238
+ $mail_sent_datetime = $row[$i]['offer_mail_sent_time'];
239
+ $prev_mail_sent_datetime = $row[$i]['prev_offer_mail_sent_time'];
240
+
241
+ $current_datetime = date('Y-m-d H:i:s');
242
+ $m_hours = round((strtotime($current_datetime) - strtotime($mail_sent_datetime)) / 3600, 1);
243
+ $daily_hours = round((strtotime($current_datetime) - strtotime($prev_mail_sent_datetime)) / 3600, 1);
244
+
245
+
246
+ if (isset($m_hours) && isset($time_frame_in_hours) && isset($daily_hours) && $m_hours >= $time_frame_in_hours) {
247
+ $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
248
+ $connectionWrite->beginTransaction();
249
+ $data = array();
250
+ $data['status'] = "MERCHANT_REJECTED";
251
+ $data['update_time'] = date('Y-m-d H:i:s');
252
+
253
+ $orderModel = Mage::getModel('sales/order');
254
+ $orderModel->loadByIncrementId($row[$i]['order_id']);
255
+ if ($orderModel->canCancel()) {
256
+ $orderModel->cancel();
257
+ $orderModel->setStatus('canceled_pendings');
258
+ $orderModel->save();
259
+ }
260
+ $where = $connectionWrite->quoteInto('clx_loan_application_detail_id =?', $row[$i]['clx_loan_application_detail_id']);
261
+ $connectionWrite->update($clx_table, $data, $where);
262
+ $connectionWrite->commit();
263
+
264
+
265
+ $parameters = array('applicationId' => $row[$i]['application_id'], 'orderNumber' => $row[$i]['order_id']);
266
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
267
+ 'clx_auto_order_cancel_email_template', Mage::getStoreConfig('trans_email/ident_sales/email'), Mage::getStoreConfig('trans_email/ident_sales/name'), 'Clx Auto Order Canceled', $parameters
268
+ );
269
+ } else if (isset($m_hours) && isset($time_frame_in_hours) && isset($daily_hours) && $m_hours < $time_frame_in_hours && $daily_hours >= (24 / $daily_mails_per_day)) {
270
+ $connectionRead = Mage::getSingleton('core/resource')->getConnection('core_read');
271
+ $select = $connectionRead->select()
272
+ ->from($table_prefix . 'clx_loan_offer_detail', array('*'))
273
+ ->where('loan_application_id=?', $row[$i]['clx_loan_application_detail_id']);
274
+
275
+ $customer_loan_offer_row = $connectionRead->fetchRow($select); //return rows
276
+
277
+ if (isset($customer_loan_offer_row) && !empty($customer_loan_offer_row)) {
278
+ if (isset($customer_loan_offer_row['clx_loan_offer_detail_id'])) {
279
+ $order_h = Mage::getModel('sales/order')->loadByIncrementId($row[$i]['order_id']);
280
+ if (isset($order_h) && !empty($order_h)) {
281
+ $e_applicationId = base64_encode(Mage::helper('core')->encrypt($row[$i]['application_id']));
282
+ $e_offerId = base64_encode(Mage::helper('core')->encrypt($customer_loan_offer_row['offerId']));
283
+ $templateData = array(
284
+ 'firstName' => uc_words(strtolower($order_h['customer_firstname'])),
285
+ 'lastName' => uc_words(strtolower($order_h['customer_lastname'])),
286
+ 'MonthlyPayment' => $customer_loan_offer_row['paymentAmount'],
287
+ 'loanRate' => $customer_loan_offer_row['loanRate'],
288
+ 'APR' => $customer_loan_offer_row['loanAPR'],
289
+ 'Terms' => $customer_loan_offer_row['loanTerm'],
290
+ 'orderNumber' => $row[$i]['order_id'],
291
+ 'offerAcceptRedirectUrl' => Mage::getBaseUrl() . 'clxfunding/ClxAPI/loanOfferAccept/applicationId/' . $e_applicationId . '/loanOfferId/' . $e_offerId,
292
+ 'offerRejectRedirectUrl' => Mage::getBaseUrl() . 'clxfunding/ClxAPI/loanOfferReject/applicationId/' . $e_applicationId . '/loanOfferId/' . $e_offerId
293
+ );
294
+ if (isset($customer_loan_offer_row['lenderName']) && !empty($customer_loan_offer_row['lenderName'])) {
295
+ $templateData['lenderName'] = $customer_loan_offer_row['lenderName'];
296
+ } else {
297
+ $templateData['lenderName'] = 'Lender';
298
+ }
299
+ if (isset($customer_loan_offer_row["ShowSelectedOfferUrl"]) && !empty($customer_loan_offer_row["ShowSelectedOfferUrl"])) {
300
+ $templateData['MoreDetails'] = '<a href=' . $customer_loan_offer_row["ShowSelectedOfferUrl"] . ' target="_blank">More details</a>';
301
+ } else {
302
+ $templateData['MoreDetails'] = '-';
303
+ }
304
+
305
+ try {
306
+
307
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
308
+ 'clx_loan_offerdetail_email_template', $order_h['customer_email'], uc_words(strtolower($order_h['customer_firstname'])) . ' ' . uc_words(strtolower($order_h['customer_lastname'])), 'Loan Offer Details', $templateData
309
+ );
310
+
311
+ $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
312
+ $connectionWrite->beginTransaction();
313
+ $data = array();
314
+ $data['update_time'] = date('Y-m-d H:i:s');
315
+ $data['prev_offer_mail_sent_time'] = date('Y-m-d H:i:s');
316
+ $data['mail_sent'] = 1;
317
+ $where = $connectionWrite->quoteInto('clx_loan_application_detail_id =?', $row[$i]['clx_loan_application_detail_id']);
318
+ $connectionWrite->update($clx_table, $data, $where);
319
+ $connectionWrite->commit();
320
+ } catch (Exception $ex) {
321
+ Mage::logException($ex);
322
+ }
323
+ }
324
+ }
325
+ }
326
+ } else {
327
+
328
+ }
329
+ }
330
+ }
331
+ }
332
+ }
333
+
334
+ }
app/code/community/CLExchange/Clexchangefunding/Model/Mysql4/Clxloanappdtls.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_Mysql4_Clxloanappdtls extends Mage_Core_Model_Mysql4_Abstract {
4
+
5
+ public function _construct() {
6
+ $this->_init('clxfunding/clxloanappdtls', 'clx_loan_application_detail_id');
7
+ }
8
+
9
+ }
app/code/community/CLExchange/Clexchangefunding/Model/Mysql4/Clxloanappdtls/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_Mysql4_Clxloanappdtls_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
4
+
5
+ public function _construct() {
6
+ //parent::__construct();
7
+ $this->_init('clxfunding/clxloanappdtls');
8
+ }
9
+
10
+ }
app/code/community/CLExchange/Clexchangefunding/Model/Mysql4/Clxloanofferdetails.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_Mysql4_Clxloanofferdetails extends Mage_Core_Model_Mysql4_Abstract {
4
+
5
+ public function _construct() {
6
+ $this->_init('clxfunding/clxloanofferdetails', 'clx_loan_offer_detail_id');
7
+ }
8
+
9
+ }
app/code/community/CLExchange/Clexchangefunding/Model/Mysql4/Clxloanofferdetails/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_Mysql4_Clxloanofferdetails_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
4
+
5
+ public function _construct() {
6
+ //parent::__construct();
7
+ $this->_init('clxfunding/clxloanofferdetails');
8
+ }
9
+
10
+ }
app/code/community/CLExchange/Clexchangefunding/Model/Observer.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_Observer {
4
+ /* This function to check extension configured with all required information, if not Hide CLXFunding else Show */
5
+
6
+ public function paymentMethodIsActive(Varien_Event_Observer $observer) {
7
+
8
+ /* extension core config data */
9
+ $isExtensionActive = Mage::getStoreConfig('payment/clxfunding/active');
10
+ if(isset($isExtensionActive) && !empty($isExtensionActive) && $isExtensionActive)
11
+ {
12
+ $clx_config_var = new Mage_Core_Model_Config();
13
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id'); //Account ID
14
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field'); //Authorization Key
15
+ $queue_authentication_key = Mage::getStoreConfig('payment/clxfunding/queue_authentication_key'); //Queue authentication key
16
+ $queue_endpoint = Mage::getStoreConfig('payment/clxfunding/queue_endpoint'); //queue endpoint
17
+
18
+ // if all required configuration parameters set then only show CLX Funding Button
19
+ if (!(isset($accountId) && !empty($accountId) &&
20
+ isset($authorizationField) && !empty($authorizationField) &&
21
+ isset($queue_authentication_key) && !empty($queue_authentication_key) &&
22
+ isset($queue_endpoint) && !empty($queue_endpoint)
23
+ )) {
24
+
25
+ $clx_config_var->saveConfig('payment/clxfunding/active', "0"); // to disable module (hide CLX Funding radio button)
26
+ }
27
+ }
28
+ }
29
+
30
+ /* following function for getting Queue Response & processing order accordingly */
31
+
32
+ public function checkCron() {
33
+ Mage::getModel('clxfunding/CronOrderStatusUpdate')->updateClxOrderStatus();
34
+ }
35
+
36
+ /* Order cancel if customer not responding to loan offer mail notification */
37
+
38
+ public function timeframeCancelOrder() {
39
+ Mage::getModel('clxfunding/CronOrderStatusUpdate')->cancelOrderAfterTimeExpire();
40
+ }
41
+
42
+ }
43
+
44
+ ?>
app/code/community/CLExchange/Clexchangefunding/Model/Observer.php~ ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_Observer {
4
+ /* This function to check extension configured with all required information, if not Hide CLXFunding else Show */
5
+
6
+ public function paymentMethodIsActive(Varien_Event_Observer $observer) {
7
+
8
+ /* extension core config data */
9
+ /*$isEnabled = Mage::helper('core')->isModuleEnabled('CLExchange_Funding');
10
+ if(isset($isEnabled) && !empty($isEnabled) && $isEnabled)
11
+ {*/
12
+ $clx_config_var = new Mage_Core_Model_Config();
13
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id'); //Account ID
14
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field'); //Authorization Key
15
+ $isBestOffer = Mage::getStoreConfig('payment/clxfunding/is_Best_Offer'); //isBestOffer
16
+ $queue_authentication_key = Mage::getStoreConfig('payment/clxfunding/queue_authentication_key'); //Queue authentication key
17
+ $queue_endpoint = Mage::getStoreConfig('payment/clxfunding/queue_endpoint'); //queue endpoint
18
+ $cron_schedule = Mage::getStoreConfig('payment/clxfunding/cron_expr'); //cron
19
+ // if all required configuration parameters set then only show CLX Funding Button
20
+ if (!(isset($accountId) && !empty($accountId) &&
21
+ isset($authorizationField) && !empty($authorizationField) &&
22
+ isset($isBestOffer) && !empty($isBestOffer) &&
23
+ isset($queue_authentication_key) && !empty($queue_authentication_key) &&
24
+ isset($queue_endpoint) && !empty($queue_endpoint) &&
25
+ isset($cron_schedule) && !empty($cron_schedule))) {
26
+
27
+ $clx_config_var->saveConfig('payment/clxfunding/active', "0"); // to disable module (hide CLX Funding radio button)
28
+ } else {
29
+ $clx_config_var->saveConfig('payment/clxfunding/active', "1"); // to enable module(show CLX Funding radio button )
30
+ }
31
+ // }
32
+ }
33
+
34
+ /* following function for getting Queue Response & processing order accordingly */
35
+
36
+ public function checkCron() {
37
+ Mage::getModel('clxfunding/CronOrderStatusUpdate')->updateClxOrderStatus();
38
+ }
39
+
40
+ /* Order cancel if customer not responding to loan offer mail notification */
41
+
42
+ public function timeframeCancelOrder() {
43
+ Mage::getModel('clxfunding/CronOrderStatusUpdate')->cancelOrderAfterTimeExpire();
44
+ }
45
+
46
+ }
47
+
48
+ ?>
app/code/community/CLExchange/Clexchangefunding/Model/PaymentMethodTitle.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* This is to restrict merchant to change title of payment method */
3
+ class CLExchange_Clexchangefunding_Model_PaymentMethodTitle extends Mage_Core_Model_Config_Data {
4
+ /* save config in admin panel */
5
+ public function save() {
6
+ $title = $this->getValue(); //get the value from our config
7
+ if (isset($title) && !empty($title) && $title != 'Online Loan') {
8
+ Mage::throwException("CLX Message - Please contact CLExchange to change title");
9
+ }
10
+ return parent::save(); //call original save method so whatever happened
11
+ }
12
+ }
app/code/community/CLExchange/Clexchangefunding/Model/Paymentmethod.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_Paymentmethod extends Mage_Payment_Model_Method_Abstract {
4
+
5
+ protected $_code = 'clxfunding';
6
+ protected $_formBlockType = 'clxfunding/form_clxfunding';
7
+
8
+ public function getOrderPlaceRedirectUrl() {
9
+ return Mage::getUrl('clxfunding/ClxAPI/saveStaus', array('_secure' => false));
10
+ }
11
+
12
+ }
app/code/community/CLExchange/Clexchangefunding/Model/QueueAuthKeyV.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* This is to restrict merchant to change title of payment method */
3
+ class CLExchange_Clexchangefunding_Model_QueueAuthKeyV extends Mage_Core_Model_Config_Data {
4
+ /* save config in admin panel */
5
+ public function save() {
6
+ $qak_v = $this->getValue(); //get the value from our config
7
+ if (!isset($qak_v) || empty($qak_v)) {
8
+ Mage::throwException("CLExchange Payment Module - Queue Authentication Key is required");
9
+ }
10
+ return parent::save(); //call original save method so whatever happened
11
+ }
12
+ }
app/code/community/CLExchange/Clexchangefunding/Model/QueueEndpointV.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* This is to restrict merchant to change title of payment method */
3
+ class CLExchange_Clexchangefunding_Model_QueueEndpointV extends Mage_Core_Model_Config_Data {
4
+ /* save config in admin panel */
5
+ public function save() {
6
+ $qev = $this->getValue(); //get the value from our config
7
+ if (!isset($qev) || empty($qev)) {
8
+ Mage::throwException("CLExchange Payment Module - Queue Endpoint is required");
9
+ }
10
+ return parent::save(); //call original save method so whatever happened
11
+ }
12
+ }
app/code/community/CLExchange/Clexchangefunding/Model/Resource/Setup.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup {
4
+ }
app/code/community/CLExchange/Clexchangefunding/TimeFrames.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_TimeFrames {
4
+ /* here we can update select field values of Cron Expression in admin panel under CLExchange Payment Module tab */
5
+
6
+ public function toOptionArray() {
7
+ return array(
8
+ array('value' => '1', 'label' => Mage::helper('adminhtml')->__('24 Hours (1 day)')),
9
+ array('value' => '2', 'label' => Mage::helper('adminhtml')->__('48 Hours (2 days)')),
10
+ array('value' => '3', 'label' => Mage::helper('adminhtml')->__('72 Hours (3 days)')),
11
+ array('value' => '4', 'label' => Mage::helper('adminhtml')->__('96 Hours (4 days)')),
12
+ array('value' => '5', 'label' => Mage::helper('adminhtml')->__('120 Hours (5 days)')),
13
+ array('value' => '6', 'label' => Mage::helper('adminhtml')->__('144 Hours (6 days)'))
14
+ );
15
+ }
16
+
17
+ }
app/code/community/CLExchange/Clexchangefunding/controllers/ClxAPIController.php ADDED
@@ -0,0 +1,1070 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_ClxAPIController extends Mage_Core_Controller_Front_Action {
4
+ /* function will receive loan application form data on click of next,previous,check eligibility,submit button */
5
+
6
+ public function loanAppProcessingAction() {
7
+ if ($this->getRequest()->isXmlHttpRequest()) {
8
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id'); //get configured accountID from core_config_data
9
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field'); //get configured authorization from core_config_data
10
+ $quote = Mage::getModel('checkout/session')->getQuote();
11
+ $quoteData = $quote->getData();
12
+
13
+ $grandTotal = $quoteData['grand_total'];
14
+
15
+ if (isset($accountId) && isset($authorizationField)) {
16
+ $formData = array(
17
+ "firstName" => trim($this->getRequest()->getParam('firstName')),
18
+ "lastName" => trim($this->getRequest()->getParam('lastName')),
19
+ "emailId" => trim($this->getRequest()->getParam('emailId')),
20
+ "birthDate" => trim($this->getRequest()->getParam('birthDate')),
21
+ "street" => trim($this->getRequest()->getParam('street')),
22
+ "city" => trim($this->getRequest()->getParam('city')),
23
+ "country" => trim($this->getRequest()->getParam('country')),
24
+ "state" => trim($this->getRequest()->getParam('state')),
25
+ "zipcode" => trim($this->getRequest()->getParam('zipcode')),
26
+ "loanAmount" => floatval($grandTotal),
27
+ "loanPurpose" => trim($this->getRequest()->getParam('loanPurpose')),
28
+ "loanTerms" => trim($this->getRequest()->getParam('loanTerms')),
29
+ "yearlyIncome" => trim($this->getRequest()->getParam('yearlyIncome')),
30
+ "employmentStatus" => trim($this->getRequest()->getParam('employmentStatus')),
31
+ "selfReportedCreditScore" => trim($this->getRequest()->getParam('selfReportedCreditScore')),
32
+ "mobilePhoneAreaCode" => trim($this->getRequest()->getParam('mobilePhoneAreaCode')),
33
+ "mobileNumber" => trim($this->getRequest()->getParam('mobileNumber')),
34
+ "ssn" => trim($this->getRequest()->getParam('ssn')),
35
+ "employerName" => trim($this->getRequest()->getParam('employerName')),
36
+ "occupation" => trim($this->getRequest()->getParam('occupation')),
37
+ "employmentStartDate" => trim($this->getRequest()->getParam('employmentStartDate')),
38
+ "bankName" => trim($this->getRequest()->getParam('bankName')),
39
+ "firstAccountHolderName" => trim($this->getRequest()->getParam('firstAccountHolderName')),
40
+ "bankAccountType" => trim($this->getRequest()->getParam('bankAccountType')),
41
+ "bankAccountNumber" => trim($this->getRequest()->getParam('bankAccountNumber')),
42
+ "routingNumber" => trim($this->getRequest()->getParam('routingNumber')),
43
+ "accountId" => $accountId,
44
+ "currency" => Mage::app()->getStore()->getCurrentCurrencyCode()
45
+ );
46
+ $clx_button_flag = trim($this->getRequest()->getParam('clx_btn_flag'));
47
+ $validation_error = array();
48
+ /* validators */
49
+
50
+ $name_validator = new Zend_Validate_Alpha(array('allowWhiteSpace' => true)); // only alphabets and space
51
+ $is_digit = new Zend_Validate_Digits();
52
+ $date_validator = new Zend_Validate_Date(); // date yyyy-mm-dd
53
+ $is_decimal = new Zend_Validate_Float(); //
54
+ $string_length_min_max_3 = new Zend_Validate_StringLength(array('max' => 3)); //mobilePhoneAreaCode
55
+ $string_length_min_max_10 = new Zend_Validate_StringLength(array('max' => 10)); //mobileNumber
56
+ $string_length_max_8 = new Zend_Validate_StringLength(array('max' => 8)); //zipcode
57
+ $string_length_max_100 = new Zend_Validate_StringLength(array('max' => 100)); //employerName(100max)
58
+ $string_length_max_255 = new Zend_Validate_StringLength(array('max' => 255)); //bankName(255max)
59
+ $string_length_max_30 = new Zend_Validate_StringLength(array('max' => 30)); //bankAccountNumber(30max)
60
+ $string_length_min_max_9 = new Zend_Validate_StringLength(array('min' => 9, 'max' => 9));
61
+
62
+ //$states_a = array("Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "District Of Columbia", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "American Samoa", "Guam", "Northern Mariana Islands", "Puerto Rico", "United States Minor Outlying", "Islands", "Virgin Islands");
63
+ //$employee_status_a = array(1 => "Self Employed", 2 => "Not Employed", 3 => "Other", 4 => "Employed");
64
+ //$occupation_a = array(1 => "Accountant/CPA", 2 => "Analyst", 3 => "Architect", 4 => "Attorney", 5 => "Biologist", 6 => "Bus Driver", 7 => "Car Dealer", 8 => "Chemist", 9 => "Civil Service", 10 => "Clergy", 11 => "Clerical", 12 => "Computer Programmer", 13 => "Construction", 14 => "Dentist", 16 => "Doctor", 17 => "Engineer - Chemical
", 18 => "Engineer - Electrical
", 19 => "Engineer - Mechanical
", 20 => "Executive
", 21 => "Fireman
", 22 => "Flight Attendant
", 23 => "Food Service
", 24 => "Food Service Management", 25 => "Homemaker
", 26 => "Judge
", 27 => "Laborer
", 28 => "Landscaping
", 29 => "Medical Technician", 30 => "Military Enlisted", 31 => "Military Officer", 32 => "Nurse (LPN)
", 33 => "Nurse (RN)", 34 => "Nurse's Aide
", 35 => "Pharmacist
", 36 => "Pilot - Private/Commercial
", 37 => "Police Officer/Correction Officer", 38 => "Postal Service
", 39 => "Principal
", 40 => "Professional
", 41 => "Professor
", 42 => "Psychologist
", 43 => "Realtor
", 44 => "Religious
", 45 => "Retail Management
", 47 => "Sales - Commission
", 48 => "Sales - Retail
", 49 => "Scientist
", 50 => "Administrative Assistant
", 52 => "Skilled Labor
", 53 => "Social Worker", 54 => "Student
", 61 => "Teacher
", 62 => "Teacher's Aide
", 63 => "Tradesman - Carpenter", 64 => "Tradesman - Electrician", 65 => "Tradesman - Mechanic", 66 => "Tradesman - Plumber", 67 => "Truck Driver", 69 => "Waiter/Waitress", 70 => "Other
", 71 => "Investor");
65
+ //$bankaccounttype_a = array("Savings", "Checking", "Credit");
66
+ //$loanpurpose_a = array(1 => "Debt consolidation", 2 => "Home improvement", 3 => "Business", 6 => "Auto", 7 => "Other", 8 => "Baby & adoption loans", 9 => "Boat", 10 => "Cosmetic procedures", 12 => "Green loans", 13 => "Household Expenses", 14 => "Large purchases", 15 => "Medical/Dental", 16 => "Motorcycle", 17 => "RV", 18 => "Taxes", 19 => "Vacation", 21 => "Special Occasion");
67
+ //$credit_score_a = array(1 => "Excellent Credit (760+)", 2 => "Good Credit (700+)", 3 => "Fair Credit (640+)", 4 => "Poor Credit");
68
+
69
+
70
+ $tab1_fields_key_arr = array("firstName", "lastName", "emailId", "birthDate", "mobilePhoneAreaCode", "mobileNumber", "street", "state", "city", "country", "zipcode", "yearlyIncome", "employmentStatus", "employmentStatus", "employerName", "employmentStartDate", "occupation");
71
+ $tab2_fields_key_arr = array("selfReportedCreditScore", "bankName", "firstAccountHolderName", "bankAccountType", "bankAccountNumber", "routingNumber", "ssn");
72
+ $tab3_fields_key_arr = array("loanAmount", "loanPurpose", "loanTerms");
73
+
74
+
75
+
76
+ /* Personal Information */
77
+
78
+ /* firstName */
79
+ if (!Zend_Validate::is($formData['firstName'], 'NotEmpty')) {
80
+ $validation_error['firstName'] = "This field is required";
81
+ } else {
82
+ if (!$name_validator->isValid($formData['firstName'])) {
83
+ $validation_error['firstName'] = "First name should be string";
84
+ }
85
+ }
86
+
87
+ /* lastName */
88
+ if (!Zend_Validate::is($formData['lastName'], 'NotEmpty')) {
89
+ $validation_error['lastName'] = "This field is required";
90
+ } else {
91
+ if (!$name_validator->isValid($formData['lastName'])) {
92
+ $validation_error['lastName'] = "Last name should be string";
93
+ }
94
+ }
95
+
96
+ /* emailId */
97
+ if (!Zend_Validate::is($formData['emailId'], 'NotEmpty')) {
98
+ $validation_error['emailId'] = "This field is required";
99
+ } else {
100
+ if (!Zend_Validate::is($formData['emailId'], 'EmailAddress')) {
101
+ $validation_error['emailId'] = "Invalid Email Address";
102
+ }
103
+ }
104
+
105
+ /* birthDate */
106
+ if (!Zend_Validate::is($formData['birthDate'], 'NotEmpty')) {
107
+ $validation_error['birthDate'] = "This field is required";
108
+ } else {
109
+ if (!$date_validator->isValid($formData['birthDate'])) {
110
+ $validation_error['birthDate'] = "Invalid date format";
111
+ }
112
+ $currentDate = date('Y-m-d');
113
+ if (strtotime($currentDate) > strtotime($formData['birthDate'])) {
114
+ $cl_age = Mage::helper('clxfunding')->getAge($formData['birthDate'], $currentDate);
115
+ if ($cl_age < 18) {
116
+ $validation_error['birthDate'] = "Age should be above 18";
117
+ }
118
+ } else {
119
+ $validation_error['birthDate'] = "Invalid birthDate";
120
+ }
121
+ }
122
+
123
+ /* mobilePhoneAreaCode */
124
+ if (!Zend_Validate::is($formData['mobilePhoneAreaCode'], 'NotEmpty')) {
125
+ $validation_error['mobilePhoneAreaCode'] = "This field is required";
126
+ } else {
127
+ if (!$string_length_min_max_3->isValid($formData['mobilePhoneAreaCode'])) {// 3digits only
128
+ $validation_error['mobilePhoneAreaCode'] = "This field should contain 3 digits only";
129
+ }
130
+ }
131
+ /* mobileNumber */
132
+ if (!Zend_Validate::is($formData['mobileNumber'], 'NotEmpty')) {
133
+ $validation_error['mobileNumber'] = "This field is required";
134
+ } else {
135
+ if ($is_digit->isValid($formData['mobileNumber'])) { //digits
136
+ if (!$string_length_min_max_10->isValid($formData['mobileNumber'])) {// 10 digits only
137
+ $validation_error['mobileNumber'] = "This field should contain 10 digits only";
138
+ }
139
+ } else {
140
+ $validation_error['mobileNumber'] = "This field should contain 10 digits only";
141
+ }
142
+ }
143
+
144
+ /* street */
145
+ if (!Zend_Validate::is($formData['street'], 'NotEmpty')) {
146
+ $validation_error['street'] = "This field is required";
147
+ }
148
+
149
+ /* city */
150
+ if (!Zend_Validate::is($formData['city'], 'NotEmpty')) {
151
+ $validation_error['city'] = "This field is required";
152
+ }
153
+
154
+ /* state */
155
+ if (!Zend_Validate::is($formData['state'], 'NotEmpty')) {
156
+ $validation_error['state'] = "This field is required";
157
+ } else {
158
+ /*if (!in_array($formData['state'], $states_a)) {
159
+ $validation_error['state'] = "Not a valid state";
160
+ }*/
161
+ }
162
+
163
+ /* zipcode */
164
+ if (!Zend_Validate::is($formData['zipcode'], 'NotEmpty')) {
165
+ $validation_error['zipcode'] = "This field is required";
166
+ } else {
167
+ if (!$string_length_max_8->isValid($formData['zipcode'])) {// 10 digits only
168
+ $validation_error['zipcode'] = "This field should contain maximum 8 digits";
169
+ }
170
+ }
171
+ /* country */
172
+ if (isset($formData['country'])) {
173
+ if (!Zend_Validate::is($formData['country'], 'NotEmpty')) {
174
+ $validation_error['country'] = "This field is required";
175
+ }
176
+ }
177
+
178
+ /* yearlyIncome */
179
+ if (!Zend_Validate::is($formData['yearlyIncome'], 'NotEmpty')) {
180
+ $validation_error['yearlyIncome'] = "This field is required";
181
+ } else {
182
+ if (!$is_decimal->isValid($formData['yearlyIncome'])) {
183
+ $validation_error['yearlyIncome'] = "This field contain decimal value only";
184
+ }
185
+ }
186
+
187
+ /* employmentStatus */
188
+ if (!Zend_Validate::is($formData['employmentStatus'], 'NotEmpty')) {
189
+ $validation_error['employmentStatus'] = "This field is required";
190
+ }
191
+ /* employerName */
192
+ if (!Zend_Validate::is($formData['employerName'], 'NotEmpty')) {
193
+ $validation_error['employerName'] = "This field is required";
194
+ } else {
195
+ if (!$string_length_max_100->isValid($formData['employerName'])) {// string length <=100
196
+ $validation_error['employerName'] = "String length should be less than 100";
197
+ }
198
+ }
199
+
200
+ /* employmentStartDate */
201
+ if (!Zend_Validate::is($formData['employmentStartDate'], 'NotEmpty')) {
202
+ $validation_error['employmentStartDate'] = "This field is required";
203
+ } else {
204
+ if (!$date_validator->isValid($formData['employmentStartDate'])) {
205
+ $validation_error['employmentStartDate'] = "Invalid date format";
206
+ }
207
+ /*
208
+ if (isset($formData['birthDate']) && (strtotime($formData['employmentStartDate']) > strtotime($formData['birthDate']))) {
209
+ $cl_age = Mage::helper('clxfunding')->getAge($formData['birthDate'], $formData['employmentStartDate']); // child labour 14
210
+ if ($cl_age < 14) {
211
+ $validation_error['employmentStartDate'] = "";
212
+ }
213
+ }*/
214
+ }
215
+
216
+ /* occupation */
217
+ if (!Zend_Validate::is($formData['occupation'], 'NotEmpty')) {
218
+ $validation_error['occupation'] = "This field is required";
219
+ }
220
+
221
+ /* End- Personal Information */
222
+
223
+ /* Bank Details & SSN tab fields */
224
+
225
+ /* selfReportedCreditScore */
226
+ if (!Zend_Validate::is($formData['selfReportedCreditScore'], 'NotEmpty')) {
227
+ $validation_error['selfReportedCreditScore'] = "This field is required";
228
+ }
229
+ /* bankName */
230
+ if (!Zend_Validate::is($formData['bankName'], 'NotEmpty')) {
231
+ $validation_error['bankName'] = "This field is required";
232
+ } else {
233
+ if (!$string_length_max_255->isValid($formData['employerName'])) {// string length <=255
234
+ $validation_error['bankName'] = "String length should be less than 255";
235
+ }
236
+ }
237
+ /* firstAccountHolderName */
238
+ if (!Zend_Validate::is($formData['firstAccountHolderName'], 'NotEmpty')) {
239
+ $validation_error['firstAccountHolderName'] = "This field is required";
240
+ } else {
241
+ if (!$string_length_max_255->isValid($formData['firstAccountHolderName'])) {// string length <=255
242
+ $validation_error['firstAccountHolderName'] = "String length should be less than 255";
243
+ }
244
+ }
245
+ /* bankAccountType */
246
+ if (!Zend_Validate::is($formData['bankAccountType'], 'NotEmpty')) {
247
+ $validation_error['bankAccountType'] = "This field is required";
248
+ }
249
+
250
+ /* bankAccountNumber */
251
+ if (!Zend_Validate::is($formData['bankAccountNumber'], 'NotEmpty')) {
252
+ $validation_error['bankAccountNumber'] = "This field is required";
253
+ } else {
254
+ if (!$string_length_max_30->isValid($formData['bankAccountNumber'])) {// string length <=255
255
+ $validation_error['bankAccountNumber'] = "Invalid bank account number";
256
+ }
257
+ }
258
+ /* routingNumber */
259
+ if (!Zend_Validate::is($formData['routingNumber'], 'NotEmpty')) {
260
+ $validation_error['routingNumber'] = "This field is required";
261
+ } else {
262
+ if (!$string_length_max_255->isValid($formData['routingNumber'])) {// string length <=255
263
+ $validation_error['routingNumber'] = "Invalid routing number";
264
+ }
265
+ }
266
+
267
+
268
+ /* ssn */
269
+ if (!Zend_Validate::is($formData['ssn'], 'NotEmpty')) {
270
+ $validation_error['ssn'] = "This field is required";
271
+ } else {
272
+ if (!$string_length_min_max_9->isValid($formData['ssn'])) {
273
+ $validation_error['ssn'] = "Please enter a valid 9 digit SSN (for example xxxxxxxxx)";
274
+ }
275
+ if(!$is_digit->isValid($formData['ssn']))
276
+ {
277
+ $validation_error['ssn'] = "Please enter a valid 9 digit SSN (for example xxxxxxxxx)";
278
+ }
279
+ }
280
+
281
+ /* End- Bank Details & SSN tab fields */
282
+
283
+ /* Confirmation & submit tab fields */
284
+
285
+ /* loanAmount */
286
+ if (!Zend_Validate::is($formData['loanAmount'], 'NotEmpty')) {
287
+ $validation_error['loanAmount'] = "This field is required";
288
+ } else {
289
+ if (!$is_decimal->isValid($formData['loanAmount'])) {
290
+ $validation_error['loanAmount'] = "Invalid loan amount";
291
+ }
292
+ }
293
+
294
+ /* loanPurpose */
295
+ if (!Zend_Validate::is($formData['loanPurpose'], 'NotEmpty')) {
296
+ $validation_error['loanPurpose'] = "This field is required";
297
+ }
298
+
299
+ /* loanTerms */
300
+ if (!Zend_Validate::is($formData['loanTerms'], 'NotEmpty')) {
301
+ $validation_error['loanTerms'] = "This field is required";
302
+ } else {
303
+ if (!$is_decimal->isValid($formData['loanTerms'])) {
304
+ $validation_error['loanTerms'] = "This field contain decimal value only";
305
+ }
306
+ }
307
+
308
+ /* End - Confirmation & submit tab fields */
309
+
310
+ /* If form contain validation errors then ajax will respond with error array */
311
+ if (isset($validation_error) && !empty($validation_error) && count($validation_error)) {
312
+ $tab_flag = array();
313
+ for ($i = 1; $i <= 3; $i++) {
314
+ for ($j = 0; $j < count(${"tab" . $i . "_fields_key_arr"}); $j++) {
315
+ if (isset($validation_error[${"tab" . $i . "_fields_key_arr"}[$j]]) && !empty($validation_error[${"tab" . $i . "_fields_key_arr"}[$j]])) {
316
+ array_push($tab_flag, $i);
317
+ break;
318
+ }
319
+ }
320
+ }
321
+ echo json_encode(array('valid' => FALSE, 'error_messages' => $validation_error, 'flag' => 'C', 'tab_flag' => $tab_flag));
322
+ }// else loan application form with no validation error
323
+ else {
324
+ if (isset($clx_button_flag) && !empty($clx_button_flag)) {
325
+ if ($clx_button_flag == 'check_eligibility') {
326
+ echo json_encode(array('valid' => TRUE, 'flag' => '2', 'redirect_url' => Mage::getBaseUrl() . 'clxfunding/ClxAPI/clxApiRequest'));
327
+ } else if ($clx_button_flag == 'loan_apply') {
328
+ echo json_encode(array('valid' => TRUE, 'flag' => '3', 'redirect_url' => Mage::getBaseUrl() . 'clxfunding/ClxAPI/clxApiRequest'));
329
+ } else {
330
+ echo json_encode(array('valid' => TRUE, 'flag' => '1', 'redirect_url' => 'undefined'));
331
+ }
332
+ } else {
333
+ echo json_encode(array('valid' => FALSE));
334
+ }
335
+ }
336
+ } else {
337
+ Mage::log('CLX Error : Merchant not configured with clx funding');
338
+ echo json_encode(array('valid' => FALSE,'flag'=>FALSE));
339
+ }
340
+ }
341
+ }
342
+
343
+ public function clxApiRequestAction() {
344
+ if ($this->getRequest()->isXmlHttpRequest()) {
345
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id');
346
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field');
347
+ $isBestOffer = Mage::getStoreConfig('payment/clxfunding/is_Best_Offer');
348
+ $ApprovalRequired = Mage::getStoreConfig('payment/clxfunding/approve_Required');
349
+
350
+ $quote = Mage::getModel('checkout/session')->getQuote();
351
+ $quoteData = $quote->getData();
352
+ $grandTotal = $quoteData['grand_total'];
353
+
354
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
355
+ $applicationId = "APP-" . $quoteId;
356
+ if (isset($quoteId) && !empty($quoteId) && isset($applicationId) && $applicationId != 'APP-') {
357
+ Mage::getSingleton('checkout/session')->setClxQuoteParam($quoteId);
358
+ Mage::getSingleton('checkout/session')->setClxApplicationIdParam($applicationId);
359
+ }
360
+
361
+ $clx_button_flag = trim($this->getRequest()->getParam('clx_btn_flag'));
362
+ if (isset($accountId) && isset($authorizationField) && isset($applicationId)) {
363
+ /* loan application form data */
364
+ $data = array(
365
+ "firstName" => trim($this->getRequest()->getParam('firstName')),
366
+ "lastName" => trim($this->getRequest()->getParam('lastName')),
367
+ "emailId" => trim($this->getRequest()->getParam('emailId')),
368
+ "birthDate" => trim($this->getRequest()->getParam('birthDate')),
369
+ "street" => trim($this->getRequest()->getParam('street')),
370
+ "city" => trim($this->getRequest()->getParam('city')),
371
+ "country" => trim($this->getRequest()->getParam('country')),
372
+ "state" => trim($this->getRequest()->getParam('state')),
373
+ "zipcode" => trim($this->getRequest()->getParam('zipcode')),
374
+ "loanAmount" => floatval($grandTotal),
375
+ "loanPurpose" => trim($this->getRequest()->getParam('loanPurpose')),
376
+ "loanTerms" => floatval(trim($this->getRequest()->getParam('loanTerms'))),
377
+ "yearlyIncome" => floatval(trim($this->getRequest()->getParam('yearlyIncome'))),
378
+ "employmentStatus" => trim($this->getRequest()->getParam('employmentStatus')),
379
+ "selfReportedCreditScore" => intval(trim($this->getRequest()->getParam('selfReportedCreditScore'))),
380
+ "mobilePhoneAreaCode" => trim($this->getRequest()->getParam('mobilePhoneAreaCode')),
381
+ "mobileNumber" => trim($this->getRequest()->getParam('mobileNumber')),
382
+ "ssn" => trim($this->getRequest()->getParam('ssn')),
383
+ "employerName" => trim($this->getRequest()->getParam('employerName')),
384
+ "occupation" => trim($this->getRequest()->getParam('occupation')),
385
+ "employmentStartDate" => trim($this->getRequest()->getParam('employmentStartDate')),
386
+ "bankName" => trim($this->getRequest()->getParam('bankName')),
387
+ "firstAccountHolderName" => trim($this->getRequest()->getParam('firstAccountHolderName')),
388
+ "bankAccountType" => trim($this->getRequest()->getParam('bankAccountType')),
389
+ "bankAccountNumber" => trim($this->getRequest()->getParam('bankAccountNumber')),
390
+ "routingNumber" => trim($this->getRequest()->getParam('routingNumber')),
391
+ "currency" => Mage::app()->getStore()->getCurrentCurrencyCode()
392
+ );
393
+
394
+ /* to save loan application form data to custom clx table */
395
+ $clx_loan_application_data = $data;
396
+ $clx_loan_application_data['application_id'] = $applicationId;
397
+ $clx_loan_application_data['quote_id'] = $quoteId;
398
+ Mage::getSingleton('checkout/session')->setLoanApplicationDataToSave($clx_loan_application_data);
399
+ /* to save loan application form data to custom clx table */
400
+
401
+ $data['accountId'] = $accountId;
402
+ if (isset($clx_button_flag) && !empty($clx_button_flag)) {
403
+ if ($clx_button_flag == 'check_eligibility') {
404
+ $data['isBestOffer'] = (isset($isBestOffer) && $isBestOffer=="1")?TRUE:FALSE;
405
+ //$data['applicationId'] = $applicationId;
406
+ $url = "http://portal.clexchange.io/api/loan-offers";
407
+ $page = "/api/loan-offers";
408
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxLoanOfferApi($url, $page, $data, $authorizationField);
409
+ if (isset($result['valid']) && $result['valid']) {
410
+ if (isset($result['result'])) {
411
+ $api_response = json_decode($result['result']);
412
+ if (isset($api_response->application_status) && $api_response->application_status == "REJECTED") {
413
+ if (isset($api_response->errors[0]) && !empty($api_response->errors[0])) {
414
+ if (isset($api_response->errors[0]->errorCode) && !empty($api_response->errors[0]->errorCode) && $api_response->errors[0]->errorCode == 'UNAUTHORIZED') {
415
+ $errorMessage = "Either authorization key is invalid or no account exist for passed accountId";
416
+ if (isset($api_response->errors[0]->errorMessage) && !empty($api_response->errors[0]->errorMessage)) {
417
+ $errorMessage = $api_response->errors[0]->errorMessage;
418
+ }
419
+ try {
420
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
421
+ 'clx_error_email_template', Mage::getStoreConfig('trans_email/ident_sales/email'), Mage::getStoreConfig('trans_email/ident_sales/name'), 'Clx Error', array('clxError' => $errorMessage)
422
+ );
423
+ } catch (Exception $ex) {
424
+ Mage::logException($ex);
425
+ }
426
+ }
427
+ }
428
+ }
429
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/loan_offer_response.phtml'));
430
+ $block->setLoanOffers(json_decode($result['result']));
431
+ $myHtml = $block->toHtml();
432
+ echo json_encode(array('valid' => TRUE, 'offer_view' => $myHtml));
433
+ }
434
+ } else {
435
+ Mage::log('CLX Error : Loan offer api has request error ');
436
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
437
+ }
438
+ } else {
439
+
440
+ $url = "http://portal.clexchange.io/api/loan-applications";
441
+ $page = "/api/loan-applications";
442
+ $data['applicationId'] = $applicationId;
443
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxLoanApplicationApi($url, $page, $data, $authorizationField);
444
+ if (isset($result['valid']) && $result['valid']) {
445
+ if (isset($result['result'])) {
446
+ $api_response = json_decode($result['result']);
447
+ if (isset($api_response->application_status) && $api_response->application_status == "REJECTED") {
448
+ if (isset($api_response->errors[0]) && !empty($api_response->errors[0])) {
449
+ if (isset($api_response->errors[0]->errorCode) && !empty($api_response->errors[0]->errorCode) && $api_response->errors[0]->errorCode == 'UNAUTHORIZED') {
450
+ $errorMessage = "Either authorization key is invalid or no account exist for passed accountId";
451
+ if (isset($api_response->errors[0]->errorMessage) && !empty($api_response->errors[0]->errorMessage)) {
452
+ $errorMessage = $api_response->errors[0]->errorMessage;
453
+ }
454
+ try {
455
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
456
+ 'clx_error_email_template', Mage::getStoreConfig('trans_email/ident_sales/email'), Mage::getStoreConfig('trans_email/ident_sales/name'), 'Clx Error', array('clxError' => $errorMessage)
457
+ );
458
+ } catch (Exception $ex) {
459
+ Mage::logException($ex);
460
+ }
461
+ }
462
+ }
463
+ }
464
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/loanapplicationstatus.phtml'));
465
+ $block->setLoanApplication(json_decode($result['result']));
466
+ $block->setApprovalRequired($ApprovalRequired);// Approval Required
467
+ $myHtml = $block->toHtml();
468
+ echo json_encode(array('valid' => TRUE, 'offer_view' => $myHtml));
469
+ }
470
+ } else {
471
+ Mage::log('CLX Error : Loan application api has request error ');
472
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
473
+ }
474
+ }
475
+ }
476
+ }
477
+ else
478
+ {
479
+ echo json_encode(array('valid' => FALSE));
480
+ }
481
+ } else {
482
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
483
+ }
484
+ }
485
+
486
+ public function storeSelectedLoanOfferAction() {
487
+ if ($this->getRequest()->isXmlHttpRequest()) {
488
+ $data = serialize($this->getRequest()->getParams());
489
+ $clx_btn_flag = $this->getRequest()->getParam('clx_btn_flag');
490
+ $loanOfferId = $this->getRequest()->getParam('loanOfferId');
491
+ if (isset($clx_btn_flag) && !empty($clx_btn_flag) && $clx_btn_flag == "check_eligibility" && isset($loanOfferId) && !empty($loanOfferId) && isset($data) && !empty($data)) {
492
+ Mage::getSingleton('checkout/session')->setLoanApplicationData($data);
493
+ Mage::getSingleton('checkout/session')->setLoanOfferFlag(true);
494
+ $check_set = Mage::getSingleton('checkout/session')->getLoanOfferFlag();
495
+ if (isset($check_set)) {
496
+ echo json_encode(array('valid' => TRUE));
497
+ } else {
498
+ echo json_encode(array('valid' => FALSE));
499
+ }
500
+ } else {
501
+ echo json_encode(array('valid' => FALSE));
502
+ }
503
+ } else {
504
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
505
+ }
506
+ }
507
+
508
+ public function setLoanApplicationSessAction() {
509
+ if ($this->getRequest()->isXmlHttpRequest()) {
510
+
511
+ Mage::getSingleton('checkout/session')->setLoanApplicationFlag(true);
512
+ $check_session_set = Mage::getSingleton('checkout/session')->getLoanApplicationFlag();
513
+ if (isset($check_session_set) && $check_session_set) {
514
+ echo json_encode(array('valid' => TRUE));
515
+ } else {
516
+ echo json_encode(array('valid' => FALSE));
517
+ }
518
+ } else {
519
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
520
+ }
521
+ }
522
+
523
+ function saveStausAction() {
524
+ $LoanOfferFlag = Mage::getSingleton('checkout/session')->getLoanOfferFlag(); // session set to track flow of loan offer
525
+ $loanApplicationFlag = Mage::getSingleton('checkout/session')->getLoanApplicationFlag(); // session set to track flow of loan application
526
+ Mage::getSingleton('checkout/session')->unsLoanOfferFlag();
527
+ Mage::getSingleton('checkout/session')->unsLoanApplicationFlag();
528
+
529
+ if (isset($LoanOfferFlag) && $LoanOfferFlag) {
530
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
531
+
532
+ Mage::getSingleton('checkout/session')->setClxOfferQuoteId($quoteId);
533
+ Mage::getSingleton('checkout/session')->setClxOfferApplicationId("APP-" . $quoteId);
534
+
535
+ Mage::getSingleton('checkout/session')->setLoanOfferConfirmAcceptance(true);
536
+
537
+ $formData = unserialize(Mage::getSingleton('checkout/session')->getLoanApplicationData());
538
+ $temp_var = Mage::getSingleton('checkout/session')->getLoanOfferConfirmAcceptance();
539
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id');
540
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field');
541
+ $isBestOffer = Mage::getStoreConfig('payment/clxfunding/is_Best_Offer');
542
+
543
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
544
+ $applicationId = "APP-" . $quoteId;
545
+
546
+ if (isset($quoteId) && !empty($quoteId) && isset($applicationId) && $applicationId != 'APP-') {
547
+ Mage::getSingleton('checkout/session')->setClxQuoteParam($quoteId);
548
+ Mage::getSingleton('checkout/session')->setClxApplicationIdParam($applicationId);
549
+ $quote = Mage::getModel('checkout/session')->getQuote();
550
+ $quoteData = $quote->getData();
551
+ if (isset($quoteData['grand_total'])) {
552
+ $grandTotal = $quoteData['grand_total'];
553
+ }
554
+ } else {
555
+ $quoteId = Mage::getSingleton('checkout/session')->getClxOfferQuoteId();
556
+ $applicationId = Mage::getSingleton('checkout/session')->getClxOfferApplicationId();
557
+ Mage::getSingleton('checkout/session')->unsClxOfferQuoteId();
558
+ Mage::getSingleton('checkout/session')->unsClxOfferApplicationId();
559
+ Mage::getSingleton('checkout/session')->setClxOfferQuoteId_New($quoteId);
560
+ Mage::getSingleton('checkout/session')->setClxOfferApplicationId_New($applicationId);
561
+ $quote = Mage::getModel('sales/quote')->load($quoteId);
562
+ $quoteData = $quote->getData();
563
+ if (isset($quoteData['grand_total'])) {
564
+ $grandTotal = $quoteData['grand_total'];
565
+ }
566
+ }
567
+
568
+ Mage::getSingleton('checkout/session')->unsLoanOfferConfirmAcceptance();
569
+ Mage::getSingleton('checkout/session')->unsLoanApplicationData();
570
+
571
+ if (isset($temp_var) && $temp_var && isset($formData) && !empty($formData)) {
572
+ $data = array(
573
+ "firstName" => trim($formData['firstName']),
574
+ "lastName" => trim($formData['lastName']),
575
+ "emailId" => trim($formData['emailId']),
576
+ "birthDate" => trim($formData['birthDate']),
577
+ "street" => trim($formData['street']),
578
+ "city" => trim($formData['city']),
579
+ "country" => trim($formData['country']),
580
+ "state" => trim($formData['state']),
581
+ "zipcode" => trim($formData['zipcode']),
582
+ "loanAmount" => floatval($grandTotal),
583
+ "loanPurpose" => trim($formData['loanPurpose']),
584
+ "loanTerms" => floatval(trim($formData['loanTerms'])),
585
+ "yearlyIncome" => floatval(trim($formData['yearlyIncome'])),
586
+ "employmentStatus" => trim($formData['employmentStatus']),
587
+ "selfReportedCreditScore" => intval(trim($formData['selfReportedCreditScore'])),
588
+ "mobilePhoneAreaCode" => trim($formData['mobilePhoneAreaCode']),
589
+ "mobileNumber" => trim($formData['mobileNumber']),
590
+ "ssn" => trim($formData['ssn']),
591
+ "employerName" => trim($formData['employerName']),
592
+ "occupation" => trim($formData['occupation']),
593
+ "employmentStartDate" => trim($formData['employmentStartDate']),
594
+ "bankName" => trim($formData['bankName']),
595
+ "firstAccountHolderName" => trim($formData['firstAccountHolderName']),
596
+ "bankAccountType" => trim($formData['bankAccountType']),
597
+ "bankAccountNumber" => trim($formData['bankAccountNumber']),
598
+ "routingNumber" => trim($formData['routingNumber']),
599
+ "accountId" => $accountId,
600
+ "loanOfferId" => trim($formData['loanOfferId']),
601
+ "currency" => Mage::app()->getStore()->getCurrentCurrencyCode()
602
+ );
603
+
604
+
605
+ $url = "http://portal.clexchange.io/api/loan-offers/" . $data['loanOfferId'] . "/loan-applications";
606
+ $page = "/api/loan-offers/" . $data['loanOfferId'] . "/loan-applications";
607
+ $data['applicationId'] = $applicationId;
608
+ $data['isOfferAccepted'] = true;
609
+
610
+ $formData['application_id'] = $applicationId;
611
+ $formData['quote_id'] = $quoteId;
612
+ Mage::getSingleton('checkout/session')->setLoanApplicationDataToSave($formData);
613
+
614
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxOfferAcceptenceApi($url, $page, $data, $authorizationField);
615
+ if ($result['valid']) {
616
+ if (isset($result['result'])) {
617
+ $this->loadLayout();
618
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/user_loan_offer_accept.phtml'));
619
+ $block->setLoanOfferStatus(json_decode($result['result']));
620
+ $this->getLayout()->getBlock('content')->append($block);
621
+ $this->renderLayout();
622
+ }
623
+ }
624
+ } else {
625
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
626
+ }
627
+
628
+ /*
629
+ $this->loadLayout();
630
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/confirm_user_acceptance.phtml'));
631
+ $this->getLayout()->getBlock('content')->append($block);
632
+ $this->renderLayout();
633
+ */
634
+
635
+ } else if (isset($loanApplicationFlag) && $loanApplicationFlag) {
636
+ $approve_required = Mage::getStoreConfig('payment/clxfunding/approve_Required'); // user approve required
637
+ $clx_status_track_model = Mage::getModel('clxfunding/CronOrderStatusUpdate'); // load clx status update model
638
+
639
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
640
+ $applicationId = "APP-" . $quoteId;
641
+
642
+ $clx_quoteid = Mage::getSingleton('checkout/session')->getClxQuoteParam();
643
+ Mage::getSingleton('checkout/session')->unsClxQuoteParam();
644
+ $clx_applicationid = Mage::getSingleton('checkout/session')->getClxApplicationIdParam();
645
+ Mage::getSingleton('checkout/session')->unsClxApplicationIdParam();
646
+
647
+ if (isset($quoteId) && isset($applicationId) && $applicationId != 'APP-' && isset($clx_quoteid) && isset($clx_applicationid) && $quoteId == $clx_quoteid && $applicationId == $clx_applicationid) {
648
+ $order = new Mage_Sales_Model_Order();
649
+ $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
650
+ $order->loadByIncrementId($orderId);
651
+ $order->setState(Mage_Sales_Model_Order::STATE_NEW, true, 'Loan Application Approved.');
652
+
653
+ $customer_email = $order['customer_email'];
654
+ $customer_firstname = $order['customer_firstname'];
655
+ $customer_lastname = $order['customer_lastname'];
656
+
657
+ $loanAppFlag = 0;
658
+ if (isset($approve_required) && $approve_required) {
659
+ $loanAppFlag = 1;
660
+ } else {
661
+
662
+ }
663
+
664
+ try {
665
+ $order->sendNewOrderEmail();
666
+ } catch (Exception $ex) {
667
+ Mage::logException($ex);
668
+ }
669
+ $order->save();
670
+
671
+ $clx_loan_application_data = Mage::getSingleton('checkout/session')->getLoanApplicationDataToSave();
672
+ $clx_loan_application_data['order_id'] = $orderId;
673
+ $clx_loan_application_data['status'] = 'PENDING';
674
+ $clx_loan_application_data['approvalRequired_flag'] = $loanAppFlag;
675
+ $clx_status_track_model->saveLoanApplicationDetails($clx_loan_application_data);
676
+ Mage::getSingleton('checkout/session')->unsLoanApplicationDataToSave();
677
+
678
+ Mage::getSingleton('checkout/session')->unsQuoteId();
679
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure' => false));
680
+ } else {
681
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure' => false));
682
+ }
683
+ } else {
684
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
685
+ }
686
+ }
687
+
688
+ function saveOrderCustomAction() {
689
+ $sess_quoteId = Mage::getSingleton('checkout/session')->getClxOfferQuoteId_New();
690
+ Mage::getSingleton('checkout/session')->unsClxOfferQuoteId_New();
691
+ $sess_applicationId = Mage::getSingleton('checkout/session')->getClxOfferApplicationId_New();
692
+ Mage::getSingleton('checkout/session')->unsClxOfferApplicationId_New();
693
+
694
+ $clx_status_track_model = Mage::getModel('clxfunding/CronOrderStatusUpdate'); // load clx status update model
695
+
696
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
697
+ $applicationId = "APP-" . $quoteId;
698
+
699
+ $clx_quoteid = Mage::getSingleton('checkout/session')->getClxQuoteParam();
700
+ Mage::getSingleton('checkout/session')->unsClxQuoteParam();
701
+ $clx_applicationid = Mage::getSingleton('checkout/session')->getClxApplicationIdParam();
702
+ Mage::getSingleton('checkout/session')->unsClxApplicationIdParam();
703
+
704
+ $order = new Mage_Sales_Model_Order();
705
+ $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
706
+ $order->loadByIncrementId($orderId);
707
+ $order->setState(Mage_Sales_Model_Order::STATE_NEW, true, 'Loan Application Approved.');
708
+ $customer_email = $order['customer_email'];
709
+ $customer_firstname = $order['customer_firstname'];
710
+ $customer_lastname = $order['customer_lastname'];
711
+ try {
712
+ $order->sendNewOrderEmail();
713
+ } catch (Exception $ex) {
714
+ Mage::logException($ex);
715
+ }
716
+ $order->save();
717
+
718
+ $clx_loan_application_data = Mage::getSingleton('checkout/session')->getLoanApplicationDataToSave();
719
+ $clx_loan_application_data['order_id'] = $orderId;
720
+ $clx_loan_application_data['status'] = 'PENDING';
721
+ $clx_loan_application_data['approvalRequired_flag'] = 0;
722
+ $clx_loan_application_data['offer_acceptance_flag'] = true;
723
+ $clx_status_track_model->saveLoanApplicationDetails($clx_loan_application_data);
724
+ Mage::getSingleton('checkout/session')->unsLoanApplicationDataToSave();
725
+
726
+ if (isset($quoteId) && !empty($quoteId) && isset($applicationId) && $applicationId != 'APP-') {
727
+ Mage::getSingleton('checkout/session')->unsQuoteId();
728
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure' => false));
729
+ } else if (isset($sess_quoteId) && !empty($sess_quoteId) && isset($sess_applicationId) && $sess_applicationId != 'APP-') {
730
+ Mage::getSingleton('checkout/session')->unsQuoteId();
731
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure' => false));
732
+ }else if (isset($clx_quoteid) && !empty($clx_quoteid) && isset($clx_applicationid) && $clx_applicationid != 'APP-') {
733
+ Mage::getSingleton('checkout/session')->unsQuoteId();
734
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure' => false));
735
+ }else {
736
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure' => false));
737
+ }
738
+ }
739
+
740
+ function checkLoanOfferAcceptanceStatusAction() {
741
+ $formData = unserialize(Mage::getSingleton('checkout/session')->getLoanApplicationData());
742
+ $temp_var = Mage::getSingleton('checkout/session')->getLoanOfferConfirmAcceptance();
743
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id');
744
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field');
745
+ $isBestOffer = Mage::getStoreConfig('payment/clxfunding/is_Best_Offer');
746
+
747
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
748
+ $applicationId = "APP-" . $quoteId;
749
+
750
+ if (isset($quoteId) && !empty($quoteId) && isset($applicationId) && $applicationId != 'APP-') {
751
+ Mage::getSingleton('checkout/session')->setClxQuoteParam($quoteId);
752
+ Mage::getSingleton('checkout/session')->setClxApplicationIdParam($applicationId);
753
+ $quote = Mage::getModel('checkout/session')->getQuote();
754
+ $quoteData = $quote->getData();
755
+ if (isset($quoteData['grand_total'])) {
756
+ $grandTotal = $quoteData['grand_total'];
757
+ }
758
+ } else {
759
+ $quoteId = Mage::getSingleton('checkout/session')->getClxOfferQuoteId();
760
+ $applicationId = Mage::getSingleton('checkout/session')->getClxOfferApplicationId();
761
+ Mage::getSingleton('checkout/session')->unsClxOfferQuoteId();
762
+ Mage::getSingleton('checkout/session')->unsClxOfferApplicationId();
763
+ Mage::getSingleton('checkout/session')->setClxOfferQuoteId_New($quoteId);
764
+ Mage::getSingleton('checkout/session')->setClxOfferApplicationId_New($applicationId);
765
+ $quote = Mage::getModel('sales/quote')->load($quoteId);
766
+ $quoteData = $quote->getData();
767
+ if (isset($quoteData['grand_total'])) {
768
+ $grandTotal = $quoteData['grand_total'];
769
+ }
770
+ }
771
+
772
+ Mage::getSingleton('checkout/session')->unsLoanOfferConfirmAcceptance();
773
+ Mage::getSingleton('checkout/session')->unsLoanApplicationData();
774
+
775
+ if (isset($temp_var) && $temp_var && isset($formData) && !empty($formData)) {
776
+ $data = array(
777
+ "firstName" => trim($formData['firstName']),
778
+ "lastName" => trim($formData['lastName']),
779
+ "emailId" => trim($formData['emailId']),
780
+ "birthDate" => trim($formData['birthDate']),
781
+ "street" => trim($formData['street']),
782
+ "city" => trim($formData['city']),
783
+ "country" => trim($formData['country']),
784
+ "state" => trim($formData['state']),
785
+ "zipcode" => trim($formData['zipcode']),
786
+ "loanAmount" => floatval($grandTotal),
787
+ "loanPurpose" => trim($formData['loanPurpose']),
788
+ "loanTerms" => floatval(trim($formData['loanTerms'])),
789
+ "yearlyIncome" => floatval(trim($formData['yearlyIncome'])),
790
+ "employmentStatus" => trim($formData['employmentStatus']),
791
+ "selfReportedCreditScore" => intval(trim($formData['selfReportedCreditScore'])),
792
+ "mobilePhoneAreaCode" => trim($formData['mobilePhoneAreaCode']),
793
+ "mobileNumber" => trim($formData['mobileNumber']),
794
+ "ssn" => trim($formData['ssn']),
795
+ "employerName" => trim($formData['employerName']),
796
+ "occupation" => trim($formData['occupation']),
797
+ "employmentStartDate" => trim($formData['employmentStartDate']),
798
+ "bankName" => trim($formData['bankName']),
799
+ "firstAccountHolderName" => trim($formData['firstAccountHolderName']),
800
+ "bankAccountType" => trim($formData['bankAccountType']),
801
+ "bankAccountNumber" => trim($formData['bankAccountNumber']),
802
+ "routingNumber" => trim($formData['routingNumber']),
803
+ "accountId" => $accountId,
804
+ "loanOfferId" => trim($formData['loanOfferId']),
805
+ "currency" => Mage::app()->getStore()->getCurrentCurrencyCode()
806
+ );
807
+
808
+
809
+ $url = "http://portal.clexchange.io/api/loan-offers/" . $data['loanOfferId'] . "/loan-applications";
810
+ $page = "/api/loan-offers/" . $data['loanOfferId'] . "/loan-applications";
811
+ $data['applicationId'] = $applicationId;
812
+ $data['isOfferAccepted'] = true;
813
+
814
+ $formData['application_id'] = $applicationId;
815
+ $formData['quote_id'] = $quoteId;
816
+ Mage::getSingleton('checkout/session')->setLoanApplicationDataToSave($formData);
817
+
818
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxOfferAcceptenceApi($url, $page, $data, $authorizationField);
819
+ if ($result['valid']) {
820
+ if (isset($result['result'])) {
821
+ /*
822
+ $clxOfferAcceptRes = json_decode($result['result']);
823
+ if ($clxOfferAcceptRes->application_status == "REJECTED")
824
+ {
825
+ $orderModel = Mage::getModel('sales/order');
826
+ $orderModel->loadByIncrementId($row['order_id']);
827
+ if ($orderModel->canCancel()) {
828
+ $orderModel->cancel();
829
+ $orderModel->setStatus('Reason for cancellation : Lender rejected the loan offer');
830
+ $orderModel->save();
831
+ }
832
+ }*/
833
+ $this->loadLayout();
834
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/user_loan_offer_accept.phtml'));
835
+ $block->setLoanOfferStatus(json_decode($result['result']));
836
+ $this->getLayout()->getBlock('content')->append($block);
837
+ $this->renderLayout();
838
+ }
839
+ }
840
+ } else {
841
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
842
+ }
843
+ }
844
+
845
+ function getLoanApplicationFormAction() {
846
+ $quote = Mage::getModel('checkout/session')->getQuote();
847
+ $quoteData = $quote->getData();
848
+ $billAddress = $quote->getBillingAddress();
849
+ $customer_dtls = $billAddress->getData();
850
+ $street = $billAddress->getStreet(1).' '.$billAddress->getStreet(2);
851
+
852
+ $grandTotal = $quoteData['grand_total'];
853
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/modal_clxfunding.phtml'));
854
+ $block->setLoanAmmount($grandTotal);
855
+ $block->setCustomerDetails($customer_dtls);
856
+ $block->setStreetAddress($street);
857
+ $myHtml = $block->toHtml();
858
+ echo json_encode(array('valid' => TRUE, 'loan_app_view' => $myHtml));
859
+ }
860
+
861
+ function loanOfferRejectAction() {
862
+ $applicationId = $this->getRequest()->getParam('applicationId');
863
+ $loanOfferId = $this->getRequest()->getParam('loanOfferId');
864
+ if (isset($applicationId) && !empty($applicationId) && isset($loanOfferId) && !empty($loanOfferId)) {
865
+ $applicationId = Mage::helper('core')->decrypt(base64_decode($applicationId));
866
+ $loanOfferId = Mage::helper('core')->decrypt(base64_decode($loanOfferId));
867
+
868
+ $table_prefix = Mage::getConfig()->getTablePrefix();
869
+ $clx_table = $table_prefix . 'clx_loan_application_detail';
870
+
871
+ $connectionRead = Mage::getSingleton('core/resource')->getConnection('core_read');
872
+ $select = $connectionRead->select()
873
+ ->from($clx_table, array('*'))
874
+ ->where('application_id=? and status!="FUNDED" and status!="LENDER_REJECTED" and status!="CUSTOMER_ACCEPTED" and status!="MERCHANT_REJECTED" and status!="CUSTOMER_REJECTED" and status!="REJECTED"', $applicationId);
875
+ $row = $connectionRead->fetchRow($select); //return rows
876
+
877
+ if (isset($row) && !empty($row) && is_array($row) && isset($row['clx_loan_application_detail_id']) && !empty($row['clx_loan_application_detail_id']) && isset($row['approvalRequired_flag']) && !empty($row['approvalRequired_flag']) && $row['approvalRequired_flag'] == 1) {
878
+ $new_data = $row; //copied to row to remove some key ->value pair from array .
879
+ unset($new_data['clx_loan_application_detail_id'], $new_data['order_id'], $new_data['application_id'], $new_data['quote_id'], $new_data['approvalRequired_flag'], $new_data['status'], $new_data['created_time'], $new_data['update_time']);
880
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id');
881
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field');
882
+ $new_data['accountId'] = $accountId;
883
+ $new_data['loanOfferId'] = $loanOfferId;
884
+ $new_data['applicationId'] = $applicationId;
885
+ $new_data['currency'] = Mage::app()->getStore()->getCurrentCurrencyCode();
886
+ $new_data['isOfferAccepted'] = FALSE;
887
+
888
+ $url = "http://portal.clexchange.io/api/loan-offers/" . $new_data['loanOfferId'] . "/loan-applications";
889
+ $page = "/api/loan-offers/" . $new_data['loanOfferId'] . "/loan-applications";
890
+
891
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxOfferAcceptenceApi($url, $page, $new_data, $authorizationField);
892
+ if (isset($result['result']) && $result['result']) {
893
+ /* Mail notification to Merchant about loan offer rejected by customer */
894
+ $parameters = array('applicationId' => $applicationId, 'orderNumber' => $row['order_id'], 'customerName' => ucfirst(strtolower($row['firstName'])) . ' ' . ucfirst(strtolower($row['lastName'])));
895
+ try {
896
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
897
+ 'clx_loan_offerreject_email_template', Mage::getStoreConfig('trans_email/ident_sales/email'), Mage::getStoreConfig('trans_email/ident_sales/name'), 'Loan Offer Rejected', $parameters
898
+ );
899
+ } catch (Exception $ex) {
900
+ Mage::logException($ex);
901
+ }
902
+ /* Mail notification to Merchant about loan offer rejected by customer */
903
+
904
+ $table_prefix = Mage::getConfig()->getTablePrefix();
905
+ $clx_table = $table_prefix . 'clx_loan_application_detail';
906
+
907
+ $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
908
+ $connectionWrite->beginTransaction();
909
+ $data = array();
910
+ $data['status'] = "CUSTOMER_REJECTED";
911
+ $data['update_time'] = date('Y-m-d H:i:s');
912
+ $where = $connectionWrite->quoteInto('clx_loan_application_detail_id =?', $row['clx_loan_application_detail_id']);
913
+ $connectionWrite->update($clx_table, $data, $where);
914
+ $connectionWrite->commit();
915
+
916
+ /* Order Cancel */
917
+ if (isset($row['order_id']) && !empty($row['order_id'])) {
918
+ $orderModel = Mage::getModel('sales/order');
919
+ $orderModel->loadByIncrementId($row['order_id']);
920
+ if ($orderModel->canCancel()) {
921
+ $orderModel->cancel();
922
+ $orderModel->setStatus('Reason for cancellation : Customer rejected the loan offer');
923
+ $orderModel->save();
924
+ }
925
+ }
926
+ /* Order Cancel */
927
+
928
+
929
+
930
+ /* Notification on FrontEnd */
931
+ $this->loadLayout();
932
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/user_loan_offer_reject.phtml'));
933
+ $this->getLayout()->getBlock('content')->append($block);
934
+ $this->renderLayout();
935
+ /* Notification on FrontEnd */
936
+ } else {
937
+ Mage::log('CLX Error : Curl error [loan offer reject]');
938
+ }
939
+ } else {
940
+ $this->loadLayout();
941
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/link_Expire.phtml'));
942
+ $this->getLayout()->getBlock('content')->append($block);
943
+ $this->renderLayout();
944
+ //Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
945
+ }
946
+ } else {
947
+ $this->getResponse()->setHeader('HTTP/1.1', '404 Not Found');
948
+ $this->getResponse()->setHeader('Status', '404 File not found');
949
+ $this->_forward('defaultNoRoute');
950
+ }
951
+ }
952
+
953
+ function loanOfferAcceptAction() {
954
+ $applicationId = $this->getRequest()->getParam('applicationId');
955
+ $loanOfferId = $this->getRequest()->getParam('loanOfferId');
956
+ if (isset($applicationId) && !empty($applicationId) && isset($loanOfferId) && !empty($loanOfferId)) {
957
+
958
+ $applicationId = Mage::helper('core')->decrypt(base64_decode($applicationId));
959
+ $loanOfferId = Mage::helper('core')->decrypt(base64_decode($loanOfferId));
960
+
961
+ $table_prefix = Mage::getConfig()->getTablePrefix();
962
+ $clx_table = $table_prefix . 'clx_loan_application_detail';
963
+
964
+ $connectionRead = Mage::getSingleton('core/resource')->getConnection('core_read');
965
+ $select = $connectionRead->select()
966
+ ->from($clx_table, array('*'))
967
+ ->where('application_id=? and status!="FUNDED" and status!="LENDER_REJECTED" and status!="CUSTOMER_ACCEPTED" and status!="REJECTED" and status!="MERCHANT_REJECTED" and status!="CUSTOMER_REJECTED"', $applicationId);
968
+ $row = $connectionRead->fetchRow($select); //return rows
969
+ if (isset($row) && !empty($row) && is_array($row) && isset($row['clx_loan_application_detail_id']) && !empty($row['clx_loan_application_detail_id']) && isset($row['approvalRequired_flag']) && !empty($row['approvalRequired_flag']) && $row['approvalRequired_flag'] == 1) {
970
+ $new_data = $row; //copy row to remove some key ->value pair from array .
971
+ unset($new_data['clx_loan_application_detail_id'], $new_data['order_id'], $new_data['application_id'], $new_data['quote_id'], $new_data['approvalRequired_flag'], $new_data['status'], $new_data['created_time'], $new_data['update_time']);
972
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id');
973
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field');
974
+ $new_data['accountId'] = $accountId;
975
+ $new_data['loanOfferId'] = $loanOfferId;
976
+ $new_data['applicationId'] = $applicationId;
977
+ $new_data['currency'] = Mage::app()->getStore()->getCurrentCurrencyCode();
978
+
979
+ $new_data['isOfferAccepted'] = TRUE;
980
+
981
+ $url = "http://portal.clexchange.io/api/loan-offers/" . $new_data['loanOfferId'] . "/loan-applications";
982
+ $page = "/api/loan-offers/" . $new_data['loanOfferId'] . "/loan-applications";
983
+
984
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxOfferAcceptenceApi($url, $page, $new_data, $authorizationField);
985
+ if (isset($result['result']) && $result['result']) {
986
+ $clxOfferAcceptRes = json_decode($result['result']);
987
+ if ($clxOfferAcceptRes->application_status == "ACCEPTED") {
988
+ $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
989
+ $connectionWrite->beginTransaction();
990
+ $data = array();
991
+ $data['status'] = "CUSTOMER_ACCEPTED";
992
+ $data['update_time'] = date('Y-m-d H:i:s');
993
+ $where = $connectionWrite->quoteInto('clx_loan_application_detail_id =?', $row['clx_loan_application_detail_id']);
994
+ $connectionWrite->update($clx_table, $data, $where);
995
+ $connectionWrite->commit();
996
+ } else if ($clxOfferAcceptRes->application_status == "REJECTED") {
997
+ $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
998
+ $connectionWrite->beginTransaction();
999
+
1000
+ $data = array();
1001
+ $data['status'] = "REJECTED";
1002
+ $data['update_time'] = date('Y-m-d H:i:s');
1003
+
1004
+ $orderModel = Mage::getModel('sales/order');
1005
+ $orderModel->loadByIncrementId($row['order_id']);
1006
+ if ($orderModel->canCancel()) {
1007
+ $orderModel->cancel();
1008
+ $orderModel->setStatus('Reason for cancellation : Lender rejected the loan offer');
1009
+ $orderModel->save();
1010
+ }
1011
+ $where = $connectionWrite->quoteInto('clx_loan_application_detail_id =?', $row['clx_loan_application_detail_id']);
1012
+ $connectionWrite->update($clx_table, $data, $where);
1013
+ $connectionWrite->commit();
1014
+
1015
+ /* loan offer reject on accept by lender */
1016
+
1017
+
1018
+ /* loan offer reject on accept by lender */
1019
+ } else {
1020
+
1021
+ }
1022
+ $this->loadLayout();
1023
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/user_loan_offer_status.phtml'));
1024
+ $block->setLoanOfferStatus(json_decode($result['result']));
1025
+ $this->getLayout()->getBlock('content')->append($block);
1026
+ $this->renderLayout();
1027
+ } else {
1028
+ Mage::log('CLX Error : Curl error [loan offer accept]');
1029
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
1030
+ }
1031
+ } else {
1032
+ $this->loadLayout();
1033
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/link_Expire.phtml'));
1034
+ $this->getLayout()->getBlock('content')->append($block);
1035
+ $this->renderLayout();
1036
+ //Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
1037
+ }
1038
+ } else {
1039
+ $this->getResponse()->setHeader('HTTP/1.1', '404 Not Found');
1040
+ $this->getResponse()->setHeader('Status', '404 File not found');
1041
+ $this->_forward('defaultNoRoute');
1042
+ }
1043
+ }
1044
+
1045
+ public function aboutCLXFundingAction() {
1046
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/aboutCLXFunding.phtml'));
1047
+ echo $block->toHtml();
1048
+ }
1049
+
1050
+ public function QueueResAction() {
1051
+ $Queue_Authentication_Key = Mage::getStoreConfig('payment/clxfunding/queue_authentication_key');
1052
+ $Queue_Endpoint = Mage::getStoreConfig('payment/clxfunding/queue_endpoint');
1053
+ if (isset($Queue_Authentication_Key) && !empty($Queue_Authentication_Key) && isset($Queue_Endpoint) && !empty($Queue_Endpoint)) {
1054
+
1055
+ $headers = array(
1056
+ "Content-type: application/json",
1057
+ "Authorization: OAuth " . $Queue_Authentication_Key
1058
+ );
1059
+
1060
+ $ch = curl_init();
1061
+ curl_setopt($ch, CURLOPT_URL, $Queue_Endpoint);
1062
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
1063
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
1064
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
1065
+
1066
+ echo $info = curl_exec($ch);
1067
+ }
1068
+ }
1069
+
1070
+ }
app/code/community/CLExchange/Clexchangefunding/controllers/ClxAPIController.php~ ADDED
@@ -0,0 +1,1032 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CLExchange_Clexchangefunding_ClxAPIController extends Mage_Core_Controller_Front_Action {
4
+ /* function will receive loan application form data on click of next,previous,check eligibility,submit button */
5
+
6
+ public function loanAppProcessingAction() {
7
+ if ($this->getRequest()->isXmlHttpRequest()) {
8
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id'); //get configured accountID from core_config_data
9
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field'); //get configured authorization from core_config_data
10
+ $quote = Mage::getModel('checkout/session')->getQuote();
11
+ $quoteData = $quote->getData();
12
+
13
+ $grandTotal = $quoteData['grand_total'];
14
+
15
+ if (isset($accountId) && isset($authorizationField)) {
16
+ $formData = array(
17
+ "firstName" => trim($this->getRequest()->getParam('firstName')),
18
+ "lastName" => trim($this->getRequest()->getParam('lastName')),
19
+ "emailId" => trim($this->getRequest()->getParam('emailId')),
20
+ "birthDate" => trim($this->getRequest()->getParam('birthDate')),
21
+ "street" => trim($this->getRequest()->getParam('street')),
22
+ "city" => trim($this->getRequest()->getParam('city')),
23
+ "state" => trim($this->getRequest()->getParam('state')),
24
+ "zipcode" => trim($this->getRequest()->getParam('zipcode')),
25
+ "loanAmount" => floatval($grandTotal),
26
+ "loanPurpose" => trim($this->getRequest()->getParam('loanPurpose')),
27
+ "loanTerms" => trim($this->getRequest()->getParam('loanTerms')),
28
+ "yearlyIncome" => trim($this->getRequest()->getParam('yearlyIncome')),
29
+ "employmentStatus" => trim($this->getRequest()->getParam('employmentStatus')),
30
+ "selfReportedCreditScore" => trim($this->getRequest()->getParam('selfReportedCreditScore')),
31
+ "mobilePhoneAreaCode" => trim($this->getRequest()->getParam('mobilePhoneAreaCode')),
32
+ "mobileNumber" => trim($this->getRequest()->getParam('mobileNumber')),
33
+ "ssn" => trim($this->getRequest()->getParam('ssn')),
34
+ "employerName" => trim($this->getRequest()->getParam('employerName')),
35
+ "occupation" => trim($this->getRequest()->getParam('occupation')),
36
+ "employmentStartDate" => trim($this->getRequest()->getParam('employmentStartDate')),
37
+ "bankName" => trim($this->getRequest()->getParam('bankName')),
38
+ "firstAccountHolderName" => trim($this->getRequest()->getParam('firstAccountHolderName')),
39
+ "bankAccountType" => trim($this->getRequest()->getParam('bankAccountType')),
40
+ "bankAccountNumber" => trim($this->getRequest()->getParam('bankAccountNumber')),
41
+ "routingNumber" => trim($this->getRequest()->getParam('routingNumber')),
42
+ "accountId" => $accountId,
43
+ "currency" => Mage::app()->getStore()->getCurrentCurrencyCode()
44
+ );
45
+ $clx_button_flag = trim($this->getRequest()->getParam('clx_btn_flag'));
46
+ $validation_error = array();
47
+ /* validators */
48
+
49
+ $name_validator = new Zend_Validate_Alpha(array('allowWhiteSpace' => true)); // only alphabets and space
50
+ $is_digit = new Zend_Validate_Digits();
51
+ $date_validator = new Zend_Validate_Date(); // date yyyy-mm-dd
52
+ $is_decimal = new Zend_Validate_Float(); //
53
+ $string_length_min_max_3 = new Zend_Validate_StringLength(array('max' => 3)); //mobilePhoneAreaCode
54
+ $string_length_min_max_10 = new Zend_Validate_StringLength(array('max' => 10)); //mobileNumber
55
+ $string_length_max_8 = new Zend_Validate_StringLength(array('max' => 8)); //zipcode
56
+ $string_length_max_100 = new Zend_Validate_StringLength(array('max' => 100)); //employerName(100max)
57
+ $string_length_max_255 = new Zend_Validate_StringLength(array('max' => 255)); //bankName(255max)
58
+ $string_length_max_30 = new Zend_Validate_StringLength(array('max' => 30)); //bankAccountNumber(30max)
59
+ $string_length_min_max_9 = new Zend_Validate_StringLength(array('min' => 9, 'max' => 9)); //bankAccountNumber(30max)
60
+
61
+ $states_a = array("Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "District Of Columbia", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "American Samoa", "Guam", "Northern Mariana Islands", "Puerto Rico", "United States Minor Outlying", "Islands", "Virgin Islands");
62
+ $employee_status_a = array(1 => "Self Employed", 2 => "Not Employed", 3 => "Other", 4 => "Employed");
63
+ $occupation_a = array(1 => "Accountant/CPA", 2 => "Analyst", 3 => "Architect", 4 => "Attorney", 5 => "Biologist", 6 => "Bus Driver", 7 => "Car Dealer", 8 => "Chemist", 9 => "Civil Service", 10 => "Clergy", 11 => "Clerical", 12 => "Computer Programmer", 13 => "Construction", 14 => "Dentist", 16 => "Doctor", 17 => "Engineer - Chemical
", 18 => "Engineer - Electrical
", 19 => "Engineer - Mechanical
", 20 => "Executive
", 21 => "Fireman
", 22 => "Flight Attendant
", 23 => "Food Service
", 24 => "Food Service Management", 25 => "Homemaker
", 26 => "Judge
", 27 => "Laborer
", 28 => "Landscaping
", 29 => "Medical Technician", 30 => "Military Enlisted", 31 => "Military Officer", 32 => "Nurse (LPN)
", 33 => "Nurse (RN)", 34 => "Nurse's Aide
", 35 => "Pharmacist
", 36 => "Pilot - Private/Commercial
", 37 => "Police Officer/Correction Officer", 38 => "Postal Service
", 39 => "Principal
", 40 => "Professional
", 41 => "Professor
", 42 => "Psychologist
", 43 => "Realtor
", 44 => "Religious
", 45 => "Retail Management
", 47 => "Sales - Commission
", 48 => "Sales - Retail
", 49 => "Scientist
", 50 => "Administrative Assistant
", 52 => "Skilled Labor
", 53 => "Social Worker", 54 => "Student
", 61 => "Teacher
", 62 => "Teacher's Aide
", 63 => "Tradesman - Carpenter", 64 => "Tradesman - Electrician", 65 => "Tradesman - Mechanic", 66 => "Tradesman - Plumber", 67 => "Truck Driver", 69 => "Waiter/Waitress", 70 => "Other
", 71 => "Investor");
64
+ $bankaccounttype_a = array("Savings", "Checking", "Credit");
65
+ $loanpurpose_a = array(1 => "Debt consolidation", 2 => "Home improvement", 3 => "Business", 6 => "Auto", 7 => "Other", 8 => "Baby & adoption loans", 9 => "Boat", 10 => "Cosmetic procedures", 12 => "Green loans", 13 => "Household Expenses", 14 => "Large purchases", 15 => "Medical/Dental", 16 => "Motorcycle", 17 => "RV", 18 => "Taxes", 19 => "Vacation", 21 => "Special Occasion");
66
+ $credit_score_a = array(1 => "Excellent Credit (760+)", 2 => "Good Credit (700+)", 3 => "Fair Credit (640+)", 4 => "Poor Credit");
67
+
68
+
69
+ $tab1_fields_key_arr = array("firstName", "lastName", "emailId", "birthDate", "mobilePhoneAreaCode", "mobileNumber", "street", "state", "city", "country", "zipcode", "yearlyIncome", "employmentStatus", "employmentStatus", "employerName", "employmentStartDate", "occupation");
70
+ $tab2_fields_key_arr = array("selfReportedCreditScore", "bankName", "firstAccountHolderName", "bankAccountType", "bankAccountNumber", "routingNumber", "ssn");
71
+ $tab3_fields_key_arr = array("loanAmount", "loanPurpose", "loanTerms");
72
+
73
+
74
+
75
+ /* Personal Information */
76
+
77
+ /* firstName */
78
+ if (!Zend_Validate::is($formData['firstName'], 'NotEmpty')) {
79
+ $validation_error['firstName'] = "This field is required";
80
+ } else {
81
+ if (!$name_validator->isValid($formData['firstName'])) {
82
+ $validation_error['firstName'] = "First name should be string";
83
+ }
84
+ }
85
+
86
+ /* lastName */
87
+ if (!Zend_Validate::is($formData['lastName'], 'NotEmpty')) {
88
+ $validation_error['lastName'] = "This field is required";
89
+ } else {
90
+ if (!$name_validator->isValid($formData['lastName'])) {
91
+ $validation_error['lastName'] = "Last name should be string";
92
+ }
93
+ }
94
+
95
+ /* emailId */
96
+ if (!Zend_Validate::is($formData['emailId'], 'NotEmpty')) {
97
+ $validation_error['emailId'] = "This field is required";
98
+ } else {
99
+ if (!Zend_Validate::is($formData['emailId'], 'EmailAddress')) {
100
+ $validation_error['emailId'] = "Invalid Email Address";
101
+ }
102
+ }
103
+
104
+ /* birthDate */
105
+ if (!Zend_Validate::is($formData['birthDate'], 'NotEmpty')) {
106
+ $validation_error['birthDate'] = "This field is required";
107
+ } else {
108
+ if (!$date_validator->isValid($formData['birthDate'])) {
109
+ $validation_error['birthDate'] = "Invalid date format";
110
+ }
111
+ $currentDate = date('Y-m-d');
112
+ if (strtotime($currentDate) > strtotime($formData['birthDate'])) {
113
+ $cl_age = Mage::helper('clxfunding')->getAge($formData['birthDate'], $currentDate);
114
+ if ($cl_age < 18) {
115
+ $validation_error['birthDate'] = "Age should be above 18";
116
+ }
117
+ } else {
118
+ $validation_error['birthDate'] = "Invalid birthDate";
119
+ }
120
+ }
121
+
122
+ /* mobilePhoneAreaCode */
123
+ if (!Zend_Validate::is($formData['mobilePhoneAreaCode'], 'NotEmpty')) {
124
+ $validation_error['mobilePhoneAreaCode'] = "This field is required";
125
+ } else {
126
+ if (!$string_length_min_max_3->isValid($formData['mobilePhoneAreaCode'])) {// 3digits only
127
+ $validation_error['mobilePhoneAreaCode'] = "This field should contain 3 digits only";
128
+ }
129
+ }
130
+ /* mobileNumber */
131
+ if (!Zend_Validate::is($formData['mobileNumber'], 'NotEmpty')) {
132
+ $validation_error['mobileNumber'] = "This field is required";
133
+ } else {
134
+ if ($is_digit->isValid($formData['mobileNumber'])) { //digits
135
+ if (!$string_length_min_max_10->isValid($formData['mobileNumber'])) {// 10 digits only
136
+ $validation_error['mobileNumber'] = "This field should contain 10 digits only";
137
+ }
138
+ } else {
139
+ $validation_error['mobileNumber'] = "This field should contain 10 digits only";
140
+ }
141
+ }
142
+
143
+ /* street */
144
+ if (!Zend_Validate::is($formData['street'], 'NotEmpty')) {
145
+ $validation_error['street'] = "This field is required";
146
+ }
147
+
148
+ /* city */
149
+ if (!Zend_Validate::is($formData['city'], 'NotEmpty')) {
150
+ $validation_error['city'] = "This field is required";
151
+ }
152
+
153
+ /* state */
154
+ if (!Zend_Validate::is($formData['state'], 'NotEmpty')) {
155
+ $validation_error['state'] = "This field is required";
156
+ } else {
157
+ if (!in_array($formData['state'], $states_a)) {
158
+ $validation_error['state'] = "Not a valid state";
159
+ }
160
+ }
161
+
162
+ /* zipcode */
163
+ if (!Zend_Validate::is($formData['zipcode'], 'NotEmpty')) {
164
+ $validation_error['zipcode'] = "This field is required";
165
+ } else {
166
+ if (!$string_length_max_8->isValid($formData['zipcode'])) {// 10 digits only
167
+ $validation_error['zipcode'] = "This field should contain maximum 8 digits";
168
+ }
169
+ }
170
+ /* country */
171
+ if (isset($formData['country'])) {
172
+ if (!Zend_Validate::is($formData['country'], 'NotEmpty')) {
173
+ $validation_error['country'] = "This field is required";
174
+ }
175
+ }
176
+
177
+ /* yearlyIncome */
178
+ if (!Zend_Validate::is($formData['yearlyIncome'], 'NotEmpty')) {
179
+ $validation_error['yearlyIncome'] = "This field is required";
180
+ } else {
181
+ if (!$is_decimal->isValid($formData['yearlyIncome'])) {
182
+ $validation_error['yearlyIncome'] = "This field contain decimal value only";
183
+ }
184
+ }
185
+
186
+ /* employmentStatus */
187
+ if (!Zend_Validate::is($formData['employmentStatus'], 'NotEmpty')) {
188
+ $validation_error['employmentStatus'] = "This field is required";
189
+ } else {
190
+ if (!array_key_exists($formData['employmentStatus'], $employee_status_a))//
191
+ if (!in_array($formData['employmentStatus'], $employee_status_a)) {
192
+ $validation_error['employmentStatus'] = "Invalid employee status";
193
+ }
194
+ }
195
+ /* employerName */
196
+ if (!Zend_Validate::is($formData['employerName'], 'NotEmpty')) {
197
+ $validation_error['employerName'] = "This field is required";
198
+ } else {
199
+ if (!$string_length_max_100->isValid($formData['employerName'])) {// string length <=100
200
+ $validation_error['employerName'] = "String length should be less than 100";
201
+ }
202
+ }
203
+
204
+ /* employmentStartDate */
205
+ if (!Zend_Validate::is($formData['employmentStartDate'], 'NotEmpty')) {
206
+ $validation_error['employmentStartDate'] = "This field is required";
207
+ } else {
208
+ if (!$date_validator->isValid($formData['employmentStartDate'])) {
209
+ $validation_error['employmentStartDate'] = "Invalid date format";
210
+ }
211
+ if (isset($formData['birthDate']) && (strtotime($formData['employmentStartDate']) > strtotime($formData['birthDate']))) {
212
+ $cl_age = Mage::helper('clxfunding')->getAge($formData['birthDate'], $formData['employmentStartDate']); // child labour 14
213
+ if ($cl_age < 14) {
214
+ $validation_error['employmentStartDate'] = "Invalid Employment Date";
215
+ }
216
+ }
217
+ }
218
+
219
+ /* occupation */
220
+ if (!Zend_Validate::is($formData['occupation'], 'NotEmpty')) {
221
+ $validation_error['occupation'] = "This field is required";
222
+ } else {
223
+ if (!in_array($formData['occupation'], $occupation_a)) {
224
+ $validation_error['occupation'] = "Invalid occupation";
225
+ }
226
+ }
227
+
228
+ /* End- Personal Information */
229
+
230
+ /* Bank Details & SSN tab fields */
231
+
232
+ /* selfReportedCreditScore */
233
+ if (!Zend_Validate::is($formData['selfReportedCreditScore'], 'NotEmpty')) {
234
+ $validation_error['selfReportedCreditScore'] = "This field is required";
235
+ } else {
236
+ if (!array_key_exists($formData['selfReportedCreditScore'], $credit_score_a)) {
237
+ $validation_error['selfReportedCreditScore'] = "Invalid self reported credit score";
238
+ }
239
+ }
240
+ /* bankName */
241
+ if (!Zend_Validate::is($formData['bankName'], 'NotEmpty')) {
242
+ $validation_error['bankName'] = "This field is required";
243
+ } else {
244
+ if (!$string_length_max_255->isValid($formData['employerName'])) {// string length <=255
245
+ $validation_error['bankName'] = "String length should be less than 255";
246
+ }
247
+ }
248
+ /* firstAccountHolderName */
249
+ if (!Zend_Validate::is($formData['firstAccountHolderName'], 'NotEmpty')) {
250
+ $validation_error['firstAccountHolderName'] = "This field is required";
251
+ } else {
252
+ if (!$string_length_max_255->isValid($formData['firstAccountHolderName'])) {// string length <=255
253
+ $validation_error['firstAccountHolderName'] = "String length should be less than 255";
254
+ }
255
+ }
256
+ /* bankAccountType */
257
+ if (!Zend_Validate::is($formData['bankAccountType'], 'NotEmpty')) {
258
+ $validation_error['bankAccountType'] = "This field is required";
259
+ } else {
260
+ //if(!in_array($formData['bankAccountType'],$bankaccounttype_a)) // case sensitive in_array
261
+ if (!in_array(strtolower($formData['bankAccountType']), array_map('strtolower', $bankaccounttype_a))) {//case insensitive in_array
262
+ $validation_error['bankAccountType'] = "Invalid bank account type";
263
+ }
264
+ }
265
+
266
+ /* bankAccountNumber */
267
+ if (!Zend_Validate::is($formData['bankAccountNumber'], 'NotEmpty')) {
268
+ $validation_error['bankAccountNumber'] = "This field is required";
269
+ } else {
270
+ if (!$string_length_max_30->isValid($formData['bankAccountNumber'])) {// string length <=255
271
+ $validation_error['bankAccountNumber'] = "Invalid bank account number";
272
+ }
273
+ }
274
+ /* routingNumber */
275
+ if (!Zend_Validate::is($formData['routingNumber'], 'NotEmpty')) {
276
+ $validation_error['routingNumber'] = "This field is required";
277
+ } else {
278
+ if (!$string_length_max_255->isValid($formData['routingNumber'])) {// string length <=255
279
+ $validation_error['routingNumber'] = "Invalid routing number";
280
+ }
281
+ }
282
+
283
+
284
+ /* ssn */
285
+ if (!Zend_Validate::is($formData['ssn'], 'NotEmpty')) {
286
+ $validation_error['ssn'] = "This field is required";
287
+ } else {
288
+ if (!$string_length_min_max_9->isValid($formData['ssn'])) {
289
+ $validation_error['ssn'] = "Invalid ssn";
290
+ }
291
+ }
292
+
293
+ /* End- Bank Details & SSN tab fields */
294
+
295
+ /* Confirmation & submit tab fields */
296
+
297
+ /* loanAmount */
298
+ if (!Zend_Validate::is($formData['loanAmount'], 'NotEmpty')) {
299
+ $validation_error['loanAmount'] = "This field is required";
300
+ } else {
301
+ if (!$is_decimal->isValid($formData['loanAmount'])) {
302
+ $validation_error['loanAmount'] = "Invalid loan amount";
303
+ }
304
+ }
305
+
306
+ /* loanPurpose */
307
+ if (!Zend_Validate::is($formData['loanPurpose'], 'NotEmpty')) {
308
+ $validation_error['loanPurpose'] = "This field is required";
309
+ } else {
310
+ if (!in_array($formData['loanPurpose'], $loanpurpose_a)) { //case sensitive in_array
311
+ $validation_error['loanPurpose'] = "Invalid loan purpose";
312
+ }
313
+ }
314
+
315
+ /* loanTerms */
316
+ if (!Zend_Validate::is($formData['loanTerms'], 'NotEmpty')) {
317
+ $validation_error['loanTerms'] = "This field is required";
318
+ } else {
319
+ if (!$is_decimal->isValid($formData['loanTerms'])) {
320
+ $validation_error['loanTerms'] = "This field contain decimal value only";
321
+ }
322
+ }
323
+
324
+ /* End - Confirmation & submit tab fields */
325
+
326
+ /* If form contain validation errors then ajax will respond with error array */
327
+ if (isset($validation_error) && !empty($validation_error) && count($validation_error)) {
328
+ $tab_flag = array();
329
+ for ($i = 1; $i <= 3; $i++) {
330
+ for ($j = 0; $j < count(${"tab" . $i . "_fields_key_arr"}); $j++) {
331
+ if (isset($validation_error[${"tab" . $i . "_fields_key_arr"}[$j]]) && !empty($validation_error[${"tab" . $i . "_fields_key_arr"}[$j]])) {
332
+ array_push($tab_flag, $i);
333
+ break;
334
+ }
335
+ }
336
+ }
337
+ echo json_encode(array('valid' => FALSE, 'error_messages' => $validation_error, 'flag' => 'C', 'tab_flag' => $tab_flag));
338
+ }// else loan application form with no validation error
339
+ else {
340
+ if (isset($clx_button_flag) && !empty($clx_button_flag)) {
341
+ if ($clx_button_flag == 'check_eligibility') {
342
+ echo json_encode(array('valid' => TRUE, 'flag' => '2', 'redirect_url' => Mage::getBaseUrl() . 'clxfunding/ClxAPI/clxApiRequest'));
343
+ } else if ($clx_button_flag == 'loan_apply') {
344
+ echo json_encode(array('valid' => TRUE, 'flag' => '3', 'redirect_url' => Mage::getBaseUrl() . 'clxfunding/ClxAPI/clxApiRequest'));
345
+ } else {
346
+ echo json_encode(array('valid' => TRUE, 'flag' => '1', 'redirect_url' => 'undefined'));
347
+ }
348
+ } else {
349
+ echo json_encode(array('valid' => FALSE));
350
+ }
351
+ }
352
+ } else {
353
+ Mage::log('CLX Error : Merchant not configured with clx funding');
354
+ echo json_encode(array('valid' => FALSE,'flag'=>FALSE));
355
+ }
356
+ }
357
+ }
358
+
359
+ public function clxApiRequestAction() {
360
+ if ($this->getRequest()->isXmlHttpRequest()) {
361
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id');
362
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field');
363
+ $isBestOffer = Mage::getStoreConfig('payment/clxfunding/is_Best_Offer');
364
+
365
+ $quote = Mage::getModel('checkout/session')->getQuote();
366
+ $quoteData = $quote->getData();
367
+ $grandTotal = $quoteData['grand_total'];
368
+
369
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
370
+ $applicationId = "APP-" . $quoteId;
371
+ if (isset($quoteId) && !empty($quoteId) && isset($applicationId) && $applicationId != 'APP-') {
372
+ Mage::getSingleton('checkout/session')->setClxQuoteParam($quoteId);
373
+ Mage::getSingleton('checkout/session')->setClxApplicationIdParam($applicationId);
374
+ }
375
+
376
+ $clx_button_flag = trim($this->getRequest()->getParam('clx_btn_flag'));
377
+ if (isset($accountId) && isset($authorizationField) && isset($applicationId)) {
378
+ /* loan application form data */
379
+ $data = array(
380
+ "firstName" => trim($this->getRequest()->getParam('firstName')),
381
+ "lastName" => trim($this->getRequest()->getParam('lastName')),
382
+ "emailId" => trim($this->getRequest()->getParam('emailId')),
383
+ "birthDate" => trim($this->getRequest()->getParam('birthDate')),
384
+ "street" => trim($this->getRequest()->getParam('street')),
385
+ "city" => trim($this->getRequest()->getParam('city')),
386
+ "state" => trim($this->getRequest()->getParam('state')),
387
+ "zipcode" => trim($this->getRequest()->getParam('zipcode')),
388
+ "loanAmount" => floatval($grandTotal),
389
+ "loanPurpose" => trim($this->getRequest()->getParam('loanPurpose')),
390
+ "loanTerms" => floatval(trim($this->getRequest()->getParam('loanTerms'))),
391
+ "yearlyIncome" => floatval(trim($this->getRequest()->getParam('yearlyIncome'))),
392
+ "employmentStatus" => trim($this->getRequest()->getParam('employmentStatus')),
393
+ "selfReportedCreditScore" => intval(trim($this->getRequest()->getParam('selfReportedCreditScore'))),
394
+ "mobilePhoneAreaCode" => trim($this->getRequest()->getParam('mobilePhoneAreaCode')),
395
+ "mobileNumber" => trim($this->getRequest()->getParam('mobileNumber')),
396
+ "ssn" => trim($this->getRequest()->getParam('ssn')),
397
+ "employerName" => trim($this->getRequest()->getParam('employerName')),
398
+ "occupation" => trim($this->getRequest()->getParam('occupation')),
399
+ "employmentStartDate" => trim($this->getRequest()->getParam('employmentStartDate')),
400
+ "bankName" => trim($this->getRequest()->getParam('bankName')),
401
+ "firstAccountHolderName" => trim($this->getRequest()->getParam('firstAccountHolderName')),
402
+ "bankAccountType" => trim($this->getRequest()->getParam('bankAccountType')),
403
+ "bankAccountNumber" => trim($this->getRequest()->getParam('bankAccountNumber')),
404
+ "routingNumber" => trim($this->getRequest()->getParam('routingNumber')),
405
+ "currency" => Mage::app()->getStore()->getCurrentCurrencyCode()
406
+ );
407
+
408
+ /* to save loan application form data to custom clx table */
409
+ $clx_loan_application_data = $data;
410
+ $clx_loan_application_data['application_id'] = $applicationId;
411
+ $clx_loan_application_data['quote_id'] = $quoteId;
412
+ Mage::getSingleton('checkout/session')->setLoanApplicationDataToSave($clx_loan_application_data);
413
+ /* to save loan application form data to custom clx table */
414
+
415
+ $data['accountId'] = $accountId;
416
+ if (isset($clx_button_flag) && !empty($clx_button_flag)) {
417
+ if ($clx_button_flag == 'check_eligibility') {
418
+ $data['isBestOffer'] = (isset($isBestOffer) && $isBestOffer=="1")?TRUE:FALSE;
419
+ //$data['applicationId'] = $applicationId;
420
+ $url = "http://portal.clexchange.io/api/loan-offers";
421
+ $page = "/api/loan-offers";
422
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxLoanOfferApi($url, $page, $data, $authorizationField);
423
+ if (isset($result['valid']) && $result['valid']) {
424
+ if (isset($result['result'])) {
425
+ $api_response = json_decode($result['result']);
426
+ if (isset($api_response->application_status) && $api_response->application_status == "REJECTED") {
427
+ if (isset($api_response->errors[0]) && !empty($api_response->errors[0])) {
428
+ if (isset($api_response->errors[0]->errorCode) && !empty($api_response->errors[0]->errorCode) && $api_response->errors[0]->errorCode == 'UNAUTHORIZED') {
429
+ $errorMessage = "Either authorization key is invalid or no account exist for passed accountId";
430
+ if (isset($api_response->errors[0]->errorMessage) && !empty($api_response->errors[0]->errorMessage)) {
431
+ $errorMessage = $api_response->errors[0]->errorMessage;
432
+ }
433
+ try {
434
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
435
+ 'clx_error_email_template', Mage::getStoreConfig('trans_email/ident_sales/email'), Mage::getStoreConfig('trans_email/ident_sales/name'), 'Clx Error', array('clxError' => $errorMessage)
436
+ );
437
+ } catch (Exception $ex) {
438
+ Mage::logException($ex);
439
+ }
440
+ }
441
+ }
442
+ }
443
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/loan_offer_response.phtml'));
444
+ $block->setLoanOffers(json_decode($result['result']));
445
+ $block->setLoanPurpose($data['loanPurpose']);
446
+ $myHtml = $block->toHtml();
447
+ echo json_encode(array('valid' => TRUE, 'offer_view' => $myHtml));
448
+ }
449
+ } else {
450
+ Mage::log('CLX Error : Loan offer api has request error ');
451
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
452
+ }
453
+ } else {
454
+
455
+ $url = "http://portal.clexchange.io/api/loan-applications";
456
+ $page = "/api/loan-applications";
457
+ $data['applicationId'] = $applicationId;
458
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxLoanApplicationApi($url, $page, $data, $authorizationField);
459
+ if (isset($result['valid']) && $result['valid']) {
460
+ if (isset($result['result'])) {
461
+ $api_response = json_decode($result['result']);
462
+ if (isset($api_response->application_status) && $api_response->application_status == "REJECTED") {
463
+ if (isset($api_response->errors[0]) && !empty($api_response->errors[0])) {
464
+ if (isset($api_response->errors[0]->errorCode) && !empty($api_response->errors[0]->errorCode) && $api_response->errors[0]->errorCode == 'UNAUTHORIZED') {
465
+ $errorMessage = "Either authorization key is invalid or no account exist for passed accountId";
466
+ if (isset($api_response->errors[0]->errorMessage) && !empty($api_response->errors[0]->errorMessage)) {
467
+ $errorMessage = $api_response->errors[0]->errorMessage;
468
+ }
469
+ try {
470
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
471
+ 'clx_error_email_template', Mage::getStoreConfig('trans_email/ident_sales/email'), Mage::getStoreConfig('trans_email/ident_sales/name'), 'Clx Error', array('clxError' => $errorMessage)
472
+ );
473
+ } catch (Exception $ex) {
474
+ Mage::logException($ex);
475
+ }
476
+ }
477
+ }
478
+ }
479
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/loanapplicationstatus.phtml'));
480
+ $block->setLoanApplication(json_decode($result['result']));
481
+ $block->setLoanApplicationPurpose($data['loanPurpose']);
482
+ $myHtml = $block->toHtml();
483
+ echo json_encode(array('valid' => TRUE, 'offer_view' => $myHtml));
484
+ }
485
+ } else {
486
+ Mage::log('CLX Error : Loan application api has request error ');
487
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
488
+ }
489
+ }
490
+ }
491
+ }
492
+ else
493
+ {
494
+ echo json_encode(array('valid' => FALSE));
495
+ }
496
+ } else {
497
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
498
+ }
499
+ }
500
+
501
+ public function storeSelectedLoanOfferAction() {
502
+ if ($this->getRequest()->isXmlHttpRequest()) {
503
+ $data = serialize($this->getRequest()->getParams());
504
+ $clx_btn_flag = $this->getRequest()->getParam('clx_btn_flag');
505
+ $loanOfferId = $this->getRequest()->getParam('loanOfferId');
506
+ if (isset($clx_btn_flag) && !empty($clx_btn_flag) && $clx_btn_flag == "check_eligibility" && isset($loanOfferId) && !empty($loanOfferId) && isset($data) && !empty($data)) {
507
+ Mage::getSingleton('checkout/session')->setLoanApplicationData($data);
508
+ Mage::getSingleton('checkout/session')->setLoanOfferFlag(true);
509
+ $check_set = Mage::getSingleton('checkout/session')->getLoanOfferFlag();
510
+ if (isset($check_set)) {
511
+ echo json_encode(array('valid' => TRUE));
512
+ } else {
513
+ echo json_encode(array('valid' => FALSE));
514
+ }
515
+ } else {
516
+ echo json_encode(array('valid' => FALSE));
517
+ }
518
+ } else {
519
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
520
+ }
521
+ }
522
+
523
+ public function setLoanApplicationSessAction() {
524
+ if ($this->getRequest()->isXmlHttpRequest()) {
525
+
526
+ Mage::getSingleton('checkout/session')->setLoanApplicationFlag(true);
527
+ $check_session_set = Mage::getSingleton('checkout/session')->getLoanApplicationFlag();
528
+ if (isset($check_session_set) && $check_session_set) {
529
+ echo json_encode(array('valid' => TRUE));
530
+ } else {
531
+ echo json_encode(array('valid' => FALSE));
532
+ }
533
+ } else {
534
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
535
+ }
536
+ }
537
+
538
+ function saveStausAction() {
539
+ $LoanOfferFlag = Mage::getSingleton('checkout/session')->getLoanOfferFlag(); // session set to track flow of loan offer
540
+ $loanApplicationFlag = Mage::getSingleton('checkout/session')->getLoanApplicationFlag(); // session set to track flow of loan application
541
+ Mage::getSingleton('checkout/session')->unsLoanOfferFlag();
542
+ Mage::getSingleton('checkout/session')->unsLoanApplicationFlag();
543
+
544
+ if (isset($LoanOfferFlag) && $LoanOfferFlag) {
545
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
546
+
547
+ Mage::getSingleton('checkout/session')->setClxOfferQuoteId($quoteId);
548
+ Mage::getSingleton('checkout/session')->setClxOfferApplicationId("APP-" . $quoteId);
549
+
550
+ Mage::getSingleton('checkout/session')->setLoanOfferConfirmAcceptance(true);
551
+ $this->loadLayout();
552
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/confirm_user_acceptance.phtml'));
553
+ $this->getLayout()->getBlock('content')->append($block);
554
+ $this->renderLayout();
555
+ } else if (isset($loanApplicationFlag) && $loanApplicationFlag) {
556
+ $approve_required = Mage::getStoreConfig('payment/clxfunding/approve_Required'); // user approve required
557
+ $clx_status_track_model = Mage::getModel('clxfunding/CronOrderStatusUpdate'); // load clx status update model
558
+
559
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
560
+ $applicationId = "APP-" . $quoteId;
561
+
562
+ $clx_quoteid = Mage::getSingleton('checkout/session')->getClxQuoteParam();
563
+ Mage::getSingleton('checkout/session')->unsClxQuoteParam();
564
+ $clx_applicationid = Mage::getSingleton('checkout/session')->getClxApplicationIdParam();
565
+ Mage::getSingleton('checkout/session')->unsClxApplicationIdParam();
566
+
567
+ if (isset($quoteId) && isset($applicationId) && $applicationId != 'APP-' && isset($clx_quoteid) && isset($clx_applicationid) && $quoteId == $clx_quoteid && $applicationId == $clx_applicationid) {
568
+ $order = new Mage_Sales_Model_Order();
569
+ $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
570
+ $order->loadByIncrementId($orderId);
571
+ $order->setState(Mage_Sales_Model_Order::STATE_NEW, true, 'Loan Application Approved.');
572
+
573
+ $customer_email = $order['customer_email'];
574
+ $customer_firstname = $order['customer_firstname'];
575
+ $customer_lastname = $order['customer_lastname'];
576
+
577
+ $loanAppFlag = 0;
578
+ if (isset($approve_required) && $approve_required) {
579
+ $loanAppFlag = 1;
580
+ } else {
581
+ // Mail notification - to - customer
582
+ /* try
583
+ {
584
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
585
+ 'clx_loan_approve_email_template',
586
+ $customer_email,
587
+ uc_words(strtolower($customer_firstname)).' '.uc_words(strtolower($customer_lastname)),
588
+ 'Loan offer confirmation',
589
+ array('firstName' => uc_words(strtolower($customer_firstname)), 'lastName' => uc_words(strtolower($customer_lastname)))
590
+ );
591
+ }catch (Exception $ex) {
592
+ Mage::logException($ex);
593
+ } */
594
+ }
595
+
596
+ try {
597
+ $order->sendNewOrderEmail();
598
+ } catch (Exception $ex) {
599
+ Mage::logException($ex);
600
+ }
601
+ $order->save();
602
+
603
+ $clx_loan_application_data = Mage::getSingleton('checkout/session')->getLoanApplicationDataToSave();
604
+ $clx_loan_application_data['order_id'] = $orderId;
605
+ $clx_loan_application_data['status'] = 'PENDING';
606
+ $clx_loan_application_data['approvalRequired_flag'] = $loanAppFlag;
607
+ $clx_status_track_model->saveLoanApplicationDetails($clx_loan_application_data);
608
+ Mage::getSingleton('checkout/session')->unsLoanApplicationDataToSave();
609
+
610
+ Mage::getSingleton('checkout/session')->unsQuoteId();
611
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure' => false));
612
+ } else {
613
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure' => false));
614
+ }
615
+ } else {
616
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
617
+ }
618
+ }
619
+
620
+ function saveOrderCustomAction() {
621
+ $sess_quoteId = Mage::getSingleton('checkout/session')->getClxOfferQuoteId_New();
622
+ Mage::getSingleton('checkout/session')->unsClxOfferQuoteId_New();
623
+ $sess_applicationId = Mage::getSingleton('checkout/session')->getClxOfferApplicationId_New();
624
+ Mage::getSingleton('checkout/session')->unsClxOfferApplicationId_New();
625
+
626
+ $clx_status_track_model = Mage::getModel('clxfunding/CronOrderStatusUpdate'); // load clx status update model
627
+
628
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
629
+ $applicationId = "APP-" . $quoteId;
630
+
631
+ $clx_quoteid = Mage::getSingleton('checkout/session')->getClxQuoteParam();
632
+ Mage::getSingleton('checkout/session')->unsClxQuoteParam();
633
+ $clx_applicationid = Mage::getSingleton('checkout/session')->getClxApplicationIdParam();
634
+ Mage::getSingleton('checkout/session')->unsClxApplicationIdParam();
635
+
636
+ $order = new Mage_Sales_Model_Order();
637
+ $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
638
+ $order->loadByIncrementId($orderId);
639
+ $order->setState(Mage_Sales_Model_Order::STATE_NEW, true, 'Loan Application Approved.');
640
+ $customer_email = $order['customer_email'];
641
+ $customer_firstname = $order['customer_firstname'];
642
+ $customer_lastname = $order['customer_lastname'];
643
+ try {
644
+ $order->sendNewOrderEmail();
645
+ } catch (Exception $ex) {
646
+ Mage::logException($ex);
647
+ }
648
+ $order->save();
649
+
650
+ $clx_loan_application_data = Mage::getSingleton('checkout/session')->getLoanApplicationDataToSave();
651
+ $clx_loan_application_data['order_id'] = $orderId;
652
+ $clx_loan_application_data['status'] = 'PENDING';
653
+ $clx_loan_application_data['approvalRequired_flag'] = 0;
654
+ $clx_loan_application_data['offer_acceptance_flag'] = true;
655
+ $clx_status_track_model->saveLoanApplicationDetails($clx_loan_application_data);
656
+ Mage::getSingleton('checkout/session')->unsLoanApplicationDataToSave();
657
+
658
+ if (isset($quoteId) && !empty($quoteId) && isset($applicationId) && $applicationId != 'APP-') {
659
+ if (isset($clx_quoteid) && isset($clx_applicationid) && $quoteId == $clx_quoteid && $applicationId == $clx_applicationid) {
660
+ if (isset($customer_email) && !empty($customer_email) && isset($customer_firstname) && !empty($customer_firstname) && isset($customer_lastname) && !empty($customer_lastname)) {
661
+ // Mail notification - to - customer
662
+ /*
663
+ try
664
+ {
665
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
666
+ 'clx_loan_approve_email_template',
667
+ $customer_email,
668
+ uc_words(strtolower($customer_firstname)).' '.uc_words(strtolower($customer_lastname)),
669
+ 'Loan offer confirmation',
670
+ array('firstName' => uc_words(strtolower($customer_firstname)), 'lastName' => uc_words(strtolower($customer_lastname)))
671
+ );
672
+ }catch (Exception $ex) {
673
+ Mage::logException($ex);
674
+ } */
675
+ }
676
+ Mage::getSingleton('checkout/session')->unsQuoteId();
677
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure' => false));
678
+ } else {
679
+ Mage::log('Clx Funding Error Message: current quote id not matches with the quote id that you sent with applicationId');
680
+ }
681
+ } else if (isset($sess_quoteId) && !empty($sess_quoteId) && isset($sess_applicationId) && $sess_applicationId != 'APP-') {
682
+ if (isset($clx_quoteid) && isset($clx_applicationid) && $sess_quoteId == $clx_quoteid && $sess_applicationId == $clx_applicationid) {
683
+ if (isset($customer_email) && !empty($customer_email) && isset($customer_firstname) && !empty($customer_firstname) && isset($customer_lastname) && !empty($customer_lastname)) {
684
+ // Mail notification - to - customer
685
+ /* try
686
+ {
687
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
688
+ 'clx_loan_approve_email_template',
689
+ $customer_email,
690
+ uc_words(strtolower($customer_firstname)).' '.uc_words(strtolower($customer_lastname)),
691
+ 'Loan offer confirmation accepted',
692
+ array('firstName' => uc_words(strtolower($customer_firstname)), 'lastName' => uc_words(strtolower($customer_lastname)))
693
+ );
694
+ }catch (Exception $ex) {
695
+ Mage::logException($ex);
696
+ } */
697
+ }
698
+
699
+ Mage::getSingleton('checkout/session')->unsQuoteId();
700
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure' => false));
701
+ } else {
702
+ Mage::log('Clx Funding Error Message: current quote id not matches with the quote id that you sent with applicationId');
703
+ }
704
+ } else {
705
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure' => false));
706
+ }
707
+ }
708
+
709
+ function checkLoanOfferAcceptanceStatusAction() {
710
+ $formData = unserialize(Mage::getSingleton('checkout/session')->getLoanApplicationData());
711
+ $temp_var = Mage::getSingleton('checkout/session')->getLoanOfferConfirmAcceptance();
712
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id');
713
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field');
714
+ $isBestOffer = Mage::getStoreConfig('payment/clxfunding/is_Best_Offer');
715
+
716
+ $quoteId = Mage::getSingleton('checkout/session')->getQuoteId();
717
+ $applicationId = "APP-" . $quoteId;
718
+
719
+ if (isset($quoteId) && !empty($quoteId) && isset($applicationId) && $applicationId != 'APP-') {
720
+ Mage::getSingleton('checkout/session')->setClxQuoteParam($quoteId);
721
+ Mage::getSingleton('checkout/session')->setClxApplicationIdParam($applicationId);
722
+ $quote = Mage::getModel('checkout/session')->getQuote();
723
+ $quoteData = $quote->getData();
724
+ if (isset($quoteData['grand_total'])) {
725
+ $grandTotal = $quoteData['grand_total'];
726
+ }
727
+ } else {
728
+ $quoteId = Mage::getSingleton('checkout/session')->getClxOfferQuoteId();
729
+ $applicationId = Mage::getSingleton('checkout/session')->getClxOfferApplicationId();
730
+ Mage::getSingleton('checkout/session')->unsClxOfferQuoteId();
731
+ Mage::getSingleton('checkout/session')->unsClxOfferApplicationId();
732
+ Mage::getSingleton('checkout/session')->setClxOfferQuoteId_New($quoteId);
733
+ Mage::getSingleton('checkout/session')->setClxOfferApplicationId_New($applicationId);
734
+ $quote = Mage::getModel('sales/quote')->load($quoteId);
735
+ $quoteData = $quote->getData();
736
+ if (isset($quoteData['grand_total'])) {
737
+ $grandTotal = $quoteData['grand_total'];
738
+ }
739
+ }
740
+
741
+ Mage::getSingleton('checkout/session')->unsLoanOfferConfirmAcceptance();
742
+ Mage::getSingleton('checkout/session')->unsLoanApplicationData();
743
+
744
+ if (isset($temp_var) && $temp_var && isset($formData) && !empty($formData)) {
745
+ $data = array(
746
+ "firstName" => trim($formData['firstName']),
747
+ "lastName" => trim($formData['lastName']),
748
+ "emailId" => trim($formData['emailId']),
749
+ "birthDate" => trim($formData['birthDate']),
750
+ "street" => trim($formData['street']),
751
+ "city" => trim($formData['city']),
752
+ "state" => trim($formData['state']),
753
+ "zipcode" => trim($formData['zipcode']),
754
+ "loanAmount" => floatval($grandTotal),
755
+ "loanPurpose" => trim($formData['loanPurpose']),
756
+ "loanTerms" => floatval(trim($formData['loanTerms'])),
757
+ "yearlyIncome" => floatval(trim($formData['yearlyIncome'])),
758
+ "employmentStatus" => trim($formData['employmentStatus']),
759
+ "selfReportedCreditScore" => intval(trim($formData['selfReportedCreditScore'])),
760
+ "mobilePhoneAreaCode" => trim($formData['mobilePhoneAreaCode']),
761
+ "mobileNumber" => trim($formData['mobileNumber']),
762
+ "ssn" => trim($formData['ssn']),
763
+ "employerName" => trim($formData['employerName']),
764
+ "occupation" => trim($formData['occupation']),
765
+ "employmentStartDate" => trim($formData['employmentStartDate']),
766
+ "bankName" => trim($formData['bankName']),
767
+ "firstAccountHolderName" => trim($formData['firstAccountHolderName']),
768
+ "bankAccountType" => trim($formData['bankAccountType']),
769
+ "bankAccountNumber" => trim($formData['bankAccountNumber']),
770
+ "routingNumber" => trim($formData['routingNumber']),
771
+ "accountId" => $accountId,
772
+ "loanOfferId" => trim($formData['loanOfferId']),
773
+ "currency" => Mage::app()->getStore()->getCurrentCurrencyCode()
774
+ );
775
+
776
+
777
+ $url = "http://portal.clexchange.io/api/loan-offers/" . $data['loanOfferId'] . "/loan-applications";
778
+ $page = "/api/loan-offers/" . $data['loanOfferId'] . "/loan-applications";
779
+ $data['applicationId'] = $applicationId;
780
+ $data['isOfferAccepted'] = true;
781
+
782
+ $formData['application_id'] = $applicationId;
783
+ $formData['quote_id'] = $quoteId;
784
+ Mage::getSingleton('checkout/session')->setLoanApplicationDataToSave($formData);
785
+
786
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxOfferAcceptenceApi($url, $page, $data, $authorizationField);
787
+ if ($result['valid']) {
788
+ if (isset($result['result'])) {
789
+ /*
790
+ $clxOfferAcceptRes = json_decode($result['result']);
791
+ if ($clxOfferAcceptRes->application_status == "REJECTED")
792
+ {
793
+ $orderModel = Mage::getModel('sales/order');
794
+ $orderModel->loadByIncrementId($row['order_id']);
795
+ if ($orderModel->canCancel()) {
796
+ $orderModel->cancel();
797
+ $orderModel->setStatus('Reason for cancellation : Lender rejected the loan offer');
798
+ $orderModel->save();
799
+ }
800
+ }*/
801
+ $this->loadLayout();
802
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/user_loan_offer_accept.phtml'));
803
+ $block->setLoanOfferStatus(json_decode($result['result']));
804
+ $this->getLayout()->getBlock('content')->append($block);
805
+ $this->renderLayout();
806
+ }
807
+ }
808
+ } else {
809
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
810
+ }
811
+ }
812
+
813
+ function getLoanApplicationFormAction() {
814
+ $quote = Mage::getModel('checkout/session')->getQuote();
815
+ $quoteData = $quote->getData();
816
+ $grandTotal = $quoteData['grand_total'];
817
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/modal_clxfunding.phtml'));
818
+ $block->setLoanAmmount($grandTotal);
819
+ $myHtml = $block->toHtml();
820
+ echo json_encode(array('valid' => TRUE, 'loan_app_view' => $myHtml));
821
+ }
822
+
823
+ function loanOfferRejectAction() {
824
+ $applicationId = $this->getRequest()->getParam('applicationId');
825
+ $loanOfferId = $this->getRequest()->getParam('loanOfferId');
826
+ if (isset($applicationId) && !empty($applicationId) && isset($loanOfferId) && !empty($loanOfferId)) {
827
+ $applicationId = Mage::helper('core')->decrypt(base64_decode($applicationId));
828
+ $loanOfferId = Mage::helper('core')->decrypt(base64_decode($loanOfferId));
829
+
830
+ $table_prefix = Mage::getConfig()->getTablePrefix();
831
+ $clx_table = $table_prefix . 'clx_loan_application_detail';
832
+
833
+ $connectionRead = Mage::getSingleton('core/resource')->getConnection('core_read');
834
+ $select = $connectionRead->select()
835
+ ->from($clx_table, array('*'))
836
+ ->where('application_id=? and status!="FUNDED" and status!="LENDER_REJECTED" and status!="CUSTOMER_ACCEPTED" and status!="MERCHANT_REJECTED" and status!="CUSTOMER_REJECTED" and status!="REJECTED"', $applicationId);
837
+ $row = $connectionRead->fetchRow($select); //return rows
838
+
839
+ if (isset($row) && !empty($row) && is_array($row) && isset($row['clx_loan_application_detail_id']) && !empty($row['clx_loan_application_detail_id']) && isset($row['approvalRequired_flag']) && !empty($row['approvalRequired_flag']) && $row['approvalRequired_flag'] == 1) {
840
+ $new_data = $row; //copy row to remove some key ->value pair from array .
841
+ unset($new_data['clx_loan_application_detail_id'], $new_data['order_id'], $new_data['application_id'], $new_data['quote_id'], $new_data['approvalRequired_flag'], $new_data['status'], $new_data['created_time'], $new_data['update_time']);
842
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id');
843
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field');
844
+ $new_data['accountId'] = $accountId;
845
+ $new_data['loanOfferId'] = $loanOfferId;
846
+ $new_data['applicationId'] = $applicationId;
847
+ $new_data['currency'] = Mage::app()->getStore()->getCurrentCurrencyCode();
848
+ $new_data['isOfferAccepted'] = FALSE;
849
+
850
+ $url = "http://portal.clexchange.io/api/loan-offers/" . $new_data['loanOfferId'] . "/loan-applications";
851
+ $page = "/api/loan-offers/" . $new_data['loanOfferId'] . "/loan-applications";
852
+
853
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxOfferAcceptenceApi($url, $page, $new_data, $authorizationField);
854
+ if (isset($result['result']) && $result['result']) {
855
+ /* Mail notification to Merchant about loan offer rejected by customer */
856
+ $parameters = array('applicationId' => $applicationId, 'orderNumber' => $row['order_id'], 'customerName' => ucfirst(strtolower($row['firstName'])) . ' ' . ucfirst(strtolower($row['lastName'])));
857
+ try {
858
+ Mage::getModel('clxfunding/ClxEmail')->sendEmail(
859
+ 'clx_loan_offerreject_email_template', Mage::getStoreConfig('trans_email/ident_sales/email'), Mage::getStoreConfig('trans_email/ident_sales/name'), 'Loan Offer Rejected', $parameters
860
+ );
861
+ } catch (Exception $ex) {
862
+ Mage::logException($ex);
863
+ }
864
+ /* Mail notification to Merchant about loan offer rejected by customer */
865
+
866
+ $table_prefix = Mage::getConfig()->getTablePrefix();
867
+ $clx_table = $table_prefix . 'clx_loan_application_detail';
868
+
869
+ $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
870
+ $connectionWrite->beginTransaction();
871
+ $data = array();
872
+ $data['status'] = "CUSTOMER_REJECTED";
873
+ $data['update_time'] = date('Y-m-d H:i:s');
874
+ $where = $connectionWrite->quoteInto('clx_loan_application_detail_id =?', $row['clx_loan_application_detail_id']);
875
+ $connectionWrite->update($clx_table, $data, $where);
876
+ $connectionWrite->commit();
877
+
878
+ /* Order Cancel */
879
+ if (isset($row['order_id']) && !empty($row['order_id'])) {
880
+ $orderModel = Mage::getModel('sales/order');
881
+ $orderModel->loadByIncrementId($row['order_id']);
882
+ if ($orderModel->canCancel()) {
883
+ $orderModel->cancel();
884
+ $orderModel->setStatus('Reason for cancellation : Customer rejected the loan offer');
885
+ $orderModel->save();
886
+ }
887
+ }
888
+ /* Order Cancel */
889
+
890
+
891
+
892
+ /* Notification on FrontEnd */
893
+ $this->loadLayout();
894
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/user_loan_offer_reject.phtml'));
895
+ $this->getLayout()->getBlock('content')->append($block);
896
+ $this->renderLayout();
897
+ /* Notification on FrontEnd */
898
+ } else {
899
+ Mage::log('CLX Error : Curl error [loan offer reject]');
900
+ }
901
+ } else {
902
+ $this->loadLayout();
903
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/link_Expire.phtml'));
904
+ $this->getLayout()->getBlock('content')->append($block);
905
+ $this->renderLayout();
906
+ //Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
907
+ }
908
+ } else {
909
+ $this->getResponse()->setHeader('HTTP/1.1', '404 Not Found');
910
+ $this->getResponse()->setHeader('Status', '404 File not found');
911
+ $this->_forward('defaultNoRoute');
912
+ }
913
+ }
914
+
915
+ function loanOfferAcceptAction() {
916
+ $applicationId = $this->getRequest()->getParam('applicationId');
917
+ $loanOfferId = $this->getRequest()->getParam('loanOfferId');
918
+ if (isset($applicationId) && !empty($applicationId) && isset($loanOfferId) && !empty($loanOfferId)) {
919
+
920
+ $applicationId = Mage::helper('core')->decrypt(base64_decode($applicationId));
921
+ $loanOfferId = Mage::helper('core')->decrypt(base64_decode($loanOfferId));
922
+
923
+ $table_prefix = Mage::getConfig()->getTablePrefix();
924
+ $clx_table = $table_prefix . 'clx_loan_application_detail';
925
+
926
+ $connectionRead = Mage::getSingleton('core/resource')->getConnection('core_read');
927
+ $select = $connectionRead->select()
928
+ ->from($clx_table, array('*'))
929
+ ->where('application_id=? and status!="FUNDED" and status!="LENDER_REJECTED" and status!="CUSTOMER_ACCEPTED" and status!="REJECTED" and status!="MERCHANT_REJECTED" and status!="CUSTOMER_REJECTED"', $applicationId);
930
+ $row = $connectionRead->fetchRow($select); //return rows
931
+ if (isset($row) && !empty($row) && is_array($row) && isset($row['clx_loan_application_detail_id']) && !empty($row['clx_loan_application_detail_id']) && isset($row['approvalRequired_flag']) && !empty($row['approvalRequired_flag']) && $row['approvalRequired_flag'] == 1) {
932
+ $new_data = $row; //copy row to remove some key ->value pair from array .
933
+ unset($new_data['clx_loan_application_detail_id'], $new_data['order_id'], $new_data['application_id'], $new_data['quote_id'], $new_data['approvalRequired_flag'], $new_data['status'], $new_data['created_time'], $new_data['update_time']);
934
+ $accountId = Mage::getStoreConfig('payment/clxfunding/account_id');
935
+ $authorizationField = Mage::getStoreConfig('payment/clxfunding/authorization_field');
936
+ $new_data['accountId'] = $accountId;
937
+ $new_data['loanOfferId'] = $loanOfferId;
938
+ $new_data['applicationId'] = $applicationId;
939
+ $new_data['currency'] = Mage::app()->getStore()->getCurrentCurrencyCode();
940
+
941
+ $new_data['isOfferAccepted'] = TRUE;
942
+
943
+ $url = "http://portal.clexchange.io/api/loan-offers/" . $new_data['loanOfferId'] . "/loan-applications";
944
+ $page = "/api/loan-offers/" . $new_data['loanOfferId'] . "/loan-applications";
945
+
946
+ $result = Mage::helper('clxfunding')->mastercurlRequestToClxOfferAcceptenceApi($url, $page, $new_data, $authorizationField);
947
+ if (isset($result['result']) && $result['result']) {
948
+ $clxOfferAcceptRes = json_decode($result['result']);
949
+ if ($clxOfferAcceptRes->application_status == "ACCEPTED") {
950
+ $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
951
+ $connectionWrite->beginTransaction();
952
+ $data = array();
953
+ $data['status'] = "CUSTOMER_ACCEPTED";
954
+ $data['update_time'] = date('Y-m-d H:i:s');
955
+ $where = $connectionWrite->quoteInto('clx_loan_application_detail_id =?', $row['clx_loan_application_detail_id']);
956
+ $connectionWrite->update($clx_table, $data, $where);
957
+ $connectionWrite->commit();
958
+ } else if ($clxOfferAcceptRes->application_status == "REJECTED") {
959
+ $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
960
+ $connectionWrite->beginTransaction();
961
+
962
+ $data = array();
963
+ $data['status'] = "REJECTED";
964
+ $data['update_time'] = date('Y-m-d H:i:s');
965
+
966
+ $orderModel = Mage::getModel('sales/order');
967
+ $orderModel->loadByIncrementId($row['order_id']);
968
+ if ($orderModel->canCancel()) {
969
+ $orderModel->cancel();
970
+ $orderModel->setStatus('Reason for cancellation : Lender rejected the loan offer');
971
+ $orderModel->save();
972
+ }
973
+ $where = $connectionWrite->quoteInto('clx_loan_application_detail_id =?', $row['clx_loan_application_detail_id']);
974
+ $connectionWrite->update($clx_table, $data, $where);
975
+ $connectionWrite->commit();
976
+
977
+ /* loan offer reject on accept by lender */
978
+
979
+
980
+ /* loan offer reject on accept by lender */
981
+ } else {
982
+
983
+ }
984
+ $this->loadLayout();
985
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/user_loan_offer_status.phtml'));
986
+ $block->setLoanOfferStatus(json_decode($result['result']));
987
+ $this->getLayout()->getBlock('content')->append($block);
988
+ $this->renderLayout();
989
+ } else {
990
+ Mage::log('CLX Error : Curl error [loan offer accept]');
991
+ Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
992
+ }
993
+ } else {
994
+ $this->loadLayout();
995
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/link_Expire.phtml'));
996
+ $this->getLayout()->getBlock('content')->append($block);
997
+ $this->renderLayout();
998
+ //Mage_Core_Controller_Varien_Action::_redirectUrl(Mage::getBaseUrl());
999
+ }
1000
+ } else {
1001
+ $this->getResponse()->setHeader('HTTP/1.1', '404 Not Found');
1002
+ $this->getResponse()->setHeader('Status', '404 File not found');
1003
+ $this->_forward('defaultNoRoute');
1004
+ }
1005
+ }
1006
+
1007
+ public function aboutCLXFundingAction() {
1008
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/form/aboutCLXFunding.phtml'));
1009
+ echo $block->toHtml();
1010
+ }
1011
+
1012
+ public function QueueResAction() {
1013
+ $Queue_Authentication_Key = Mage::getStoreConfig('payment/clxfunding/queue_authentication_key');
1014
+ $Queue_Endpoint = Mage::getStoreConfig('payment/clxfunding/queue_endpoint');
1015
+ if (isset($Queue_Authentication_Key) && !empty($Queue_Authentication_Key) && isset($Queue_Endpoint) && !empty($Queue_Endpoint)) {
1016
+
1017
+ $headers = array(
1018
+ "Content-type: application/json",
1019
+ "Authorization: OAuth " . $Queue_Authentication_Key
1020
+ );
1021
+
1022
+ $ch = curl_init();
1023
+ curl_setopt($ch, CURLOPT_URL, $Queue_Endpoint);
1024
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
1025
+ curl_setopt($ch, CURLOPT_TIMEOUT, 60);
1026
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
1027
+
1028
+ echo $info = curl_exec($ch);
1029
+ }
1030
+ }
1031
+
1032
+ }
app/code/community/CLExchange/Clexchangefunding/controllers/PaymentController.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // app/code/local/Envato/Clexchangefunding/controllers/PaymentController.php
4
+ class CLExchange_Clexchangefunding_PaymentController extends Mage_Core_Controller_Front_Action {
5
+
6
+ public function gatewayAction() {
7
+ if ($this->getRequest()->get("orderId")) {
8
+ $arr_querystring = array(
9
+ 'flag' => 1,
10
+ 'orderId' => $this->getRequest()->get("orderId")
11
+ );
12
+
13
+ Mage_Core_Controller_Varien_Action::_redirect('clxfunding/payment/response', array('_secure' => false, '_query' => $arr_querystring));
14
+ }
15
+ }
16
+
17
+ public function redirectAction() {
18
+ $this->loadLayout();
19
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'clxfunding', array('template' => 'clxfunding/redirect.phtml'));
20
+ $this->getLayout()->getBlock('content')->append($block);
21
+ $this->renderLayout();
22
+ }
23
+
24
+ public function responseAction() {
25
+ if ($this->getRequest()->get("flag") == "1" && $this->getRequest()->get("orderId")) {
26
+ $orderId = $this->getRequest()->get("orderId");
27
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
28
+ $order->setState(Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW, true, 'Payment Success.');
29
+ $order->save();
30
+
31
+ Mage::getSingleton('checkout/session')->unsQuoteId();
32
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure' => false));
33
+ } else {
34
+ Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/error', array('_secure' => false));
35
+ }
36
+ }
37
+
38
+ }
app/code/community/CLExchange/Clexchangefunding/etc/config.xml ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ To change this license header, choose License Headers in Project Properties.
4
+ To change this template file, choose Tools | Templates
5
+ and open the template in the editor.
6
+ -->
7
+
8
+
9
+ <config>
10
+ <modules>
11
+ <CLExchange_Clexchangefunding>
12
+ <version>1.0.0.0</version>
13
+ </CLExchange_Clexchangefunding>
14
+ </modules>
15
+ <frontend>
16
+ <routers>
17
+ <clxfunding>
18
+ <use>standard</use>
19
+ <args>
20
+ <module>CLExchange_Clexchangefunding</module>
21
+ <frontName>clxfunding</frontName>
22
+ </args>
23
+ </clxfunding>
24
+ </routers>
25
+ <events>
26
+ <payment_method_is_active>
27
+ <observers>
28
+ <clxfunding_payment_method_is_active>
29
+ <type>singleton</type>
30
+ <class>clxfunding/observer</class>
31
+ <method>paymentMethodIsActive</method>
32
+ </clxfunding_payment_method_is_active>
33
+ </observers>
34
+ </payment_method_is_active>
35
+ </events>
36
+ <layout>
37
+ <updates>
38
+ <clx_custom module="CLExchange_Clexchangefunding">
39
+ <file>clxblock.xml</file>
40
+ </clx_custom>
41
+ </updates>
42
+ </layout>
43
+ </frontend>
44
+ <global>
45
+ <models>
46
+ <clxfunding>
47
+ <class>CLExchange_Clexchangefunding_Model</class>
48
+ <resourceModel>clxfunding_mysql4</resourceModel>
49
+ </clxfunding>
50
+ <clxfunding_mysql4>
51
+ <class>CLExchange_Clexchangefunding_Model_Mysql4</class>
52
+ <entities>
53
+ <clxloanappdtls>
54
+ <table>clx_loan_application_detail</table>
55
+ </clxloanappdtls>
56
+ <clxloanofferdetails>
57
+ <table>clx_loan_offer_detail</table>
58
+ </clxloanofferdetails>
59
+ </entities>
60
+ </clxfunding_mysql4>
61
+ </models>
62
+ <resources>
63
+ <clxfunding_setup>
64
+ <setup>
65
+ <module>CLExchange_Clexchangefunding</module>
66
+ <class>CLExchange_Clexchangefunding_Model_Resource_Setup</class>
67
+ </setup>
68
+ <connection>
69
+ <use>core_setup</use>
70
+ </connection>
71
+ </clxfunding_setup>
72
+ <clxfunding_write>
73
+ <connection>
74
+ <use>core_write</use>
75
+ </connection>
76
+ </clxfunding_write>
77
+ <clxfunding_read>
78
+ <connection>
79
+ <use>core_read</use>
80
+ </connection>
81
+ </clxfunding_read>
82
+ </resources>
83
+
84
+ <!--fieldsets>
85
+ <sales_convert_quote_payment>
86
+ <custom_field_one>
87
+ <to_order_payment>*</to_order_payment>
88
+ </custom_field_one>
89
+ <custom_field_two>
90
+ <to_order_payment>*</to_order_payment>
91
+ </custom_field_two>
92
+ </sales_convert_quote_payment>
93
+ </fieldsets-->
94
+
95
+ <helpers>
96
+ <clxfunding>
97
+ <class>CLExchange_Clexchangefunding_Helper</class>
98
+ </clxfunding>
99
+ </helpers>
100
+
101
+ <blocks>
102
+ <clxfunding>
103
+ <class>CLExchange_Clexchangefunding_Block</class>
104
+ </clxfunding>
105
+ </blocks>
106
+
107
+ <events>
108
+ <checkout_onepage_index>
109
+ <observers>
110
+ <clxfunding>
111
+ <type>singleton</type>
112
+ <class>clxfunding/observer</class>
113
+ <method>paymentMethodIsActive</method>
114
+ </clxfunding>
115
+ </observers>
116
+ </checkout_onepage_index>
117
+ </events>
118
+
119
+ <template>
120
+ <email>
121
+ <clx_loan_approve_email_template>
122
+ <label>Clx Loan Approve Template</label>
123
+ <file>CLX/email-template/clx_loan_approved.html</file>
124
+ <type>html</type>
125
+ </clx_loan_approve_email_template>
126
+ <clx_loan_funded_email_template>
127
+ <label>Clx Loan Funded Template</label>
128
+ <file>CLX/email-template/clx_loan_funded.html</file>
129
+ <type>html</type>
130
+ </clx_loan_funded_email_template>
131
+ <clx_loan_offerdetail_email_template>
132
+ <label>Clx Loan Offer Template</label>
133
+ <file>CLX/email-template/clx_loan_offer.html</file>
134
+ <type>html</type>
135
+ </clx_loan_offerdetail_email_template>
136
+ <clx_loan_offerreject_email_template>
137
+ <label>Clx Loan Offer Reject Template</label>
138
+ <file>CLX/email-template/clx_loan_offer_reject.html</file>
139
+ <type>html</type>
140
+ </clx_loan_offerreject_email_template>
141
+ <clx_loan_offer_details_email_template>
142
+ <label>Clx Loan Offer Details Template</label>
143
+ <file>CLX/email-template/clx_loan_offer_details.html</file>
144
+ <type>html</type>
145
+ </clx_loan_offer_details_email_template>
146
+ <clx_error_email_template>
147
+ <label>Clx Error Details Template</label>
148
+ <file>CLX/email-template/clx_error.html</file>
149
+ <type>html</type>
150
+ </clx_error_email_template>
151
+ <clx_auto_order_cancel_email_template>
152
+ <label>Clx Auto Order Cancel Template</label>
153
+ <file>CLX/email-template/clx_auto_order_cancel.html</file>
154
+ <type>html</type>
155
+ </clx_auto_order_cancel_email_template>
156
+ </email>
157
+ </template>
158
+
159
+ </global>
160
+ <crontab>
161
+ <jobs>
162
+ <clxfunding_setStatus>
163
+ <schedule>
164
+ <!--<cron_expr>*/5 * * * *</cron_expr>-->
165
+ <config_path>payment/clxfunding/cron_expr</config_path>
166
+ </schedule>
167
+ <run>
168
+ <model>clxfunding/Observer::checkCron</model>
169
+ </run>
170
+ </clxfunding_setStatus>
171
+ <clxfunding_timeframe>
172
+ <schedule>
173
+ <cron_expr>0 * * * *</cron_expr>
174
+ </schedule>
175
+ <run>
176
+ <model>clxfunding/Observer::timeframeCancelOrder</model>
177
+ </run>
178
+ </clxfunding_timeframe>
179
+ </jobs>
180
+ </crontab>
181
+ <default>
182
+ <payment>
183
+ <clxfunding>
184
+ <active>0</active>
185
+ <model>clxfunding/paymentmethod</model>
186
+ <order_status>pending</order_status>
187
+ <title>CLX Funding</title>
188
+ <allowspecific>0</allowspecific>
189
+ <payment_action>sale</payment_action>
190
+ <sort_order>3</sort_order>
191
+ </clxfunding>
192
+ </payment>
193
+ </default>
194
+ </config>
app/code/community/CLExchange/Clexchangefunding/etc/config.xml~ ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ To change this license header, choose License Headers in Project Properties.
4
+ To change this template file, choose Tools | Templates
5
+ and open the template in the editor.
6
+ -->
7
+
8
+
9
+ <config>
10
+ <modules>
11
+ <CLExchange_Clexchangefunding>
12
+ <version>1.0.0.0</version>
13
+ </CLExchange_Clexchangefunding>
14
+ </modules>
15
+ <frontend>
16
+ <routers>
17
+ <clexchangefunding>
18
+ <use>standard</use>
19
+ <args>
20
+ <module>CLExchange_Clexchangefunding</module>
21
+ <frontName>clexchangefunding</frontName>
22
+ </args>
23
+ </clexchangefunding>
24
+ </routers>
25
+ <events>
26
+ <payment_method_is_active>
27
+ <observers>
28
+ <clexchangefunding_payment_method_is_active>
29
+ <type>singleton</type>
30
+ <class>clexchangefunding/observer</class>
31
+ <method>paymentMethodIsActive</method>
32
+ </clexchangefunding_payment_method_is_active>
33
+ </observers>
34
+ </payment_method_is_active>
35
+ </events>
36
+ <layout>
37
+ <updates>
38
+ <clx_custom module="CLExchange_Clexchangefunding">
39
+ <file>clxblock.xml</file>
40
+ </clx_custom>
41
+ </updates>
42
+ </layout>
43
+ </frontend>
44
+ <global>
45
+ <models>
46
+ <clexchangefunding>
47
+ <class>CLExchange_Clexchangefunding_Model</class>
48
+ <resourceModel>clexchangefunding_mysql4</resourceModel>
49
+ </clexchangefunding>
50
+ <clexchangefunding_mysql4>
51
+ <class>CLExchange_Clexchangefunding_Model_Mysql4</class>
52
+ <entities>
53
+ <clxloanapplicationdetails>
54
+ <table>clx_loan_application_detail</table>
55
+ </clxloanapplicationdetails>
56
+ <clxloanofferdetails>
57
+ <table>clx_loan_offer_detail</table>
58
+ </clxloanofferdetails>
59
+ </entities>
60
+ </clexchangefunding_mysql4>
61
+ </models>
62
+ <resources>
63
+ <clexchangefunding_setup>
64
+ <setup>
65
+ <module>CLExchange_Clexchangefunding</module>
66
+ <class>CLExchange_Clexchangefunding_Model_Resource_Setup</class>
67
+ </setup>
68
+ <connection>
69
+ <use>core_setup</use>
70
+ </connection>
71
+ </clexchangefunding_setup>
72
+ <clexchangefunding_write>
73
+ <connection>
74
+ <use>core_write</use>
75
+ </connection>
76
+ </clexchangefunding_write>
77
+ <clexchangefunding_read>
78
+ <connection>
79
+ <use>core_read</use>
80
+ </connection>
81
+ </clexchangefunding_read>
82
+ </resources>
83
+
84
+ <!--fieldsets>
85
+ <sales_convert_quote_payment>
86
+ <custom_field_one>
87
+ <to_order_payment>*</to_order_payment>
88
+ </custom_field_one>
89
+ <custom_field_two>
90
+ <to_order_payment>*</to_order_payment>
91
+ </custom_field_two>
92
+ </sales_convert_quote_payment>
93
+ </fieldsets-->
94
+
95
+ <helpers>
96
+ <clexchangefunding>
97
+ <class>CLExchange_Clexchangefunding_Helper</class>
98
+ </clexchangefunding>
99
+ </helpers>
100
+
101
+ <blocks>
102
+ <clexchangefunding>
103
+ <class>CLExchange_Clexchangefunding_Block</class>
104
+ </clexchangefunding>
105
+ </blocks>
106
+
107
+ <events>
108
+ <checkout_onepage_index>
109
+ <observers>
110
+ <clexchangefunding>
111
+ <type>singleton</type>
112
+ <class>clexchangefunding/observer</class>
113
+ <method>paymentMethodIsActive</method>
114
+ </clexchangefunding>
115
+ </observers>
116
+ </checkout_onepage_index>
117
+ </events>
118
+
119
+ <template>
120
+ <email>
121
+ <clx_loan_approve_email_template>
122
+ <label>Clx Loan Approve Template</label>
123
+ <file>CLX/email-template/clx_loan_approved.html</file>
124
+ <type>html</type>
125
+ </clx_loan_approve_email_template>
126
+ <clx_loan_funded_email_template>
127
+ <label>Clx Loan Funded Template</label>
128
+ <file>CLX/email-template/clx_loan_funded.html</file>
129
+ <type>html</type>
130
+ </clx_loan_funded_email_template>
131
+ <clx_loan_offerdetail_email_template>
132
+ <label>Clx Loan Offer Template</label>
133
+ <file>CLX/email-template/clx_loan_offer.html</file>
134
+ <type>html</type>
135
+ </clx_loan_offerdetail_email_template>
136
+ <clx_loan_offerreject_email_template>
137
+ <label>Clx Loan Offer Reject Template</label>
138
+ <file>CLX/email-template/clx_loan_offer_reject.html</file>
139
+ <type>html</type>
140
+ </clx_loan_offerreject_email_template>
141
+ <clx_loan_offer_details_email_template>
142
+ <label>Clx Loan Offer Details Template</label>
143
+ <file>CLX/email-template/clx_loan_offer_details.html</file>
144
+ <type>html</type>
145
+ </clx_loan_offer_details_email_template>
146
+ <clx_error_email_template>
147
+ <label>Clx Error Details Template</label>
148
+ <file>CLX/email-template/clx_error.html</file>
149
+ <type>html</type>
150
+ </clx_error_email_template>
151
+ <clx_auto_order_cancel_email_template>
152
+ <label>Clx Auto Order Cancel Template</label>
153
+ <file>CLX/email-template/clx_auto_order_cancel.html</file>
154
+ <type>html</type>
155
+ </clx_auto_order_cancel_email_template>
156
+ </email>
157
+ </template>
158
+
159
+ </global>
160
+ <crontab>
161
+ <jobs>
162
+ <clexchangefunding_setStatus>
163
+ <schedule>
164
+ <!--<cron_expr>*/5 * * * *</cron_expr>-->
165
+ <config_path>payment/clexchangefunding/cron_expr</config_path>
166
+ </schedule>
167
+ <run>
168
+ <model>clexchangefunding/Observer::checkCron</model>
169
+ </run>
170
+ </clexchangefunding_setStatus>
171
+ <clexchangefunding_timeframe>
172
+ <schedule>
173
+ <cron_expr>30 * * * *</cron_expr>
174
+ </schedule>
175
+ <run>
176
+ <model>clexchangefunding/Observer::timeframeCancelOrder</model>
177
+ </run>
178
+ </clexchangefunding_timeframe>
179
+ </jobs>
180
+ </crontab>
181
+ <default>
182
+ <payment>
183
+ <clexchangefunding>
184
+ <active>1</active>
185
+ <model>clexchangefunding/paymentmethod</model>
186
+ <order_status>pending</order_status>
187
+ <title>CLX Funding</title>
188
+ <allowspecific>0</allowspecific>
189
+ <payment_action>sale</payment_action>
190
+ <sort_order>3</sort_order>
191
+ </clexchangefunding>
192
+ </payment>
193
+ </default>
194
+ </config>
app/code/community/CLExchange/Clexchangefunding/etc/system.xml ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ To change this license header, choose License Headers in Project Properties.
4
+ To change this template file, choose Tools | Templates
5
+ and open the template in the editor.
6
+ -->
7
+
8
+ <config>
9
+ <sections>
10
+ <payment>
11
+ <groups>
12
+ <clxfunding translate="label" module="clxfunding">
13
+ <label>CLExchange Payment Module</label>
14
+ <sort_order>1000</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>0</show_in_store>
18
+ <fields>
19
+ <title translate="label">
20
+ <backend_model>clxfunding/PaymentMethodTitle</backend_model>
21
+ <label>Title</label>
22
+ <frontend_type>text</frontend_type>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>0</show_in_store>
26
+ <sort_order>1</sort_order>
27
+ </title>
28
+ <active translate="label">
29
+ <label>Enabled</label>
30
+ <frontend_type>select</frontend_type>
31
+ <source_model>adminhtml/system_config_source_yesno</source_model>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>0</show_in_store>
35
+ <sort_order>2</sort_order>
36
+ </active>
37
+ <sort_order translate="label">
38
+ <label>Sort order</label>
39
+ <frontend_type>text</frontend_type>
40
+ <sort_order>3</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>0</show_in_store>
44
+ </sort_order>
45
+ <account_id translate="label">
46
+ <label>Account Id</label>
47
+ <backend_model>clxfunding/AccountIdV</backend_model>
48
+ <comment>Merchant Authentication</comment>
49
+ <frontend_type>text</frontend_type>
50
+ <sort_order>4</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>0</show_in_store>
54
+ </account_id>
55
+ <authorization_field translate="label">
56
+ <label>Authorization Key</label>
57
+ <backend_model>clxfunding/AuthorizationKeyV</backend_model>
58
+ <comment>Merchant Authentication</comment>
59
+ <frontend_type>text</frontend_type>
60
+ <sort_order>5</sort_order>
61
+ <show_in_default>1</show_in_default>
62
+ <show_in_website>1</show_in_website>
63
+ <show_in_store>0</show_in_store>
64
+ </authorization_field>
65
+ <is_Best_Offer translate="label">
66
+ <label>is Best Offer</label>
67
+ <comment>Check the best available offer</comment>
68
+ <frontend_type>select</frontend_type>
69
+ <source_model>CLExchange_Clexchangefunding_IsBestOffer</source_model>
70
+ <sort_order>6</sort_order>
71
+ <show_in_default>1</show_in_default>
72
+ <show_in_website>1</show_in_website>
73
+ <show_in_store>0</show_in_store>
74
+ </is_Best_Offer>
75
+ <approve_Required translate="label">
76
+ <label>Approval Required</label>
77
+ <comment>Take approval of loan offer from borrower</comment>
78
+ <frontend_type>select</frontend_type>
79
+ <source_model>CLExchange_Clexchangefunding_ApprovalRequired</source_model>
80
+ <sort_order>7</sort_order>
81
+ <show_in_default>1</show_in_default>
82
+ <show_in_website>1</show_in_website>
83
+ <show_in_store>0</show_in_store>
84
+ </approve_Required>
85
+ <queue_authentication_key translate="label">
86
+ <label>Queue Authentication Key</label>
87
+ <backend_model>clxfunding/QueueAuthKeyV</backend_model>
88
+ <comment>Required parameter in API calls to Queue, for tracking applications status</comment>
89
+ <frontend_type>text</frontend_type>
90
+ <sort_order>8</sort_order>
91
+ <show_in_default>1</show_in_default>
92
+ <show_in_website>1</show_in_website>
93
+ <show_in_store>0</show_in_store>
94
+ </queue_authentication_key>
95
+ <queue_endpoint translate="label">
96
+ <label>Queue Endpoint</label>
97
+ <backend_model>clxfunding/QueueEndpointV</backend_model>
98
+ <comment>Required parameter in API calls to Queue, for tracking applications status</comment>
99
+ <frontend_type>text</frontend_type>
100
+ <sort_order>9</sort_order>
101
+ <show_in_default>1</show_in_default>
102
+ <show_in_website>1</show_in_website>
103
+ <show_in_store>0</show_in_store>
104
+ </queue_endpoint>
105
+ <cron_expr translate="label" module="clxfunding">
106
+ <label>Cron Expression</label>
107
+ <comment>Make cron calls to Queue system at regular intervals</comment>
108
+ <frontend_type>select</frontend_type>
109
+ <source_model>CLExchange_Clexchangefunding_CronExpressionList</source_model>
110
+ <sort_order>10</sort_order>
111
+ <show_in_default>1</show_in_default>
112
+ <show_in_website>1</show_in_website>
113
+ <show_in_store>0</show_in_store>
114
+ </cron_expr>
115
+ <show_loan_offer translate="label" module="clxfunding">
116
+ <label>Show Loan Offer</label>
117
+ <comment>Allow user to check for the available loan offers or not</comment>
118
+ <frontend_type>select</frontend_type>
119
+ <source_model>CLExchange_Clexchangefunding_ApprovalRequired</source_model>
120
+ <sort_order>11</sort_order>
121
+ <show_in_default>1</show_in_default>
122
+ <show_in_website>1</show_in_website>
123
+ <show_in_store>0</show_in_store>
124
+ </show_loan_offer>
125
+ <loan_offer_time_frame translate="label" module="clxfunding">
126
+ <label>Time Frame (In Hours)</label>
127
+ <comment>Define the time period, a borrower has to accept the loan offer</comment>
128
+ <frontend_type>select</frontend_type>
129
+ <source_model>CLExchange_Clexchangefunding_TimeFrames</source_model>
130
+ <sort_order>12</sort_order>
131
+ <show_in_default>1</show_in_default>
132
+ <show_in_website>1</show_in_website>
133
+ <show_in_store>0</show_in_store>
134
+ </loan_offer_time_frame>
135
+ <!--mail_notification_interval translate="label" module="clxfunding">
136
+ <label>Daily Mail Notification</label>
137
+ <comment>Loan offer mail notification/notifications per day</comment>
138
+ <frontend_type>text</frontend_type>
139
+ <sort_order>13</sort_order>
140
+ <show_in_default>1</show_in_default>
141
+ <show_in_website>1</show_in_website>
142
+ <show_in_store>0</show_in_store>
143
+ </mail_notification_interval-->
144
+ </fields>
145
+ </clxfunding>
146
+ </groups>
147
+ </payment>
148
+ </sections>
149
+ </config>
app/code/community/CLExchange/Clexchangefunding/sql/clxfunding_setup/mysql4-install-1.0.0.0.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // following code snipet will create table `clx_loan_application_detail` and `clx_loan_offer_detail`
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ -- DROP TABLE IF EXISTS {$this->getTable('clx_loan_offer_detail')};DROP TABLE IF EXISTS {$this->getTable('clx_loan_application_detail')};
10
+ CREATE TABLE {$this->getTable('clx_loan_application_detail')} (
11
+ `clx_loan_application_detail_id` int(11) unsigned NOT NULL auto_increment,
12
+ `application_id` varchar(255) NOT NULL COMMENT 'Application ID',
13
+ `quote_id` varchar(255) NOT NULL COMMENT 'Quote ID',
14
+ `order_id` varchar(255) NOT NULL COMMENT 'Order Number',
15
+ `status` varchar(255) NOT NULL COMMENT 'Clx Status',
16
+ `approvalRequired_flag` boolean NOT NULL default false COMMENT 'Loan Application Flag',
17
+ `mail_sent` boolean NOT NULL default false COMMENT 'Loan Offer Mail Sent',
18
+ `offer_mail_sent_time` datetime NULL COMMENT 'Loan Offer Mail Sent Date',
19
+ `prev_offer_mail_sent_time` datetime NULL COMMENT 'Previous Loan Offer Mail Sent Date',
20
+ `firstName` varchar(255) NOT NULL COMMENT 'Borrowers First Name',
21
+ `lastName` varchar(255) NOT NULL COMMENT 'Borrowers Last Name',
22
+ `emailId` varchar(255) NOT NULL COMMENT 'Borrowers Email Id',
23
+ `birthDate` date NOT NULL COMMENT 'Borrowers Birth Date',
24
+ `mobilePhoneAreaCode` varchar(3) NOT NULL,
25
+ `mobileNumber` varchar(10) NOT NULL,
26
+ `street` varchar(255) NOT NULL,
27
+ `city` varchar(255) NOT NULL,
28
+ `state` varchar(255) NOT NULL,
29
+ `zipcode` varchar(8) NOT NULL,
30
+ `country` varchar(255) NOT NULL,
31
+ `yearlyIncome` DECIMAL NOT NULL COMMENT 'Borrowers yearly income',
32
+ `employmentStatus` varchar(30) NOT NULL,
33
+ `employmentName` varchar(100) NOT NULL,
34
+ `loanTerms` DOUBLE NOT NULL COMMENT 'loan terms in months',
35
+ `employmentStartDate` date NOT NULL,
36
+ `occupation` varchar(100) NOT NULL,
37
+ `bankName` varchar(255) NOT NULL,
38
+ `firstAccountHolderName` varchar(255) NOT NULL,
39
+ `bankAccountType` varchar(100) NOT NULL,
40
+ `bankAccountNumber` varchar(30) NOT NULL,
41
+ `routingNumber` varchar(255) NOT NULL,
42
+ `loanAmount` DECIMAL NOT NULL,
43
+ `loanPurpose` varchar(255) NOT NULL,
44
+ `ssn` varchar(15) NOT NULL,
45
+ `selfReportedCreditScore` int(11) NOT NULL,
46
+ `created_time` datetime NULL,
47
+ `update_time` datetime NULL,
48
+ PRIMARY KEY (`clx_loan_application_detail_id`)
49
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
50
+
51
+ -- DROP TABLE IF EXISTS {$this->getTable('clx_loan_offer_detail')};
52
+ CREATE TABLE {$this->getTable('clx_loan_offer_detail')} (
53
+ `clx_loan_offer_detail_id` int(11) unsigned NOT NULL auto_increment,
54
+ `loan_application_id` int(11) unsigned NOT NULL COMMENT 'clx_loan_application_detail_id',
55
+ `loanTerm` DECIMAL NOT NULL COMMENT 'Loan Terms',
56
+ `loanAPR` DECIMAL NOT NULL COMMENT 'Loan APR',
57
+ `loanRate` DECIMAL NOT NULL COMMENT 'Loan Rate',
58
+ `paymentFrequency` DECIMAL NOT NULL COMMENT 'Payment Frequency',
59
+ `paymentAmount` DECIMAL NOT NULL COMMENT 'Payment Amount',
60
+ `downPayment` DECIMAL NOT NULL COMMENT 'Down Payment',
61
+ `offerId` varchar(255) NOT NULL COMMENT 'Loan Offer Id',
62
+ `showSelectedOfferUrl` varchar(255) NOT NULL COMMENT 'Show Selected Offer Url',
63
+ `lenderName` varchar(100) NULL COMMENT 'Lender Name',
64
+ PRIMARY KEY (`clx_loan_offer_detail_id`),
65
+ KEY `FK_NEW` (`loan_application_id`),
66
+ CONSTRAINT `FK_NEW` FOREIGN KEY (`loan_application_id`) REFERENCES `{$installer->getTable('clx_loan_application_detail')}` (`clx_loan_application_detail_id`) ON DELETE CASCADE ON UPDATE CASCADE
67
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
68
+
69
+ ");
70
+ $installer->endSetup();
app/design/frontend/base/default/layout/clxblock.xml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout version="0.1.0">
3
+ <!--default>
4
+ <reference name="head">
5
+ <action method="addItem">
6
+ <type>skin_css</type>
7
+ <name>css/Clx/clx_custom.css</name>
8
+ </action>
9
+ </reference>
10
+ </default-->
11
+ <checkout_onepage_index>
12
+ <!--reference name="footer">
13
+ <block type="core/template" template="clxfunding/form/modal_clxfunding.phtml">
14
+ </block>
15
+ </reference-->
16
+ <reference name="head">
17
+ <action method="addItem">
18
+ <type>skin_js</type>
19
+ <name>js/Clx/jquery-1.11.3.min.js</name>
20
+ </action>
21
+ <action method="addItem">
22
+ <type>skin_js</type>
23
+ <name>js/Clx/noConflict.js</name>
24
+ </action>
25
+ <action method="addItem">
26
+ <type>skin_js</type>
27
+ <name>js/Clx/bootstrap.min.js</name>
28
+ </action>
29
+ <action method="addItem">
30
+ <type>skin_js</type>
31
+ <name>js/Clx/bootbox.min.js</name>
32
+ </action>
33
+ <action method="addItem">
34
+ <type>skin_js</type>
35
+ <name>js/Clx/bootstrap-datepicker.min.js</name>
36
+ </action>
37
+ <!--action method="addJs">
38
+ <script>CLX/Clexchangefunding/bootstrap.min.js</script>
39
+ </action-->
40
+ <!--action method="addJs">
41
+ <script>CLX/Clexchangefunding/clx.custom.js</script>
42
+ </action-->
43
+
44
+ <action method="addItem">
45
+ <type>skin_css</type>
46
+ <name>css/Clx/bootstrap.min.css</name>
47
+ </action>
48
+ <action method="addItem">
49
+ <type>skin_css</type>
50
+ <name>css/Clx/bootstrap-datepicker.min.css</name>
51
+ </action>
52
+ <action method="addItem">
53
+ <type>skin_css</type>
54
+ <name>css/Clx/clx_custom.css</name>
55
+ </action>
56
+ </reference>
57
+ </checkout_onepage_index>
58
+ </layout>
app/design/frontend/base/default/template/clxfunding/form/aboutCLXFunding.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <p>This option quickly and securely pairs users unique attributes with lenders’ established qualifications, providing them a higher chance of obtaining an online loan.</p>
2
+ <p>All you need to do is fill this loan application and submit it. The application would be verified and responded immediately. If the application is approved, it goes in an under-writing process, where the bidding process starts between different lenders. Once the bidding is finished, the winner bidder would fund your order.</p>
3
+ <p>You can even check for the available loan offers of different lenders by clicking on the Check Eligibility button.</p>
app/design/frontend/base/default/template/clxfunding/form/clxfunding.phtml ADDED
@@ -0,0 +1,660 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $show_loan_offer_flag = Mage::getStoreConfig('payment/clxfunding/show_loan_offer');
3
+ ?>
4
+ <script>
5
+ jQuery(document).ready(function (jQuery) {
6
+ jQuery(document).on('focus', '#birthDate', function (event) {
7
+ var cur_input = jQuery(this);
8
+ jQuery(this).datepicker({
9
+ autoclose: true,
10
+ format: "yyyy-mm-dd",
11
+ endDate: new Date()
12
+ }).on('hide', function (e) {
13
+ e.preventDefault();
14
+ jQuery(cur_input).removeAttr('style');
15
+ }).on('changeDate',function(e){
16
+ jQuery('#employmentStartDate').val('');
17
+ jQuery('#employmentStartDate').datepicker({
18
+ autoclose: true,
19
+ format: "yyyy-mm-dd",
20
+ endDate: new Date(),
21
+ startDate: e.date
22
+ });
23
+ });
24
+ });
25
+ jQuery(document).on('focus', '#employmentStartDate', function (event) {
26
+ var cur_input = jQuery(this);
27
+ jQuery(this).datepicker({
28
+ autoclose: true,
29
+ format: "yyyy-mm-dd",
30
+ endDate: new Date(),
31
+ startDate:new Date(jQuery('#employmentStartDate').val())
32
+ }).on('hide', function (e) {
33
+ e.preventDefault();
34
+ jQuery(cur_input).removeAttr('style');
35
+ });
36
+ });
37
+ var t;
38
+ jQuery(document).on(
39
+ 'DOMMouseScroll mousewheel scroll',
40
+ '#clxLoanApplicationModal',
41
+ function () {
42
+ window.clearTimeout(t);
43
+ t = window.setTimeout(function () {
44
+ jQuery('#birthDate').datepicker('place');
45
+ jQuery('#employmentStartDate').datepicker('place');
46
+ }, 10);
47
+ jQuery('#birthDate').datepicker({
48
+ autoclose: true,
49
+ format: "yyyy-mm-dd",
50
+ endDate: new Date()
51
+ }).on('hide', function (e) {
52
+ e.preventDefault();
53
+ jQuery('#birthDate').removeAttr('style');
54
+ });
55
+ jQuery('#employmentStartDate').datepicker({
56
+ autoclose: true,
57
+ format: "yyyy-mm-dd",
58
+ endDate: new Date()
59
+ }).on('hide', function (e) {
60
+ e.preventDefault();
61
+ jQuery('#employmentStartDate').removeAttr('style');
62
+ });
63
+ }
64
+ );
65
+ jQuery("#clxLoanApplicationModal").on("show", function () {
66
+ jQuery("body").addClass("modal-open");
67
+ }).on("hidden", function () {
68
+ jQuery("body").removeClass("modal-open")
69
+ });
70
+ //CLX Funding radio button click
71
+ jQuery('#p_method_clxfunding').prop('checked', false); //radio button unchecked until application accepted
72
+ jQuery('<a href="javascript:void(0);" class="clx_info" title="About CLX Funding"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>frontend/base/default/css/Clx/help.png"/></a>').insertAfter(jQuery('#p_method_clxfunding').next('label'));
73
+ jQuery('#p_method_clxfunding').click(function (event) {
74
+ event.preventDefault();
75
+ event.stopImmediatePropagation();
76
+ jQuery(document).find('#loading_div').remove();
77
+ jQuery('<div id="loading_div"></div>').insertAfter(jQuery(this).next('label'));
78
+ jQuery('#loading_div').show();
79
+ jQuery(this).prop('disabled', 'disabled'); // double click problem
80
+ jQuery(document).find('#clxLoanApplicationModal').remove();// remove Modal if instance exist
81
+ jQuery(this).prop('checked', false); //not checking radio button until loan application form submited
82
+ /* fetch loan application form & show in popup */
83
+ jQuery.ajax({
84
+ url: "<?php echo(Mage::getBaseUrl() . 'clxfunding/ClxAPI/getLoanApplicationForm'); ?>", // path to controller function ClxAPIController.php
85
+ dataType: 'json',
86
+ success: function (response)
87
+ {
88
+ if (response.valid)
89
+ {
90
+ jQuery(document).find('#loading_div').remove();
91
+ jQuery(document).find('#clxLoanApplicationModal').remove();
92
+ var loanAppForm = response.loan_app_view;
93
+ jQuery(loanAppForm).find('#loading_div').hide();
94
+ jQuery(loanAppForm).modal({backdrop: 'static', keyboard: false}); // show modal
95
+ jQuery('body').css({"padding-right": "0px", "overflow": "scroll"});
96
+ }
97
+ else
98
+ {
99
+ jQuery(document).find('#loading_div').remove();
100
+ }
101
+ },
102
+ beforeSend: function () {
103
+ jQuery('#loading_div').show();
104
+ },
105
+ complete: function () {
106
+ jQuery(document).find('#loading_div').hide();
107
+ jQuery('#p_method_clxfunding').prop('disabled', false); // avoid double click call
108
+ }
109
+ });
110
+ /* end */
111
+ });
112
+
113
+ jQuery(document).on('click', '.clx_info', function (event) {
114
+ event.preventDefault();
115
+ event.stopImmediatePropagation();
116
+ var current_element = jQuery(this);
117
+ jQuery(current_element).addClass('not-active');
118
+ jQuery.ajax({
119
+ url: "<?php echo(Mage::getBaseUrl() . 'clxfunding/ClxAPI/aboutCLXFunding'); ?>",
120
+ type: 'post',
121
+ success: function (res)
122
+ {
123
+ bootbox.dialog({
124
+ message: res,
125
+ title: "About Online Loan",
126
+ className:'textAlign_c',
127
+ });
128
+ },
129
+ complete: function ()
130
+ {
131
+ jQuery(current_element).removeClass('not-active');
132
+ }
133
+ });
134
+ });
135
+ /* modal form tabs */
136
+ jQuery(document).on('click', "#clxLoanApplicationModal .nav-tabs a", function (event) {
137
+ event.preventDefault();
138
+ event.stopImmediatePropagation();
139
+ if (jQuery(this).closest('li').hasClass('disabled')) {
140
+ return false;
141
+ }
142
+ else
143
+ {
144
+ jQuery('#clxLoanApplicationModal .nav-tabs a').each(function () {
145
+ jQuery(this).css('display', 'block');
146
+ });
147
+
148
+ jQuery('#clxLoanApplicationModal .nav-tabs li').removeClass('active');
149
+ jQuery(this).parent('li').addClass('active');
150
+
151
+ var id = jQuery(this).attr('href');
152
+ jQuery('#clxLoanApplicationModal #clx-loanform .tab-pane').removeClass('active in');
153
+ jQuery(id).addClass('active in');
154
+ var current_li = jQuery(this).parent().index();
155
+ if (current_li == 2) // loan application (confirmation & submit) tab add button prev,check eligibility,submit
156
+ {
157
+ <?php
158
+ if ($show_loan_offer_flag) {
159
+ ?>
160
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="1" data-btn="prev">Previous</a><a href="javascript:void(0);" class="btn btn-default clx_check_eligibility_btn">Check Eligibility</a><a href="javascript:void(0);" class="btn btn-primary clx_loan_application_submit_btn">Create Loan Application</a>');
161
+ <?php
162
+ } else {
163
+ ?>
164
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="1" data-btn="prev">Previous</a><a href="javascript:void(0);" class="btn btn-primary clx_loan_application_submit_btn">Create Loan Application</a>');
165
+ <?php } ?>
166
+ }
167
+ else
168
+ {
169
+ if (current_li == 1)// loan application (Bank Details & SSN) tab add button next,prev
170
+ {
171
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="0" data-btn="prev">Previous</a><a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="2" data-btn="next">Next</a>');
172
+ }
173
+ else // loan application (Personal Information) tab add button next
174
+ {
175
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="1" data-btn="next">Next</a>');
176
+ }
177
+ }
178
+ }
179
+ });
180
+ /* end */
181
+ /* common event handle next & prev steps*/
182
+ jQuery(document).on('click', '.clx_common_next_prev_btn', function (event) {
183
+ event.preventDefault();
184
+ event.stopImmediatePropagation();
185
+
186
+ var temp_id = jQuery('#clxLoanApplicationModal ul.nav-tabs li.active a').attr('href');
187
+ var current_form_id = jQuery(temp_id).find('form').attr('id');
188
+ var currentFormValidate = new VarienForm(current_form_id, true);
189
+ var ssn = jQuery('#'+current_form_id).find('#ssn').val();
190
+ Validation.add('custom-ssn','Please enter a valid 9 digit SSN (for example xxxxxxxxx)',function(ssn){
191
+ if(ssn.match(/^\d{9}$/))
192
+ {
193
+ return true;
194
+ }
195
+ return false;
196
+ });
197
+ Validation.add('custom-dob','Age should be above 18',function(birthDate){
198
+ var dateold = new Date(birthDate);
199
+ var datenew = new Date();
200
+ var age = dateDiff(dateold, datenew);
201
+ if(age>=18)
202
+ {
203
+ return true;
204
+ }
205
+ return false;
206
+ });
207
+
208
+ if (currentFormValidate.validator.validate() || jQuery(this).data('btn') == 'prev') {
209
+ jQuery('.nav-tabs li').removeClass('active');
210
+ var tab_index = jQuery(this).data('tab');
211
+ if (tab_index == 1)// loan application (Bank Details & SSN) tab add button next,prev
212
+ {
213
+ jQuery('#clxLoanApplicationModal').find('#selfReportedCreditScore').focus();
214
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="0" data-btn="prev">Previous</a><a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="2" data-btn="next">Next</a>');
215
+ }
216
+ else if (tab_index == 2)// loan application (confirmation & submit) tab add button prev,check eligibility,submit
217
+ {
218
+ jQuery('#clxLoanApplicationModal').find('#loanPurpose').focus();
219
+ <?php
220
+ if ($show_loan_offer_flag) {
221
+ ?>
222
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="1" data-btn="prev">Previous</a><a href="javascript:void(0);" class="btn btn-default clx_check_eligibility_btn">Check Eligibility</a><a href="javascript:void(0);" class="btn btn-primary clx_loan_application_submit_btn">Create Loan Application</a>');
223
+ <?php
224
+ } else {
225
+ ?>
226
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="1" data-btn="prev">Previous</a><a href="javascript:void(0);" class="btn btn-primary clx_loan_application_submit_btn">Create Loan Application</a>');
227
+ <?php } ?>
228
+ }
229
+ else// loan application (Personal Information) tab add button next
230
+ {
231
+ jQuery('#clxLoanApplicationModal').find('#firstName').focus();
232
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="1" data-btn="next">Next</a>');
233
+ }
234
+ var next_li = jQuery('.nav-tabs li').eq(tab_index);
235
+ jQuery(next_li).addClass('active');
236
+ jQuery(next_li).removeClass('disabled');
237
+ jQuery(next_li).find('a').data('toggle', 'tab');
238
+ var id = jQuery(next_li).find('a').attr('href');
239
+ jQuery('#clx-loanform .tab-pane').removeClass('active in');
240
+ jQuery(id).addClass('active in');
241
+ }
242
+ else
243
+ {
244
+ return false;
245
+ }
246
+
247
+ });
248
+ /* end */
249
+ /*jQuery('.nav-tabs a').on('shown.bs.tab', function (event) {
250
+ var x = jQuery(event.target).text(); // active tab
251
+ var y = jQuery(event.relatedTarget).text(); // previous tab
252
+ jQuery(".act span").text(x);
253
+ jQuery(".prev span").text(y);
254
+ });*/
255
+ /* loan application form submit */
256
+
257
+ jQuery(document).on('click', '.clx_loan_offer_accept', function (event) {
258
+ event.preventDefault();
259
+ event.stopImmediatePropagation();
260
+
261
+ var current_element = jQuery(this);
262
+ jQuery(current_element).addClass('disabled');
263
+ jQuery('#loanApplicationForm').hide();
264
+ var serializeData = jQuery('#personal_information_form1,#bankdetails_and_ssn_form2,#confirmation_and_submit_form3').serializeArray();
265
+ var selected_loan_offer = jQuery('.clx_loan_offer_select:checked');
266
+ serializeData.push({name: 'loanOfferId', value: jQuery(selected_loan_offer).val()});
267
+ serializeData.push({name: 'paymentAmount', value: jQuery(selected_loan_offer).data('paymentamount')});
268
+ serializeData.push({name: 'loanTerm', value: jQuery(selected_loan_offer).data('loanterm')});
269
+ serializeData.push({name: 'loanAPR', value: jQuery(selected_loan_offer).data('loanapr')});
270
+ serializeData.push({name: 'loanRate', value: jQuery(selected_loan_offer).data('loanrate')});
271
+ serializeData.push({name: 'showSelectedOfferUrl', value: jQuery(selected_loan_offer).data('showselectedofferurl')});
272
+ serializeData.push({name: 'lenderName', value: jQuery(selected_loan_offer).data('lendername')});
273
+ serializeData.push({name: 'paymentFrequency', value: jQuery(selected_loan_offer).data('paymentfrequency')});
274
+ serializeData.push({name: 'downPayment', value: jQuery(selected_loan_offer).data('downpayment')});
275
+ <?php /*
276
+ var current_tr = jQuery('.clx_loan_offer_select:checked').closest('tr').clone(true);
277
+ jQuery(current_tr).find('td').first().remove();
278
+ jQuery(current_tr).find('td').last().remove();
279
+ */?>
280
+ jQuery.ajax({
281
+ url: "<?php echo(Mage::getBaseUrl() . 'clxfunding/ClxAPI/storeSelectedLoanOffer'); ?>",
282
+ data: serializeData,
283
+ type: 'post',
284
+ dataType: 'json',
285
+ success: function (res)
286
+ {
287
+ jQuery(current_element).removeClass('disabled');
288
+ if (res.valid)
289
+ {
290
+ jQuery(document).find('#p_method_clxfunding').prop('checked', 'checked');
291
+ jQuery(document).find('#clxLoanApplicationModal').remove();
292
+ jQuery(document).find('#loanApplicationForm').remove();
293
+ payment.save(); // proceed to next step
294
+ }
295
+ else
296
+ {
297
+ jQuery(document).find('#p_method_clxfunding').prop('checked', false);
298
+ jQuery(document).find('#clxLoanApplicationModal').remove();
299
+ jQuery(document).find('#loanApplicationForm').remove();
300
+ }
301
+ }
302
+ });
303
+ <?php /*
304
+ var custom_table = '<table class="table table-bordered"><caption><h5>Offer selected by you </h5></caption><thead><tr><th>Monthly Payment</th><th>Terms</th><th>APR(%)</th><th>Loan Rate(%)</th></tr></thead><tbody><tr>' + jQuery(current_tr).html() + '</tr></tbody></table>';
305
+ bootbox.dialog({
306
+ message: custom_table,
307
+ title: "Confirmation",
308
+ className:'textAlign_c',
309
+ buttons: {
310
+ success: {
311
+ label: "Yes",
312
+ className: "btn-success",
313
+ callback: function () {
314
+ jQuery.ajax({
315
+ url: "<?php echo(Mage::getBaseUrl() . 'clxfunding/ClxAPI/storeSelectedLoanOffer'); ?>",
316
+ data: serializeData,
317
+ type: 'post',
318
+ dataType: 'json',
319
+ success: function (res)
320
+ {
321
+ jQuery(current_element).removeClass('disabled');
322
+ if (res.valid)
323
+ {
324
+ jQuery(document).find('#p_method_clxfunding').prop('checked', 'checked');
325
+ jQuery(document).find('#clxLoanApplicationModal').remove();
326
+ jQuery(document).find('#loanApplicationForm').remove();
327
+ payment.save(); // proceed to next step
328
+ }
329
+ else
330
+ {
331
+ jQuery(document).find('#p_method_clxfunding').prop('checked', false);
332
+ jQuery(document).find('#clxLoanApplicationModal').remove();
333
+ jQuery(document).find('#loanApplicationForm').remove();
334
+ }
335
+ }
336
+ });
337
+ }
338
+ },
339
+ danger: {
340
+ label: "No",
341
+ className: "btn-danger",
342
+ callback: function () {
343
+ jQuery(current_element).removeClass('disabled');
344
+ jQuery('#loanApplicationForm').show();
345
+ }
346
+ }
347
+ }
348
+ });*/?>
349
+ });
350
+ jQuery(document).on('click', '.clx_loan_offer_back', function (event) {
351
+ event.preventDefault();
352
+ event.stopImmediatePropagation();
353
+
354
+ jQuery(this).closest('.modal').remove();
355
+ jQuery(document).find('#clxLoanApplicationModal').show();
356
+ });
357
+ /* continue button after loan application accepted by clx*/
358
+ jQuery(document).on('click', '.clx_funding_continue', function (event) {
359
+ event.preventDefault();
360
+ event.stopImmediatePropagation();
361
+
362
+ jQuery.ajax({
363
+ url: "<?php echo(Mage::getBaseUrl() . 'clxfunding/ClxAPI/setLoanApplicationSess'); ?>",
364
+ dataType: 'json',
365
+ success: function (res)
366
+ {
367
+ if (res.valid)
368
+ {
369
+ jQuery(document).find('#p_method_clxfunding').prop('checked', 'checked');
370
+ jQuery(this).closest('.modal').remove();
371
+ jQuery(document).find('#clxLoanApplicationModal').modal('hide');
372
+ payment.save(); // proceed to next step
373
+ }
374
+ }
375
+ });
376
+
377
+ });
378
+ jQuery(document).on('click', '.clx_funding_return', function (event) {
379
+ event.preventDefault();
380
+ event.stopImmediatePropagation();
381
+
382
+ jQuery(this).closest('.modal').remove();
383
+ jQuery(document).find('#clxLoanApplicationModal').remove();
384
+ jQuery(document).find('#loanApplicationForm').remove();
385
+ jQuery(document).find('#loanApplicationStatus').remove();
386
+ jQuery(document).find('#loading_div').remove();
387
+
388
+ });
389
+ /* form submit on button click check eligibility,submit button click*/
390
+ jQuery(document).on('click', '.clx_check_eligibility_btn,.clx_loan_application_submit_btn', function (event) {
391
+ event.preventDefault();
392
+ event.stopImmediatePropagation();
393
+
394
+ jQuery('#loading_div').show();
395
+ var btn_flag = jQuery(this);
396
+ jQuery(btn_flag).addClass('disabled');
397
+ if (jQuery(this).hasClass('clx_modal_form_submit_btn'))//next button
398
+ {
399
+ jQuery("#clxLoanApplicationModal").find('#clx_btn_flag').val('next');
400
+ }
401
+ else if (jQuery(this).hasClass('clx_check_eligibility_btn'))
402
+ {
403
+ jQuery("#clxLoanApplicationModal").find('#clx_btn_flag').val('check_eligibility');
404
+ }
405
+ else
406
+ {
407
+ jQuery("#clxLoanApplicationModal").find('#clx_btn_flag').val('loan_apply');
408
+ }
409
+
410
+ loan_application_form_submit(btn_flag);
411
+ });
412
+ /* loan form close event - uncheck radio button*/
413
+ jQuery('body').delegate('.clx_modal_form_close', 'click', function () {
414
+ jQuery('#p_method_clxfunding').prop('checked', false);
415
+
416
+ });
417
+ /* end */
418
+ });
419
+ function loan_application_form_submit(btn_flag)
420
+ {
421
+ var url = jQuery('#clxLoanApplicationModal').find('#loan_application_redirect_url').val();
422
+
423
+ var form1 = new VarienForm('personal_information_form1', true);
424
+ var form2 = new VarienForm('bankdetails_and_ssn_form2', true);
425
+ var form3 = new VarienForm('confirmation_and_submit_form3', true);
426
+
427
+ if (form1.validator.validate() && form2.validator.validate() && form3.validator.validate()) {
428
+ jQuery.ajax({
429
+ url: url,
430
+ data: jQuery('#personal_information_form1,#bankdetails_and_ssn_form2,#confirmation_and_submit_form3').serialize(),
431
+ type: 'post',
432
+ dataType: 'json',
433
+ success: function (response)
434
+ {
435
+ jQuery('#loading_div').hide();
436
+ jQuery(btn_flag).removeClass('disabled');
437
+ //response.flag possible values - C.next btn validation,2.check eligibility,3.submit button
438
+ if (response.flag)
439
+ {
440
+ if (response.flag == 'C')
441
+ {
442
+ if (response.valid)
443
+ {
444
+ jQuery('#clxLoanApplicationModal .nav-tabs li a').removeClass('custom-clx-error');
445
+ jQuery('#personal_information_form1,#bankdetails_and_ssn_form2,#confirmation_and_submit_form3').find('.input-text').each(function () {
446
+ var cur_node = jQuery(this);
447
+ jQuery(cur_node).removeClass('validation-passed');
448
+ jQuery(cur_node).closest('div').find('.validation-advice').remove();
449
+ });
450
+ }
451
+ else
452
+ {
453
+ var err_arr = response.error_messages;
454
+ var err_tab_flag_arr = response.tab_flag;
455
+ jQuery('#personal_information_form1,#bankdetails_and_ssn_form2,#confirmation_and_submit_form3').find('.input-text').each(function () {
456
+
457
+ var cur_node = jQuery(this);
458
+ if (jQuery(this).attr('name') in err_arr) // add server side validation
459
+ {
460
+ jQuery(cur_node).removeClass('validation-passed');
461
+ jQuery(cur_node).addClass('validation-failed');
462
+ jQuery(cur_node).closest('div').find('.validation-advice').remove();
463
+ jQuery('<div class="validation-advice" style="">' + err_arr[jQuery(this).attr('name')] + '</div>').insertAfter(jQuery(cur_node));
464
+ }
465
+ else
466
+ {
467
+ jQuery(cur_node).removeClass('validation-passed');
468
+ jQuery(cur_node).closest('div').find('.validation-advice').remove();
469
+ }
470
+ });
471
+ var t_flag = 0;
472
+ jQuery('#clxLoanApplicationModal .nav-tabs li a').removeClass('custom-clx-error');
473
+ jQuery.each(err_tab_flag_arr, function (i, val) {
474
+ jQuery('#clxLoanApplicationModal .nav-tabs li').eq(val - 1).find('a').addClass('custom-clx-error');
475
+ if (val == 1)
476
+ {
477
+ t_flag = 1;
478
+ }
479
+ if (val == 2)
480
+ {
481
+ if (t_flag != 1)
482
+ t_flag = 2;
483
+ }
484
+ if (val == 3)
485
+ {
486
+ if (t_flag != 1 && t_flag != 2)
487
+ t_flag = 3;
488
+ }
489
+ });
490
+ jQuery('.nav-tabs li').removeClass('active');
491
+ var tab_index = t_flag - 1;
492
+ if (tab_index == 1)// loan application (Bank Details & SSN) tab add button next,prev
493
+ {
494
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="0" data-btn="prev">Previous</a><a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="2" data-btn="next">Next</a>');
495
+ }
496
+ else if (tab_index == 2)// loan application (confirmation & submit) tab add button prev,check eligibility,submit
497
+ {
498
+ <?php
499
+ if ($show_loan_offer_flag) {
500
+ ?>
501
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="1" data-btn="prev">Previous</a><a href="javascript:void(0);" class="btn btn-default clx_check_eligibility_btn">Check Eligibility</a><a href="javascript:void(0);" class="btn btn-primary clx_loan_application_submit_btn">Create Loan Application</a>');
502
+ <?php
503
+ } else {
504
+ ?>
505
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-primary clx_common_next_prev_btn" data-tab="1" data-btn="prev">Previous</a><a href="javascript:void(0);" class="btn btn-default clx_loan_application_submit_btn">Create Loan Application</a>');
506
+ <?php } ?>
507
+ }
508
+ else// loan application (Personal Information) tab add button next
509
+ {
510
+ jQuery('#clxLoanApplicationModal').find('.modal-footer').html('<a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="1" data-btn="next">Next</a>');
511
+ }
512
+ var cur_li = jQuery('.nav-tabs li').eq(tab_index);
513
+ jQuery(cur_li).addClass('active');
514
+ jQuery(cur_li).removeClass('disabled');
515
+ jQuery(cur_li).find('a').data('toggle', 'tab');
516
+ var id = jQuery(cur_li).find('a').attr('href');
517
+ jQuery('#clx-loanform .tab-pane').removeClass('active in');
518
+ jQuery(id).addClass('active in');
519
+ }
520
+ }
521
+ else if (response.flag == 2)
522
+ {
523
+ jQuery('#clxLoanApplicationModal .nav-tabs li a').removeClass('custom-clx-error');
524
+ jQuery('#personal_information_form1,#bankdetails_and_ssn_form2,#confirmation_and_submit_form3').find('.input-text').each(function () {
525
+ var cur_node = jQuery(this);
526
+ jQuery(cur_node).removeClass('validation-passed');
527
+ jQuery(cur_node).closest('div').find('.validation-advice').remove();
528
+ });
529
+ /* call loan offer api */
530
+ if (response.redirect_url != '') // response.redirect_url - path to controller function
531
+ {
532
+ jQuery.ajax({
533
+ url: response.redirect_url,
534
+ data: jQuery('#personal_information_form1,#bankdetails_and_ssn_form2,#confirmation_and_submit_form3').serialize(),
535
+ type: 'post',
536
+ dataType: 'json',
537
+ success: function (ret_data)
538
+ {
539
+ if (ret_data.valid)
540
+ {
541
+ if (jQuery('#clxLoanApplicationModal').length)
542
+ {
543
+ jQuery('#clxLoanApplicationModal').hide();
544
+ }
545
+ if (jQuery('#loanApplicationForm').length)
546
+ {
547
+ jQuery('#loanApplicationForm').hide();
548
+ }
549
+ var offerView = ret_data.offer_view;
550
+ jQuery(offerView).modal({backdrop: 'static', keyboard: false});
551
+ }
552
+ else
553
+ {
554
+ bootbox.dialog({
555
+ message: "We are sorry to inform you that your loan application cannot be processed further.",
556
+ title: "Notification",
557
+ className:'textAlign_c',
558
+ });
559
+ }
560
+ },
561
+ beforeSend: function () {
562
+ jQuery('#loading_div').show();
563
+ },
564
+ complete: function () {
565
+ jQuery('#loading_div').hide();
566
+ }
567
+ });
568
+ }
569
+ }
570
+ else if (response.flag == 3)//
571
+ {
572
+ jQuery('#clxLoanApplicationModal .nav-tabs li a').removeClass('custom-clx-error');
573
+ jQuery('#personal_information_form1,#bankdetails_and_ssn_form2,#confirmation_and_submit_form3').find('.input-text').each(function () {
574
+ var cur_node = jQuery(this);
575
+ jQuery(cur_node).removeClass('validation-passed');
576
+ jQuery(cur_node).closest('div').find('.validation-advice').remove();
577
+ });
578
+ /* call loan application api */
579
+ if (response.redirect_url != '')
580
+ {
581
+ jQuery.ajax({
582
+ url: response.redirect_url, // response.redirect_url - path to controller function
583
+ data: jQuery('#personal_information_form1,#bankdetails_and_ssn_form2,#confirmation_and_submit_form3').serialize(),
584
+ type: 'post',
585
+ dataType: 'json',
586
+ success: function (ret_data)
587
+ {
588
+ if (ret_data.valid)
589
+ {
590
+ if (jQuery('#clxLoanApplicationModal').length)
591
+ {
592
+ jQuery('#clxLoanApplicationModal').hide();
593
+ }
594
+ if (jQuery('#loanApplicationForm').length)
595
+ {
596
+ jQuery('#loanApplicationForm').hide();
597
+ }
598
+ var offerView = ret_data.offer_view;
599
+ jQuery(offerView).modal({backdrop: 'static', keyboard: false});
600
+ }
601
+ else
602
+ {
603
+ bootbox.dialog({
604
+ message: "We are sorry to inform you that your loan application cannot be processed further.",
605
+ title: "Notification",
606
+ className:'textAlign_c',
607
+ });
608
+ }
609
+ },
610
+ beforeSend: function () {
611
+ jQuery('#loading_div').show();
612
+ },
613
+ complete: function () {
614
+ jQuery('#loading_div').hide();
615
+ }
616
+ });
617
+ }
618
+ }
619
+ }
620
+ else
621
+ {
622
+ if(!response.valid && !response.flag)
623
+ {
624
+ bootbox.dialog({
625
+ message: "We are sorry to inform you that your loan application cannot be processed further.",
626
+ title: "Notification",
627
+ className:'textAlign_c',
628
+ });
629
+ }
630
+ }
631
+ }
632
+
633
+ });
634
+ }
635
+ else {
636
+ jQuery('#loading_div').hide();
637
+ jQuery(btn_flag).removeClass('disabled');
638
+ }
639
+ }
640
+ function dateDiff(dateold, datenew)
641
+ {
642
+ var ynew = datenew.getFullYear();
643
+ var mnew = datenew.getMonth();
644
+ var dnew = datenew.getDate();
645
+ var yold = dateold.getFullYear();
646
+ var mold = dateold.getMonth();
647
+ var dold = dateold.getDate();
648
+ var diff = ynew - yold;
649
+ if(mold > mnew) diff--;
650
+ else
651
+ {
652
+ if(mold == mnew)
653
+ {
654
+ if(dold > dnew) diff--;
655
+ }
656
+ }
657
+ return diff;
658
+ }
659
+ </script>
660
+
app/design/frontend/base/default/template/clxfunding/form/confirm_user_acceptance.phtml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="">
2
+ <div class="">
3
+ <form name="loan_offer_acceptance" id="loan_offer_acceptance" method="post" action="<?php echo Mage::getBaseUrl() . 'clxfunding/ClxAPI/checkLoanOfferAcceptanceStatus'; ?>">
4
+ <div class="" style="width:80%">
5
+ <div class="page-title">
6
+ </div>
7
+ <h5 class="sub-title">Thank you for choosing Online Loan</h5>
8
+ <p>Please confirm your acceptance of the selected loan offer.</p>
9
+ <div class="buttons-set border-top-none">
10
+ <button type="button" class="button align-left" title="Continue Shopping" onclick="redirectURL()"><span><span>I Reject</span></span></button>
11
+ <button type="submit" class="button align-left" id="Confirm_Acceptance_Submit" title="Confirm Acceptance"><span><span>I Accept</span></span></button>
12
+ </div>
13
+ </div>
14
+ </form>
15
+ </div>
16
+ </div>
17
+ <script>
18
+ function redirectURL() {
19
+ window.location.href = "<?php echo Mage::getBaseUrl().'customer/account'; ?>";
20
+ }
21
+ </script>
app/design/frontend/base/default/template/clxfunding/form/custompaymentmethod.phtml~ ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ <div class="form-list" id="payment_form_<?php echo $this->getMethodCode();?>" style="display:block;">
4
+ <div>
5
+ <label><?php echo $this->__('Custom Field One') ?>*</label>
6
+ <span>
7
+ <input type="text" title="<?php echo $this->__('Custom Field One') ?>" name="payment[custom_field_one]" value="<?php echo $this->htmlEscape($this->getInfoData('custom_field_one')) ?>" />
8
+ </span>
9
+ </div>
10
+ <div>
11
+ <label><?php echo $this->__('Custom Field Two') ?>*</label>
12
+ <span>
13
+ <input type="text" title="<?php echo $this->__('Custom Field Two') ?>" name="payment[custom_field_two]" value="<?php echo $this->htmlEscape($this->getInfoData('custom_field_two')) ?>" />
14
+ </span>
15
+ </div>
16
+ </div>
17
+ <div>
18
+ <?php echo $this->getMethod()->getConfigData('message'); ?>
19
+ </div>
20
+ */?>
21
+ <script type="text/javascript">
22
+ //< ![CDATA[
23
+ var customForm = new VarienForm('my-clxloan-form', true);
24
+ //]]>
25
+ </script>
26
+ <script>
27
+ jQuery(document).ready(function(jQuery) {
28
+
29
+ jQuery('#p_method_custompaymentmethod').click(function() {
30
+ jQuery(this).prop('checked',false);
31
+ jQuery('#myModal').modal({backdrop: 'static', keyboard: false});
32
+ jQuery('#myModal').find('#my-clxloan-form')[0].reset();
33
+ jQuery('#myModal').find('#my-clxloan-form').find('.input-text').not('select,input[type="submit"]').val('');
34
+ jQuery('#myModal').find('#my-clxloan-form').find('.input-text').each(function(){
35
+ jQuery(this).removeClass('validation-failed');
36
+ jQuery(this).next('.validation-advice').remove();
37
+ });
38
+ jQuery('#myModal').find('.nav-tabs li').first().trigger('click');
39
+ //jQuery('#myModal').modal('show');
40
+ jQuery('#myModal').find('.input-text').removeAttr('disabled');
41
+ });
42
+ jQuery(".nav-tabs a").click(function(e) {
43
+ e.preventDefault();
44
+ // jQuery(this).tab('show');
45
+
46
+ jQuery('.nav-tabs li').removeClass('active');
47
+ jQuery(this).parent('li').addClass('active');
48
+
49
+ var id = jQuery(this).attr('href');
50
+ jQuery('#clx-loanform .tab-pane').removeClass('active in');
51
+ jQuery(id).addClass('active in');
52
+ });
53
+ jQuery('.nav-tabs a').on('shown.bs.tab', function(event) {
54
+ var x = jQuery(event.target).text(); // active tab
55
+ var y = jQuery(event.relatedTarget).text(); // previous tab
56
+ jQuery(".act span").text(x);
57
+ jQuery(".prev span").text(y);
58
+ });
59
+ jQuery(document).on('submit','#my-clxloan-form',function(event){
60
+ event.preventDefault();
61
+ var url = jQuery(this).data('action');
62
+ jQuery.ajax({
63
+ url:url,
64
+ data:jQuery(this).serialize(),
65
+ type:'post',
66
+ dataType:'json',
67
+ success:function(response)
68
+ {
69
+ if(response.valid)
70
+ {
71
+ jQuery('#my-clxloan-form').find('.input-text').each(function(){
72
+ var cur_node = jQuery(this);
73
+ jQuery(cur_node).removeClass('validation-passed');
74
+ if(jQuery(cur_node).next().hasClass('validation-advice'))
75
+ {
76
+ jQuery(cur_node).next().remove();
77
+ }
78
+ });
79
+ }
80
+ else
81
+ {
82
+ var err_arr = response.error_messages;
83
+ jQuery('#my-clxloan-form').find('.input-text').each(function(){
84
+
85
+ var cur_node = jQuery(this);
86
+ if(jQuery(this).attr('name') in err_arr)
87
+ {
88
+ jQuery(cur_node).removeClass('validation-passed');
89
+ jQuery(cur_node).addClass('validation-failed');
90
+ if(jQuery(cur_node).next().hasClass('validation-advice'))
91
+ {
92
+ jQuery(cur_node).next().remove();
93
+ }
94
+ jQuery('<div class="validation-advice" style="">'+err_arr[jQuery(this).attr('name')]+'</div>').insertAfter(jQuery(cur_node));
95
+ }
96
+ else
97
+ {
98
+ jQuery(cur_node).removeClass('validation-passed');
99
+ if(jQuery(cur_node).next().hasClass('validation-advice'))
100
+ {
101
+ jQuery(cur_node).next().remove();
102
+ }
103
+ }
104
+ });
105
+ }
106
+ }
107
+ });
108
+ });
109
+ /*jQuery('body').delegate('.submitss','click',function(){
110
+ jQuery(this).closest('form').attr('action');
111
+ alert(jQuery('#my-clxloan-form').attr('action'));
112
+ });*/
113
+ jQuery('body').delegate('.clx_modal_form_close','click',function(){
114
+ jQuery('#p_method_custompaymentmethod').prop('checked', false);
115
+ });
116
+
117
+ });
118
+ </script>
app/design/frontend/base/default/template/clxfunding/form/link_Expire.phtml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="">
2
+ <div class="">
3
+ <div class="" style="width:80%">
4
+ <p>This link does not exist more. This may occur due to either you have confirmed your acceptance already or you haven't given your response within the given time-frame.</p>
5
+ <div class="buttons-set border-top-none">
6
+ <button class="button align-left" onclick="redirectURL()" title="My Account"><span><span>My Account</span></span></button>
7
+ </div>
8
+ </div>
9
+ </div>
10
+ </div>
11
+ <script>
12
+ function redirectURL() {
13
+ window.location.href = "<?php echo Mage::getBaseUrl().'customer/account'; ?>";
14
+ }
15
+ </script>
app/design/frontend/base/default/template/clxfunding/form/loan_offer_response.phtml ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $data = $this->getLoanOffers(); ?>
2
+ <div id="loanApplicationForm" class="modal fade" role="dialog">
3
+ <div class="modal-dialog">
4
+ <!-- Modal content-->
5
+ <div class="modal-content">
6
+ <div class="modal-header">
7
+ <?php if (isset($data->application_status) && $data->application_status == "ACCEPTED" && isset($data->loan_offers) && is_array($data->loan_offers) && !empty($data->loan_offers) && count($data->loan_offers)) { ?>
8
+ <center><h4 class="modal-title">Your Pre-Approved Loan Offers</h4></center>
9
+ <?php } else { ?>
10
+ <center><h4 class="modal-title">Application Response</h4></center>
11
+ <?php } ?>
12
+ </div>
13
+ <div class="modal-body">
14
+ <?php
15
+ if (isset($data->application_status) && $data->application_status == "ACCEPTED") {
16
+ if (isset($data->loan_offers) && is_array($data->loan_offers) && !empty($data->loan_offers) && count($data->loan_offers)) {
17
+ ?>
18
+ <div class="table-responsive">
19
+ <table class="table table-hover">
20
+ <thead>
21
+ <tr>
22
+ <th>#</th>
23
+ <th>Monthly Payment($)</th>
24
+ <th>Terms(Months)</th>
25
+ <th>APR(%)</th>
26
+ <th>Interest Rate(%)</th>
27
+ <?php if(count($data->loan_offers) && isset($data->loan_offers[0]->showSelectedOfferUrl)){
28
+ echo "<th>More Details</th>";
29
+ }?>
30
+ </tr>
31
+ </thead>
32
+ <tbody>
33
+ <?php
34
+ for ($i = 0; $i < count($data->loan_offers); $i++) {
35
+ ?>
36
+ <tr>
37
+ <td><input type="radio" name="clx_loan_offer_select" data-downPayment="<?php echo(isset($data->loan_offers[$i]->downPayment) ? $data->loan_offers[$i]->downPayment : ''); ?>" data-paymentFrequency="<?php echo(isset($data->loan_offers[$i]->paymentFrequency) ? $data->loan_offers[$i]->paymentFrequency : ''); ?>" data-offerId="<?php echo(isset($data->loan_offers[$i]->id) ? $data->loan_offers[$i]->id : ''); ?>" data-lenderName="<?php echo(isset($data->loan_offers[$i]->lenderName) ? $data->loan_offers[$i]->lenderName : ''); ?>" data-showSelectedOfferUrl="<?php echo(isset($data->loan_offers[$i]->showSelectedOfferUrl) ? $data->loan_offers[$i]->showSelectedOfferUrl : 'javascript:void(0)'); ?>" data-loanRate="<?php echo(isset($data->loan_offers[$i]->loanRate) ? $data->loan_offers[$i]->loanRate : ''); ?>" data-loanAPR="<?php echo(isset($data->loan_offers[$i]->loanAPR) ? $data->loan_offers[$i]->loanAPR : ''); ?>" data-loanTerm="<?php echo(isset($data->loan_offers[$i]->loanTerm) ? $data->loan_offers[$i]->loanTerm : ''); ?>" data-paymentAmount="<?php echo(isset($data->loan_offers[$i]->paymentAmount) ? $data->loan_offers[$i]->paymentAmount : ''); ?>" class="clx_loan_offer_select" <?php echo((isset($i) && $i == 0) ? "checked='checked'" : ""); ?> value="<?php echo($data->loan_offers[$i]->id); ?>"/></td>
38
+ <td><?php echo('$' . (isset($data->loan_offers[$i]->paymentAmount) ? $data->loan_offers[$i]->paymentAmount : '')); ?></td>
39
+ <td><?php echo(isset($data->loan_offers[$i]->loanTerm) ? $data->loan_offers[$i]->loanTerm : ''); ?></td>
40
+ <td><?php echo((isset($data->loan_offers[$i]->loanAPR) ? $data->loan_offers[$i]->loanAPR : '') . "%"); ?></td>
41
+ <td><?php echo((isset($data->loan_offers[$i]->loanRate) ? $data->loan_offers[$i]->loanRate."%": '-')); ?></td>
42
+ <?php if(isset($data->loan_offers[$i]->showSelectedOfferUrl)){
43
+ echo "<td><a href='".$data->loan_offers[$i]->showSelectedOfferUrl."' target='_blank'>More Details</a></td>";
44
+ }?>
45
+ </tr>
46
+ <?php }
47
+ ?>
48
+ </tbody>
49
+ </table>
50
+ </div>
51
+ <?php } else { ?>
52
+ <p>No loan offers available.<p>
53
+ <?php }
54
+ } else {
55
+ ?>
56
+ <p>We are sorry to inform you that your loan application cannot be processed further.<p>
57
+ <?php } ?>
58
+
59
+ </div>
60
+ <div class="modal-footer">
61
+ <?php
62
+ if (isset($data->application_status) && $data->application_status == "ACCEPTED") {
63
+ if (isset($data->loan_offers) && is_array($data->loan_offers) && !empty($data->loan_offers) && count($data->loan_offers)) {
64
+ ?>
65
+ <a href="javascript:void(0);" class="btn btn-default clx_loan_offer_back">Back</a>
66
+ <a href="javascript:void(0);" class="btn btn-success clx_loan_offer_accept">Accept</a>
67
+ <a href="javascript:void(0);" class="btn btn-primary clx_loan_application_submit_btn">Create Loan Application</a>
68
+ <?php } else { ?>
69
+ <a href="javascript:void(0);" class="btn btn-default clx_loan_offer_back">Close</a>
70
+ <?php }
71
+ } else {
72
+ ?>
73
+ <a href="javascript:void(0);" class="btn btn-default clx_funding_return">Close</a>
74
+ <?php } ?>
75
+ </div>
76
+ </div>
77
+
78
+ </div>
79
+ </div>
app/design/frontend/base/default/template/clxfunding/form/loan_offer_response.phtml~ ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $data = $this->getLoanOffers();
2
+ $loanpurpose = $this->getLoanPurpose(); ?>
3
+ <div id="loanApplicationForm" class="modal fade" role="dialog">
4
+ <div class="modal-dialog">
5
+ <!-- Modal content-->
6
+ <div class="modal-content">
7
+ <div class="modal-header">
8
+ <?php if (isset($data->application_status) && $data->application_status == "ACCEPTED" && isset($data->loan_offers) && is_array($data->loan_offers) && !empty($data->loan_offers) && count($data->loan_offers) && isset($loanpurpose) && !empty($loanpurpose)) { ?>
9
+ <center><h4 class="modal-title">Your Pre-Approved Loan Offers</h4></center>
10
+ <?php } else { ?>
11
+ <center><h4 class="modal-title">Application Response</h4></center>
12
+ <?php } ?>
13
+ </div>
14
+ <div class="modal-body">
15
+ <?php
16
+ if (isset($data->application_status) && $data->application_status == "ACCEPTED" && isset($loanpurpose) && !empty($loanpurpose)) {
17
+ if (isset($data->loan_offers) && is_array($data->loan_offers) && !empty($data->loan_offers) && count($data->loan_offers)) {
18
+ ?>
19
+ <div class="table-responsive">
20
+ <table class="table table-hover">
21
+ <caption style="text-align: center"><h5><?php echo($loanpurpose); ?></h5></caption>
22
+ <thead>
23
+ <tr>
24
+ <th>#</th>
25
+ <th>Monthly Payment($)</th>
26
+ <th>Term(Years)</th>
27
+ <th>APR(%)</th>
28
+ <th>Interest Rate(%)</th>
29
+ <th>More Details</th>
30
+ </tr>
31
+ </thead>
32
+ <tbody>
33
+ <?php
34
+ for ($i = 0; $i < count($data->loan_offers); $i++) {
35
+ ?>
36
+ <tr>
37
+ <td><input type="radio" name="clx_loan_offer_select" data-downPayment="<?php echo(isset($data->loan_offers[$i]->downPayment) ? $data->loan_offers[$i]->downPayment : ''); ?>" data-paymentFrequency="<?php echo(isset($data->loan_offers[$i]->paymentFrequency) ? $data->loan_offers[$i]->paymentFrequency : ''); ?>" data-offerId="<?php echo(isset($data->loan_offers[$i]->id) ? $data->loan_offers[$i]->id : ''); ?>" data-lenderName="<?php echo(isset($data->loan_offers[$i]->lenderName) ? $data->loan_offers[$i]->lenderName : ''); ?>" data-showSelectedOfferUrl="<?php echo(isset($data->loan_offers[$i]->showSelectedOfferUrl) ? $data->loan_offers[$i]->showSelectedOfferUrl : 'javascript:void(0)'); ?>" data-loanRate="<?php echo(isset($data->loan_offers[$i]->loanRate) ? $data->loan_offers[$i]->loanRate * 100 : ''); ?>" data-loanAPR="<?php echo(isset($data->loan_offers[$i]->loanAPR) ? $data->loan_offers[$i]->loanAPR * 100 : ''); ?>" data-loanTerm="<?php echo(isset($data->loan_offers[$i]->loanTerm) ? $data->loan_offers[$i]->loanTerm : ''); ?>" data-paymentAmount="<?php echo(isset($data->loan_offers[$i]->paymentAmount) ? $data->loan_offers[$i]->paymentAmount : ''); ?>" class="clx_loan_offer_select" <?php echo((isset($i) && $i == 0) ? "checked='checked'" : ""); ?> value="<?php echo($data->loan_offers[$i]->id); ?>"/></td>
38
+ <td><?php echo('$' . (isset($data->loan_offers[$i]->paymentAmount) ? $data->loan_offers[$i]->paymentAmount : '')); ?></td>
39
+ <td><?php echo(isset($data->loan_offers[$i]->loanTerm) ? $data->loan_offers[$i]->loanTerm : ''); ?></td>
40
+ <td><?php echo((isset($data->loan_offers[$i]->loanAPR) ? $data->loan_offers[$i]->loanAPR * 100 : '') . "%"); ?></td>
41
+ <td><?php echo((isset($data->loan_offers[$i]->loanRate) ? $data->loan_offers[$i]->loanRate * 100 : '') . "%"); ?></td>
42
+ <td><a href="<?php echo(isset($data->loan_offers[$i]->showSelectedOfferUrl) ? $data->loan_offers[$i]->showSelectedOfferUrl : 'javascript:void(0)'); ?>" target="_blank">More Details</a></td>
43
+ </tr>
44
+ <?php }
45
+ ?>
46
+ </tbody>
47
+ </table>
48
+ </div>
49
+ <?php } else { ?>
50
+ <p>No loan offers available.<p>
51
+ <?php }
52
+ } else { ?>
53
+ <p>We are sorry to inform you that your loan application cannot be processed further.<p>
54
+ <?php } ?>
55
+
56
+ </div>
57
+ <div class="modal-footer">
58
+ <?php
59
+ if (isset($data->application_status) && $data->application_status == "ACCEPTED" && isset($loanpurpose) && !empty($loanpurpose)) {
60
+ if (isset($data->loan_offers) && is_array($data->loan_offers) && !empty($data->loan_offers) && count($data->loan_offers)) {
61
+ ?>
62
+ <a href="javascript:void(0);" class="btn btn-default clx_loan_offer_back">Back</a>
63
+ <a href="javascript:void(0);" class="btn btn-success clx_loan_offer_accept">Accept</a>
64
+ <a href="javascript:void(0);" class="btn btn-primary clx_loan_application_submit_btn">Create Loan Application</a>
65
+ <?php } else { ?>
66
+ <a href="javascript:void(0);" class="btn btn-default clx_loan_offer_back">Close</a>
67
+ <?php }
68
+ } else { ?>
69
+ <a href="javascript:void(0);" class="btn btn-default clx_funding_return">Close</a>
70
+ <?php } ?>
71
+ </div>
72
+ </div>
73
+
74
+ </div>
75
+ </div>
app/design/frontend/base/default/template/clxfunding/form/loanapplicationstatus.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="loanApplicationStatus" class="modal fade" role="dialog">
2
+ <div class="modal-dialog">
3
+
4
+ <!-- Modal content-->
5
+ <div class="modal-content">
6
+ <div class="modal-header">
7
+ <center><h4 class="modal-title">Loan Application Status</h4></center>
8
+ </div>
9
+ <div class="modal-body">
10
+ <div>
11
+ <?php
12
+ $data = $this->getLoanApplication();
13
+ $ApprovalRequired = $this->getApprovalRequired();
14
+ if (isset($data->application_status)) {
15
+ if ($data->application_status == 'ACCEPTED') {
16
+ if(isset($ApprovalRequired) && $ApprovalRequired){
17
+ echo "<p>Thank you for purchasing the product using the 'Online Loan' payment option. You will receive a mail notification detailing about the loan offer within the next 1 hours.</p>";
18
+ }
19
+ else{
20
+ echo "<p>Your application has been preliminarily approved and it will be processed within 24 hours.</p>";
21
+ }
22
+ }
23
+ if ($data->application_status == 'REJECTED') {
24
+ ?>
25
+ <p>We are sorry to inform you that your loan application cannot be processed further.</p>
26
+ <?php }
27
+ } else {
28
+ ?>
29
+ <p>We are sorry to inform you that your loan application cannot be processed further.</p>
30
+ <?php } ?>
31
+ </div>
32
+ </div>
33
+ <div class="modal-footer">
34
+ <?php if (isset($data->application_status) && $data->application_status == 'ACCEPTED') {
35
+ ?>
36
+ <a href="javascript:void(0);" class="btn btn-success clx_funding_continue" data-dismiss="modal">Continue</a>
37
+ <?php } else {
38
+ ?>
39
+ <a href="javascript:void(0);" class="btn btn-primary clx_funding_return" data-dismiss="modal">Ok</a>
40
+ <?php } ?>
41
+ </div>
42
+ </div>
43
+
44
+ </div>
45
+ </div>
app/design/frontend/base/default/template/clxfunding/form/modal_clxfunding.phtml ADDED
@@ -0,0 +1,409 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $customer_data = $this->getCustomerDetails();$street = $this->getStreetAddress();?>
2
+ <div id="loading_div"></div>
3
+ <div id="clxLoanApplicationModal" class="modal fade" role="dialog">
4
+ <div class="modal-dialog">
5
+ <input type="hidden" id="loan_application_redirect_url" value="<?php echo Mage::getBaseUrl() . 'clxfunding/ClxAPI/loanAppProcessing'; ?>"/>
6
+ <!--Modal content-->
7
+ <div class="modal-content">
8
+ <div class="modal-header">
9
+ <a href="javascript:void(0);" class="btn btn-default clx_modal_form_css clx_modal_form_close clx_modal_close" data-dismiss="modal">x</a>
10
+ <center><h5 class="modal-title">CLEXCHANGE LOAN APPLICATION</h5></center>
11
+ </div>
12
+ <div class="modal-body">
13
+ <div class="fieldset">
14
+ <ul class="nav nav-tabs">
15
+ <li class="active"><a data-toggle="tab" style="display:block !important;" href="#home">Personal Information</a></li>
16
+ <li class="disabled"><a href="#menu2">Bank Details & SSN</a></li>
17
+ <li class="disabled"><a href="#menu3">Confirmation & Submit</a></li>
18
+ </ul>
19
+ <ul id="clx-loanform" class="form-list tab-content">
20
+ <p class="required">* Required Fields</p><br/>
21
+ <div id="home" class="tab-pane fade in active">
22
+ <form action="javascript:void(0)" id="personal_information_form1" role="form" autocomplete="off">
23
+ <input type="hidden" id="clx_btn_flag" name="clx_btn_flag" value=""/>
24
+ <li>
25
+ <div class="row">
26
+ <div class="col-md-6">
27
+ <label for="firstName" class="required"><em>*</em>First Name:</label>
28
+ <div class="input-box custom_width">
29
+ <input type="text" autocapitalize="on" autocorrect="off" spellcheck="false" class="input-text required-entry validate-no-html-tags validate-alpha-spac" id="firstName" name="firstName" value="<?php echo(isset($customer_data['firstname'])?$customer_data['firstname']:'');?>">
30
+ </div>
31
+ </div>
32
+ <div class="col-md-6">
33
+ <label for="lastName" class="required"><em>*</em>Last Name:</label>
34
+ <div class="input-box custom_width">
35
+ <input type="text" autocapitalize="on" autocorrect="off" spellcheck="false" class="input-text required-entry validate-no-html-tags validate-alpha-spac" id="lastName" name="lastName" value="<?php echo(isset($customer_data['lastname'])?$customer_data['lastname']:'');?>">
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </li>
40
+ <li>
41
+ <div class="row">
42
+ <div class="col-md-6">
43
+ <label for="emailId" class="required"><em>*</em>Email Address:</label>
44
+ <div class="input-box custom_width">
45
+ <input type="email" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-email validate-no-html-tags" id="emailId" name="emailId" value="<?php echo(isset($customer_data['email'])?$customer_data['email']:'');?>">
46
+ </div>
47
+ </div>
48
+ <div class="col-md-6">
49
+ <label for="birthDate" class="required"><em>*</em>Date of birth:</label>
50
+ <div class="input-box custom_width">
51
+ <input type="text" autocorrect="off" spellcheck="false" class="input-text required-entry validate-date validate-no-html-tags custom-dob" id="birthDate" name="birthDate" readonly="readonly" value="">
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </li>
56
+ <li>
57
+ <div class="row">
58
+ <div class="col-md-6">
59
+ <label for="street" class="required"><em>*</em>Street:</label>
60
+ <div class="input-box custom_width">
61
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-no-html-tags" id="street" name="street" value="<?php echo(isset($street)?$street:'');?>">
62
+ </div>
63
+ </div>
64
+ <div class="col-md-6">
65
+ <label for="mobilePhoneAreaCode" class="required"><em>*</em>Mobile phone area code:</label>
66
+ <div class="input-box custom_width">
67
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-length maximum-length-3 validate-no-html-tags" id="mobilePhoneAreaCode" name="mobilePhoneAreaCode" value="">
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </li>
72
+ <li>
73
+ <div class="row">
74
+ <div class="col-md-6">
75
+ <label for="mobileNumber" class="required"><em>*</em>Mobile number:</label>
76
+ <div class="input-box custom_width">
77
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-number validate-length validate-no-html-tags maximum-length-10" id="mobileNumber" name="mobileNumber" value="<?php echo(isset($customer_data['telephone'])?$customer_data['telephone']:'');?>">
78
+ </div>
79
+ </div>
80
+ <div class="col-md-6">
81
+ <label for="city" class="required"><em>*</em>City:</label>
82
+ <div class="input-box custom_width">
83
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-alpha-spac validate-no-html-tags" id="city" name="city" value="<?php echo(isset($customer_data['city'])?$customer_data['city']:'');?>">
84
+ </div>
85
+ </div>
86
+ </div>
87
+ </li>
88
+ <li>
89
+ <div class="row">
90
+ <div class="col-md-6">
91
+ <label for="state" class="required"><em>*</em>State:</label>
92
+ <div class="input-box custom_width">
93
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-alpha-spac validate-no-html-tags" id="state" name="state" value="<?php echo(isset($customer_data['region'])?$customer_data['region']:'');?>">
94
+ </div>
95
+ <?php /*
96
+ <div class="input-box custom_width">
97
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="state" name="state">
98
+ <option value="">Please select state</option>
99
+ <option value="Alabama">Alabama</option>
100
+ <option value="Alaska">Alaska</option>
101
+ <option value="Arizona">Arizona</option>
102
+ <option value="Arkansas">Arkansas</option>
103
+ <option value="California">California</option>
104
+ <option value="Colorado">Colorado</option>
105
+ <option value="Connecticut">Connecticut</option>
106
+ <option value="Delaware">Delaware</option>
107
+ <option value="District Of Columbia">District Of Columbia</option>
108
+ <option value="Florida">Florida</option>
109
+ <option value="Georgia">Georgia</option>
110
+ <option value="Hawaii">Hawaii</option>
111
+ <option value="Idaho">Idaho</option>
112
+ <option value="Illinois">Illinois</option>
113
+ <option value="Indiana">Indiana</option>
114
+ <option value="Iowa">Iowa</option>
115
+ <option value="Kansas">Kansas</option>
116
+ <option value="Kentucky">Kentucky</option>
117
+ <option value="Louisiana">Louisiana</option>
118
+ <option value="Maine">Maine</option>
119
+ <option value="Maryland">Maryland</option>
120
+ <option value="Massachusetts">Massachusetts</option>
121
+ <option value="Michigan">Michigan</option>
122
+ <option value="Minnesota">Minnesota</option>
123
+ <option value="Mississippi">Mississippi</option>
124
+ <option value="Missouri">Missouri</option>
125
+ <option value="Montana">Montana</option>
126
+ <option value="Nebraska">Nebraska</option>
127
+ <option value="Nevada">Nevada</option>
128
+ <option value="New Hampshire">New Hampshire</option>
129
+ <option value="New Jersey">New Jersey</option>
130
+ <option value="New Mexico">New Mexico</option>
131
+ <option value="New York">New York</option>
132
+ <option value="North Carolina">North Carolina</option>
133
+ <option value="North Dakota">North Dakota</option>
134
+ <option value="Ohio">Ohio</option>
135
+ <option value="Oklahoma">Oklahoma</option>
136
+ <option value="Oregon">Oregon</option>
137
+ <option value="Pennsylvania">Pennsylvania</option>
138
+ <option value="Rhode Island">Rhode Island</option>
139
+ <option value="South Carolina">South Carolina</option>
140
+ <option value="South Dakota">South Dakota</option>
141
+ <option value="Tennessee">Tennessee</option>
142
+ <option value="Texas">Texas</option>
143
+ <option value="Utah">Utah</option>
144
+ <option value="Vermont">Vermont</option>
145
+ <option value="Virginia">Virginia</option>
146
+ <option value="Washington">Washington</option>
147
+ <option value="West Virginia">West Virginia</option>
148
+ <option value="Wisconsin">Wisconsin</option>
149
+ <option value="Wyoming">Wyoming</option>
150
+ <option value="American Samoa">American Samoa</option>
151
+ <option value="Guam">Guam</option>
152
+ <option value="Northern Mariana Islands">Northern Mariana Islands</option>
153
+ <option value="Puerto Rico">Puerto Rico</option>
154
+ <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
155
+ <option value="Virgin Islands">Virgin Islands</option>
156
+ </select>
157
+ </div>
158
+ */ ?>
159
+ </div>
160
+ <div class="col-md-6">
161
+ <label for="zipcode" class="required"><em>*</em>Zipcode:</label>
162
+ <div class="input-box custom_width">
163
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-zip validate-length maximum-length-10" id="zipcode" name="zipcode" value="<?php echo(isset($customer_data['postcode'])?$customer_data['postcode']:'');?>">
164
+ </div>
165
+ </div>
166
+ </div>
167
+ </li>
168
+ <li>
169
+ <div class="row">
170
+ <div class="col-md-6">
171
+ <label for="country" class="required"><em>*</em>Country:</label>
172
+ <div class="input-box custom_width">
173
+ <?php if(isset($customer_data['country_id'])){$countryName = Mage::getModel('directory/country')->load($customer_data['country_id'])->getName();}?>
174
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-alpha-spac" id="country" name="country" value="<?php echo(isset($countryName)?$countryName:'');?>">
175
+ </div>
176
+ </div>
177
+ <div class="col-md-6">
178
+ <label for="yearlyIncome" class="required"><em>*</em>Yearly Income(<?php echo(Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol()); ?>):</label>
179
+ <div class="input-box custom_width">
180
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-number" id="yearlyIncome" name="yearlyIncome" value="">
181
+ </div>
182
+ </div>
183
+ </div>
184
+ </li>
185
+ <li>
186
+ <div class="row">
187
+ <div class="col-md-6">
188
+ <label for="employmentStatus" class="required"><em>*</em>Employment status:</label>
189
+ <div class="input-box custom_width">
190
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="employmentStatus" name="employmentStatus">
191
+ <option value="">Please select employment status</option>
192
+ <option value="Self Employed">Self Employed</option>
193
+ <option value="Not Employed">Not Employed</option>
194
+ <option value="Other">Other</option>
195
+ <option value="Employed">Employed</option>
196
+ </select>
197
+ </div>
198
+ </div>
199
+ <div class="col-md-6">
200
+ <label for="occupation" class="required"><em>*</em>Occupation:</label>
201
+ <div class="input-box custom_width">
202
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="occupation" name="occupation">
203
+ <option value="">Please select occupation</option>
204
+ <option value="Accountant/CPA">Accountant/CPA</option>
205
+ <option value="Analyst">Analyst</option>
206
+ <option value="Architect">Architect</option>
207
+ <option value="Attorney">Attorney</option>
208
+ <option value="Biologist">Biologist</option>
209
+ <option value="Bus Driver">Bus Driver</option>
210
+ <option value="Car Dealer">Car Dealer</option>
211
+ <option value="Chemist">Chemist</option>
212
+ <option value="Civil Service">Civil Service</option>
213
+ <option value="Clergy">Clergy</option>
214
+ <option value="Clerical">Clerical</option>
215
+ <option value="Computer Programmer">Computer Programmer</option>
216
+ <option value="Construction">Construction</option>
217
+ <option value="Dentist">Dentist</option>
218
+ <option value="Doctor">Doctor</option>
219
+ <option value="Engineer- Chemical">Engineer- Chemical</option>
220
+ <option value="Engineer- Electrical">Engineer- Electrical</option>
221
+ <option value="Engineer- Mechanical">Engineer- Mechanical</option>
222
+ <option value="Executive">Executive</option>
223
+ <option value="Fireman">Fireman</option>
224
+ <option value="Flight Attendant">Flight Attendant</option>
225
+ <option value="Food Service">Food Service</option>
226
+ <option value="Food Service Management">Food Service Management</option>
227
+ <option value="Homemaker">Homemaker</option>
228
+ <option value="Judge">Judge</option>
229
+ <option value="Laborer">Laborer</option>
230
+ <option value="Landscaping">Landscaping</option>
231
+ <option value="Medical Technician">Medical Technician</option>
232
+ <option value="Military Enlisted">Military Enlisted</option>
233
+ <option value="Military Officer">Military Officer</option>
234
+ <option value="Nurse (LPN)">Nurse (LPN)</option>
235
+ <option value="Nurse (RN)">Nurse (RN)</option>
236
+ <option value="Nurse's Aide">Nurse's Aide</option>
237
+ <option value="Pharmacist">Pharmacist</option>
238
+ <option value="Pilot- Private/Commercial">Pilot- Private/Commercial</option>
239
+ <option value="Police- Officer/Correction officer">Police- Officer/Correction officer</option>
240
+ <option value="Postal Service">Postal Service</option>
241
+ <option value="Principal">Principal</option>
242
+ <option value="Professional">Professional</option>
243
+ <option value="Professor">Professor</option>
244
+ <option value="Psychologist">Psychologist</option>
245
+ <option value="Realtor">Realtor</option>
246
+ <option value="Religious">Religious</option>
247
+ <option value="Retail Management">Retail Management</option>
248
+ <option value="Sales- Commission">Sales- Commission</option>
249
+ <option value="Sales- Retails">Sales- Retails</option>
250
+ <option value="Scientist">Scientist</option>
251
+ <option value="Administrative Assistant">Administrative Assistant</option>
252
+ <option value="Skilled Labor">Skilled Labor</option>
253
+ <option value="Social Worker">Social Worker</option>
254
+ <option value="Student">Student</option>
255
+ <option value="Teacher">Teacher</option>
256
+ <option value="Teacher's Aide">Teacher's Aide</option>
257
+ <option value="Tradesman- Carpenter">Tradesman- Carpenter</option>
258
+ <option value="Tradesman- Electrician">Tradesman- Electrician</option>
259
+ <option value="Tradesman- Mechanic">Tradesman- Mechanic</option>
260
+ <option value="Tradesman- Plumber">Tradesman- Plumber</option>
261
+ <option value="Truck Driver">Truck Driver</option>
262
+ <option value="Waiter/Waitress">Waiter/Waitress</option>
263
+ <option value="Other">Other</option>
264
+ <option value="Investor">Investor</option>
265
+ </select>
266
+ </div>
267
+ </div>
268
+ </div>
269
+ </li>
270
+ <li>
271
+ <div class="row">
272
+ <div class="col-md-6">
273
+ <label for="employerName" class="required"><em>*</em>Employer name:</label>
274
+ <div class="input-box custom_width">
275
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-alpha-spac" id="employerName" name="employerName" value="">
276
+ </div>
277
+ </div>
278
+ <div class="col-md-6">
279
+ <label for="employmentStartDate" class="required"><em>*</em>Employment start date:</label>
280
+ <div class="input-box custom_width">
281
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-date" id="employmentStartDate" name="employmentStartDate" readonly="readonly" value="">
282
+ </div>
283
+ </div>
284
+ </div>
285
+ </li>
286
+ </form>
287
+ </div>
288
+ <div id="menu2" class="tab-pane fade">
289
+ <form action="javascript:void(0)" id="bankdetails_and_ssn_form2" role="form" autocomplete="off">
290
+ <li>
291
+ <label for="selfReportedCreditScore" class="required"><em>*</em>Self reported credit score:</label>
292
+ <div class="input-box">
293
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="selfReportedCreditScore" name="selfReportedCreditScore">
294
+ <option value="">Please select self Reported Credit score</option>
295
+ <option value="1">Excellent Credit (760+)</option>
296
+ <option value="2">Good Credit (700+) </option>
297
+ <option value="3">Fair Credit (640+) </option>
298
+ <option value="4">Poor Credit</option>
299
+ </select>
300
+ </div>
301
+ </li>
302
+ <li>
303
+ <label for="bankName" class="required"><em>*</em>Bank name:</label>
304
+ <div class="input-box">
305
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-length maximum-length-255" id="bankName" name="bankName" value="">
306
+ </div>
307
+ </li>
308
+ <li>
309
+ <label for="firstAccountHolderName" class="required"><em>*</em>First account holder name:</label>
310
+ <div class="input-box">
311
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-alpha-spac validate-length maximum-length-255" id="firstAccountHolderName" name="firstAccountHolderName" value="">
312
+ </div>
313
+ </li>
314
+ <li>
315
+ <label for="bankAccountType" class="required"><em>*</em>Bank account type:</label>
316
+ <div class="input-box">
317
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="bankAccountType" name="bankAccountType">
318
+ <option value="">Please select bank account type</option>
319
+ <option value="Savings">Savings</option>
320
+ <option value="Checking">Checking</option>
321
+ <option value="Credit">Credit</option>
322
+ </select>
323
+ </div>
324
+ </li>
325
+ <li>
326
+ <label for="bankAccountNumber" class="required"><em>*</em>Bank account number:</label>
327
+ <div class="input-box">
328
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-number validate-length maximum-length-30" id="bankAccountNumber" name="bankAccountNumber" value="">
329
+ </div>
330
+ </li>
331
+ <li>
332
+ <label for="routingNumber" class="required"><em>*</em>Routing number:</label>
333
+ <div class="input-box">
334
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-length maximum-length-255" id="routingNumber" name="routingNumber" value="">
335
+ </div>
336
+ </li>
337
+ <li>
338
+ <label for="ssn" class="required"><em>*</em>Social Security Number:</label>
339
+ <div class="input-box">
340
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text custom-ssn required-entry validate-number" id="ssn" name="ssn" value="">
341
+ </div>
342
+ </li>
343
+ </form>
344
+ </div>
345
+ <div id="menu3" class="tab-pane fade">
346
+ <form action="javascript:void(0)" id="confirmation_and_submit_form3" role="form" autocomplete="off">
347
+ <li>
348
+ <label for="loanAmount" class="required"><em>*</em>Loan amount:(<?php echo(Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol()); ?>)</label>
349
+ <div class="input-box">
350
+ <?php $grand_total = $this->getLoanAmmount(); ?>
351
+ <input type="text" autocapitalize="off" readonly="readonly" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-number" id="loanAmount" name="loanAmount" value="<?php echo(isset($grand_total) ? $grand_total : ''); ?>">
352
+ </div>
353
+ </li>
354
+ <?php
355
+ echo "<input type='hidden' name='loanPurpose' value='Other'/>";
356
+ /*
357
+ <li>
358
+ <label for="loanPurpose" class="required"><em>*</em>Loan purpose:</label>
359
+ <div class="input-box">
360
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="loanPurpose" name="loanPurpose">
361
+ <option value="">Please select loan purpose</option>
362
+ <option value="Debt consolidation">Debt consolidation</option>
363
+ <option value="Home improvement">Home improvement</option>
364
+ <option value="Business">Business</option>
365
+ <option value="Auto">Auto</option>
366
+ <option value="Other">Other</option>
367
+ <option value="Baby & adoption loans">Baby & adoption loans</option>
368
+ <option value="Boat">Boat</option>
369
+ <option value="Cosmetic procedures">Cosmetic procedures</option>
370
+ <option value="Green loans">Green loans</option>
371
+ <option value="Household expenses">Household expenses</option>
372
+ <option value="Large purchases">Large purchases</option>
373
+ <option value="Medical/Dental">Medical/Dental</option>
374
+ <option value="Motorcycle">Motorcycle</option>
375
+ <option value="RV">RV</option>
376
+ <option value="Taxes">Taxes</option>
377
+ <option value="Vacation">Vacation</option>
378
+ <option value="Special Occasion">Special Occasion</option>
379
+ </select>
380
+ </div>
381
+ </li>
382
+ */ ?>
383
+ <li>
384
+ <label for="loanTerms" class="required"><em>*</em>Loan terms (In months):</label>
385
+ <div class="input-box">
386
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-digits" id="loanTerms" name="loanTerms" value="">
387
+ </div>
388
+ </li>
389
+ </form>
390
+ </div>
391
+ </ul>
392
+ </div>
393
+ </div>
394
+ <div class="modal-footer">
395
+ <a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="1">Next</a>
396
+ </div>
397
+ </div>
398
+ <!--</form>-->
399
+ </div>
400
+ </div>
401
+ <script type="text/javascript">
402
+ jQuery(document).ready(function () {
403
+ Validation.add('validate-alpha-spac', 'Allowed only alphabets', function (v) {
404
+ return Validation.get('IsEmpty').test(v) || /^[a-zA-Z ]+$/.test(v)
405
+ });
406
+ });
407
+ </script>
408
+
409
+
app/design/frontend/base/default/template/clxfunding/form/modal_clxfunding.phtml~ ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="loading_div"></div>
2
+ <div id="clxLoanApplicationModal" class="modal fade" role="dialog">
3
+ <div class="modal-dialog">
4
+ <input type="hidden" id="loan_application_redirect_url" value="<?php echo Mage::getBaseUrl() . 'clxfunding/ClxAPI/loanAppProcessing'; ?>"/>
5
+ <!--Modal content-->
6
+ <div class="modal-content">
7
+ <div class="modal-header">
8
+ <a href="javascript:void(0);" class="btn btn-default clx_modal_form_css clx_modal_form_close clx_modal_close" data-dismiss="modal">x</a>
9
+ <center><h5 class="modal-title">CLEXCHANGE LOAN APPLICATION</h5></center>
10
+ </div>
11
+ <div class="modal-body">
12
+ <div class="fieldset">
13
+ <ul class="nav nav-tabs">
14
+ <li class="active"><a data-toggle="tab" style="display:block !important;" href="#home">Personal Information</a></li>
15
+ <li class="disabled"><a href="#menu2">Bank Details & SSN</a></li>
16
+ <li class="disabled"><a href="#menu3">Confirmation & Submit</a></li>
17
+ </ul>
18
+ <ul id="clx-loanform" class="form-list tab-content">
19
+ <p class="required">* Required Fields</p><br/>
20
+ <div id="home" class="tab-pane fade in active">
21
+ <form action="javascript:void(0)" id="personal_information_form1" role="form">
22
+ <input type="hidden" id="clx_btn_flag" name="clx_btn_flag" value=""/>
23
+ <li>
24
+ <div class="row">
25
+ <div class="col-md-6">
26
+ <label for="login-email" class="required"><em>*</em>First Name:</label>
27
+ <div class="input-box custom_width">
28
+ <input type="text" autocapitalize="on" autocorrect="off" spellcheck="false" class="input-text required-entry validate-no-html-tags validate-alpha-spac" id="firstName" name="firstName" value="">
29
+ </div>
30
+ </div>
31
+ <div class="col-md-6">
32
+ <label for="login-email" class="required"><em>*</em>Last Name:</label>
33
+ <div class="input-box custom_width">
34
+ <input type="text" autocapitalize="on" autocorrect="off" spellcheck="false" class="input-text required-entry validate-no-html-tags validate-alpha-spac" id="lastName" name="lastName" value="">
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </li>
39
+ <li>
40
+ <div class="row">
41
+ <div class="col-md-6">
42
+ <label for="login-email" class="required"><em>*</em>Email Address:</label>
43
+ <div class="input-box custom_width">
44
+ <input type="email" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-email validate-no-html-tags" id="emailId" name="emailId" value="">
45
+ </div>
46
+ </div>
47
+ <div class="col-md-6">
48
+ <label for="login-email" class="required"><em>*</em>Date of birth:</label>
49
+ <div class="input-box custom_width">
50
+ <input type="text" autocorrect="off" spellcheck="false" class="input-text required-entry validate-date validate-no-html-tags" id="birthDate" name="birthDate" value="">
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </li>
55
+ <li>
56
+ <div class="row">
57
+ <div class="col-md-6">
58
+ <label for="login-email" class="required"><em>*</em>Street:</label>
59
+ <div class="input-box custom_width">
60
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-street validate-no-html-tags" id="street" name="street" value="">
61
+ </div>
62
+ </div>
63
+ <div class="col-md-6">
64
+ <label for="login-email" class="required"><em>*</em>Mobile phone area code:</label>
65
+ <div class="input-box custom_width">
66
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-length maximum-length-3 minimum-length-3 validate-no-html-tags" id="mobilePhoneAreaCode" name="mobilePhoneAreaCode" value="">
67
+ </div>
68
+ </div>
69
+ </div>
70
+ </li>
71
+ <li>
72
+ <div class="row">
73
+ <div class="col-md-6">
74
+ <label for="login-email" class="required"><em>*</em>Mobile number:</label>
75
+ <div class="input-box custom_width">
76
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-number validate-length maximum-length-10 validate-no-html-tags" id="mobileNumber" name="mobileNumber" value="">
77
+ </div>
78
+ </div>
79
+ <div class="col-md-6">
80
+ <label for="login-email" class="required"><em>*</em>City:</label>
81
+ <div class="input-box custom_width">
82
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-alpha-spac validate-no-html-tags" id="city" name="city" value="">
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </li>
87
+ <li>
88
+ <div class="row">
89
+ <div class="col-md-6">
90
+ <label for="login-email" class="required"><em>*</em>State:</label>
91
+ <div class="input-box custom_width">
92
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="state" name="state">
93
+ <option value="">Please select state</option>
94
+ <option value="Alabama">Alabama</option>
95
+ <option value="Alaska">Alaska</option>
96
+ <option value="Arizona">Arizona</option>
97
+ <option value="Arkansas">Arkansas</option>
98
+ <option value="California">California</option>
99
+ <option value="Colorado">Colorado</option>
100
+ <option value="Connecticut">Connecticut</option>
101
+ <option value="Delaware">Delaware</option>
102
+ <option value="District Of Columbia">District Of Columbia</option>
103
+ <option value="Florida">Florida</option>
104
+ <option value="Georgia">Georgia</option>
105
+ <option value="Hawaii">Hawaii</option>
106
+ <option value="Idaho">Idaho</option>
107
+ <option value="Illinois">Illinois</option>
108
+ <option value="Indiana">Indiana</option>
109
+ <option value="Iowa">Iowa</option>
110
+ <option value="Kansas">Kansas</option>
111
+ <option value="Kentucky">Kentucky</option>
112
+ <option value="Louisiana">Louisiana</option>
113
+ <option value="Maine">Maine</option>
114
+ <option value="Maryland">Maryland</option>
115
+ <option value="Massachusetts">Massachusetts</option>
116
+ <option value="Michigan">Michigan</option>
117
+ <option value="Minnesota">Minnesota</option>
118
+ <option value="Mississippi">Mississippi</option>
119
+ <option value="Missouri">Missouri</option>
120
+ <option value="Montana">Montana</option>
121
+ <option value="Nebraska">Nebraska</option>
122
+ <option value="Nevada">Nevada</option>
123
+ <option value="New Hampshire">New Hampshire</option>
124
+ <option value="New Jersey">New Jersey</option>
125
+ <option value="New Mexico">New Mexico</option>
126
+ <option value="New York">New York</option>
127
+ <option value="North Carolina">North Carolina</option>
128
+ <option value="North Dakota">North Dakota</option>
129
+ <option value="Ohio">Ohio</option>
130
+ <option value="Oklahoma">Oklahoma</option>
131
+ <option value="Oregon">Oregon</option>
132
+ <option value="Pennsylvania">Pennsylvania</option>
133
+ <option value="Rhode Island">Rhode Island</option>
134
+ <option value="South Carolina">South Carolina</option>
135
+ <option value="South Dakota">South Dakota</option>
136
+ <option value="Tennessee">Tennessee</option>
137
+ <option value="Texas">Texas</option>
138
+ <option value="Utah">Utah</option>
139
+ <option value="Vermont">Vermont</option>
140
+ <option value="Virginia">Virginia</option>
141
+ <option value="Washington">Washington</option>
142
+ <option value="West Virginia">West Virginia</option>
143
+ <option value="Wisconsin">Wisconsin</option>
144
+ <option value="Wyoming">Wyoming</option>
145
+ <option value="American Samoa">American Samoa</option>
146
+ <option value="Guam">Guam</option>
147
+ <option value="Northern Mariana Islands">Northern Mariana Islands</option>
148
+ <option value="Puerto Rico">Puerto Rico</option>
149
+ <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
150
+ <option value="Virgin Islands">Virgin Islands</option>
151
+ </select>
152
+ </div>
153
+ </div>
154
+ <div class="col-md-6">
155
+ <label for="login-email" class="required"><em>*</em>Zipcode:</label>
156
+ <div class="input-box custom_width">
157
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-zip validate-length maximum-length-10" id="zipcode" name="zipcode" value="">
158
+ </div>
159
+ </div>
160
+ </div>
161
+ </li>
162
+ <li>
163
+ <div class="row">
164
+ <div class="col-md-6">
165
+ <label for="login-email" class="required"><em>*</em>Country:</label>
166
+ <div class="input-box custom_width">
167
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-alpha-spac" id="country" name="country" value="">
168
+ </div>
169
+ </div>
170
+ <div class="col-md-6">
171
+ <label for="login-email" class="required"><em>*</em>Yearly Income(<?php echo(Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol()); ?>):</label>
172
+ <div class="input-box custom_width">
173
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-number" id="yearlyIncome" name="yearlyIncome" value="">
174
+ </div>
175
+ </div>
176
+ </div>
177
+ </li>
178
+ <li>
179
+ <div class="row">
180
+ <div class="col-md-6">
181
+ <label for="login-email" class="required"><em>*</em>Employment status:</label>
182
+ <div class="input-box custom_width">
183
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="employmentStatus" name="employmentStatus">
184
+ <option value="">Please select employment status</option>
185
+ <option value="Self Employed">Self Employed</option>
186
+ <option value="Not Employed">Not Employed</option>
187
+ <option value="Other">Other</option>
188
+ <option value="Employed">Employed</option>
189
+ </select>
190
+ </div>
191
+ </div>
192
+ <div class="col-md-6">
193
+ <label for="login-email" class="required"><em>*</em>Occupation:</label>
194
+ <div class="input-box custom_width">
195
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="occupation" name="occupation">
196
+ <option value="">Please select occupation</option>
197
+ <option value="Accountant/CPA">Accountant/CPA</option>
198
+ <option value="Analyst">Analyst</option>
199
+ <option value="Architect">Architect</option>
200
+ <option value="Attorney">Attorney</option>
201
+ <option value="Biologist">Biologist</option>
202
+ <option value="Bus Driver">Bus Driver</option>
203
+ <option value="Car Dealer">Car Dealer</option>
204
+ <option value="Chemist">Chemist</option>
205
+ <option value="Civil Service">Civil Service</option>
206
+ <option value="Clergy">Clergy</option>
207
+ <option value="Clerical">Clerical</option>
208
+ <option value="Computer Programmer">Computer Programmer</option>
209
+ <option value="Construction">Construction</option>
210
+ <option value="Dentist">Dentist</option>
211
+ <option value="Doctor">Doctor</option>
212
+ <option value="Engineer- Chemical">Engineer- Chemical</option>
213
+ <option value="Engineer- Electrical">Engineer- Electrical</option>
214
+ <option value="Engineer- Mechanical">Engineer- Mechanical</option>
215
+ <option value="Executive">Executive</option>
216
+ <option value="Fireman">Fireman</option>
217
+ <option value="Flight Attendant">Flight Attendant</option>
218
+ <option value="Food Service">Food Service</option>
219
+ <option value="Food Service Management">Food Service Management</option>
220
+ <option value="Homemaker">Homemaker</option>
221
+ <option value="Judge">Judge</option>
222
+ <option value="Laborer">Laborer</option>
223
+ <option value="Landscaping">Landscaping</option>
224
+ <option value="Medical Technician">Medical Technician</option>
225
+ <option value="Military Enlisted">Military Enlisted</option>
226
+ <option value="Military Officer">Military Officer</option>
227
+ <option value="Nurse (LPN)">Nurse (LPN)</option>
228
+ <option value="Nurse (RN)">Nurse (RN)</option>
229
+ <option value="Nurse's Aide">Nurse's Aide</option>
230
+ <option value="Pharmacist">Pharmacist</option>
231
+ <option value="Pilot- Private/Commercial">Pilot- Private/Commercial</option>
232
+ <option value="Police- Officer/Correction officer">Police- Officer/Correction officer</option>
233
+ <option value="Postal Service">Postal Service</option>
234
+ <option value="Principal">Principal</option>
235
+ <option value="Professional">Professional</option>
236
+ <option value="Professor">Professor</option>
237
+ <option value="Psychologist">Psychologist</option>
238
+ <option value="Realtor">Realtor</option>
239
+ <option value="Religious">Religious</option>
240
+ <option value="Retail Management">Retail Management</option>
241
+ <option value="Sales- Commission">Sales- Commission</option>
242
+ <option value="Sales- Retails">Sales- Retails</option>
243
+ <option value="Scientist">Scientist</option>
244
+ <option value="Administrative Assistant">Administrative Assistant</option>
245
+ <option value="Skilled Labor">Skilled Labor</option>
246
+ <option value="Social Worker">Social Worker</option>
247
+ <option value="Student">Student</option>
248
+ <option value="Teacher">Teacher</option>
249
+ <option value="Teacher's Aide">Teacher's Aide</option>
250
+ <option value="Tradesman- Carpenter">Tradesman- Carpenter</option>
251
+ <option value="Tradesman- Electrician">Tradesman- Electrician</option>
252
+ <option value="Tradesman- Mechanic">Tradesman- Mechanic</option>
253
+ <option value="Tradesman- Plumber">Tradesman- Plumber</option>
254
+ <option value="Truck Driver">Truck Driver</option>
255
+ <option value="Waiter/Waitress">Waiter/Waitress</option>
256
+ <option value="Other">Other</option>
257
+ <option value="Investor">Investor</option>
258
+ </select>
259
+ </div>
260
+ </div>
261
+ </div>
262
+ </li>
263
+ <li>
264
+ <div class="row">
265
+ <div class="col-md-6">
266
+ <label for="login-email" class="required"><em>*</em>Employer name:</label>
267
+ <div class="input-box custom_width">
268
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-alpha-spac" id="employerName" name="employerName" value="">
269
+ </div>
270
+ </div>
271
+ <div class="col-md-6">
272
+ <label for="login-email" class="required"><em>*</em>Employment start date:</label>
273
+ <div class="input-box custom_width">
274
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-date" id="employmentStartDate" name="employmentStartDate" value="">
275
+ </div>
276
+ </div>
277
+ </div>
278
+ </li>
279
+ </form>
280
+ </div>
281
+ <div id="menu2" class="tab-pane fade">
282
+ <form action="javascript:void(0)" id="bankdetails_and_ssn_form2" role="form">
283
+ <li>
284
+ <label for="login-email" class="required"><em>*</em>Self reported credit score:</label>
285
+ <div class="input-box">
286
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="selfReportedCreditScore" name="selfReportedCreditScore">
287
+ <option value="">Please select self Reported Credit score</option>
288
+ <option value="1">Excellent Credit (760+)</option>
289
+ <option value="2">Good Credit (700+) </option>
290
+ <option value="3">Fair Credit (640+) </option>
291
+ <option value="4">Poor Credit</option>
292
+ </select>
293
+ </div>
294
+ </li>
295
+ <li>
296
+ <label for="bankName" class="required"><em>*</em>Bank name:</label>
297
+ <div class="input-box">
298
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-length maximum-length-255" id="bankName" name="bankName" value="">
299
+ </div>
300
+ </li>
301
+ <li>
302
+ <label for="firstAccountHolderName" class="required"><em>*</em>First account holder name:</label>
303
+ <div class="input-box">
304
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-alpha-spac validate-length maximum-length-255" id="firstAccountHolderName" name="firstAccountHolderName" value="">
305
+ </div>
306
+ </li>
307
+ <li>
308
+ <label for="bankAccountType" class="required"><em>*</em>Bank account type:</label>
309
+ <div class="input-box">
310
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="bankAccountType" name="bankAccountType">
311
+ <option value="">Please select bank account type</option>
312
+ <option value="Savings">Savings</option>
313
+ <option value="Checking">Checking</option>
314
+ <option value="Credit">Credit</option>
315
+ </select>
316
+ </div>
317
+ </li>
318
+ <li>
319
+ <label for="bankAccountNumber" class="required"><em>*</em>Bank account number:</label>
320
+ <div class="input-box">
321
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-number validate-length maximum-length-30" id="bankAccountNumber" name="bankAccountNumber" value="">
322
+ </div>
323
+ </li>
324
+ <li>
325
+ <label for="routingNumber" class="required"><em>*</em>Routing number:</label>
326
+ <div class="input-box">
327
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-length maximum-length-255" id="routingNumber" name="routingNumber" value="">
328
+ </div>
329
+ </li>
330
+ <li>
331
+ <label for="ssn" class="required"><em>*</em>ssn:</label>
332
+ <div class="input-box">
333
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-ssn" id="ssn" name="ssn" value="">
334
+ </div>
335
+ </li>
336
+ </form>
337
+ </div>
338
+ <div id="menu3" class="tab-pane fade">
339
+ <form action="javascript:void(0)" id="confirmation_and_submit_form3" role="form">
340
+ <li>
341
+ <label for="loanAmount" class="required"><em>*</em>Loan amount:(<?php echo(Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol()); ?>)</label>
342
+ <div class="input-box">
343
+ <?php $grand_total = $this->getLoanAmmount(); ?>
344
+ <input type="text" autocapitalize="off" readonly="readonly" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-number" id="loanAmount" name="loanAmount" value="<?php echo(isset($grand_total) ? $grand_total : ''); ?>">
345
+ </div>
346
+ </li>
347
+ <li>
348
+ <label for="loanPurpose" class="required"><em>*</em>Loan purpose:</label>
349
+ <div class="input-box">
350
+ <select class="input-text select_input_f validate-select validate-no-html-tags" id="loanPurpose" name="loanPurpose">
351
+ <option value="">Please select loan purpose</option>
352
+ <option value="Debt consolidation">Debt consolidation</option>
353
+ <option value="Home improvement">Home improvement</option>
354
+ <option value="Business">Business</option>
355
+ <option value="Auto">Auto</option>
356
+ <option value="Other">Other</option>
357
+ <option value="Baby & adoption loans">Baby & adoption loans</option>
358
+ <option value="Boat">Boat</option>
359
+ <option value="Cosmetic procedures">Cosmetic procedures</option>
360
+ <option value="Green loans">Green loans</option>
361
+ <option value="Household expenses">Household expenses</option>
362
+ <option value="Large purchases">Large purchases</option>
363
+ <option value="Medical/Dental">Medical/Dental</option>
364
+ <option value="Motorcycle">Motorcycle</option>
365
+ <option value="RV">RV</option>
366
+ <option value="Taxes">Taxes</option>
367
+ <option value="Vacation">Vacation</option>
368
+ <option value="Special Occasion">Special Occasion</option>
369
+ </select>
370
+ </div>
371
+ </li>
372
+ <li>
373
+ <label for="loanTerms" class="required"><em>*</em>Loan terms (In months):</label>
374
+ <div class="input-box">
375
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="validate-no-html-tags input-text required-entry validate-digits" id="loanTerms" name="loanTerms" value="">
376
+ </div>
377
+ </li>
378
+ </form>
379
+ </div>
380
+ </ul>
381
+ </div>
382
+ </div>
383
+ <div class="modal-footer">
384
+ <a href="javascript:void(0);" class="btn btn-default clx_common_next_prev_btn" data-tab="1">Next</a>
385
+ </div>
386
+ </div>
387
+ <!--</form>-->
388
+ </div>
389
+ </div>
390
+ <script type="text/javascript">
391
+ jQuery(document).ready(function () {
392
+ Validation.add('validate-alpha-spac', 'Allowed only alphabets', function (v) {
393
+ return Validation.get('IsEmpty').test(v) || /^[a-zA-Z ]+$/.test(v)
394
+ });
395
+ });
396
+ </script>
397
+
398
+
app/design/frontend/base/default/template/clxfunding/form/modal_custompaymentmethod.phtml~ ADDED
@@ -0,0 +1,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- Modal -->
2
+ <div id="myModal" class="modal fade" role="dialog">
3
+ <div class="modal-dialog">
4
+ <form role="form" id="my-clxloan-form" action="javascript:void(0);" data-action="<?php echo Mage::getBaseUrl().'custompaymentmethod/ClxAPI/loanAppProcessing';?>">
5
+ <!--Modal content-->
6
+ <div class="modal-content">
7
+ <div class="modal-header">
8
+ <a href="javascript:void(0);" class="clx_modal_form_close" data-dismiss="modal">x</a>
9
+ <center><h4 class="modal-title">LOAN APPLICATION</h4></center>
10
+
11
+ </div>
12
+ <div class="modal-body">
13
+
14
+ <div class="fieldset">
15
+
16
+
17
+ <ul class="nav nav-tabs">
18
+ <li class="active"><a data-toggle="tab" style="display:block !important;" href="#home">General info1</a></li>
19
+ <li><a data-toggle="tab" href="#menu1">General info2</a></li>
20
+ <li><a data-toggle="tab" href="#menu2">Verification</a></li>
21
+ <li><a data-toggle="tab" href="#menu3">Loan information</a></li>
22
+ </ul>
23
+ <ul id="clx-loanform" class="form-list tab-content">
24
+ <p class="required">* Required Fields</p><br>
25
+ <div id="home" class="tab-pane fade in active"><br>
26
+ <li>
27
+ <label for="login-email" class="required"><em>*</em>First Name:</label>
28
+ <div class="input-box">
29
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="firstName" name="firstName" value="">
30
+ </div>
31
+ </li>
32
+ <li>
33
+ <label for="login-email" class="required"><em>*</em>Last Name:</label>
34
+ <div class="input-box">
35
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="lastName" name="lastName" value="">
36
+ </div>
37
+ </li>
38
+ <li>
39
+ <label for="login-email" class="required"><em>*</em>Email Address:</label>
40
+ <div class="input-box">
41
+ <input type="email" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-email" id="emailId" name="emailId" value="">
42
+ </div>
43
+ </li>
44
+ <li>
45
+ <label for="login-email" class="required"><em>*</em>Date of birth:</label>
46
+ <div class="input-box">
47
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="birthDate" name="birthDate" value="">
48
+ </div>
49
+ </li>
50
+ <li>
51
+ <label for="login-email" class="required"><em>*</em>Street:</label>
52
+ <div class="input-box">
53
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="street" name="street" value="">
54
+ </div>
55
+ </li>
56
+ <li>
57
+ <label for="login-email" class="required"><em>*</em>Mobile phone area code:</label>
58
+ <div class="input-box">
59
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="mobilePhoneAreaCode" name="mobilePhoneAreaCode" value="">
60
+ </div>
61
+ </li>
62
+ <li>
63
+ <label for="login-email" class="required"><em>*</em>Mobile number:</label>
64
+ <div class="input-box">
65
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="mobileNumber" name="mobileNumber" value="">
66
+ </div>
67
+ </li>
68
+
69
+ <li>
70
+ <label for="login-email" class="required"><em>*</em>City:</label>
71
+ <div class="input-box">
72
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="city" name="city" value="">
73
+ </div>
74
+ </li>
75
+ </div>
76
+ <div id="menu1" class="tab-pane fade">
77
+ <li>
78
+ <label for="login-email" class="required"><em>*</em>State:</label>
79
+ <div class="input-box">
80
+ <select class="input-text" id="state" name="state">
81
+ <option>Alabama</option>
82
+ <option>Alaska</option>
83
+ <option>Arizona</option>
84
+ <option>Arkansas</option>
85
+ <option>California</option>
86
+ <option>Colorado</option>
87
+ <option>Connecticut</option>
88
+ <option>Delaware</option>
89
+ <option>District Of Columbia</option>
90
+ <option>Florida</option>
91
+ <option>Georgia</option>
92
+ <option>Hawaii</option>
93
+ <option>Idaho</option>
94
+ <option>Illinois</option>
95
+ <option>Indiana</option>
96
+ <option>Iowa</option>
97
+ <option>Kansas</option>
98
+ <option>Kentucky</option>
99
+ <option>Louisiana</option>
100
+ <option>Maine</option>
101
+ <option>Maryland</option>
102
+ <option>Massachusetts</option>
103
+ <option>Michigan</option>
104
+ <option>Minnesota</option>
105
+ <option>Mississippi</option>
106
+ <option>Missouri</option>
107
+ <option>Montana</option>
108
+ <option>Nebraska</option>
109
+ <option>Nevada</option>
110
+ <option>New Hampshire</option>
111
+ <option>New Jersey</option>
112
+ <option>New Mexico</option>
113
+ <option>New York</option>
114
+ <option>North Carolina</option>
115
+ <option>North Dakota</option>
116
+ <option>Ohio</option>
117
+ <option>Oklahoma</option>
118
+ <option>Oregon</option>
119
+ <option>Pennsylvania</option>
120
+ <option>Rhode Island</option>
121
+ <option>South Carolina</option>
122
+ <option>South Dakota</option>
123
+ <option>Tennessee</option>
124
+ <option>Texas</option>
125
+ <option>Utah</option>
126
+ <option>Vermont</option>
127
+ <option>Virginia</option>
128
+ <option>Washington</option>
129
+ <option>West Virginia</option>
130
+ <option>Wisconsin</option>
131
+ <option>Wyoming</option>
132
+ <option>American Samoa</option>
133
+ <option>Guam</option>
134
+ <option>Northern Mariana Islands</option>
135
+ <option>Puerto Rico</option>
136
+ <option>United States Minor Outlying</option>
137
+ <option>Islands</option>
138
+ <option>Virgin Islands</option>
139
+ </select>
140
+ </div>
141
+ </li>
142
+ <li>
143
+ <label for="login-email" class="required"><em>*</em>Zipcode:</label>
144
+ <div class="input-box">
145
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="zipcode" name="zipcode" value="">
146
+ </div>
147
+ </li>
148
+ <li>
149
+ <label for="login-email" class="required"><em>*</em>Country:</label>
150
+ <div class="input-box">
151
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="country" name="country" value="">
152
+ </div>
153
+ </li>
154
+ <li>
155
+ <label for="login-email" class="required"><em>*</em>Yearly income:</label>
156
+ <div class="input-box">
157
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="yearlyIncome" name="yearlyIncome" value="">
158
+ </div>
159
+ </li>
160
+ <li>
161
+ <label for="login-email" class="required"><em>*</em>Employment status:</label>
162
+ <div class="input-box">
163
+ <select class="input-text" id="employmentStatus" name="employmentStatus">
164
+ <option>Self Employed</option>
165
+ <option>Not Employed</option>
166
+ <option>Other</option>
167
+ <option>Employed</option>
168
+ </select>
169
+ </div>
170
+ </li>
171
+ <li>
172
+ <label for="login-email" class="required"><em>*</em>Occupation:</label>
173
+ <div class="input-box">
174
+ <select class="input-text" id="occupation" name="occupation">
175
+ <option>Accountant/CPA</option>
176
+ <option>Analyst</option>
177
+ <option>Architect</option>
178
+ <option>Attorney</option>
179
+ <option>Biologist</option>
180
+ <option>Bus Driver</option>
181
+ <option>Car Dealer</option>
182
+ <option>Chemist</option>
183
+ <option>Civil Service</option>
184
+ <option>Clergy</option>
185
+ <option>Clerical</option>
186
+ <option>Computer Programmer</option>
187
+ <option>Construction</option>
188
+ <option>Dentist</option>
189
+ <option>Doctor</option>
190
+ <option>Engineer- Chemical</option>
191
+ <option>Engineer- Electrical</option>
192
+ <option>Engineer- Mechanical</option>
193
+ <option>Executive</option>
194
+ <option>Fireman</option>
195
+ <option>Flight Attendant</option>
196
+ <option>Food Service</option>
197
+ <option>Food Service Management</option>
198
+ <option>Homemaker</option>
199
+ <option>Judge</option>
200
+ <option>Laborer</option>
201
+ <option>Landscaping</option>
202
+ <option>Medical Technician</option>
203
+ <option>Military Enlisted</option>
204
+ <option>Military Officer</option>
205
+ <option>Nurse (LPN)</option>
206
+ <option>Nurse (RN)</option>
207
+ <option>Nurse's Aide</option>
208
+ <option>Pharmacist</option>
209
+ <option>Pilot- Private/Commercial</option>
210
+ <option>Police- Officer/Correction officer</option>
211
+ <option>Postal Service</option>
212
+ <option>Principal</option>
213
+ <option>Professional</option>
214
+ <option>Professor</option>
215
+ <option>Psychologist</option>
216
+ <option>Realtor</option>
217
+ <option>Religious</option>
218
+ <option>Retail Management</option>
219
+ <option>Sales- Commission</option>
220
+ <option>Sales- Retails</option>
221
+ <option>Scientist</option>
222
+ <option>Administrative Assistant</option>
223
+ <option>Skilled Labor</option>
224
+ <option>Social Worker</option>
225
+ <option>Student</option>
226
+ <option>Teacher</option>
227
+ <option>Teacher's Aide</option>
228
+ <option>Tradesman- Carpenter</option>
229
+ <option>Tradesman- Electrician</option>
230
+ <option>Tradesman- Mechanic</option>
231
+ <option>Tradesman- Plumber</option>
232
+ <option>Truck Driver</option>
233
+ <option>Waiter/Waitress</option>
234
+ <option>Other</option>
235
+ <option>Investor</option>
236
+ </select>
237
+ </div>
238
+ </li>
239
+ <li>
240
+ <label for="login-email" class="required"><em>*</em>Employer name:</label>
241
+ <div class="input-box">
242
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="employerName" name="employerName" value="">
243
+ </div>
244
+ </li>
245
+
246
+ <li>
247
+ <label for="login-email" class="required"><em>*</em>Employment start date:</label>
248
+ <div class="input-box">
249
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry " id="employmentStartDate" name="employmentStartDate" value="">
250
+ </div>
251
+ </li>
252
+ <li>
253
+ <label for="login-email" class="required"><em>*</em>Self reported credit score:</label>
254
+ <div class="input-box">
255
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry " id="selfReportedCreditScore" name="selfReportedCreditScore" value="">
256
+ </div>
257
+ </li>
258
+ </div>
259
+ <div id="menu2" class="tab-pane fade">
260
+ <li>
261
+ <label for="bankName" class="required"><em>*</em>Bank name:</label>
262
+ <div class="input-box">
263
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry " id="bankName" name="bankName" value="">
264
+ </div>
265
+ </li>
266
+ <li>
267
+ <label for="firstAccountHolderName" class="required"><em>*</em>First account holder name:</label>
268
+ <div class="input-box">
269
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry " id="firstAccountHolderName" name="firstAccountHolderName" value="">
270
+ </div>
271
+ </li>
272
+ <li>
273
+ <label for="bankAccountType" class="required"><em>*</em>Bank account type:</label>
274
+ <div class="input-box">
275
+ <select class="input-text" id="bankAccountType" name="bankAccountType">
276
+ <option>Savings</option>
277
+ <option>Checking</option>
278
+ <option>Credit</option>
279
+ </select>
280
+ </div>
281
+ </li>
282
+ <li>
283
+ <label for="bankAccountNumber" class="required"><em>*</em>Bank account number:</label>
284
+ <div class="input-box">
285
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry " id="bankAccountNumber" name="bankAccountNumber" value="">
286
+ </div>
287
+ </li>
288
+ <li>
289
+ <label for="routingNumber" class="required"><em>*</em>Routing number:</label>
290
+ <div class="input-box">
291
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry " id="routingNumber" name="routingNumber" value="">
292
+ </div>
293
+ </li>
294
+ <li>
295
+ <label for="ssn" class="required"><em>*</em>ssn:</label>
296
+ <div class="input-box">
297
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry " id="ssn" name="ssn" value="">
298
+ </div>
299
+ </li>
300
+
301
+ </div>
302
+ <div id="menu3" class="tab-pane fade">
303
+ <li>
304
+ <label for="loanAmount" class="required"><em>*</em>Loan amount:</label>
305
+ <div class="input-box">
306
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry " id="loanAmount" name="loanAmount" value="">
307
+ </div>
308
+ </li>
309
+ <li>
310
+ <label for="loanPurpose" class="required"><em>*</em>Loan purpose:</label>
311
+ <div class="input-box">
312
+ <select class="input-text" id="loanPurpose" name="loanPurpose">
313
+ <option>Debt consolidation</option>
314
+ <option>Home improvement</option>
315
+ <option>Business</option>
316
+ <option>Auto</option>
317
+ <option>Other</option>
318
+ <option>Baby & adoption loans</option>
319
+ <option>Boat</option>
320
+ <option>Cosmetic procedures</option>
321
+ <option>Green loans</option>
322
+ <option>Household expenses</option>
323
+ <option>Large purchases</option>
324
+ <option>Medical/Dental</option>
325
+ <option>Motorcycle</option>
326
+ <option>RV</option>
327
+ <option>Taxes</option>
328
+ <option>Vacation</option>
329
+ <option>Special Occasion</option>
330
+ </select>
331
+ </div>
332
+ </li>
333
+ <li>
334
+ <label for="loanTerms" class="required"><em>*</em>Loan terms:</label>
335
+ <div class="input-box">
336
+ <input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry" id="loanTerms" name="loanTerms" value="">
337
+ </div>
338
+ </li>
339
+ </div>
340
+ </ul>
341
+ </div>
342
+ </div>
343
+ <div class="modal-footer">
344
+ <input type="submit" name="submit" class="input-text submitss btn btn-default" value="Apply loan">
345
+ <a href="javascript:void(0);" class="btn btn-default clx_modal_form_close" data-dismiss="modal">Close</a>
346
+ </div>
347
+ </div>
348
+ </form>
349
+ </div>
350
+ </div>
351
+
352
+
353
+ <!--<script>jQuery.noConflict()</script>-->
app/design/frontend/base/default/template/clxfunding/form/user_loan_offer_accept.phtml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $data = $this->getLoanOfferStatus();
3
+ ?>
4
+ <div class="">
5
+ <div class="" style="width:80%">
6
+ <?php if (isset($data) && !empty($data)) {
7
+ if (isset($data->application_status) && $data->application_status == "ACCEPTED") {
8
+ ?>
9
+ <form name="loan_offer_acceptance_res" id="loan_offer_acceptance_res" method="post" action="<?php echo Mage::getBaseUrl() . 'clxfunding/ClxAPI/saveOrderCustom'; ?>">
10
+ <div class="">
11
+ <p>Your application has been preliminarily approved and it will be processed within 24 hours.</p>
12
+ <div class="buttons-set border-top-none">
13
+ <button type="submit" class="button align-left" id="Confirm_Acceptance_Continue" title="Continue"><span><span>Continue to save order</span></span></button>
14
+ </div>
15
+ </div>
16
+ </form>
17
+ <?php } else { ?>
18
+ <div class="">
19
+ <p>We are sorry to inform you that your loan application cannot be processed further.</p>
20
+ <div class="buttons-set border-top-none">
21
+ <button type="button" class="button align-left" title="My Account" onclick="redirectURL()"><span><span>My Account</span></span></button>
22
+ </div>
23
+ </div>
24
+ <?php }
25
+ } ?>
26
+ </div>
27
+ </div>
28
+ <script>
29
+ function redirectURL() {
30
+ window.location.href = "<?php echo Mage::getBaseUrl().'customer/account'; ?>";
31
+ }
32
+ </script>
app/design/frontend/base/default/template/clxfunding/form/user_loan_offer_reject.phtml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="">
2
+ <div class="">
3
+ <div class="" style="width:80%">
4
+ <p>Your order has been canceled.Thank you for choosing <strong>Online Loan</strong>.</p>
5
+ <div class="buttons-set border-top-none">
6
+ <button class="button align-left" onclick="redirectURL()" title="My Account"><span><span>My Account</span></span></button>
7
+ </div>
8
+ </div>
9
+ </div>
10
+ </div>
11
+ <script>
12
+ function redirectURL() {
13
+ window.location.href = "<?php echo Mage::getBaseUrl().'customer/account'; ?>";
14
+ }
15
+ </script>
app/design/frontend/base/default/template/clxfunding/form/user_loan_offer_status.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $data = $this->getLoanOfferStatus();
3
+ ?>
4
+ <div class="">
5
+ <div class="" style="width:80%">
6
+ <?php if (isset($data) && !empty($data)) {
7
+ if (isset($data->application_status) && $data->application_status == "ACCEPTED") {
8
+ ?>
9
+ <div class="">
10
+ <p>Your application has been preliminarily approved and it will be processed within 24 hours.</p>
11
+ <div class="buttons-set border-top-none">
12
+ <button class="button align-left" onclick="redirectURL()" title="My Account"><span><span>My Account</span></span></button>
13
+ </div>
14
+ </div>
15
+ <?php } else { ?>
16
+ <div class="">
17
+ <p>We are sorry to inform you that your loan application cannot be processed further.</p>
18
+ <div class="buttons-set border-top-none">
19
+ <button class="button align-left" onclick="redirectURL()" title="My Account"><span><span>My Account</span></span></button>
20
+ </div>
21
+ </div>
22
+ <?php }
23
+ } else { ?>
24
+ <div class="buttons-set border-top-none">
25
+ <button class="button align-left" onclick="redirectURL()" title="My Account"><span><span>My Account</span></span></button>
26
+ </div>
27
+ <?php } ?>
28
+ </div>
29
+ </div>
30
+ <script>
31
+ function redirectURL() {
32
+ window.location.href = "<?php echo Mage::getBaseUrl().'customer/account'; ?>";
33
+ }
34
+ </script>
app/etc/modules/CLExchange_Clexchangefunding.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ To change this license header, choose License Headers in Project Properties.
4
+ To change this template file, choose Tools | Templates
5
+ and open the template in the editor.
6
+ -->
7
+
8
+ <config>
9
+ <modules>
10
+ <CLExchange_Clexchangefunding>
11
+ <active>true</active>
12
+ <codePool>community</codePool>
13
+ <depends>
14
+ <Mage_Payment />
15
+ </depends>
16
+ </CLExchange_Clexchangefunding>
17
+ </modules>
18
+ </config>
app/locale/en_US/template/email/CLX/email-template/clx_error.html ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
2
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
3
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
4
+ <tr>
5
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
6
+ <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
7
+ <!-- [ header starts here] -->
8
+ <tr>
9
+ <td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
10
+ </tr>
11
+ <tr>
12
+ <td>
13
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
14
+ <tr>
15
+ <td align="center" style="margin: 0; padding: 0;padding: 35px 0">
16
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="650">
17
+ <tr>
18
+ <td width="620" valign="top" align="left" bgcolor="#ffffff"style="font-family: Georgia, serif; background: #fff;">
19
+ <p><strong>Dear Merchant,</strong></p>
20
+ <br/><p>Loan applications of customer were rejected due to following configuration error:</p><br/>
21
+ <p><strong>"{{var clxError}}"</strong></p><br/>
22
+ <p>Please check CLExchange configuration in admin panel or Please contact CLExchange</p>
23
+ </td>
24
+ </tr>
25
+ </table><!-- body -->
26
+ </td>
27
+ </tr>
28
+ </table>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
33
+ </tr>
34
+ </table>
35
+ </td>
36
+ </tr>
37
+ </table>
38
+ </div>
39
+ </body>
app/locale/en_US/template/email/CLX/email-template/clx_loan_approved.html ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
2
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
3
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
4
+ <tr>
5
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
6
+ <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
7
+ <!-- [ header starts here] -->
8
+ <tr>
9
+ <td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
10
+ </tr>
11
+ <tr>
12
+ <td>
13
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
14
+ <tr>
15
+ <td align="center" style="margin: 0; padding: 0;padding: 35px 0">
16
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="650">
17
+ <tr>
18
+ <td width="620" valign="top" align="left" bgcolor="#ffffff"style="font-family: Georgia, serif; background: #fff;">
19
+ <p><strong>Dear {{var firstName}} {{var lastName}},</strong></p>
20
+ <p>Your application has been received, and you are preliminary approved.It will take up to 1 hour for your application to be processed and the merchant will be notified to deliver your goods.</p>
21
+ </td>
22
+ </tr>
23
+ </table><!-- body -->
24
+ </td>
25
+ </tr>
26
+ </table>
27
+ </td>
28
+ </tr>
29
+ <tr>
30
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
31
+ </tr>
32
+ </table>
33
+ </td>
34
+ </tr>
35
+ </table>
36
+ </div>
37
+ </body>
app/locale/en_US/template/email/CLX/email-template/clx_loan_funded.html ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
2
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
3
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
4
+ <tr>
5
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
6
+ <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
7
+ <!-- [ header starts here] -->
8
+ <tr>
9
+ <td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
10
+ </tr>
11
+ <tr>
12
+ <td>
13
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
14
+ <tr>
15
+ <td align="center" style="margin: 0; padding: 0;padding: 35px 0">
16
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="650">
17
+ <tr>
18
+ <td width="620" valign="top" align="left" bgcolor="#ffffff"style="font-family: Georgia, serif; background: #fff;">
19
+ <p><strong>Dear Merchant,</strong></p>
20
+ <br/>
21
+ <p>The application <strong>{{var applicationID}}</strong> for the order number <strong>{{var orderNumber}}</strong> has been funded by lender</p>
22
+ </td>
23
+ </tr>
24
+ </table><!-- body -->
25
+ </td>
26
+ </tr>
27
+ </table>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
32
+ </tr>
33
+ </table>
34
+ </td>
35
+ </tr>
36
+ </table>
37
+ </div>
38
+ </body>
app/locale/en_US/template/email/CLX/email-template/clx_loan_offer.html ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <head>
2
+ <style type="text/css">
3
+ table.table-style-two {
4
+ font-family: verdana, arial, sans-serif;
5
+ font-size: 14px;
6
+ color: #333333;
7
+ border-width: 1px;
8
+ border-color: #3A3A3A;
9
+ border-collapse: collapse;
10
+ }
11
+ table.table-style-two th {
12
+ border-width: 1px;
13
+ padding: 8px;
14
+ border-style: solid;
15
+ border-color: #517994;
16
+ background-color: #B2CFD8;
17
+ }
18
+ table.table-style-two tr:hover td {
19
+ background-color: #DFEBF1;
20
+ }
21
+ table.table-style-two td {
22
+ border-width: 1px;
23
+ padding: 8px;
24
+ border-style: solid;
25
+ border-color: #517994;
26
+ background-color: #ffffff;
27
+ }
28
+ .clx_link:link, .clx_link:visited {
29
+ display: block;
30
+ width: 6em;
31
+ padding: 0.2em;
32
+ line-height: 1.4;
33
+ background-color: #94B8E9;
34
+ border: 1px solid black;
35
+ color: #000;
36
+ text-decoration: none;
37
+ text-align: center;
38
+ }
39
+
40
+ .clx_link:hover {
41
+ background-color: #369;
42
+ color: #fff;
43
+ }
44
+ </style>
45
+ </head>
46
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
47
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
48
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
49
+ <tr>
50
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
51
+ <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
52
+ <!-- [ header starts here] -->
53
+ <tr>
54
+ <td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
55
+ </tr>
56
+ <tr>
57
+ <td>
58
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="650">
59
+ <tr>
60
+ <td width="620" valign="top" align="left" bgcolor="#ffffff"style="font-family: Georgia, serif; background: #fff;">
61
+ <table cellpadding="0" cellspacing="0" border="0" width="620" class="content">
62
+ <tr>
63
+ <td valign="top" align="center">
64
+ <div style="text-align:left">
65
+ <p><strong>Dear Customer,</strong></p><br/>
66
+ <p>This mail is in reference with order number <strong>{{var orderNumber}}</strong>.Following is the loan offered by the <strong>{{var lenderName}}</strong></p>
67
+ <br/>
68
+ </div>
69
+ <table class="table-style-two">
70
+ <thead>
71
+ <tr>
72
+ <th>Monthly Payment($)</th>
73
+ <th>Term(Months)</th>
74
+ <th>APR(%)</th>
75
+ <th>Loan Rate(%)</th>
76
+ </tr>
77
+ </thead>
78
+ <tbody>
79
+ <tr>
80
+ <td>${{var MonthlyPayment}}</td>
81
+ <td>{{var Terms}}</td>
82
+ <td>{{var APR}}%</td>
83
+ <td>{{var loanRate}}</td>
84
+ </tr>
85
+ </tbody>
86
+ <tfoot>
87
+ <tr>
88
+ <td colspan="5"><a style="float:left;margin-left:5px" class="clx_link" href="{{var offerAcceptRedirectUrl}}">Accept</a><a style="float:left;margin-left:5px" class="clx_link" href="{{var offerRejectRedirectUrl}}">Reject</a></td>
89
+ </tr>
90
+ </tfoot>
91
+ </table>
92
+ </td>
93
+ </tr>
94
+ </table>
95
+ </td>
96
+ </tr>
97
+ </table><!-- body -->
98
+ </td>
99
+ </tr>
100
+ <tr>
101
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
102
+ </tr>
103
+ </table>
104
+ </td>
105
+ </tr>
106
+ </table>
107
+ </div>
108
+ </body>
app/locale/en_US/template/email/CLX/email-template/clx_loan_offer_reject.html ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
2
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
3
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
4
+ <tr>
5
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
6
+ <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
7
+ <!-- [ header starts here] -->
8
+ <tr>
9
+ <td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
10
+ </tr>
11
+ <tr>
12
+ <td>
13
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
14
+ <tr>
15
+ <td align="center" style="margin: 0; padding: 0;padding: 35px 0">
16
+ <table cellpadding="0" cellspacing="0" border="0" align="center" width="650">
17
+ <tr>
18
+ <td width="620" valign="top" align="left" bgcolor="#ffffff"style="font-family: Georgia, serif; background: #fff;">
19
+ <p><strong>Dear Merchant,</strong></p>
20
+ <br/>
21
+ <p>The loan offer with application id <strong>{{var applicationId}}</strong> for order number <strong>{{var orderNumber}}</strong> proposed to the customer <strong>{{var customerName}}</strong> has been rejected</p>
22
+ </td>
23
+ </tr>
24
+ </table><!-- body -->
25
+ </td>
26
+ </tr>
27
+ </table>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
32
+ </tr>
33
+ </table>
34
+ </td>
35
+ </tr>
36
+ </table>
37
+ </div>
38
+ </body>
39
+
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Clexchange_Funding</name>
4
+ <version>1.0.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>CLX Funding allows users to submit an online loan application to lenders from the checkout page itself</summary>
10
+ <description>CLX Funding provides a way for online retailers to sell goods as part of the loan experience, but submitting application to CL exchange so that lenders can bid on them. It is basically an online marketplace that enables people to borrow money from the lenders without the involvement of banks or credit card companies. By cutting out the middle men and bypassing many of the traditional banking costs, it is able to provide multiple loan offers at different rates for borrowers</description>
11
+ <notes>Stable Module</notes>
12
+ <authors><author><name>Dhananjay Goel</name><user>agsdhananjay</user><email>dhananjay.goel@agstechnologies.com</email></author></authors>
13
+ <date>2015-12-03</date>
14
+ <time>07:37:18</time>
15
+ <contents><target name="magecommunity"><dir name="."><dir name="CLExchange"><dir name="Clexchangefunding"><file name="ApprovalRequired.php" hash="96688bf7b67f8c0742ab9bad39cedeb9"/><dir name="Block"><dir name="Form"><file name="Clxfunding.php" hash="081527c555695d5ef6c431f7f6c12c95"/><file name="Clxfunding.php~" hash="a20584db3e9f4b099a7144d12a2b8ef3"/></dir></dir><file name="CronExpressionList.php" hash="d60ce922145f3ae36946fb439933de84"/><file name="CronExpressionList.php~" hash="517b5955d0b9a57f981774a24cc85f21"/><dir name="Helper"><file name="Data.php" hash="f3de7be5f6112b1bdccf39296da819f7"/><file name="Data.php~" hash="a730a72d6b337f5ef6f7ff871e5eda01"/></dir><file name="IsBestOffer.php" hash="96d8ff73ade5a8982181d61471f76140"/><dir name="Model"><file name="AccountIdV.php" hash="fce6f3dafa1e2cea6cf124864d9fc782"/><file name="AuthorizationKeyV.php" hash="cc385bd818815d084fdc33adca0274b7"/><file name="ClxEmail.php" hash="b9fce4e10ba99984dd59fb748c327e0e"/><file name="Clxloanappdtls.php" hash="d131567dcf509e63989e7d5739699c35"/><file name="Clxloanofferdetails.php" hash="673d4de3b8aaa9d0409a8a8a3a2b5060"/><file name="CronOrderStatusUpdate.php" hash="c0ffc89deeadfee459f9e009a37a411d"/><dir name="Mysql4"><dir name="Clxloanappdtls"><file name="Collection.php" hash="9d3b2d78188b257fb9022057c17ac948"/></dir><file name="Clxloanappdtls.php" hash="10402960edc7dc8e6b248bc60e3fc589"/><dir name="Clxloanofferdetails"><file name="Collection.php" hash="518d07728d6296b14512fc5cc5a8b37e"/></dir><file name="Clxloanofferdetails.php" hash="4f94744cc78e809eb718d55bee297455"/></dir><file name="Observer.php" hash="f9de34cdae961c9e6b9d763430977056"/><file name="Observer.php~" hash="fe6c42be3c15b14f36c5b7d9e8003dbd"/><file name="PaymentMethodTitle.php" hash="9fd8ce6214e2e6a7dba330f6913dda0b"/><file name="Paymentmethod.php" hash="036b7356644228046ab8ec880f7f2fe5"/><file name="QueueAuthKeyV.php" hash="bdb91ab2589bd0a025f2ca0fe051f420"/><file name="QueueEndpointV.php" hash="80f1dc2c25dea674a6208a411921a82f"/><dir name="Resource"><file name="Setup.php" hash="891431034dc2144ccf9ed0f89b81a93a"/></dir></dir><file name="TimeFrames.php" hash="c6003d6e6639431fe3a96b057aa84c21"/><dir name="controllers"><file name="ClxAPIController.php" hash="a845844c6fa315b885b39b27bf670dd1"/><file name="ClxAPIController.php~" hash="b0e4e7bfe1c10cd756c647713fc878d6"/><file name="PaymentController.php" hash="7bfa38bd5d5e4e92aafe3f2a20073f76"/></dir><dir name="etc"><file name="config.xml" hash="3394d2b161f0c6c8e0ac4bcb8441cd8c"/><file name="config.xml~" hash="2fb2c5db0f6eeb0ceb1df3a88d41e4e8"/><file name="system.xml" hash="a6c50f131ac6faf145e29666b1de961b"/></dir><dir name="sql"><dir name="clxfunding_setup"><file name="mysql4-install-1.0.0.0.php" hash="ed180b5d726026a8aa4464bbe6f9e40c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="."><dir name="modules"><file name="CLExchange_Clexchangefunding.xml" hash="baacaefedc8b344c94325fb0707ac4fa"/></dir></dir></target><target name="magedesign"><dir name="."><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="clxblock.xml" hash="33d1ee86efa9a2ca1a69cd0a1193f036"/></dir><dir name="template"><dir name="clxfunding"><dir name="form"><file name="aboutCLXFunding.phtml" hash="d770c8fb641e9d80318893735b63a07e"/><file name="clxfunding.phtml" hash="63074651223b2e3999fcd5da94151322"/><file name="confirm_user_acceptance.phtml" hash="ac94290aef0ec7b0ad0fd1c0eda1ea82"/><file name="custompaymentmethod.phtml~" hash="eb341bef92ad331d87cc04826a3c6d80"/><file name="link_Expire.phtml" hash="dc348778a35a160616661e5f57eecc2a"/><file name="loan_offer_response.phtml" hash="c9a62e6b568f72907bf6ff40b15a4aec"/><file name="loan_offer_response.phtml~" hash="fb3bd4c15f59244d1581744b75433b07"/><file name="loanapplicationstatus.phtml" hash="3f28370fe0adcbbcdf0a3934e7027ba8"/><file name="modal_clxfunding.phtml" hash="7b982715958f7f9b7da2b7905ed476c2"/><file name="modal_clxfunding.phtml~" hash="83cb30ea1c0f9ab50ddf8d02f75a45c8"/><file name="modal_custompaymentmethod.phtml~" hash="3bd861132e0dc8e856d87aa90d0c504d"/><file name="user_loan_offer_accept.phtml" hash="082ef7c1c33fe01966d562237efe056f"/><file name="user_loan_offer_reject.phtml" hash="f3e265bf67ab7f46b7d88fed85e526f0"/><file name="user_loan_offer_status.phtml" hash="f95386d992f0581c2c9dc2f4c3e4470b"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="."><dir name="en_US"><dir name="template"><dir name="email"><dir name="CLX"><dir name="email-template"><file name="clx_error.html" hash="00e79d990018928d6744e2674a5f8f96"/><file name="clx_loan_approved.html" hash="c1c65d26dc7d8ffe3202b84d563d8ca1"/><file name="clx_loan_funded.html" hash="6b79fecb27ee174eb371260ed49bfbb1"/><file name="clx_loan_offer.html" hash="5bcc0e69296527e5c72fcd008f4d06dd"/><file name="clx_loan_offer_reject.html" hash="5ef3d5cda7e3854a2d8c4297f122127b"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="."><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="Clx"><file name="bootstrap-datepicker.min.css" hash="cd2c0b0211d190705a331aec86e9b58b"/><file name="bootstrap.min.css" hash="f5be102f57c28817dfd7cb45c2e348cc"/><file name="clx_custom.css" hash="98e74ca9d4dc37207ba7dd5009b95f02"/><file name="clxloanofferdata.php~" hash="2b9a4570344187bb80e7e4d3aacf5bae"/><file name="clxloantabledata.php~" hash="04fd656486dda8e8edd0118f2c284997"/><file name="cron_status.php~" hash="9475575fe75cd8ae8e944e88485bd325"/><file name="help.png" hash="8d624cc7c85c82d94af8c733bbbfe70c"/><file name="loading.gif" hash="b93b075c32e850e533118e9da3ab908f"/><file name="loading11.gif" hash="76a38d8ef9d1c3b220ad82562e199b40"/></dir></dir><dir name="js"><dir name="Clx"><file name="bootbox.min.js" hash="05d23d3920015845ca00414081fd0ec6"/><file name="bootstrap-datepicker.min.js" hash="8162cad799165edbecd075126bc9ba9a"/><file name="bootstrap.min.js" hash="1e111f47ca44c667c9db657ef90e08bf"/><file name="jquery-1.11.3.min.js" hash="e73e73f10b0074aeb269444ce5e3f9b6"/><file name="jquery-migrate-1.2.1.min.js" hash="d73215496d38ffbaf7136ced76910a96"/><file name="noConflict.js" hash="7be7463c1b83b4ab8daad25a2da121ed"/></dir></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.3.0</min><max>5.6.0</max></php></required></dependencies>
18
+ </package>
skin/frontend/base/default/css/Clx/bootstrap-datepicker.min.css ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Datepicker for Bootstrap v1.4.0 (https://github.com/eternicode/bootstrap-datepicker)
3
+ *
4
+ * Copyright 2012 Stefan Petre
5
+ * Improvements by Andrew Rowls
6
+ * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
7
+ */
8
+ .datepicker{padding:4px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;direction:ltr}.datepicker-inline{width:220px}.datepicker.datepicker-rtl{direction:rtl}.datepicker.datepicker-rtl table tr td span{float:right}.datepicker-dropdown{top:0;left:0}.datepicker-dropdown:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-top:0;border-bottom-color:rgba(0,0,0,.2);position:absolute}.datepicker-dropdown:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;border-top:0;position:absolute}.datepicker-dropdown.datepicker-orient-left:before{left:6px}.datepicker-dropdown.datepicker-orient-left:after{left:7px}.datepicker-dropdown.datepicker-orient-right:before{right:6px}.datepicker-dropdown.datepicker-orient-right:after{right:7px}.datepicker-dropdown.datepicker-orient-top:before{top:-7px}.datepicker-dropdown.datepicker-orient-top:after{top:-6px}.datepicker-dropdown.datepicker-orient-bottom:before{bottom:-7px;border-bottom:0;border-top:7px solid #999}.datepicker-dropdown.datepicker-orient-bottom:after{bottom:-6px;border-bottom:0;border-top:6px solid #fff}.datepicker>div{display:none}.datepicker.days .datepicker-days,.datepicker.months .datepicker-months,.datepicker.years .datepicker-years{display:block}.datepicker table{margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker td,.datepicker th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:none}.table-striped .datepicker table tr td,.table-striped .datepicker table tr th{background-color:transparent}.datepicker table tr td.day:hover,.datepicker table tr td.day.focused{background:#eee;cursor:pointer}.datepicker table tr td.old,.datepicker table tr td.new{color:#999}.datepicker table tr td.disabled,.datepicker table tr td.disabled:hover{background:0 0;color:#999;cursor:default}.datepicker table tr td.today,.datepicker table tr td.today:hover,.datepicker table tr td.today.disabled,.datepicker table tr td.today.disabled:hover{background-color:#fde19a;background-image:-moz-linear-gradient(top,#fdd49a,#fdf59a);background-image:-ms-linear-gradient(top,#fdd49a,#fdf59a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdd49a),to(#fdf59a));background-image:-webkit-linear-gradient(top,#fdd49a,#fdf59a);background-image:-o-linear-gradient(top,#fdd49a,#fdf59a);background-image:linear-gradient(top,#fdd49a,#fdf59a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);border-color:#fdf59a #fdf59a #fbed50;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);color:#000}.datepicker table tr td.today:hover,.datepicker table tr td.today:hover:hover,.datepicker table tr td.today.disabled:hover,.datepicker table tr td.today.disabled:hover:hover,.datepicker table tr td.today:active,.datepicker table tr td.today:hover:active,.datepicker table tr td.today.disabled:active,.datepicker table tr td.today.disabled:hover:active,.datepicker table tr td.today.active,.datepicker table tr td.today:hover.active,.datepicker table tr td.today.disabled.active,.datepicker table tr td.today.disabled:hover.active,.datepicker table tr td.today.disabled,.datepicker table tr td.today:hover.disabled,.datepicker table tr td.today.disabled.disabled,.datepicker table tr td.today.disabled:hover.disabled,.datepicker table tr td.today[disabled],.datepicker table tr td.today:hover[disabled],.datepicker table tr td.today.disabled[disabled],.datepicker table tr td.today.disabled:hover[disabled]{background-color:#fdf59a}.datepicker table tr td.today:active,.datepicker table tr td.today:hover:active,.datepicker table tr td.today.disabled:active,.datepicker table tr td.today.disabled:hover:active,.datepicker table tr td.today.active,.datepicker table tr td.today:hover.active,.datepicker table tr td.today.disabled.active,.datepicker table tr td.today.disabled:hover.active{background-color:#fbf069 \9}.datepicker table tr td.today:hover:hover{color:#000}.datepicker table tr td.today.active:hover{color:#fff}.datepicker table tr td.range,.datepicker table tr td.range:hover,.datepicker table tr td.range.disabled,.datepicker table tr td.range.disabled:hover{background:#eee;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.datepicker table tr td.range.today,.datepicker table tr td.range.today:hover,.datepicker table tr td.range.today.disabled,.datepicker table tr td.range.today.disabled:hover{background-color:#f3d17a;background-image:-moz-linear-gradient(top,#f3c17a,#f3e97a);background-image:-ms-linear-gradient(top,#f3c17a,#f3e97a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f3c17a),to(#f3e97a));background-image:-webkit-linear-gradient(top,#f3c17a,#f3e97a);background-image:-o-linear-gradient(top,#f3c17a,#f3e97a);background-image:linear-gradient(top,#f3c17a,#f3e97a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);border-color:#f3e97a #f3e97a #edde34;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.datepicker table tr td.range.today:hover,.datepicker table tr td.range.today:hover:hover,.datepicker table tr td.range.today.disabled:hover,.datepicker table tr td.range.today.disabled:hover:hover,.datepicker table tr td.range.today:active,.datepicker table tr td.range.today:hover:active,.datepicker table tr td.range.today.disabled:active,.datepicker table tr td.range.today.disabled:hover:active,.datepicker table tr td.range.today.active,.datepicker table tr td.range.today:hover.active,.datepicker table tr td.range.today.disabled.active,.datepicker table tr td.range.today.disabled:hover.active,.datepicker table tr td.range.today.disabled,.datepicker table tr td.range.today:hover.disabled,.datepicker table tr td.range.today.disabled.disabled,.datepicker table tr td.range.today.disabled:hover.disabled,.datepicker table tr td.range.today[disabled],.datepicker table tr td.range.today:hover[disabled],.datepicker table tr td.range.today.disabled[disabled],.datepicker table tr td.range.today.disabled:hover[disabled]{background-color:#f3e97a}.datepicker table tr td.range.today:active,.datepicker table tr td.range.today:hover:active,.datepicker table tr td.range.today.disabled:active,.datepicker table tr td.range.today.disabled:hover:active,.datepicker table tr td.range.today.active,.datepicker table tr td.range.today:hover.active,.datepicker table tr td.range.today.disabled.active,.datepicker table tr td.range.today.disabled:hover.active{background-color:#efe24b \9}.datepicker table tr td.selected,.datepicker table tr td.selected:hover,.datepicker table tr td.selected.disabled,.datepicker table tr td.selected.disabled:hover{background-color:#9e9e9e;background-image:-moz-linear-gradient(top,#b3b3b3,gray);background-image:-ms-linear-gradient(top,#b3b3b3,gray);background-image:-webkit-gradient(linear,0 0,0 100%,from(#b3b3b3),to(gray));background-image:-webkit-linear-gradient(top,#b3b3b3,gray);background-image:-o-linear-gradient(top,#b3b3b3,gray);background-image:linear-gradient(top,#b3b3b3,gray);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);border-color:gray #808080 #595959;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.datepicker table tr td.selected:hover,.datepicker table tr td.selected:hover:hover,.datepicker table tr td.selected.disabled:hover,.datepicker table tr td.selected.disabled:hover:hover,.datepicker table tr td.selected:active,.datepicker table tr td.selected:hover:active,.datepicker table tr td.selected.disabled:active,.datepicker table tr td.selected.disabled:hover:active,.datepicker table tr td.selected.active,.datepicker table tr td.selected:hover.active,.datepicker table tr td.selected.disabled.active,.datepicker table tr td.selected.disabled:hover.active,.datepicker table tr td.selected.disabled,.datepicker table tr td.selected:hover.disabled,.datepicker table tr td.selected.disabled.disabled,.datepicker table tr td.selected.disabled:hover.disabled,.datepicker table tr td.selected[disabled],.datepicker table tr td.selected:hover[disabled],.datepicker table tr td.selected.disabled[disabled],.datepicker table tr td.selected.disabled:hover[disabled]{background-color:gray}.datepicker table tr td.selected:active,.datepicker table tr td.selected:hover:active,.datepicker table tr td.selected.disabled:active,.datepicker table tr td.selected.disabled:hover:active,.datepicker table tr td.selected.active,.datepicker table tr td.selected:hover.active,.datepicker table tr td.selected.disabled.active,.datepicker table tr td.selected.disabled:hover.active{background-color:#666 \9}.datepicker table tr td.active,.datepicker table tr td.active:hover,.datepicker table tr td.active.disabled,.datepicker table tr td.active.disabled:hover{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(top,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.datepicker table tr td.active:hover,.datepicker table tr td.active:hover:hover,.datepicker table tr td.active.disabled:hover,.datepicker table tr td.active.disabled:hover:hover,.datepicker table tr td.active:active,.datepicker table tr td.active:hover:active,.datepicker table tr td.active.disabled:active,.datepicker table tr td.active.disabled:hover:active,.datepicker table tr td.active.active,.datepicker table tr td.active:hover.active,.datepicker table tr td.active.disabled.active,.datepicker table tr td.active.disabled:hover.active,.datepicker table tr td.active.disabled,.datepicker table tr td.active:hover.disabled,.datepicker table tr td.active.disabled.disabled,.datepicker table tr td.active.disabled:hover.disabled,.datepicker table tr td.active[disabled],.datepicker table tr td.active:hover[disabled],.datepicker table tr td.active.disabled[disabled],.datepicker table tr td.active.disabled:hover[disabled]{background-color:#04c}.datepicker table tr td.active:active,.datepicker table tr td.active:hover:active,.datepicker table tr td.active.disabled:active,.datepicker table tr td.active.disabled:hover:active,.datepicker table tr td.active.active,.datepicker table tr td.active:hover.active,.datepicker table tr td.active.disabled.active,.datepicker table tr td.active.disabled:hover.active{background-color:#039 \9}.datepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.datepicker table tr td span:hover{background:#eee}.datepicker table tr td span.disabled,.datepicker table tr td span.disabled:hover{background:0 0;color:#999;cursor:default}.datepicker table tr td span.active,.datepicker table tr td span.active:hover,.datepicker table tr td span.active.disabled,.datepicker table tr td span.active.disabled:hover{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(top,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.datepicker table tr td span.active:hover,.datepicker table tr td span.active:hover:hover,.datepicker table tr td span.active.disabled:hover,.datepicker table tr td span.active.disabled:hover:hover,.datepicker table tr td span.active:active,.datepicker table tr td span.active:hover:active,.datepicker table tr td span.active.disabled:active,.datepicker table tr td span.active.disabled:hover:active,.datepicker table tr td span.active.active,.datepicker table tr td span.active:hover.active,.datepicker table tr td span.active.disabled.active,.datepicker table tr td span.active.disabled:hover.active,.datepicker table tr td span.active.disabled,.datepicker table tr td span.active:hover.disabled,.datepicker table tr td span.active.disabled.disabled,.datepicker table tr td span.active.disabled:hover.disabled,.datepicker table tr td span.active[disabled],.datepicker table tr td span.active:hover[disabled],.datepicker table tr td span.active.disabled[disabled],.datepicker table tr td span.active.disabled:hover[disabled]{background-color:#04c}.datepicker table tr td span.active:active,.datepicker table tr td span.active:hover:active,.datepicker table tr td span.active.disabled:active,.datepicker table tr td span.active.disabled:hover:active,.datepicker table tr td span.active.active,.datepicker table tr td span.active:hover.active,.datepicker table tr td span.active.disabled.active,.datepicker table tr td span.active.disabled:hover.active{background-color:#039 \9}.datepicker table tr td span.old,.datepicker table tr td span.new{color:#999}.datepicker .datepicker-switch{width:145px}.datepicker thead tr:first-child th,.datepicker tfoot tr th{cursor:pointer}.datepicker thead tr:first-child th:hover,.datepicker tfoot tr th:hover{background:#eee}.datepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.datepicker thead tr:first-child .cw{cursor:default;background-color:transparent}.input-append.date .add-on,.input-prepend.date .add-on{cursor:pointer}.input-append.date .add-on i,.input-prepend.date .add-on i{margin-top:3px}.input-daterange input{text-align:center}.input-daterange input:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-daterange input:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-daterange .add-on{display:inline-block;width:auto;min-width:16px;height:18px;padding:4px 5px;font-weight:400;line-height:18px;text-align:center;text-shadow:0 1px 0 #fff;vertical-align:middle;background-color:#eee;border:1px solid #ccc;margin-left:-5px;margin-right:-5px}
skin/frontend/base/default/css/Clx/bootstrap.min.css ADDED
@@ -0,0 +1,6291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
3
+ * Copyright 2011-2014 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */
6
+ /*! normalize.css v3.0.1 | MIT License | git.io/normalize */
7
+
8
+ html {
9
+ font-family: sans-serif;
10
+ -webkit-text-size-adjust: 100%;
11
+ -ms-text-size-adjust: 100%
12
+ }
13
+ body {
14
+ margin: 0
15
+ }
16
+ article,
17
+ aside,
18
+ details,
19
+ figcaption,
20
+ figure,
21
+ footer,
22
+ header,
23
+ hgroup,
24
+ main,
25
+ nav,
26
+ section,
27
+ summary {
28
+ display: block
29
+ }
30
+ audio,
31
+ canvas,
32
+ progress,
33
+ video {
34
+ display: inline-block;
35
+ vertical-align: baseline
36
+ }
37
+ audio:not([controls]) {
38
+ display: none;
39
+ height: 0
40
+ }
41
+ [hidden],
42
+ template {
43
+ display: none
44
+ }
45
+ a {
46
+ background: 0 0
47
+ }
48
+ a:active,
49
+ a:hover {
50
+ outline: 0
51
+ }
52
+ abbr[title] {
53
+ border-bottom: 1px dotted
54
+ }
55
+ b,
56
+ strong {
57
+ font-weight: 700
58
+ }
59
+ dfn {
60
+ font-style: italic
61
+ }
62
+ h1 {
63
+ margin: .67em 0;
64
+ font-size: 2em
65
+ }
66
+ mark {
67
+ color: #000;
68
+ background: #ff0
69
+ }
70
+ small {
71
+ font-size: 80%
72
+ }
73
+ sub,
74
+ sup {
75
+ position: relative;
76
+ font-size: 75%;
77
+ line-height: 0;
78
+ vertical-align: baseline
79
+ }
80
+ sup {
81
+ top: -.5em
82
+ }
83
+ sub {
84
+ bottom: -.25em
85
+ }
86
+ img {
87
+ border: 0
88
+ }
89
+ svg:not(:root) {
90
+ overflow: hidden
91
+ }
92
+ figure {
93
+ margin: 1em 40px
94
+ }
95
+ hr {
96
+ height: 0;
97
+ -webkit-box-sizing: content-box;
98
+ -moz-box-sizing: content-box;
99
+ box-sizing: content-box
100
+ }
101
+ pre {
102
+ overflow: auto
103
+ }
104
+ code,
105
+ kbd,
106
+ pre,
107
+ samp {
108
+ font-family: monospace, monospace;
109
+ font-size: 1em
110
+ }
111
+ button,
112
+ input,
113
+ optgroup,
114
+ select,
115
+ textarea {
116
+ margin: 0;
117
+ font: inherit;
118
+ color: inherit
119
+ }
120
+ button {
121
+ overflow: visible
122
+ }
123
+ button,
124
+ select {
125
+ text-transform: none
126
+ }
127
+ button,
128
+ html input[type=button],
129
+ input[type=reset],
130
+ input[type=submit] {
131
+ -webkit-appearance: button;
132
+ cursor: pointer
133
+ }
134
+ button[disabled],
135
+ html input[disabled] {
136
+ cursor: default
137
+ }
138
+ button::-moz-focus-inner,
139
+ input::-moz-focus-inner {
140
+ padding: 0;
141
+ border: 0
142
+ }
143
+ input {
144
+ line-height: normal
145
+ }
146
+ input[type=checkbox],
147
+ input[type=radio] {
148
+ -webkit-box-sizing: border-box;
149
+ -moz-box-sizing: border-box;
150
+ box-sizing: border-box;
151
+ padding: 0
152
+ }
153
+ input[type=number]::-webkit-inner-spin-button,
154
+ input[type=number]::-webkit-outer-spin-button {
155
+ height: auto
156
+ }
157
+ input[type=search] {
158
+ -webkit-box-sizing: content-box;
159
+ -moz-box-sizing: content-box;
160
+ box-sizing: content-box;
161
+ -webkit-appearance: textfield
162
+ }
163
+ input[type=search]::-webkit-search-cancel-button,
164
+ input[type=search]::-webkit-search-decoration {
165
+ -webkit-appearance: none
166
+ }
167
+ fieldset {
168
+ padding: .35em .625em .75em;
169
+ margin: 0 2px;
170
+ border: 1px solid silver
171
+ }
172
+ legend {
173
+ padding: 0;
174
+ border: 0
175
+ }
176
+ textarea {
177
+ overflow: auto
178
+ }
179
+ optgroup {
180
+ font-weight: 700
181
+ }
182
+ table {
183
+ border-spacing: 0;
184
+ border-collapse: collapse
185
+ }
186
+ td,
187
+ th {
188
+ padding: 0
189
+ }
190
+ @media print {
191
+ * {
192
+ color: #000!important;
193
+ text-shadow: none!important;
194
+ background: transparent!important;
195
+ -webkit-box-shadow: none!important;
196
+ box-shadow: none!important
197
+ }
198
+ a,
199
+ a:visited {
200
+ text-decoration: underline
201
+ }
202
+ a[href]:after {
203
+ content: " (" attr(href) ")"
204
+ }
205
+ abbr[title]:after {
206
+ content: " (" attr(title) ")"
207
+ }
208
+ a[href^="javascript:"]:after,
209
+ a[href^="#"]:after {
210
+ content: ""
211
+ }
212
+ pre,
213
+ blockquote {
214
+ border: 1px solid #999;
215
+ page-break-inside: avoid
216
+ }
217
+ thead {
218
+ display: table-header-group
219
+ }
220
+ tr,
221
+ img {
222
+ page-break-inside: avoid
223
+ }
224
+ img {
225
+ max-width: 100%!important
226
+ }
227
+ p,
228
+ h2,
229
+ h3 {
230
+ orphans: 3;
231
+ widows: 3
232
+ }
233
+ h2,
234
+ h3 {
235
+ page-break-after: avoid
236
+ }
237
+ select {
238
+ background: #fff!important
239
+ }
240
+ .navbar {
241
+ display: none
242
+ }
243
+ .table td,
244
+ .table th {
245
+ background-color: #fff!important
246
+ }
247
+ .btn>.caret,
248
+ .dropup>.btn>.caret {
249
+ border-top-color: #000!important
250
+ }
251
+ .label {
252
+ border: 1px solid #000
253
+ }
254
+ .table {
255
+ border-collapse: collapse!important
256
+ }
257
+ .table-bordered th,
258
+ .table-bordered td {
259
+ border: 1px solid #ddd!important
260
+ }
261
+ }
262
+ @font-face {
263
+ font-family: 'Glyphicons Halflings';
264
+ src: url(../css/glyphicons-halflings-regular.eot);
265
+ src: url(../css/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'), url(../css/glyphicons-halflings-regular.woff) format('woff'), url(../css/glyphicons-halflings-regular.ttf) format('truetype'), url(../css/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')
266
+ }
267
+ .glyphicon {
268
+ position: relative;
269
+ top: 1px;
270
+ display: inline-block;
271
+ font-family: 'Glyphicons Halflings';
272
+ font-style: normal;
273
+ font-weight: 400;
274
+ line-height: 1;
275
+ -webkit-font-smoothing: antialiased;
276
+ -moz-osx-font-smoothing: grayscale
277
+ }
278
+ .glyphicon-asterisk:before {
279
+ content: "\2a"
280
+ }
281
+ .glyphicon-plus:before {
282
+ content: "\2b"
283
+ }
284
+ .glyphicon-euro:before {
285
+ content: "\20ac"
286
+ }
287
+ .glyphicon-minus:before {
288
+ content: "\2212"
289
+ }
290
+ .glyphicon-cloud:before {
291
+ content: "\2601"
292
+ }
293
+ .glyphicon-envelope:before {
294
+ content: "\2709"
295
+ }
296
+ .glyphicon-pencil:before {
297
+ content: "\270f"
298
+ }
299
+ .glyphicon-glass:before {
300
+ content: "\e001"
301
+ }
302
+ .glyphicon-music:before {
303
+ content: "\e002"
304
+ }
305
+ .glyphicon-search:before {
306
+ content: "\e003"
307
+ }
308
+ .glyphicon-heart:before {
309
+ content: "\e005"
310
+ }
311
+ .glyphicon-star:before {
312
+ content: "\e006"
313
+ }
314
+ .glyphicon-star-empty:before {
315
+ content: "\e007"
316
+ }
317
+ .glyphicon-user:before {
318
+ content: "\e008"
319
+ }
320
+ .glyphicon-film:before {
321
+ content: "\e009"
322
+ }
323
+ .glyphicon-th-large:before {
324
+ content: "\e010"
325
+ }
326
+ .glyphicon-th:before {
327
+ content: "\e011"
328
+ }
329
+ .glyphicon-th-list:before {
330
+ content: "\e012"
331
+ }
332
+ .glyphicon-ok:before {
333
+ content: "\e013"
334
+ }
335
+ .glyphicon-remove:before {
336
+ content: "\e014"
337
+ }
338
+ .glyphicon-zoom-in:before {
339
+ content: "\e015"
340
+ }
341
+ .glyphicon-zoom-out:before {
342
+ content: "\e016"
343
+ }
344
+ .glyphicon-off:before {
345
+ content: "\e017"
346
+ }
347
+ .glyphicon-signal:before {
348
+ content: "\e018"
349
+ }
350
+ .glyphicon-cog:before {
351
+ content: "\e019"
352
+ }
353
+ .glyphicon-trash:before {
354
+ content: "\e020"
355
+ }
356
+ .glyphicon-home:before {
357
+ content: "\e021"
358
+ }
359
+ .glyphicon-file:before {
360
+ content: "\e022"
361
+ }
362
+ .glyphicon-time:before {
363
+ content: "\e023"
364
+ }
365
+ .glyphicon-road:before {
366
+ content: "\e024"
367
+ }
368
+ .glyphicon-download-alt:before {
369
+ content: "\e025"
370
+ }
371
+ .glyphicon-download:before {
372
+ content: "\e026"
373
+ }
374
+ .glyphicon-upload:before {
375
+ content: "\e027"
376
+ }
377
+ .glyphicon-inbox:before {
378
+ content: "\e028"
379
+ }
380
+ .glyphicon-play-circle:before {
381
+ content: "\e029"
382
+ }
383
+ .glyphicon-repeat:before {
384
+ content: "\e030"
385
+ }
386
+ .glyphicon-refresh:before {
387
+ content: "\e031"
388
+ }
389
+ .glyphicon-list-alt:before {
390
+ content: "\e032"
391
+ }
392
+ .glyphicon-lock:before {
393
+ content: "\e033"
394
+ }
395
+ .glyphicon-flag:before {
396
+ content: "\e034"
397
+ }
398
+ .glyphicon-headphones:before {
399
+ content: "\e035"
400
+ }
401
+ .glyphicon-volume-off:before {
402
+ content: "\e036"
403
+ }
404
+ .glyphicon-volume-down:before {
405
+ content: "\e037"
406
+ }
407
+ .glyphicon-volume-up:before {
408
+ content: "\e038"
409
+ }
410
+ .glyphicon-qrcode:before {
411
+ content: "\e039"
412
+ }
413
+ .glyphicon-barcode:before {
414
+ content: "\e040"
415
+ }
416
+ .glyphicon-tag:before {
417
+ content: "\e041"
418
+ }
419
+ .glyphicon-tags:before {
420
+ content: "\e042"
421
+ }
422
+ .glyphicon-book:before {
423
+ content: "\e043"
424
+ }
425
+ .glyphicon-bookmark:before {
426
+ content: "\e044"
427
+ }
428
+ .glyphicon-print:before {
429
+ content: "\e045"
430
+ }
431
+ .glyphicon-camera:before {
432
+ content: "\e046"
433
+ }
434
+ .glyphicon-font:before {
435
+ content: "\e047"
436
+ }
437
+ .glyphicon-bold:before {
438
+ content: "\e048"
439
+ }
440
+ .glyphicon-italic:before {
441
+ content: "\e049"
442
+ }
443
+ .glyphicon-text-height:before {
444
+ content: "\e050"
445
+ }
446
+ .glyphicon-text-width:before {
447
+ content: "\e051"
448
+ }
449
+ .glyphicon-align-left:before {
450
+ content: "\e052"
451
+ }
452
+ .glyphicon-align-center:before {
453
+ content: "\e053"
454
+ }
455
+ .glyphicon-align-right:before {
456
+ content: "\e054"
457
+ }
458
+ .glyphicon-align-justify:before {
459
+ content: "\e055"
460
+ }
461
+ .glyphicon-list:before {
462
+ content: "\e056"
463
+ }
464
+ .glyphicon-indent-left:before {
465
+ content: "\e057"
466
+ }
467
+ .glyphicon-indent-right:before {
468
+ content: "\e058"
469
+ }
470
+ .glyphicon-facetime-video:before {
471
+ content: "\e059"
472
+ }
473
+ .glyphicon-picture:before {
474
+ content: "\e060"
475
+ }
476
+ .glyphicon-map-marker:before {
477
+ content: "\e062"
478
+ }
479
+ .glyphicon-adjust:before {
480
+ content: "\e063"
481
+ }
482
+ .glyphicon-tint:before {
483
+ content: "\e064"
484
+ }
485
+ .glyphicon-edit:before {
486
+ content: "\e065"
487
+ }
488
+ .glyphicon-share:before {
489
+ content: "\e066"
490
+ }
491
+ .glyphicon-check:before {
492
+ content: "\e067"
493
+ }
494
+ .glyphicon-move:before {
495
+ content: "\e068"
496
+ }
497
+ .glyphicon-step-backward:before {
498
+ content: "\e069"
499
+ }
500
+ .glyphicon-fast-backward:before {
501
+ content: "\e070"
502
+ }
503
+ .glyphicon-backward:before {
504
+ content: "\e071"
505
+ }
506
+ .glyphicon-play:before {
507
+ content: "\e072"
508
+ }
509
+ .glyphicon-pause:before {
510
+ content: "\e073"
511
+ }
512
+ .glyphicon-stop:before {
513
+ content: "\e074"
514
+ }
515
+ .glyphicon-forward:before {
516
+ content: "\e075"
517
+ }
518
+ .glyphicon-fast-forward:before {
519
+ content: "\e076"
520
+ }
521
+ .glyphicon-step-forward:before {
522
+ content: "\e077"
523
+ }
524
+ .glyphicon-eject:before {
525
+ content: "\e078"
526
+ }
527
+ .glyphicon-chevron-left:before {
528
+ content: "\e079"
529
+ }
530
+ .glyphicon-chevron-right:before {
531
+ content: "\e080"
532
+ }
533
+ .glyphicon-plus-sign:before {
534
+ content: "\e081"
535
+ }
536
+ .glyphicon-minus-sign:before {
537
+ content: "\e082"
538
+ }
539
+ .glyphicon-remove-sign:before {
540
+ content: "\e083"
541
+ }
542
+ .glyphicon-ok-sign:before {
543
+ content: "\e084"
544
+ }
545
+ .glyphicon-question-sign:before {
546
+ content: "\e085"
547
+ }
548
+ .glyphicon-info-sign:before {
549
+ content: "\e086"
550
+ }
551
+ .glyphicon-screenshot:before {
552
+ content: "\e087"
553
+ }
554
+ .glyphicon-remove-circle:before {
555
+ content: "\e088"
556
+ }
557
+ .glyphicon-ok-circle:before {
558
+ content: "\e089"
559
+ }
560
+ .glyphicon-ban-circle:before {
561
+ content: "\e090"
562
+ }
563
+ .glyphicon-arrow-left:before {
564
+ content: "\e091"
565
+ }
566
+ .glyphicon-arrow-right:before {
567
+ content: "\e092"
568
+ }
569
+ .glyphicon-arrow-up:before {
570
+ content: "\e093"
571
+ }
572
+ .glyphicon-arrow-down:before {
573
+ content: "\e094"
574
+ }
575
+ .glyphicon-share-alt:before {
576
+ content: "\e095"
577
+ }
578
+ .glyphicon-resize-full:before {
579
+ content: "\e096"
580
+ }
581
+ .glyphicon-resize-small:before {
582
+ content: "\e097"
583
+ }
584
+ .glyphicon-exclamation-sign:before {
585
+ content: "\e101"
586
+ }
587
+ .glyphicon-gift:before {
588
+ content: "\e102"
589
+ }
590
+ .glyphicon-leaf:before {
591
+ content: "\e103"
592
+ }
593
+ .glyphicon-fire:before {
594
+ content: "\e104"
595
+ }
596
+ .glyphicon-eye-open:before {
597
+ content: "\e105"
598
+ }
599
+ .glyphicon-eye-close:before {
600
+ content: "\e106"
601
+ }
602
+ .glyphicon-warning-sign:before {
603
+ content: "\e107"
604
+ }
605
+ .glyphicon-plane:before {
606
+ content: "\e108"
607
+ }
608
+ .glyphicon-calendar:before {
609
+ content: "\e109"
610
+ }
611
+ .glyphicon-random:before {
612
+ content: "\e110"
613
+ }
614
+ .glyphicon-comment:before {
615
+ content: "\e111"
616
+ }
617
+ .glyphicon-magnet:before {
618
+ content: "\e112"
619
+ }
620
+ .glyphicon-chevron-up:before {
621
+ content: "\e113"
622
+ }
623
+ .glyphicon-chevron-down:before {
624
+ content: "\e114"
625
+ }
626
+ .glyphicon-retweet:before {
627
+ content: "\e115"
628
+ }
629
+ .glyphicon-shopping-cart:before {
630
+ content: "\e116"
631
+ }
632
+ .glyphicon-folder-close:before {
633
+ content: "\e117"
634
+ }
635
+ .glyphicon-folder-open:before {
636
+ content: "\e118"
637
+ }
638
+ .glyphicon-resize-vertical:before {
639
+ content: "\e119"
640
+ }
641
+ .glyphicon-resize-horizontal:before {
642
+ content: "\e120"
643
+ }
644
+ .glyphicon-hdd:before {
645
+ content: "\e121"
646
+ }
647
+ .glyphicon-bullhorn:before {
648
+ content: "\e122"
649
+ }
650
+ .glyphicon-bell:before {
651
+ content: "\e123"
652
+ }
653
+ .glyphicon-certificate:before {
654
+ content: "\e124"
655
+ }
656
+ .glyphicon-thumbs-up:before {
657
+ content: "\e125"
658
+ }
659
+ .glyphicon-thumbs-down:before {
660
+ content: "\e126"
661
+ }
662
+ .glyphicon-hand-right:before {
663
+ content: "\e127"
664
+ }
665
+ .glyphicon-hand-left:before {
666
+ content: "\e128"
667
+ }
668
+ .glyphicon-hand-up:before {
669
+ content: "\e129"
670
+ }
671
+ .glyphicon-hand-down:before {
672
+ content: "\e130"
673
+ }
674
+ .glyphicon-circle-arrow-right:before {
675
+ content: "\e131"
676
+ }
677
+ .glyphicon-circle-arrow-left:before {
678
+ content: "\e132"
679
+ }
680
+ .glyphicon-circle-arrow-up:before {
681
+ content: "\e133"
682
+ }
683
+ .glyphicon-circle-arrow-down:before {
684
+ content: "\e134"
685
+ }
686
+ .glyphicon-globe:before {
687
+ content: "\e135"
688
+ }
689
+ .glyphicon-wrench:before {
690
+ content: "\e136"
691
+ }
692
+ .glyphicon-tasks:before {
693
+ content: "\e137"
694
+ }
695
+ .glyphicon-filter:before {
696
+ content: "\e138"
697
+ }
698
+ .glyphicon-briefcase:before {
699
+ content: "\e139"
700
+ }
701
+ .glyphicon-fullscreen:before {
702
+ content: "\e140"
703
+ }
704
+ .glyphicon-dashboard:before {
705
+ content: "\e141"
706
+ }
707
+ .glyphicon-paperclip:before {
708
+ content: "\e142"
709
+ }
710
+ .glyphicon-heart-empty:before {
711
+ content: "\e143"
712
+ }
713
+ .glyphicon-link:before {
714
+ content: "\e144"
715
+ }
716
+ .glyphicon-phone:before {
717
+ content: "\e145"
718
+ }
719
+ .glyphicon-pushpin:before {
720
+ content: "\e146"
721
+ }
722
+ .glyphicon-usd:before {
723
+ content: "\e148"
724
+ }
725
+ .glyphicon-gbp:before {
726
+ content: "\e149"
727
+ }
728
+ .glyphicon-sort:before {
729
+ content: "\e150"
730
+ }
731
+ .glyphicon-sort-by-alphabet:before {
732
+ content: "\e151"
733
+ }
734
+ .glyphicon-sort-by-alphabet-alt:before {
735
+ content: "\e152"
736
+ }
737
+ .glyphicon-sort-by-order:before {
738
+ content: "\e153"
739
+ }
740
+ .glyphicon-sort-by-order-alt:before {
741
+ content: "\e154"
742
+ }
743
+ .glyphicon-sort-by-attributes:before {
744
+ content: "\e155"
745
+ }
746
+ .glyphicon-sort-by-attributes-alt:before {
747
+ content: "\e156"
748
+ }
749
+ .glyphicon-unchecked:before {
750
+ content: "\e157"
751
+ }
752
+ .glyphicon-expand:before {
753
+ content: "\e158"
754
+ }
755
+ .glyphicon-collapse-down:before {
756
+ content: "\e159"
757
+ }
758
+ .glyphicon-collapse-up:before {
759
+ content: "\e160"
760
+ }
761
+ .glyphicon-log-in:before {
762
+ content: "\e161"
763
+ }
764
+ .glyphicon-flash:before {
765
+ content: "\e162"
766
+ }
767
+ .glyphicon-log-out:before {
768
+ content: "\e163"
769
+ }
770
+ .glyphicon-new-window:before {
771
+ content: "\e164"
772
+ }
773
+ .glyphicon-record:before {
774
+ content: "\e165"
775
+ }
776
+ .glyphicon-save:before {
777
+ content: "\e166"
778
+ }
779
+ .glyphicon-open:before {
780
+ content: "\e167"
781
+ }
782
+ .glyphicon-saved:before {
783
+ content: "\e168"
784
+ }
785
+ .glyphicon-import:before {
786
+ content: "\e169"
787
+ }
788
+ .glyphicon-export:before {
789
+ content: "\e170"
790
+ }
791
+ .glyphicon-send:before {
792
+ content: "\e171"
793
+ }
794
+ .glyphicon-floppy-disk:before {
795
+ content: "\e172"
796
+ }
797
+ .glyphicon-floppy-saved:before {
798
+ content: "\e173"
799
+ }
800
+ .glyphicon-floppy-remove:before {
801
+ content: "\e174"
802
+ }
803
+ .glyphicon-floppy-save:before {
804
+ content: "\e175"
805
+ }
806
+ .glyphicon-floppy-open:before {
807
+ content: "\e176"
808
+ }
809
+ .glyphicon-credit-card:before {
810
+ content: "\e177"
811
+ }
812
+ .glyphicon-transfer:before {
813
+ content: "\e178"
814
+ }
815
+ .glyphicon-cutlery:before {
816
+ content: "\e179"
817
+ }
818
+ .glyphicon-header:before {
819
+ content: "\e180"
820
+ }
821
+ .glyphicon-compressed:before {
822
+ content: "\e181"
823
+ }
824
+ .glyphicon-earphone:before {
825
+ content: "\e182"
826
+ }
827
+ .glyphicon-phone-alt:before {
828
+ content: "\e183"
829
+ }
830
+ .glyphicon-tower:before {
831
+ content: "\e184"
832
+ }
833
+ .glyphicon-stats:before {
834
+ content: "\e185"
835
+ }
836
+ .glyphicon-sd-video:before {
837
+ content: "\e186"
838
+ }
839
+ .glyphicon-hd-video:before {
840
+ content: "\e187"
841
+ }
842
+ .glyphicon-subtitles:before {
843
+ content: "\e188"
844
+ }
845
+ .glyphicon-sound-stereo:before {
846
+ content: "\e189"
847
+ }
848
+ .glyphicon-sound-dolby:before {
849
+ content: "\e190"
850
+ }
851
+ .glyphicon-sound-5-1:before {
852
+ content: "\e191"
853
+ }
854
+ .glyphicon-sound-6-1:before {
855
+ content: "\e192"
856
+ }
857
+ .glyphicon-sound-7-1:before {
858
+ content: "\e193"
859
+ }
860
+ .glyphicon-copyright-mark:before {
861
+ content: "\e194"
862
+ }
863
+ .glyphicon-registration-mark:before {
864
+ content: "\e195"
865
+ }
866
+ .glyphicon-cloud-download:before {
867
+ content: "\e197"
868
+ }
869
+ .glyphicon-cloud-upload:before {
870
+ content: "\e198"
871
+ }
872
+ .glyphicon-tree-conifer:before {
873
+ content: "\e199"
874
+ }
875
+ .glyphicon-tree-deciduous:before {
876
+ content: "\e200"
877
+ }
878
+ * {
879
+ -webkit-box-sizing: border-box;
880
+ -moz-box-sizing: border-box;
881
+ box-sizing: border-box
882
+ }
883
+ :before,
884
+ :after {
885
+ -webkit-box-sizing: border-box;
886
+ -moz-box-sizing: border-box;
887
+ box-sizing: border-box
888
+ }
889
+ html {
890
+ font-size: 10px;
891
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0)
892
+ }
893
+ body {
894
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
895
+ font-size: 14px;
896
+ line-height: 1.42857143;
897
+ color: #333;
898
+ background-color: #fff
899
+ }
900
+ input,
901
+ button,
902
+ select,
903
+ textarea {
904
+ font-family: inherit;
905
+ font-size: inherit;
906
+ line-height: inherit
907
+ }
908
+ a {
909
+ color: #428bca;
910
+ text-decoration: none
911
+ }
912
+ a:hover,
913
+ a:focus {
914
+ color: #2a6496;
915
+ text-decoration: underline
916
+ }
917
+ a:focus {
918
+ outline: thin dotted;
919
+ outline: 5px auto -webkit-focus-ring-color;
920
+ outline-offset: -2px
921
+ }
922
+ figure {
923
+ margin: 0
924
+ }
925
+ img {
926
+ vertical-align: middle
927
+ }
928
+ .img-responsive,
929
+ .thumbnail>img,
930
+ .thumbnail a>img,
931
+ .carousel-inner>.item>img,
932
+ .carousel-inner>.item>a>img {
933
+ display: block;
934
+ width: 100% \9;
935
+ max-width: 100%;
936
+ height: auto
937
+ }
938
+ .img-rounded {
939
+ border-radius: 6px
940
+ }
941
+ .img-thumbnail {
942
+ display: inline-block;
943
+ width: 100% \9;
944
+ max-width: 100%;
945
+ height: auto;
946
+ padding: 4px;
947
+ line-height: 1.42857143;
948
+ background-color: #fff;
949
+ border: 1px solid #ddd;
950
+ border-radius: 4px;
951
+ -webkit-transition: all .2s ease-in-out;
952
+ -o-transition: all .2s ease-in-out;
953
+ transition: all .2s ease-in-out
954
+ }
955
+ .img-circle {
956
+ border-radius: 50%
957
+ }
958
+ hr {
959
+ margin-top: 20px;
960
+ margin-bottom: 20px;
961
+ border: 0;
962
+ border-top: 1px solid #eee
963
+ }
964
+ .sr-only {
965
+ position: absolute;
966
+ width: 1px;
967
+ height: 1px;
968
+ padding: 0;
969
+ margin: -1px;
970
+ overflow: hidden;
971
+ clip: rect(0, 0, 0, 0);
972
+ border: 0
973
+ }
974
+ .sr-only-focusable:active,
975
+ .sr-only-focusable:focus {
976
+ position: static;
977
+ width: auto;
978
+ height: auto;
979
+ margin: 0;
980
+ overflow: visible;
981
+ clip: auto
982
+ }
983
+ h1,
984
+ h2,
985
+ h3,
986
+ h4,
987
+ h5,
988
+ h6,
989
+ .h1,
990
+ .h2,
991
+ .h3,
992
+ .h4,
993
+ .h5,
994
+ .h6 {
995
+ font-family: inherit;
996
+ font-weight: 500;
997
+ line-height: 1.1;
998
+ color: inherit
999
+ }
1000
+ h1 small,
1001
+ h2 small,
1002
+ h3 small,
1003
+ h4 small,
1004
+ h5 small,
1005
+ h6 small,
1006
+ .h1 small,
1007
+ .h2 small,
1008
+ .h3 small,
1009
+ .h4 small,
1010
+ .h5 small,
1011
+ .h6 small,
1012
+ h1 .small,
1013
+ h2 .small,
1014
+ h3 .small,
1015
+ h4 .small,
1016
+ h5 .small,
1017
+ h6 .small,
1018
+ .h1 .small,
1019
+ .h2 .small,
1020
+ .h3 .small,
1021
+ .h4 .small,
1022
+ .h5 .small,
1023
+ .h6 .small {
1024
+ font-weight: 400;
1025
+ line-height: 1;
1026
+ color: #777
1027
+ }
1028
+ h1,
1029
+ .h1,
1030
+ h2,
1031
+ .h2,
1032
+ h3,
1033
+ .h3 {
1034
+ margin-top: 20px;
1035
+ margin-bottom: 10px
1036
+ }
1037
+ h1 small,
1038
+ .h1 small,
1039
+ h2 small,
1040
+ .h2 small,
1041
+ h3 small,
1042
+ .h3 small,
1043
+ h1 .small,
1044
+ .h1 .small,
1045
+ h2 .small,
1046
+ .h2 .small,
1047
+ h3 .small,
1048
+ .h3 .small {
1049
+ font-size: 65%
1050
+ }
1051
+ h4,
1052
+ .h4,
1053
+ h5,
1054
+ .h5,
1055
+ h6,
1056
+ .h6 {
1057
+ margin-top: 10px;
1058
+ margin-bottom: 10px
1059
+ }
1060
+ h4 small,
1061
+ .h4 small,
1062
+ h5 small,
1063
+ .h5 small,
1064
+ h6 small,
1065
+ .h6 small,
1066
+ h4 .small,
1067
+ .h4 .small,
1068
+ h5 .small,
1069
+ .h5 .small,
1070
+ h6 .small,
1071
+ .h6 .small {
1072
+ font-size: 75%
1073
+ }
1074
+ h1,
1075
+ .h1 {
1076
+ font-size: 36px
1077
+ }
1078
+ h2,
1079
+ .h2 {
1080
+ font-size: 30px
1081
+ }
1082
+ h3,
1083
+ .h3 {
1084
+ font-size: 24px
1085
+ }
1086
+ h4,
1087
+ .h4 {
1088
+ font-size: 18px
1089
+ }
1090
+ h5,
1091
+ .h5 {
1092
+ font-size: 14px
1093
+ }
1094
+ h6,
1095
+ .h6 {
1096
+ font-size: 12px
1097
+ }
1098
+ p {
1099
+ margin: 0 0 10px
1100
+ }
1101
+ .lead {
1102
+ margin-bottom: 20px;
1103
+ font-size: 16px;
1104
+ font-weight: 300;
1105
+ line-height: 1.4
1106
+ }
1107
+ @media (min-width: 768px) {
1108
+ .lead {
1109
+ font-size: 21px
1110
+ }
1111
+ }
1112
+ small,
1113
+ .small {
1114
+ font-size: 85%
1115
+ }
1116
+ cite {
1117
+ font-style: normal
1118
+ }
1119
+ mark,
1120
+ .mark {
1121
+ padding: .2em;
1122
+ background-color: #fcf8e3
1123
+ }
1124
+ .text-left {
1125
+ text-align: left
1126
+ }
1127
+ .text-right {
1128
+ text-align: right
1129
+ }
1130
+ .text-center {
1131
+ text-align: center
1132
+ }
1133
+ .text-justify {
1134
+ text-align: justify
1135
+ }
1136
+ .text-nowrap {
1137
+ white-space: nowrap
1138
+ }
1139
+ .text-lowercase {
1140
+ text-transform: lowercase
1141
+ }
1142
+ .text-uppercase {
1143
+ text-transform: uppercase
1144
+ }
1145
+ .text-capitalize {
1146
+ text-transform: capitalize
1147
+ }
1148
+ .text-muted {
1149
+ color: #777
1150
+ }
1151
+ .text-primary {
1152
+ color: #428bca
1153
+ }
1154
+ a.text-primary:hover {
1155
+ color: #3071a9
1156
+ }
1157
+ .text-success {
1158
+ color: #3c763d
1159
+ }
1160
+ a.text-success:hover {
1161
+ color: #2b542c
1162
+ }
1163
+ .text-info {
1164
+ color: #31708f
1165
+ }
1166
+ a.text-info:hover {
1167
+ color: #245269
1168
+ }
1169
+ .text-warning {
1170
+ color: #8a6d3b
1171
+ }
1172
+ a.text-warning:hover {
1173
+ color: #66512c
1174
+ }
1175
+ .text-danger {
1176
+ color: #a94442
1177
+ }
1178
+ a.text-danger:hover {
1179
+ color: #843534
1180
+ }
1181
+ .bg-primary {
1182
+ color: #fff;
1183
+ background-color: #428bca
1184
+ }
1185
+ a.bg-primary:hover {
1186
+ background-color: #3071a9
1187
+ }
1188
+ .bg-success {
1189
+ background-color: #dff0d8
1190
+ }
1191
+ a.bg-success:hover {
1192
+ background-color: #c1e2b3
1193
+ }
1194
+ .bg-info {
1195
+ background-color: #d9edf7
1196
+ }
1197
+ a.bg-info:hover {
1198
+ background-color: #afd9ee
1199
+ }
1200
+ .bg-warning {
1201
+ background-color: #fcf8e3
1202
+ }
1203
+ a.bg-warning:hover {
1204
+ background-color: #f7ecb5
1205
+ }
1206
+ .bg-danger {
1207
+ background-color: #f2dede
1208
+ }
1209
+ a.bg-danger:hover {
1210
+ background-color: #e4b9b9
1211
+ }
1212
+ .page-header {
1213
+ padding-bottom: 9px;
1214
+ margin: 40px 0 20px;
1215
+ border-bottom: 1px solid #eee
1216
+ }
1217
+ ul,
1218
+ ol {
1219
+ margin-top: 0;
1220
+ margin-bottom: 10px
1221
+ }
1222
+ ul ul,
1223
+ ol ul,
1224
+ ul ol,
1225
+ ol ol {
1226
+ margin-bottom: 0
1227
+ }
1228
+ .list-unstyled {
1229
+ padding-left: 0;
1230
+ list-style: none
1231
+ }
1232
+ .list-inline {
1233
+ padding-left: 0;
1234
+ margin-left: -5px;
1235
+ list-style: none
1236
+ }
1237
+ .list-inline>li {
1238
+ display: inline-block;
1239
+ padding-right: 5px;
1240
+ padding-left: 5px
1241
+ }
1242
+ dl {
1243
+ margin-top: 0;
1244
+ margin-bottom: 20px
1245
+ }
1246
+ dt,
1247
+ dd {
1248
+ line-height: 1.42857143
1249
+ }
1250
+ dt {
1251
+ font-weight: 700
1252
+ }
1253
+ dd {
1254
+ margin-left: 0
1255
+ }
1256
+ @media (min-width: 768px) {
1257
+ .dl-horizontal dt {
1258
+ float: left;
1259
+ width: 160px;
1260
+ overflow: hidden;
1261
+ clear: left;
1262
+ text-align: right;
1263
+ text-overflow: ellipsis;
1264
+ white-space: nowrap
1265
+ }
1266
+ .dl-horizontal dd {
1267
+ margin-left: 180px
1268
+ }
1269
+ }
1270
+ abbr[title],
1271
+ abbr[data-original-title] {
1272
+ cursor: help;
1273
+ border-bottom: 1px dotted #777
1274
+ }
1275
+ .initialism {
1276
+ font-size: 90%;
1277
+ text-transform: uppercase
1278
+ }
1279
+ blockquote {
1280
+ padding: 10px 20px;
1281
+ margin: 0 0 20px;
1282
+ font-size: 17.5px;
1283
+ border-left: 5px solid #eee
1284
+ }
1285
+ blockquote p:last-child,
1286
+ blockquote ul:last-child,
1287
+ blockquote ol:last-child {
1288
+ margin-bottom: 0
1289
+ }
1290
+ blockquote footer,
1291
+ blockquote small,
1292
+ blockquote .small {
1293
+ display: block;
1294
+ font-size: 80%;
1295
+ line-height: 1.42857143;
1296
+ color: #777
1297
+ }
1298
+ blockquote footer:before,
1299
+ blockquote small:before,
1300
+ blockquote .small:before {
1301
+ content: '\2014 \00A0'
1302
+ }
1303
+ .blockquote-reverse,
1304
+ blockquote.pull-right {
1305
+ padding-right: 15px;
1306
+ padding-left: 0;
1307
+ text-align: right;
1308
+ border-right: 5px solid #eee;
1309
+ border-left: 0
1310
+ }
1311
+ .blockquote-reverse footer:before,
1312
+ blockquote.pull-right footer:before,
1313
+ .blockquote-reverse small:before,
1314
+ blockquote.pull-right small:before,
1315
+ .blockquote-reverse .small:before,
1316
+ blockquote.pull-right .small:before {
1317
+ content: ''
1318
+ }
1319
+ .blockquote-reverse footer:after,
1320
+ blockquote.pull-right footer:after,
1321
+ .blockquote-reverse small:after,
1322
+ blockquote.pull-right small:after,
1323
+ .blockquote-reverse .small:after,
1324
+ blockquote.pull-right .small:after {
1325
+ content: '\00A0 \2014'
1326
+ }
1327
+ blockquote:before,
1328
+ blockquote:after {
1329
+ content: ""
1330
+ }
1331
+ address {
1332
+ margin-bottom: 20px;
1333
+ font-style: normal;
1334
+ line-height: 1.42857143
1335
+ }
1336
+ code,
1337
+ kbd,
1338
+ pre,
1339
+ samp {
1340
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace
1341
+ }
1342
+ code {
1343
+ padding: 2px 4px;
1344
+ font-size: 90%;
1345
+ color: #c7254e;
1346
+ background-color: #f9f2f4;
1347
+ border-radius: 4px
1348
+ }
1349
+ kbd {
1350
+ padding: 2px 4px;
1351
+ font-size: 90%;
1352
+ color: #fff;
1353
+ background-color: #333;
1354
+ border-radius: 3px;
1355
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
1356
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25)
1357
+ }
1358
+ kbd kbd {
1359
+ padding: 0;
1360
+ font-size: 100%;
1361
+ -webkit-box-shadow: none;
1362
+ box-shadow: none
1363
+ }
1364
+ pre {
1365
+ display: block;
1366
+ padding: 9.5px;
1367
+ margin: 0 0 10px;
1368
+ font-size: 13px;
1369
+ line-height: 1.42857143;
1370
+ color: #333;
1371
+ word-break: break-all;
1372
+ word-wrap: break-word;
1373
+ background-color: #f5f5f5;
1374
+ border: 1px solid #ccc;
1375
+ border-radius: 4px
1376
+ }
1377
+ pre code {
1378
+ padding: 0;
1379
+ font-size: inherit;
1380
+ color: inherit;
1381
+ white-space: pre-wrap;
1382
+ background-color: transparent;
1383
+ border-radius: 0
1384
+ }
1385
+ .pre-scrollable {
1386
+ max-height: 340px;
1387
+ overflow-y: scroll
1388
+ }
1389
+ .container {
1390
+ padding-right: 15px;
1391
+ padding-left: 15px;
1392
+ margin-right: auto;
1393
+ margin-left: auto
1394
+ }
1395
+ @media (min-width: 768px) {
1396
+ .container {
1397
+ width: 750px
1398
+ }
1399
+ }
1400
+ @media (min-width: 992px) {
1401
+ .container {
1402
+ width: 970px
1403
+ }
1404
+ }
1405
+ @media (min-width: 1200px) {
1406
+ .container {
1407
+ width: 1170px
1408
+ }
1409
+ }
1410
+ .container-fluid {
1411
+ padding-right: 15px;
1412
+ padding-left: 15px;
1413
+ margin-right: auto;
1414
+ margin-left: auto
1415
+ }
1416
+ .row {
1417
+ margin-right: -15px;
1418
+ margin-left: -15px
1419
+ }
1420
+ .col-xs-1,
1421
+ .col-sm-1,
1422
+ .col-md-1,
1423
+ .col-lg-1,
1424
+ .col-xs-2,
1425
+ .col-sm-2,
1426
+ .col-md-2,
1427
+ .col-lg-2,
1428
+ .col-xs-3,
1429
+ .col-sm-3,
1430
+ .col-md-3,
1431
+ .col-lg-3,
1432
+ .col-xs-4,
1433
+ .col-sm-4,
1434
+ .col-md-4,
1435
+ .col-lg-4,
1436
+ .col-xs-5,
1437
+ .col-sm-5,
1438
+ .col-md-5,
1439
+ .col-lg-5,
1440
+ .col-xs-6,
1441
+ .col-sm-6,
1442
+ .col-md-6,
1443
+ .col-lg-6,
1444
+ .col-xs-7,
1445
+ .col-sm-7,
1446
+ .col-md-7,
1447
+ .col-lg-7,
1448
+ .col-xs-8,
1449
+ .col-sm-8,
1450
+ .col-md-8,
1451
+ .col-lg-8,
1452
+ .col-xs-9,
1453
+ .col-sm-9,
1454
+ .col-md-9,
1455
+ .col-lg-9,
1456
+ .col-xs-10,
1457
+ .col-sm-10,
1458
+ .col-md-10,
1459
+ .col-lg-10,
1460
+ .col-xs-11,
1461
+ .col-sm-11,
1462
+ .col-md-11,
1463
+ .col-lg-11,
1464
+ .col-xs-12,
1465
+ .col-sm-12,
1466
+ .col-md-12,
1467
+ .col-lg-12 {
1468
+ position: relative;
1469
+ min-height: 1px;
1470
+ padding-right: 15px;
1471
+ padding-left: 15px
1472
+ }
1473
+ .col-xs-1,
1474
+ .col-xs-2,
1475
+ .col-xs-3,
1476
+ .col-xs-4,
1477
+ .col-xs-5,
1478
+ .col-xs-6,
1479
+ .col-xs-7,
1480
+ .col-xs-8,
1481
+ .col-xs-9,
1482
+ .col-xs-10,
1483
+ .col-xs-11,
1484
+ .col-xs-12 {
1485
+ float: left
1486
+ }
1487
+ .col-xs-12 {
1488
+ width: 100%
1489
+ }
1490
+ .col-xs-11 {
1491
+ width: 91.66666667%
1492
+ }
1493
+ .col-xs-10 {
1494
+ width: 83.33333333%
1495
+ }
1496
+ .col-xs-9 {
1497
+ width: 75%
1498
+ }
1499
+ .col-xs-8 {
1500
+ width: 66.66666667%
1501
+ }
1502
+ .col-xs-7 {
1503
+ width: 58.33333333%
1504
+ }
1505
+ .col-xs-6 {
1506
+ width: 50%
1507
+ }
1508
+ .col-xs-5 {
1509
+ width: 41.66666667%
1510
+ }
1511
+ .col-xs-4 {
1512
+ width: 33.33333333%
1513
+ }
1514
+ .col-xs-3 {
1515
+ width: 25%
1516
+ }
1517
+ .col-xs-2 {
1518
+ width: 16.66666667%
1519
+ }
1520
+ .col-xs-1 {
1521
+ width: 8.33333333%
1522
+ }
1523
+ .col-xs-pull-12 {
1524
+ right: 100%
1525
+ }
1526
+ .col-xs-pull-11 {
1527
+ right: 91.66666667%
1528
+ }
1529
+ .col-xs-pull-10 {
1530
+ right: 83.33333333%
1531
+ }
1532
+ .col-xs-pull-9 {
1533
+ right: 75%
1534
+ }
1535
+ .col-xs-pull-8 {
1536
+ right: 66.66666667%
1537
+ }
1538
+ .col-xs-pull-7 {
1539
+ right: 58.33333333%
1540
+ }
1541
+ .col-xs-pull-6 {
1542
+ right: 50%
1543
+ }
1544
+ .col-xs-pull-5 {
1545
+ right: 41.66666667%
1546
+ }
1547
+ .col-xs-pull-4 {
1548
+ right: 33.33333333%
1549
+ }
1550
+ .col-xs-pull-3 {
1551
+ right: 25%
1552
+ }
1553
+ .col-xs-pull-2 {
1554
+ right: 16.66666667%
1555
+ }
1556
+ .col-xs-pull-1 {
1557
+ right: 8.33333333%
1558
+ }
1559
+ .col-xs-pull-0 {
1560
+ right: auto
1561
+ }
1562
+ .col-xs-push-12 {
1563
+ left: 100%
1564
+ }
1565
+ .col-xs-push-11 {
1566
+ left: 91.66666667%
1567
+ }
1568
+ .col-xs-push-10 {
1569
+ left: 83.33333333%
1570
+ }
1571
+ .col-xs-push-9 {
1572
+ left: 75%
1573
+ }
1574
+ .col-xs-push-8 {
1575
+ left: 66.66666667%
1576
+ }
1577
+ .col-xs-push-7 {
1578
+ left: 58.33333333%
1579
+ }
1580
+ .col-xs-push-6 {
1581
+ left: 50%
1582
+ }
1583
+ .col-xs-push-5 {
1584
+ left: 41.66666667%
1585
+ }
1586
+ .col-xs-push-4 {
1587
+ left: 33.33333333%
1588
+ }
1589
+ .col-xs-push-3 {
1590
+ left: 25%
1591
+ }
1592
+ .col-xs-push-2 {
1593
+ left: 16.66666667%
1594
+ }
1595
+ .col-xs-push-1 {
1596
+ left: 8.33333333%
1597
+ }
1598
+ .col-xs-push-0 {
1599
+ left: auto
1600
+ }
1601
+ .col-xs-offset-12 {
1602
+ margin-left: 100%
1603
+ }
1604
+ .col-xs-offset-11 {
1605
+ margin-left: 91.66666667%
1606
+ }
1607
+ .col-xs-offset-10 {
1608
+ margin-left: 83.33333333%
1609
+ }
1610
+ .col-xs-offset-9 {
1611
+ margin-left: 75%
1612
+ }
1613
+ .col-xs-offset-8 {
1614
+ margin-left: 66.66666667%
1615
+ }
1616
+ .col-xs-offset-7 {
1617
+ margin-left: 58.33333333%
1618
+ }
1619
+ .col-xs-offset-6 {
1620
+ margin-left: 50%
1621
+ }
1622
+ .col-xs-offset-5 {
1623
+ margin-left: 41.66666667%
1624
+ }
1625
+ .col-xs-offset-4 {
1626
+ margin-left: 33.33333333%
1627
+ }
1628
+ .col-xs-offset-3 {
1629
+ margin-left: 25%
1630
+ }
1631
+ .col-xs-offset-2 {
1632
+ margin-left: 16.66666667%
1633
+ }
1634
+ .col-xs-offset-1 {
1635
+ margin-left: 8.33333333%
1636
+ }
1637
+ .col-xs-offset-0 {
1638
+ margin-left: 0
1639
+ }
1640
+ @media (min-width: 768px) {
1641
+ .col-sm-1,
1642
+ .col-sm-2,
1643
+ .col-sm-3,
1644
+ .col-sm-4,
1645
+ .col-sm-5,
1646
+ .col-sm-6,
1647
+ .col-sm-7,
1648
+ .col-sm-8,
1649
+ .col-sm-9,
1650
+ .col-sm-10,
1651
+ .col-sm-11,
1652
+ .col-sm-12 {
1653
+ float: left
1654
+ }
1655
+ .col-sm-12 {
1656
+ width: 100%
1657
+ }
1658
+ .col-sm-11 {
1659
+ width: 91.66666667%
1660
+ }
1661
+ .col-sm-10 {
1662
+ width: 83.33333333%
1663
+ }
1664
+ .col-sm-9 {
1665
+ width: 75%
1666
+ }
1667
+ .col-sm-8 {
1668
+ width: 66.66666667%
1669
+ }
1670
+ .col-sm-7 {
1671
+ width: 58.33333333%
1672
+ }
1673
+ .col-sm-6 {
1674
+ width: 50%
1675
+ }
1676
+ .col-sm-5 {
1677
+ width: 41.66666667%
1678
+ }
1679
+ .col-sm-4 {
1680
+ width: 33.33333333%
1681
+ }
1682
+ .col-sm-3 {
1683
+ width: 25%
1684
+ }
1685
+ .col-sm-2 {
1686
+ width: 16.66666667%
1687
+ }
1688
+ .col-sm-1 {
1689
+ width: 8.33333333%
1690
+ }
1691
+ .col-sm-pull-12 {
1692
+ right: 100%
1693
+ }
1694
+ .col-sm-pull-11 {
1695
+ right: 91.66666667%
1696
+ }
1697
+ .col-sm-pull-10 {
1698
+ right: 83.33333333%
1699
+ }
1700
+ .col-sm-pull-9 {
1701
+ right: 75%
1702
+ }
1703
+ .col-sm-pull-8 {
1704
+ right: 66.66666667%
1705
+ }
1706
+ .col-sm-pull-7 {
1707
+ right: 58.33333333%
1708
+ }
1709
+ .col-sm-pull-6 {
1710
+ right: 50%
1711
+ }
1712
+ .col-sm-pull-5 {
1713
+ right: 41.66666667%
1714
+ }
1715
+ .col-sm-pull-4 {
1716
+ right: 33.33333333%
1717
+ }
1718
+ .col-sm-pull-3 {
1719
+ right: 25%
1720
+ }
1721
+ .col-sm-pull-2 {
1722
+ right: 16.66666667%
1723
+ }
1724
+ .col-sm-pull-1 {
1725
+ right: 8.33333333%
1726
+ }
1727
+ .col-sm-pull-0 {
1728
+ right: auto
1729
+ }
1730
+ .col-sm-push-12 {
1731
+ left: 100%
1732
+ }
1733
+ .col-sm-push-11 {
1734
+ left: 91.66666667%
1735
+ }
1736
+ .col-sm-push-10 {
1737
+ left: 83.33333333%
1738
+ }
1739
+ .col-sm-push-9 {
1740
+ left: 75%
1741
+ }
1742
+ .col-sm-push-8 {
1743
+ left: 66.66666667%
1744
+ }
1745
+ .col-sm-push-7 {
1746
+ left: 58.33333333%
1747
+ }
1748
+ .col-sm-push-6 {
1749
+ left: 50%
1750
+ }
1751
+ .col-sm-push-5 {
1752
+ left: 41.66666667%
1753
+ }
1754
+ .col-sm-push-4 {
1755
+ left: 33.33333333%
1756
+ }
1757
+ .col-sm-push-3 {
1758
+ left: 25%
1759
+ }
1760
+ .col-sm-push-2 {
1761
+ left: 16.66666667%
1762
+ }
1763
+ .col-sm-push-1 {
1764
+ left: 8.33333333%
1765
+ }
1766
+ .col-sm-push-0 {
1767
+ left: auto
1768
+ }
1769
+ .col-sm-offset-12 {
1770
+ margin-left: 100%
1771
+ }
1772
+ .col-sm-offset-11 {
1773
+ margin-left: 91.66666667%
1774
+ }
1775
+ .col-sm-offset-10 {
1776
+ margin-left: 83.33333333%
1777
+ }
1778
+ .col-sm-offset-9 {
1779
+ margin-left: 75%
1780
+ }
1781
+ .col-sm-offset-8 {
1782
+ margin-left: 66.66666667%
1783
+ }
1784
+ .col-sm-offset-7 {
1785
+ margin-left: 58.33333333%
1786
+ }
1787
+ .col-sm-offset-6 {
1788
+ margin-left: 50%
1789
+ }
1790
+ .col-sm-offset-5 {
1791
+ margin-left: 41.66666667%
1792
+ }
1793
+ .col-sm-offset-4 {
1794
+ margin-left: 33.33333333%
1795
+ }
1796
+ .col-sm-offset-3 {
1797
+ margin-left: 25%
1798
+ }
1799
+ .col-sm-offset-2 {
1800
+ margin-left: 16.66666667%
1801
+ }
1802
+ .col-sm-offset-1 {
1803
+ margin-left: 8.33333333%
1804
+ }
1805
+ .col-sm-offset-0 {
1806
+ margin-left: 0
1807
+ }
1808
+ }
1809
+ @media (min-width: 992px) {
1810
+ .col-md-1,
1811
+ .col-md-2,
1812
+ .col-md-3,
1813
+ .col-md-4,
1814
+ .col-md-5,
1815
+ .col-md-6,
1816
+ .col-md-7,
1817
+ .col-md-8,
1818
+ .col-md-9,
1819
+ .col-md-10,
1820
+ .col-md-11,
1821
+ .col-md-12 {
1822
+ float: left
1823
+ }
1824
+ .col-md-12 {
1825
+ width: 100%
1826
+ }
1827
+ .col-md-11 {
1828
+ width: 91.66666667%
1829
+ }
1830
+ .col-md-10 {
1831
+ width: 83.33333333%
1832
+ }
1833
+ .col-md-9 {
1834
+ width: 75%
1835
+ }
1836
+ .col-md-8 {
1837
+ width: 66.66666667%
1838
+ }
1839
+ .col-md-7 {
1840
+ width: 58.33333333%
1841
+ }
1842
+ .col-md-6 {
1843
+ width: 50%
1844
+ }
1845
+ .col-md-5 {
1846
+ width: 41.66666667%
1847
+ }
1848
+ .col-md-4 {
1849
+ width: 33.33333333%
1850
+ }
1851
+ .col-md-3 {
1852
+ width: 25%
1853
+ }
1854
+ .col-md-2 {
1855
+ width: 16.66666667%
1856
+ }
1857
+ .col-md-1 {
1858
+ width: 8.33333333%
1859
+ }
1860
+ .col-md-pull-12 {
1861
+ right: 100%
1862
+ }
1863
+ .col-md-pull-11 {
1864
+ right: 91.66666667%
1865
+ }
1866
+ .col-md-pull-10 {
1867
+ right: 83.33333333%
1868
+ }
1869
+ .col-md-pull-9 {
1870
+ right: 75%
1871
+ }
1872
+ .col-md-pull-8 {
1873
+ right: 66.66666667%
1874
+ }
1875
+ .col-md-pull-7 {
1876
+ right: 58.33333333%
1877
+ }
1878
+ .col-md-pull-6 {
1879
+ right: 50%
1880
+ }
1881
+ .col-md-pull-5 {
1882
+ right: 41.66666667%
1883
+ }
1884
+ .col-md-pull-4 {
1885
+ right: 33.33333333%
1886
+ }
1887
+ .col-md-pull-3 {
1888
+ right: 25%
1889
+ }
1890
+ .col-md-pull-2 {
1891
+ right: 16.66666667%
1892
+ }
1893
+ .col-md-pull-1 {
1894
+ right: 8.33333333%
1895
+ }
1896
+ .col-md-pull-0 {
1897
+ right: auto
1898
+ }
1899
+ .col-md-push-12 {
1900
+ left: 100%
1901
+ }
1902
+ .col-md-push-11 {
1903
+ left: 91.66666667%
1904
+ }
1905
+ .col-md-push-10 {
1906
+ left: 83.33333333%
1907
+ }
1908
+ .col-md-push-9 {
1909
+ left: 75%
1910
+ }
1911
+ .col-md-push-8 {
1912
+ left: 66.66666667%
1913
+ }
1914
+ .col-md-push-7 {
1915
+ left: 58.33333333%
1916
+ }
1917
+ .col-md-push-6 {
1918
+ left: 50%
1919
+ }
1920
+ .col-md-push-5 {
1921
+ left: 41.66666667%
1922
+ }
1923
+ .col-md-push-4 {
1924
+ left: 33.33333333%
1925
+ }
1926
+ .col-md-push-3 {
1927
+ left: 25%
1928
+ }
1929
+ .col-md-push-2 {
1930
+ left: 16.66666667%
1931
+ }
1932
+ .col-md-push-1 {
1933
+ left: 8.33333333%
1934
+ }
1935
+ .col-md-push-0 {
1936
+ left: auto
1937
+ }
1938
+ .col-md-offset-12 {
1939
+ margin-left: 100%
1940
+ }
1941
+ .col-md-offset-11 {
1942
+ margin-left: 91.66666667%
1943
+ }
1944
+ .col-md-offset-10 {
1945
+ margin-left: 83.33333333%
1946
+ }
1947
+ .col-md-offset-9 {
1948
+ margin-left: 75%
1949
+ }
1950
+ .col-md-offset-8 {
1951
+ margin-left: 66.66666667%
1952
+ }
1953
+ .col-md-offset-7 {
1954
+ margin-left: 58.33333333%
1955
+ }
1956
+ .col-md-offset-6 {
1957
+ margin-left: 50%
1958
+ }
1959
+ .col-md-offset-5 {
1960
+ margin-left: 41.66666667%
1961
+ }
1962
+ .col-md-offset-4 {
1963
+ margin-left: 33.33333333%
1964
+ }
1965
+ .col-md-offset-3 {
1966
+ margin-left: 25%
1967
+ }
1968
+ .col-md-offset-2 {
1969
+ margin-left: 16.66666667%
1970
+ }
1971
+ .col-md-offset-1 {
1972
+ margin-left: 8.33333333%
1973
+ }
1974
+ .col-md-offset-0 {
1975
+ margin-left: 0
1976
+ }
1977
+ }
1978
+ @media (min-width: 1200px) {
1979
+ .col-lg-1,
1980
+ .col-lg-2,
1981
+ .col-lg-3,
1982
+ .col-lg-4,
1983
+ .col-lg-5,
1984
+ .col-lg-6,
1985
+ .col-lg-7,
1986
+ .col-lg-8,
1987
+ .col-lg-9,
1988
+ .col-lg-10,
1989
+ .col-lg-11,
1990
+ .col-lg-12 {
1991
+ float: left
1992
+ }
1993
+ .col-lg-12 {
1994
+ width: 100%
1995
+ }
1996
+ .col-lg-11 {
1997
+ width: 91.66666667%
1998
+ }
1999
+ .col-lg-10 {
2000
+ width: 83.33333333%
2001
+ }
2002
+ .col-lg-9 {
2003
+ width: 75%
2004
+ }
2005
+ .col-lg-8 {
2006
+ width: 66.66666667%
2007
+ }
2008
+ .col-lg-7 {
2009
+ width: 58.33333333%
2010
+ }
2011
+ .col-lg-6 {
2012
+ width: 50%
2013
+ }
2014
+ .col-lg-5 {
2015
+ width: 41.66666667%
2016
+ }
2017
+ .col-lg-4 {
2018
+ width: 33.33333333%
2019
+ }
2020
+ .col-lg-3 {
2021
+ width: 25%
2022
+ }
2023
+ .col-lg-2 {
2024
+ width: 16.66666667%
2025
+ }
2026
+ .col-lg-1 {
2027
+ width: 8.33333333%
2028
+ }
2029
+ .col-lg-pull-12 {
2030
+ right: 100%
2031
+ }
2032
+ .col-lg-pull-11 {
2033
+ right: 91.66666667%
2034
+ }
2035
+ .col-lg-pull-10 {
2036
+ right: 83.33333333%
2037
+ }
2038
+ .col-lg-pull-9 {
2039
+ right: 75%
2040
+ }
2041
+ .col-lg-pull-8 {
2042
+ right: 66.66666667%
2043
+ }
2044
+ .col-lg-pull-7 {
2045
+ right: 58.33333333%
2046
+ }
2047
+ .col-lg-pull-6 {
2048
+ right: 50%
2049
+ }
2050
+ .col-lg-pull-5 {
2051
+ right: 41.66666667%
2052
+ }
2053
+ .col-lg-pull-4 {
2054
+ right: 33.33333333%
2055
+ }
2056
+ .col-lg-pull-3 {
2057
+ right: 25%
2058
+ }
2059
+ .col-lg-pull-2 {
2060
+ right: 16.66666667%
2061
+ }
2062
+ .col-lg-pull-1 {
2063
+ right: 8.33333333%
2064
+ }
2065
+ .col-lg-pull-0 {
2066
+ right: auto
2067
+ }
2068
+ .col-lg-push-12 {
2069
+ left: 100%
2070
+ }
2071
+ .col-lg-push-11 {
2072
+ left: 91.66666667%
2073
+ }
2074
+ .col-lg-push-10 {
2075
+ left: 83.33333333%
2076
+ }
2077
+ .col-lg-push-9 {
2078
+ left: 75%
2079
+ }
2080
+ .col-lg-push-8 {
2081
+ left: 66.66666667%
2082
+ }
2083
+ .col-lg-push-7 {
2084
+ left: 58.33333333%
2085
+ }
2086
+ .col-lg-push-6 {
2087
+ left: 50%
2088
+ }
2089
+ .col-lg-push-5 {
2090
+ left: 41.66666667%
2091
+ }
2092
+ .col-lg-push-4 {
2093
+ left: 33.33333333%
2094
+ }
2095
+ .col-lg-push-3 {
2096
+ left: 25%
2097
+ }
2098
+ .col-lg-push-2 {
2099
+ left: 16.66666667%
2100
+ }
2101
+ .col-lg-push-1 {
2102
+ left: 8.33333333%
2103
+ }
2104
+ .col-lg-push-0 {
2105
+ left: auto
2106
+ }
2107
+ .col-lg-offset-12 {
2108
+ margin-left: 100%
2109
+ }
2110
+ .col-lg-offset-11 {
2111
+ margin-left: 91.66666667%
2112
+ }
2113
+ .col-lg-offset-10 {
2114
+ margin-left: 83.33333333%
2115
+ }
2116
+ .col-lg-offset-9 {
2117
+ margin-left: 75%
2118
+ }
2119
+ .col-lg-offset-8 {
2120
+ margin-left: 66.66666667%
2121
+ }
2122
+ .col-lg-offset-7 {
2123
+ margin-left: 58.33333333%
2124
+ }
2125
+ .col-lg-offset-6 {
2126
+ margin-left: 50%
2127
+ }
2128
+ .col-lg-offset-5 {
2129
+ margin-left: 41.66666667%
2130
+ }
2131
+ .col-lg-offset-4 {
2132
+ margin-left: 33.33333333%
2133
+ }
2134
+ .col-lg-offset-3 {
2135
+ margin-left: 25%
2136
+ }
2137
+ .col-lg-offset-2 {
2138
+ margin-left: 16.66666667%
2139
+ }
2140
+ .col-lg-offset-1 {
2141
+ margin-left: 8.33333333%
2142
+ }
2143
+ .col-lg-offset-0 {
2144
+ margin-left: 0
2145
+ }
2146
+ }
2147
+ table {
2148
+ background-color: transparent
2149
+ }
2150
+ th {
2151
+ text-align: left
2152
+ }
2153
+ .table {
2154
+ width: 100%;
2155
+ max-width: 100%;
2156
+ margin-bottom: 20px
2157
+ }
2158
+ .table>thead>tr>th,
2159
+ .table>tbody>tr>th,
2160
+ .table>tfoot>tr>th,
2161
+ .table>thead>tr>td,
2162
+ .table>tbody>tr>td,
2163
+ .table>tfoot>tr>td {
2164
+ padding: 8px;
2165
+ line-height: 1.42857143;
2166
+ vertical-align: top;
2167
+ border-top: 1px solid #ddd
2168
+ }
2169
+ .table>thead>tr>th {
2170
+ vertical-align: bottom;
2171
+ border-bottom: 2px solid #ddd
2172
+ }
2173
+ .table>caption+thead>tr:first-child>th,
2174
+ .table>colgroup+thead>tr:first-child>th,
2175
+ .table>thead:first-child>tr:first-child>th,
2176
+ .table>caption+thead>tr:first-child>td,
2177
+ .table>colgroup+thead>tr:first-child>td,
2178
+ .table>thead:first-child>tr:first-child>td {
2179
+ border-top: 0
2180
+ }
2181
+ .table>tbody+tbody {
2182
+ border-top: 2px solid #ddd
2183
+ }
2184
+ .table .table {
2185
+ background-color: #fff
2186
+ }
2187
+ .table-condensed>thead>tr>th,
2188
+ .table-condensed>tbody>tr>th,
2189
+ .table-condensed>tfoot>tr>th,
2190
+ .table-condensed>thead>tr>td,
2191
+ .table-condensed>tbody>tr>td,
2192
+ .table-condensed>tfoot>tr>td {
2193
+ padding: 5px
2194
+ }
2195
+ .table-bordered {
2196
+ border: 1px solid #ddd
2197
+ }
2198
+ .table-bordered>thead>tr>th,
2199
+ .table-bordered>tbody>tr>th,
2200
+ .table-bordered>tfoot>tr>th,
2201
+ .table-bordered>thead>tr>td,
2202
+ .table-bordered>tbody>tr>td,
2203
+ .table-bordered>tfoot>tr>td {
2204
+ border: 1px solid #ddd
2205
+ }
2206
+ .table-bordered>thead>tr>th,
2207
+ .table-bordered>thead>tr>td {
2208
+ border-bottom-width: 2px
2209
+ }
2210
+ .table-striped>tbody>tr:nth-child(odd)>td,
2211
+ .table-striped>tbody>tr:nth-child(odd)>th {
2212
+ background-color: #f9f9f9
2213
+ }
2214
+ .table-hover>tbody>tr:hover>td,
2215
+ .table-hover>tbody>tr:hover>th {
2216
+ background-color: #f5f5f5
2217
+ }
2218
+ table col[class*=col-] {
2219
+ position: static;
2220
+ display: table-column;
2221
+ float: none
2222
+ }
2223
+ table td[class*=col-],
2224
+ table th[class*=col-] {
2225
+ position: static;
2226
+ display: table-cell;
2227
+ float: none
2228
+ }
2229
+ .table>thead>tr>td.active,
2230
+ .table>tbody>tr>td.active,
2231
+ .table>tfoot>tr>td.active,
2232
+ .table>thead>tr>th.active,
2233
+ .table>tbody>tr>th.active,
2234
+ .table>tfoot>tr>th.active,
2235
+ .table>thead>tr.active>td,
2236
+ .table>tbody>tr.active>td,
2237
+ .table>tfoot>tr.active>td,
2238
+ .table>thead>tr.active>th,
2239
+ .table>tbody>tr.active>th,
2240
+ .table>tfoot>tr.active>th {
2241
+ background-color: #f5f5f5
2242
+ }
2243
+ .table-hover>tbody>tr>td.active:hover,
2244
+ .table-hover>tbody>tr>th.active:hover,
2245
+ .table-hover>tbody>tr.active:hover>td,
2246
+ .table-hover>tbody>tr:hover>.active,
2247
+ .table-hover>tbody>tr.active:hover>th {
2248
+ background-color: #e8e8e8
2249
+ }
2250
+ .table>thead>tr>td.success,
2251
+ .table>tbody>tr>td.success,
2252
+ .table>tfoot>tr>td.success,
2253
+ .table>thead>tr>th.success,
2254
+ .table>tbody>tr>th.success,
2255
+ .table>tfoot>tr>th.success,
2256
+ .table>thead>tr.success>td,
2257
+ .table>tbody>tr.success>td,
2258
+ .table>tfoot>tr.success>td,
2259
+ .table>thead>tr.success>th,
2260
+ .table>tbody>tr.success>th,
2261
+ .table>tfoot>tr.success>th {
2262
+ background-color: #dff0d8
2263
+ }
2264
+ .table-hover>tbody>tr>td.success:hover,
2265
+ .table-hover>tbody>tr>th.success:hover,
2266
+ .table-hover>tbody>tr.success:hover>td,
2267
+ .table-hover>tbody>tr:hover>.success,
2268
+ .table-hover>tbody>tr.success:hover>th {
2269
+ background-color: #d0e9c6
2270
+ }
2271
+ .table>thead>tr>td.info,
2272
+ .table>tbody>tr>td.info,
2273
+ .table>tfoot>tr>td.info,
2274
+ .table>thead>tr>th.info,
2275
+ .table>tbody>tr>th.info,
2276
+ .table>tfoot>tr>th.info,
2277
+ .table>thead>tr.info>td,
2278
+ .table>tbody>tr.info>td,
2279
+ .table>tfoot>tr.info>td,
2280
+ .table>thead>tr.info>th,
2281
+ .table>tbody>tr.info>th,
2282
+ .table>tfoot>tr.info>th {
2283
+ background-color: #d9edf7
2284
+ }
2285
+ .table-hover>tbody>tr>td.info:hover,
2286
+ .table-hover>tbody>tr>th.info:hover,
2287
+ .table-hover>tbody>tr.info:hover>td,
2288
+ .table-hover>tbody>tr:hover>.info,
2289
+ .table-hover>tbody>tr.info:hover>th {
2290
+ background-color: #c4e3f3
2291
+ }
2292
+ .table>thead>tr>td.warning,
2293
+ .table>tbody>tr>td.warning,
2294
+ .table>tfoot>tr>td.warning,
2295
+ .table>thead>tr>th.warning,
2296
+ .table>tbody>tr>th.warning,
2297
+ .table>tfoot>tr>th.warning,
2298
+ .table>thead>tr.warning>td,
2299
+ .table>tbody>tr.warning>td,
2300
+ .table>tfoot>tr.warning>td,
2301
+ .table>thead>tr.warning>th,
2302
+ .table>tbody>tr.warning>th,
2303
+ .table>tfoot>tr.warning>th {
2304
+ background-color: #fcf8e3
2305
+ }
2306
+ .table-hover>tbody>tr>td.warning:hover,
2307
+ .table-hover>tbody>tr>th.warning:hover,
2308
+ .table-hover>tbody>tr.warning:hover>td,
2309
+ .table-hover>tbody>tr:hover>.warning,
2310
+ .table-hover>tbody>tr.warning:hover>th {
2311
+ background-color: #faf2cc
2312
+ }
2313
+ .table>thead>tr>td.danger,
2314
+ .table>tbody>tr>td.danger,
2315
+ .table>tfoot>tr>td.danger,
2316
+ .table>thead>tr>th.danger,
2317
+ .table>tbody>tr>th.danger,
2318
+ .table>tfoot>tr>th.danger,
2319
+ .table>thead>tr.danger>td,
2320
+ .table>tbody>tr.danger>td,
2321
+ .table>tfoot>tr.danger>td,
2322
+ .table>thead>tr.danger>th,
2323
+ .table>tbody>tr.danger>th,
2324
+ .table>tfoot>tr.danger>th {
2325
+ background-color: #f2dede
2326
+ }
2327
+ .table-hover>tbody>tr>td.danger:hover,
2328
+ .table-hover>tbody>tr>th.danger:hover,
2329
+ .table-hover>tbody>tr.danger:hover>td,
2330
+ .table-hover>tbody>tr:hover>.danger,
2331
+ .table-hover>tbody>tr.danger:hover>th {
2332
+ background-color: #ebcccc
2333
+ }
2334
+ @media screen and (max-width: 767px) {
2335
+ .table-responsive {
2336
+ width: 100%;
2337
+ margin-bottom: 15px;
2338
+ overflow-x: auto;
2339
+ overflow-y: hidden;
2340
+ -webkit-overflow-scrolling: touch;
2341
+ -ms-overflow-style: -ms-autohiding-scrollbar;
2342
+ border: 1px solid #ddd
2343
+ }
2344
+ .table-responsive>.table {
2345
+ margin-bottom: 0
2346
+ }
2347
+ .table-responsive>.table>thead>tr>th,
2348
+ .table-responsive>.table>tbody>tr>th,
2349
+ .table-responsive>.table>tfoot>tr>th,
2350
+ .table-responsive>.table>thead>tr>td,
2351
+ .table-responsive>.table>tbody>tr>td,
2352
+ .table-responsive>.table>tfoot>tr>td {
2353
+ white-space: nowrap
2354
+ }
2355
+ .table-responsive>.table-bordered {
2356
+ border: 0
2357
+ }
2358
+ .table-responsive>.table-bordered>thead>tr>th:first-child,
2359
+ .table-responsive>.table-bordered>tbody>tr>th:first-child,
2360
+ .table-responsive>.table-bordered>tfoot>tr>th:first-child,
2361
+ .table-responsive>.table-bordered>thead>tr>td:first-child,
2362
+ .table-responsive>.table-bordered>tbody>tr>td:first-child,
2363
+ .table-responsive>.table-bordered>tfoot>tr>td:first-child {
2364
+ border-left: 0
2365
+ }
2366
+ .table-responsive>.table-bordered>thead>tr>th:last-child,
2367
+ .table-responsive>.table-bordered>tbody>tr>th:last-child,
2368
+ .table-responsive>.table-bordered>tfoot>tr>th:last-child,
2369
+ .table-responsive>.table-bordered>thead>tr>td:last-child,
2370
+ .table-responsive>.table-bordered>tbody>tr>td:last-child,
2371
+ .table-responsive>.table-bordered>tfoot>tr>td:last-child {
2372
+ border-right: 0
2373
+ }
2374
+ .table-responsive>.table-bordered>tbody>tr:last-child>th,
2375
+ .table-responsive>.table-bordered>tfoot>tr:last-child>th,
2376
+ .table-responsive>.table-bordered>tbody>tr:last-child>td,
2377
+ .table-responsive>.table-bordered>tfoot>tr:last-child>td {
2378
+ border-bottom: 0
2379
+ }
2380
+ }
2381
+ fieldset {
2382
+ min-width: 0;
2383
+ padding: 0;
2384
+ margin: 0;
2385
+ border: 0
2386
+ }
2387
+ legend {
2388
+ display: block;
2389
+ width: 100%;
2390
+ padding: 0;
2391
+ margin-bottom: 20px;
2392
+ font-size: 21px;
2393
+ line-height: inherit;
2394
+ color: #333;
2395
+ border: 0;
2396
+ border-bottom: 1px solid #e5e5e5
2397
+ }
2398
+ label {
2399
+ display: inline-block;
2400
+ max-width: 100%;
2401
+ margin-bottom: 5px;
2402
+ font-weight: 700
2403
+ }
2404
+ input[type=search] {
2405
+ -webkit-box-sizing: border-box;
2406
+ -moz-box-sizing: border-box;
2407
+ box-sizing: border-box
2408
+ }
2409
+ input[type=radio],
2410
+ input[type=checkbox] {
2411
+ margin: 4px 0 0;
2412
+ margin-top: 1px \9;
2413
+ line-height: normal
2414
+ }
2415
+ input[type=file] {
2416
+ display: block
2417
+ }
2418
+ input[type=range] {
2419
+ display: block;
2420
+ width: 100%
2421
+ }
2422
+ select[multiple],
2423
+ select[size] {
2424
+ height: auto
2425
+ }
2426
+ input[type=file]:focus,
2427
+ input[type=radio]:focus,
2428
+ input[type=checkbox]:focus {
2429
+ outline: thin dotted;
2430
+ outline: 5px auto -webkit-focus-ring-color;
2431
+ outline-offset: -2px
2432
+ }
2433
+ output {
2434
+ display: block;
2435
+ padding-top: 7px;
2436
+ font-size: 14px;
2437
+ line-height: 1.42857143;
2438
+ color: #555
2439
+ }
2440
+ .form-control {
2441
+ display: block;
2442
+ width: 100%;
2443
+ height: 34px;
2444
+ padding: 6px 12px;
2445
+ font-size: 14px;
2446
+ line-height: 1.42857143;
2447
+ color: #555;
2448
+ background-color: #fff;
2449
+ background-image: none;
2450
+ border: 1px solid #ccc;
2451
+ border-radius: 4px;
2452
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
2453
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
2454
+ -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
2455
+ -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
2456
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s
2457
+ }
2458
+ .form-control:focus {
2459
+ border-color: #66afe9;
2460
+ outline: 0;
2461
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
2462
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6)
2463
+ }
2464
+ .form-control::-moz-placeholder {
2465
+ color: #777;
2466
+ opacity: 1
2467
+ }
2468
+ .form-control:-ms-input-placeholder {
2469
+ color: #777
2470
+ }
2471
+ .form-control::-webkit-input-placeholder {
2472
+ color: #777
2473
+ }
2474
+ .form-control[disabled],
2475
+ .form-control[readonly],
2476
+ fieldset[disabled] .form-control {
2477
+ cursor: not-allowed;
2478
+ background-color: #eee;
2479
+ opacity: 1
2480
+ }
2481
+ textarea.form-control {
2482
+ height: auto
2483
+ }
2484
+ input[type=search] {
2485
+ -webkit-appearance: none
2486
+ }
2487
+ input[type=date],
2488
+ input[type=time],
2489
+ input[type=datetime-local],
2490
+ input[type=month] {
2491
+ line-height: 34px;
2492
+ line-height: 1.42857143 \0
2493
+ }
2494
+ input[type=date].input-sm,
2495
+ input[type=time].input-sm,
2496
+ input[type=datetime-local].input-sm,
2497
+ input[type=month].input-sm {
2498
+ line-height: 30px
2499
+ }
2500
+ input[type=date].input-lg,
2501
+ input[type=time].input-lg,
2502
+ input[type=datetime-local].input-lg,
2503
+ input[type=month].input-lg {
2504
+ line-height: 46px
2505
+ }
2506
+ .form-group {
2507
+ margin-bottom: 15px
2508
+ }
2509
+ .radio,
2510
+ .checkbox {
2511
+ position: relative;
2512
+ display: block;
2513
+ min-height: 20px;
2514
+ margin-top: 10px;
2515
+ margin-bottom: 10px
2516
+ }
2517
+ .radio label,
2518
+ .checkbox label {
2519
+ padding-left: 20px;
2520
+ margin-bottom: 0;
2521
+ font-weight: 400;
2522
+ cursor: pointer
2523
+ }
2524
+ .radio input[type=radio],
2525
+ .radio-inline input[type=radio],
2526
+ .checkbox input[type=checkbox],
2527
+ .checkbox-inline input[type=checkbox] {
2528
+ position: absolute;
2529
+ margin-top: 4px \9;
2530
+ margin-left: -20px
2531
+ }
2532
+ .radio+.radio,
2533
+ .checkbox+.checkbox {
2534
+ margin-top: -5px
2535
+ }
2536
+ .radio-inline,
2537
+ .checkbox-inline {
2538
+ display: inline-block;
2539
+ padding-left: 20px;
2540
+ margin-bottom: 0;
2541
+ font-weight: 400;
2542
+ vertical-align: middle;
2543
+ cursor: pointer
2544
+ }
2545
+ .radio-inline+.radio-inline,
2546
+ .checkbox-inline+.checkbox-inline {
2547
+ margin-top: 0;
2548
+ margin-left: 10px
2549
+ }
2550
+ input[type=radio][disabled],
2551
+ input[type=checkbox][disabled],
2552
+ input[type=radio].disabled,
2553
+ input[type=checkbox].disabled,
2554
+ fieldset[disabled] input[type=radio],
2555
+ fieldset[disabled] input[type=checkbox] {
2556
+ cursor: not-allowed
2557
+ }
2558
+ .radio-inline.disabled,
2559
+ .checkbox-inline.disabled,
2560
+ fieldset[disabled] .radio-inline,
2561
+ fieldset[disabled] .checkbox-inline {
2562
+ cursor: not-allowed
2563
+ }
2564
+ .radio.disabled label,
2565
+ .checkbox.disabled label,
2566
+ fieldset[disabled] .radio label,
2567
+ fieldset[disabled] .checkbox label {
2568
+ cursor: not-allowed
2569
+ }
2570
+ .form-control-static {
2571
+ padding-top: 7px;
2572
+ padding-bottom: 7px;
2573
+ margin-bottom: 0
2574
+ }
2575
+ .form-control-static.input-lg,
2576
+ .form-control-static.input-sm {
2577
+ padding-right: 0;
2578
+ padding-left: 0
2579
+ }
2580
+ .input-sm,
2581
+ .form-horizontal .form-group-sm .form-control {
2582
+ height: 30px;
2583
+ padding: 5px 10px;
2584
+ font-size: 12px;
2585
+ line-height: 1.5;
2586
+ border-radius: 3px
2587
+ }
2588
+ select.input-sm {
2589
+ height: 30px;
2590
+ line-height: 30px
2591
+ }
2592
+ textarea.input-sm,
2593
+ select[multiple].input-sm {
2594
+ height: auto
2595
+ }
2596
+ .input-lg,
2597
+ .form-horizontal .form-group-lg .form-control {
2598
+ height: 46px;
2599
+ padding: 10px 16px;
2600
+ font-size: 18px;
2601
+ line-height: 1.33;
2602
+ border-radius: 6px
2603
+ }
2604
+ select.input-lg {
2605
+ height: 46px;
2606
+ line-height: 46px
2607
+ }
2608
+ textarea.input-lg,
2609
+ select[multiple].input-lg {
2610
+ height: auto
2611
+ }
2612
+ .has-feedback {
2613
+ position: relative
2614
+ }
2615
+ .has-feedback .form-control {
2616
+ padding-right: 42.5px
2617
+ }
2618
+ .form-control-feedback {
2619
+ position: absolute;
2620
+ top: 25px;
2621
+ right: 0;
2622
+ z-index: 2;
2623
+ display: block;
2624
+ width: 34px;
2625
+ height: 34px;
2626
+ line-height: 34px;
2627
+ text-align: center
2628
+ }
2629
+ .input-lg+.form-control-feedback {
2630
+ width: 46px;
2631
+ height: 46px;
2632
+ line-height: 46px
2633
+ }
2634
+ .input-sm+.form-control-feedback {
2635
+ width: 30px;
2636
+ height: 30px;
2637
+ line-height: 30px
2638
+ }
2639
+ .has-success .help-block,
2640
+ .has-success .control-label,
2641
+ .has-success .radio,
2642
+ .has-success .checkbox,
2643
+ .has-success .radio-inline,
2644
+ .has-success .checkbox-inline {
2645
+ color: #3c763d
2646
+ }
2647
+ .has-success .form-control {
2648
+ border-color: #3c763d;
2649
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
2650
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)
2651
+ }
2652
+ .has-success .form-control:focus {
2653
+ border-color: #2b542c;
2654
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
2655
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168
2656
+ }
2657
+ .has-success .input-group-addon {
2658
+ color: #3c763d;
2659
+ background-color: #dff0d8;
2660
+ border-color: #3c763d
2661
+ }
2662
+ .has-success .form-control-feedback {
2663
+ color: #3c763d
2664
+ }
2665
+ .has-warning .help-block,
2666
+ .has-warning .control-label,
2667
+ .has-warning .radio,
2668
+ .has-warning .checkbox,
2669
+ .has-warning .radio-inline,
2670
+ .has-warning .checkbox-inline {
2671
+ color: #8a6d3b
2672
+ }
2673
+ .has-warning .form-control {
2674
+ border-color: #8a6d3b;
2675
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
2676
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)
2677
+ }
2678
+ .has-warning .form-control:focus {
2679
+ border-color: #66512c;
2680
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
2681
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b
2682
+ }
2683
+ .has-warning .input-group-addon {
2684
+ color: #8a6d3b;
2685
+ background-color: #fcf8e3;
2686
+ border-color: #8a6d3b
2687
+ }
2688
+ .has-warning .form-control-feedback {
2689
+ color: #8a6d3b
2690
+ }
2691
+ .has-error .help-block,
2692
+ .has-error .control-label,
2693
+ .has-error .radio,
2694
+ .has-error .checkbox,
2695
+ .has-error .radio-inline,
2696
+ .has-error .checkbox-inline {
2697
+ color: #a94442
2698
+ }
2699
+ .has-error .form-control {
2700
+ border-color: #a94442;
2701
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
2702
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)
2703
+ }
2704
+ .has-error .form-control:focus {
2705
+ border-color: #843534;
2706
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
2707
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483
2708
+ }
2709
+ .has-error .input-group-addon {
2710
+ color: #a94442;
2711
+ background-color: #f2dede;
2712
+ border-color: #a94442
2713
+ }
2714
+ .has-error .form-control-feedback {
2715
+ color: #a94442
2716
+ }
2717
+ .has-feedback label.sr-only~.form-control-feedback {
2718
+ top: 0
2719
+ }
2720
+ .help-block {
2721
+ display: block;
2722
+ margin-top: 5px;
2723
+ margin-bottom: 10px;
2724
+ color: #737373
2725
+ }
2726
+ @media (min-width: 768px) {
2727
+ .form-inline .form-group {
2728
+ display: inline-block;
2729
+ margin-bottom: 0;
2730
+ vertical-align: middle
2731
+ }
2732
+ .form-inline .form-control {
2733
+ display: inline-block;
2734
+ width: auto;
2735
+ vertical-align: middle
2736
+ }
2737
+ .form-inline .input-group {
2738
+ display: inline-table;
2739
+ vertical-align: middle
2740
+ }
2741
+ .form-inline .input-group .input-group-addon,
2742
+ .form-inline .input-group .input-group-btn,
2743
+ .form-inline .input-group .form-control {
2744
+ width: auto
2745
+ }
2746
+ .form-inline .input-group>.form-control {
2747
+ width: 100%
2748
+ }
2749
+ .form-inline .control-label {
2750
+ margin-bottom: 0;
2751
+ vertical-align: middle
2752
+ }
2753
+ .form-inline .radio,
2754
+ .form-inline .checkbox {
2755
+ display: inline-block;
2756
+ margin-top: 0;
2757
+ margin-bottom: 0;
2758
+ vertical-align: middle
2759
+ }
2760
+ .form-inline .radio label,
2761
+ .form-inline .checkbox label {
2762
+ padding-left: 0
2763
+ }
2764
+ .form-inline .radio input[type=radio],
2765
+ .form-inline .checkbox input[type=checkbox] {
2766
+ position: relative;
2767
+ margin-left: 0
2768
+ }
2769
+ .form-inline .has-feedback .form-control-feedback {
2770
+ top: 0
2771
+ }
2772
+ }
2773
+ .form-horizontal .radio,
2774
+ .form-horizontal .checkbox,
2775
+ .form-horizontal .radio-inline,
2776
+ .form-horizontal .checkbox-inline {
2777
+ padding-top: 7px;
2778
+ margin-top: 0;
2779
+ margin-bottom: 0
2780
+ }
2781
+ .form-horizontal .radio,
2782
+ .form-horizontal .checkbox {
2783
+ min-height: 27px
2784
+ }
2785
+ .form-horizontal .form-group {
2786
+ margin-right: -15px;
2787
+ margin-left: -15px
2788
+ }
2789
+ @media (min-width: 768px) {
2790
+ .form-horizontal .control-label {
2791
+ padding-top: 7px;
2792
+ margin-bottom: 0;
2793
+ text-align: right
2794
+ }
2795
+ }
2796
+ .form-horizontal .has-feedback .form-control-feedback {
2797
+ top: 0;
2798
+ right: 15px
2799
+ }
2800
+ @media (min-width: 768px) {
2801
+ .form-horizontal .form-group-lg .control-label {
2802
+ padding-top: 14.3px
2803
+ }
2804
+ }
2805
+ @media (min-width: 768px) {
2806
+ .form-horizontal .form-group-sm .control-label {
2807
+ padding-top: 6px
2808
+ }
2809
+ }
2810
+ .btn {
2811
+ display: inline-block;
2812
+ padding: 6px 12px;
2813
+ margin-bottom: 0;
2814
+ font-size: 14px;
2815
+ font-weight: 400;
2816
+ line-height: 1.42857143;
2817
+ text-align: center;
2818
+ white-space: nowrap;
2819
+ vertical-align: middle;
2820
+ cursor: pointer;
2821
+ -webkit-user-select: none;
2822
+ -moz-user-select: none;
2823
+ -ms-user-select: none;
2824
+ user-select: none;
2825
+ background-image: none;
2826
+ border: 1px solid transparent;
2827
+ border-radius: 4px
2828
+ }
2829
+ .btn:focus,
2830
+ .btn:active:focus,
2831
+ .btn.active:focus {
2832
+ outline: thin dotted;
2833
+ outline: 5px auto -webkit-focus-ring-color;
2834
+ outline-offset: -2px
2835
+ }
2836
+ .btn:hover,
2837
+ .btn:focus {
2838
+ color: #333;
2839
+ text-decoration: none
2840
+ }
2841
+ .btn:active,
2842
+ .btn.active {
2843
+ background-image: none;
2844
+ outline: 0;
2845
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
2846
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125)
2847
+ }
2848
+ .btn.disabled,
2849
+ .btn[disabled],
2850
+ fieldset[disabled] .btn {
2851
+ pointer-events: none;
2852
+ cursor: not-allowed;
2853
+ filter: alpha(opacity=65);
2854
+ -webkit-box-shadow: none;
2855
+ box-shadow: none;
2856
+ opacity: .65
2857
+ }
2858
+ .btn-default {
2859
+ color: #333;
2860
+ background-color: #fff;
2861
+ border-color: #ccc
2862
+ }
2863
+ .btn-default:hover,
2864
+ .btn-default:focus,
2865
+ .btn-default:active,
2866
+ .btn-default.active,
2867
+ .open>.dropdown-toggle.btn-default {
2868
+ color: #333;
2869
+ background-color: #e6e6e6;
2870
+ border-color: #adadad
2871
+ }
2872
+ .btn-default:active,
2873
+ .btn-default.active,
2874
+ .open>.dropdown-toggle.btn-default {
2875
+ background-image: none
2876
+ }
2877
+ .btn-default.disabled,
2878
+ .btn-default[disabled],
2879
+ fieldset[disabled] .btn-default,
2880
+ .btn-default.disabled:hover,
2881
+ .btn-default[disabled]:hover,
2882
+ fieldset[disabled] .btn-default:hover,
2883
+ .btn-default.disabled:focus,
2884
+ .btn-default[disabled]:focus,
2885
+ fieldset[disabled] .btn-default:focus,
2886
+ .btn-default.disabled:active,
2887
+ .btn-default[disabled]:active,
2888
+ fieldset[disabled] .btn-default:active,
2889
+ .btn-default.disabled.active,
2890
+ .btn-default[disabled].active,
2891
+ fieldset[disabled] .btn-default.active {
2892
+ background-color: #fff;
2893
+ border-color: #ccc
2894
+ }
2895
+ .btn-default .badge {
2896
+ color: #fff;
2897
+ background-color: #333
2898
+ }
2899
+ .btn-primary {
2900
+ color: #fff;
2901
+ background-color: #428bca;
2902
+ border-color: #357ebd
2903
+ }
2904
+ .btn-primary:hover,
2905
+ .btn-primary:focus,
2906
+ .btn-primary:active,
2907
+ .btn-primary.active,
2908
+ .open>.dropdown-toggle.btn-primary {
2909
+ color: #fff;
2910
+ background-color: #3071a9;
2911
+ border-color: #285e8e
2912
+ }
2913
+ .btn-primary:active,
2914
+ .btn-primary.active,
2915
+ .open>.dropdown-toggle.btn-primary {
2916
+ background-image: none
2917
+ }
2918
+ .btn-primary.disabled,
2919
+ .btn-primary[disabled],
2920
+ fieldset[disabled] .btn-primary,
2921
+ .btn-primary.disabled:hover,
2922
+ .btn-primary[disabled]:hover,
2923
+ fieldset[disabled] .btn-primary:hover,
2924
+ .btn-primary.disabled:focus,
2925
+ .btn-primary[disabled]:focus,
2926
+ fieldset[disabled] .btn-primary:focus,
2927
+ .btn-primary.disabled:active,
2928
+ .btn-primary[disabled]:active,
2929
+ fieldset[disabled] .btn-primary:active,
2930
+ .btn-primary.disabled.active,
2931
+ .btn-primary[disabled].active,
2932
+ fieldset[disabled] .btn-primary.active {
2933
+ background-color: #428bca;
2934
+ border-color: #357ebd
2935
+ }
2936
+ .btn-primary .badge {
2937
+ color: #428bca;
2938
+ background-color: #fff
2939
+ }
2940
+ .btn-success {
2941
+ color: #fff;
2942
+ background-color: #5cb85c;
2943
+ border-color: #4cae4c
2944
+ }
2945
+ .btn-success:hover,
2946
+ .btn-success:focus,
2947
+ .btn-success:active,
2948
+ .btn-success.active,
2949
+ .open>.dropdown-toggle.btn-success {
2950
+ color: #fff;
2951
+ background-color: #449d44;
2952
+ border-color: #398439
2953
+ }
2954
+ .btn-success:active,
2955
+ .btn-success.active,
2956
+ .open>.dropdown-toggle.btn-success {
2957
+ background-image: none
2958
+ }
2959
+ .btn-success.disabled,
2960
+ .btn-success[disabled],
2961
+ fieldset[disabled] .btn-success,
2962
+ .btn-success.disabled:hover,
2963
+ .btn-success[disabled]:hover,
2964
+ fieldset[disabled] .btn-success:hover,
2965
+ .btn-success.disabled:focus,
2966
+ .btn-success[disabled]:focus,
2967
+ fieldset[disabled] .btn-success:focus,
2968
+ .btn-success.disabled:active,
2969
+ .btn-success[disabled]:active,
2970
+ fieldset[disabled] .btn-success:active,
2971
+ .btn-success.disabled.active,
2972
+ .btn-success[disabled].active,
2973
+ fieldset[disabled] .btn-success.active {
2974
+ background-color: #5cb85c;
2975
+ border-color: #4cae4c
2976
+ }
2977
+ .btn-success .badge {
2978
+ color: #5cb85c;
2979
+ background-color: #fff
2980
+ }
2981
+ .btn-info {
2982
+ color: #fff;
2983
+ background-color: #5bc0de;
2984
+ border-color: #46b8da
2985
+ }
2986
+ .btn-info:hover,
2987
+ .btn-info:focus,
2988
+ .btn-info:active,
2989
+ .btn-info.active,
2990
+ .open>.dropdown-toggle.btn-info {
2991
+ color: #fff;
2992
+ background-color: #31b0d5;
2993
+ border-color: #269abc
2994
+ }
2995
+ .btn-info:active,
2996
+ .btn-info.active,
2997
+ .open>.dropdown-toggle.btn-info {
2998
+ background-image: none
2999
+ }
3000
+ .btn-info.disabled,
3001
+ .btn-info[disabled],
3002
+ fieldset[disabled] .btn-info,
3003
+ .btn-info.disabled:hover,
3004
+ .btn-info[disabled]:hover,
3005
+ fieldset[disabled] .btn-info:hover,
3006
+ .btn-info.disabled:focus,
3007
+ .btn-info[disabled]:focus,
3008
+ fieldset[disabled] .btn-info:focus,
3009
+ .btn-info.disabled:active,
3010
+ .btn-info[disabled]:active,
3011
+ fieldset[disabled] .btn-info:active,
3012
+ .btn-info.disabled.active,
3013
+ .btn-info[disabled].active,
3014
+ fieldset[disabled] .btn-info.active {
3015
+ background-color: #5bc0de;
3016
+ border-color: #46b8da
3017
+ }
3018
+ .btn-info .badge {
3019
+ color: #5bc0de;
3020
+ background-color: #fff
3021
+ }
3022
+ .btn-warning {
3023
+ color: #fff;
3024
+ background-color: #f0ad4e;
3025
+ border-color: #eea236
3026
+ }
3027
+ .btn-warning:hover,
3028
+ .btn-warning:focus,
3029
+ .btn-warning:active,
3030
+ .btn-warning.active,
3031
+ .open>.dropdown-toggle.btn-warning {
3032
+ color: #fff;
3033
+ background-color: #ec971f;
3034
+ border-color: #d58512
3035
+ }
3036
+ .btn-warning:active,
3037
+ .btn-warning.active,
3038
+ .open>.dropdown-toggle.btn-warning {
3039
+ background-image: none
3040
+ }
3041
+ .btn-warning.disabled,
3042
+ .btn-warning[disabled],
3043
+ fieldset[disabled] .btn-warning,
3044
+ .btn-warning.disabled:hover,
3045
+ .btn-warning[disabled]:hover,
3046
+ fieldset[disabled] .btn-warning:hover,
3047
+ .btn-warning.disabled:focus,
3048
+ .btn-warning[disabled]:focus,
3049
+ fieldset[disabled] .btn-warning:focus,
3050
+ .btn-warning.disabled:active,
3051
+ .btn-warning[disabled]:active,
3052
+ fieldset[disabled] .btn-warning:active,
3053
+ .btn-warning.disabled.active,
3054
+ .btn-warning[disabled].active,
3055
+ fieldset[disabled] .btn-warning.active {
3056
+ background-color: #f0ad4e;
3057
+ border-color: #eea236
3058
+ }
3059
+ .btn-warning .badge {
3060
+ color: #f0ad4e;
3061
+ background-color: #fff
3062
+ }
3063
+ .btn-danger {
3064
+ color: #fff;
3065
+ background-color: #d9534f;
3066
+ border-color: #d43f3a
3067
+ }
3068
+ .btn-danger:hover,
3069
+ .btn-danger:focus,
3070
+ .btn-danger:active,
3071
+ .btn-danger.active,
3072
+ .open>.dropdown-toggle.btn-danger {
3073
+ color: #fff;
3074
+ background-color: #c9302c;
3075
+ border-color: #ac2925
3076
+ }
3077
+ .btn-danger:active,
3078
+ .btn-danger.active,
3079
+ .open>.dropdown-toggle.btn-danger {
3080
+ background-image: none
3081
+ }
3082
+ .btn-danger.disabled,
3083
+ .btn-danger[disabled],
3084
+ fieldset[disabled] .btn-danger,
3085
+ .btn-danger.disabled:hover,
3086
+ .btn-danger[disabled]:hover,
3087
+ fieldset[disabled] .btn-danger:hover,
3088
+ .btn-danger.disabled:focus,
3089
+ .btn-danger[disabled]:focus,
3090
+ fieldset[disabled] .btn-danger:focus,
3091
+ .btn-danger.disabled:active,
3092
+ .btn-danger[disabled]:active,
3093
+ fieldset[disabled] .btn-danger:active,
3094
+ .btn-danger.disabled.active,
3095
+ .btn-danger[disabled].active,
3096
+ fieldset[disabled] .btn-danger.active {
3097
+ background-color: #d9534f;
3098
+ border-color: #d43f3a
3099
+ }
3100
+ .btn-danger .badge {
3101
+ color: #d9534f;
3102
+ background-color: #fff
3103
+ }
3104
+ .btn-link {
3105
+ font-weight: 400;
3106
+ color: #428bca;
3107
+ cursor: pointer;
3108
+ border-radius: 0
3109
+ }
3110
+ .btn-link,
3111
+ .btn-link:active,
3112
+ .btn-link[disabled],
3113
+ fieldset[disabled] .btn-link {
3114
+ background-color: transparent;
3115
+ -webkit-box-shadow: none;
3116
+ box-shadow: none
3117
+ }
3118
+ .btn-link,
3119
+ .btn-link:hover,
3120
+ .btn-link:focus,
3121
+ .btn-link:active {
3122
+ border-color: transparent
3123
+ }
3124
+ .btn-link:hover,
3125
+ .btn-link:focus {
3126
+ color: #2a6496;
3127
+ text-decoration: underline;
3128
+ background-color: transparent
3129
+ }
3130
+ .btn-link[disabled]:hover,
3131
+ fieldset[disabled] .btn-link:hover,
3132
+ .btn-link[disabled]:focus,
3133
+ fieldset[disabled] .btn-link:focus {
3134
+ color: #777;
3135
+ text-decoration: none
3136
+ }
3137
+ .btn-lg,
3138
+ .btn-group-lg>.btn {
3139
+ padding: 10px 16px;
3140
+ font-size: 18px;
3141
+ line-height: 1.33;
3142
+ border-radius: 6px
3143
+ }
3144
+ .btn-sm,
3145
+ .btn-group-sm>.btn {
3146
+ padding: 5px 10px;
3147
+ font-size: 12px;
3148
+ line-height: 1.5;
3149
+ border-radius: 3px
3150
+ }
3151
+ .btn-xs,
3152
+ .btn-group-xs>.btn {
3153
+ padding: 1px 5px;
3154
+ font-size: 12px;
3155
+ line-height: 1.5;
3156
+ border-radius: 3px
3157
+ }
3158
+ .btn-block {
3159
+ display: block;
3160
+ width: 100%
3161
+ }
3162
+ .btn-block+.btn-block {
3163
+ margin-top: 5px
3164
+ }
3165
+ input[type=submit].btn-block,
3166
+ input[type=reset].btn-block,
3167
+ input[type=button].btn-block {
3168
+ width: 100%
3169
+ }
3170
+ .fade {
3171
+ opacity: 0;
3172
+ -webkit-transition: opacity .15s linear;
3173
+ -o-transition: opacity .15s linear;
3174
+ transition: opacity .15s linear
3175
+ }
3176
+ .fade.in {
3177
+ opacity: 1
3178
+ }
3179
+ .collapse {
3180
+ display: none
3181
+ }
3182
+ .collapse.in {
3183
+ display: block
3184
+ }
3185
+ tr.collapse.in {
3186
+ display: table-row
3187
+ }
3188
+ tbody.collapse.in {
3189
+ display: table-row-group
3190
+ }
3191
+ .collapsing {
3192
+ position: relative;
3193
+ height: 0;
3194
+ overflow: hidden;
3195
+ -webkit-transition: height .35s ease;
3196
+ -o-transition: height .35s ease;
3197
+ transition: height .35s ease
3198
+ }
3199
+ .caret {
3200
+ display: inline-block;
3201
+ width: 0;
3202
+ height: 0;
3203
+ margin-left: 2px;
3204
+ vertical-align: middle;
3205
+ border-top: 4px solid;
3206
+ border-right: 4px solid transparent;
3207
+ border-left: 4px solid transparent
3208
+ }
3209
+ .dropdown {
3210
+ position: relative
3211
+ }
3212
+ .dropdown-toggle:focus {
3213
+ outline: 0
3214
+ }
3215
+ .dropdown-menu {
3216
+ position: absolute;
3217
+ top: 100%;
3218
+ left: 0;
3219
+ z-index: 1000;
3220
+ display: none;
3221
+ float: left;
3222
+ min-width: 160px;
3223
+ padding: 5px 0;
3224
+ margin: 2px 0 0;
3225
+ font-size: 14px;
3226
+ text-align: left;
3227
+ list-style: none;
3228
+ background-color: #fff;
3229
+ -webkit-background-clip: padding-box;
3230
+ background-clip: padding-box;
3231
+ border: 1px solid #ccc;
3232
+ border: 1px solid rgba(0, 0, 0, .15);
3233
+ border-radius: 4px;
3234
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
3235
+ box-shadow: 0 6px 12px rgba(0, 0, 0, .175)
3236
+ }
3237
+ .dropdown-menu.pull-right {
3238
+ right: 0;
3239
+ left: auto
3240
+ }
3241
+ .dropdown-menu .divider {
3242
+ height: 1px;
3243
+ margin: 9px 0;
3244
+ overflow: hidden;
3245
+ background-color: #e5e5e5
3246
+ }
3247
+ .dropdown-menu>li>a {
3248
+ display: block;
3249
+ padding: 3px 20px;
3250
+ clear: both;
3251
+ font-weight: 400;
3252
+ line-height: 1.42857143;
3253
+ color: #333;
3254
+ white-space: nowrap
3255
+ }
3256
+ .dropdown-menu>li>a:hover,
3257
+ .dropdown-menu>li>a:focus {
3258
+ color: #262626;
3259
+ text-decoration: none;
3260
+ background-color: #f5f5f5
3261
+ }
3262
+ .dropdown-menu>.active>a,
3263
+ .dropdown-menu>.active>a:hover,
3264
+ .dropdown-menu>.active>a:focus {
3265
+ color: #fff;
3266
+ text-decoration: none;
3267
+ background-color: #428bca;
3268
+ outline: 0
3269
+ }
3270
+ .dropdown-menu>.disabled>a,
3271
+ .dropdown-menu>.disabled>a:hover,
3272
+ .dropdown-menu>.disabled>a:focus {
3273
+ color: #777
3274
+ }
3275
+ .dropdown-menu>.disabled>a:hover,
3276
+ .dropdown-menu>.disabled>a:focus {
3277
+ text-decoration: none;
3278
+ cursor: not-allowed;
3279
+ background-color: transparent;
3280
+ background-image: none;
3281
+ filter: progid: DXImageTransform.Microsoft.gradient(enabled=false)
3282
+ }
3283
+ .open>.dropdown-menu {
3284
+ display: block
3285
+ }
3286
+ .open>a {
3287
+ outline: 0
3288
+ }
3289
+ .dropdown-menu-right {
3290
+ right: 0;
3291
+ left: auto
3292
+ }
3293
+ .dropdown-menu-left {
3294
+ right: auto;
3295
+ left: 0
3296
+ }
3297
+ .dropdown-header {
3298
+ display: block;
3299
+ padding: 3px 20px;
3300
+ font-size: 12px;
3301
+ line-height: 1.42857143;
3302
+ color: #777;
3303
+ white-space: nowrap
3304
+ }
3305
+ .dropdown-backdrop {
3306
+ position: fixed;
3307
+ top: 0;
3308
+ right: 0;
3309
+ bottom: 0;
3310
+ left: 0;
3311
+ z-index: 990
3312
+ }
3313
+ .pull-right>.dropdown-menu {
3314
+ right: 0;
3315
+ left: auto
3316
+ }
3317
+ .dropup .caret,
3318
+ .navbar-fixed-bottom .dropdown .caret {
3319
+ content: "";
3320
+ border-top: 0;
3321
+ border-bottom: 4px solid
3322
+ }
3323
+ .dropup .dropdown-menu,
3324
+ .navbar-fixed-bottom .dropdown .dropdown-menu {
3325
+ top: auto;
3326
+ bottom: 100%;
3327
+ margin-bottom: 1px
3328
+ }
3329
+ @media (min-width: 768px) {
3330
+ .navbar-right .dropdown-menu {
3331
+ right: 0;
3332
+ left: auto
3333
+ }
3334
+ .navbar-right .dropdown-menu-left {
3335
+ right: auto;
3336
+ left: 0
3337
+ }
3338
+ }
3339
+ .btn-group,
3340
+ .btn-group-vertical {
3341
+ position: relative;
3342
+ display: inline-block;
3343
+ vertical-align: middle
3344
+ }
3345
+ .btn-group>.btn,
3346
+ .btn-group-vertical>.btn {
3347
+ position: relative;
3348
+ float: left
3349
+ }
3350
+ .btn-group>.btn:hover,
3351
+ .btn-group-vertical>.btn:hover,
3352
+ .btn-group>.btn:focus,
3353
+ .btn-group-vertical>.btn:focus,
3354
+ .btn-group>.btn:active,
3355
+ .btn-group-vertical>.btn:active,
3356
+ .btn-group>.btn.active,
3357
+ .btn-group-vertical>.btn.active {
3358
+ z-index: 2
3359
+ }
3360
+ .btn-group>.btn:focus,
3361
+ .btn-group-vertical>.btn:focus {
3362
+ outline: 0
3363
+ }
3364
+ .btn-group .btn+.btn,
3365
+ .btn-group .btn+.btn-group,
3366
+ .btn-group .btn-group+.btn,
3367
+ .btn-group .btn-group+.btn-group {
3368
+ margin-left: -1px
3369
+ }
3370
+ .btn-toolbar {
3371
+ margin-left: -5px
3372
+ }
3373
+ .btn-toolbar .btn-group,
3374
+ .btn-toolbar .input-group {
3375
+ float: left
3376
+ }
3377
+ .btn-toolbar>.btn,
3378
+ .btn-toolbar>.btn-group,
3379
+ .btn-toolbar>.input-group {
3380
+ margin-left: 5px
3381
+ }
3382
+ .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
3383
+ border-radius: 0
3384
+ }
3385
+ .btn-group>.btn:first-child {
3386
+ margin-left: 0
3387
+ }
3388
+ .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle) {
3389
+ border-top-right-radius: 0;
3390
+ border-bottom-right-radius: 0
3391
+ }
3392
+ .btn-group>.btn:last-child:not(:first-child),
3393
+ .btn-group>.dropdown-toggle:not(:first-child) {
3394
+ border-top-left-radius: 0;
3395
+ border-bottom-left-radius: 0
3396
+ }
3397
+ .btn-group>.btn-group {
3398
+ float: left
3399
+ }
3400
+ .btn-group>.btn-group:not(:first-child):not(:last-child)>.btn {
3401
+ border-radius: 0
3402
+ }
3403
+ .btn-group>.btn-group:first-child>.btn:last-child,
3404
+ .btn-group>.btn-group:first-child>.dropdown-toggle {
3405
+ border-top-right-radius: 0;
3406
+ border-bottom-right-radius: 0
3407
+ }
3408
+ .btn-group>.btn-group:last-child>.btn:first-child {
3409
+ border-top-left-radius: 0;
3410
+ border-bottom-left-radius: 0
3411
+ }
3412
+ .btn-group .dropdown-toggle:active,
3413
+ .btn-group.open .dropdown-toggle {
3414
+ outline: 0
3415
+ }
3416
+ .btn-group>.btn+.dropdown-toggle {
3417
+ padding-right: 8px;
3418
+ padding-left: 8px
3419
+ }
3420
+ .btn-group>.btn-lg+.dropdown-toggle {
3421
+ padding-right: 12px;
3422
+ padding-left: 12px
3423
+ }
3424
+ .btn-group.open .dropdown-toggle {
3425
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
3426
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125)
3427
+ }
3428
+ .btn-group.open .dropdown-toggle.btn-link {
3429
+ -webkit-box-shadow: none;
3430
+ box-shadow: none
3431
+ }
3432
+ .btn .caret {
3433
+ margin-left: 0
3434
+ }
3435
+ .btn-lg .caret {
3436
+ border-width: 5px 5px 0;
3437
+ border-bottom-width: 0
3438
+ }
3439
+ .dropup .btn-lg .caret {
3440
+ border-width: 0 5px 5px
3441
+ }
3442
+ .btn-group-vertical>.btn,
3443
+ .btn-group-vertical>.btn-group,
3444
+ .btn-group-vertical>.btn-group>.btn {
3445
+ display: block;
3446
+ float: none;
3447
+ width: 100%;
3448
+ max-width: 100%
3449
+ }
3450
+ .btn-group-vertical>.btn-group>.btn {
3451
+ float: none
3452
+ }
3453
+ .btn-group-vertical>.btn+.btn,
3454
+ .btn-group-vertical>.btn+.btn-group,
3455
+ .btn-group-vertical>.btn-group+.btn,
3456
+ .btn-group-vertical>.btn-group+.btn-group {
3457
+ margin-top: -1px;
3458
+ margin-left: 0
3459
+ }
3460
+ .btn-group-vertical>.btn:not(:first-child):not(:last-child) {
3461
+ border-radius: 0
3462
+ }
3463
+ .btn-group-vertical>.btn:first-child:not(:last-child) {
3464
+ border-top-right-radius: 4px;
3465
+ border-bottom-right-radius: 0;
3466
+ border-bottom-left-radius: 0
3467
+ }
3468
+ .btn-group-vertical>.btn:last-child:not(:first-child) {
3469
+ border-top-left-radius: 0;
3470
+ border-top-right-radius: 0;
3471
+ border-bottom-left-radius: 4px
3472
+ }
3473
+ .btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn {
3474
+ border-radius: 0
3475
+ }
3476
+ .btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,
3477
+ .btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle {
3478
+ border-bottom-right-radius: 0;
3479
+ border-bottom-left-radius: 0
3480
+ }
3481
+ .btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child {
3482
+ border-top-left-radius: 0;
3483
+ border-top-right-radius: 0
3484
+ }
3485
+ .btn-group-justified {
3486
+ display: table;
3487
+ width: 100%;
3488
+ table-layout: fixed;
3489
+ border-collapse: separate
3490
+ }
3491
+ .btn-group-justified>.btn,
3492
+ .btn-group-justified>.btn-group {
3493
+ display: table-cell;
3494
+ float: none;
3495
+ width: 1%
3496
+ }
3497
+ .btn-group-justified>.btn-group .btn {
3498
+ width: 100%
3499
+ }
3500
+ .btn-group-justified>.btn-group .dropdown-menu {
3501
+ left: auto
3502
+ }
3503
+ [data-toggle=buttons]>.btn>input[type=radio],
3504
+ [data-toggle=buttons]>.btn>input[type=checkbox] {
3505
+ position: absolute;
3506
+ z-index: -1;
3507
+ filter: alpha(opacity=0);
3508
+ opacity: 0
3509
+ }
3510
+ .input-group {
3511
+ position: relative;
3512
+ display: table;
3513
+ border-collapse: separate
3514
+ }
3515
+ .input-group[class*=col-] {
3516
+ float: none;
3517
+ padding-right: 0;
3518
+ padding-left: 0
3519
+ }
3520
+ .input-group .form-control {
3521
+ position: relative;
3522
+ z-index: 2;
3523
+ float: left;
3524
+ width: 100%;
3525
+ margin-bottom: 0
3526
+ }
3527
+ .input-group-lg>.form-control,
3528
+ .input-group-lg>.input-group-addon,
3529
+ .input-group-lg>.input-group-btn>.btn {
3530
+ height: 46px;
3531
+ padding: 10px 16px;
3532
+ font-size: 18px;
3533
+ line-height: 1.33;
3534
+ border-radius: 6px
3535
+ }
3536
+ select.input-group-lg>.form-control,
3537
+ select.input-group-lg>.input-group-addon,
3538
+ select.input-group-lg>.input-group-btn>.btn {
3539
+ height: 46px;
3540
+ line-height: 46px
3541
+ }
3542
+ textarea.input-group-lg>.form-control,
3543
+ textarea.input-group-lg>.input-group-addon,
3544
+ textarea.input-group-lg>.input-group-btn>.btn,
3545
+ select[multiple].input-group-lg>.form-control,
3546
+ select[multiple].input-group-lg>.input-group-addon,
3547
+ select[multiple].input-group-lg>.input-group-btn>.btn {
3548
+ height: auto
3549
+ }
3550
+ .input-group-sm>.form-control,
3551
+ .input-group-sm>.input-group-addon,
3552
+ .input-group-sm>.input-group-btn>.btn {
3553
+ height: 30px;
3554
+ padding: 5px 10px;
3555
+ font-size: 12px;
3556
+ line-height: 1.5;
3557
+ border-radius: 3px
3558
+ }
3559
+ select.input-group-sm>.form-control,
3560
+ select.input-group-sm>.input-group-addon,
3561
+ select.input-group-sm>.input-group-btn>.btn {
3562
+ height: 30px;
3563
+ line-height: 30px
3564
+ }
3565
+ textarea.input-group-sm>.form-control,
3566
+ textarea.input-group-sm>.input-group-addon,
3567
+ textarea.input-group-sm>.input-group-btn>.btn,
3568
+ select[multiple].input-group-sm>.form-control,
3569
+ select[multiple].input-group-sm>.input-group-addon,
3570
+ select[multiple].input-group-sm>.input-group-btn>.btn {
3571
+ height: auto
3572
+ }
3573
+ .input-group-addon,
3574
+ .input-group-btn,
3575
+ .input-group .form-control {
3576
+ display: table-cell
3577
+ }
3578
+ .input-group-addon:not(:first-child):not(:last-child),
3579
+ .input-group-btn:not(:first-child):not(:last-child),
3580
+ .input-group .form-control:not(:first-child):not(:last-child) {
3581
+ border-radius: 0
3582
+ }
3583
+ .input-group-addon,
3584
+ .input-group-btn {
3585
+ width: 1%;
3586
+ white-space: nowrap;
3587
+ vertical-align: middle
3588
+ }
3589
+ .input-group-addon {
3590
+ padding: 6px 12px;
3591
+ font-size: 14px;
3592
+ font-weight: 400;
3593
+ line-height: 1;
3594
+ color: #555;
3595
+ text-align: center;
3596
+ background-color: #eee;
3597
+ border: 1px solid #ccc;
3598
+ border-radius: 4px
3599
+ }
3600
+ .input-group-addon.input-sm {
3601
+ padding: 5px 10px;
3602
+ font-size: 12px;
3603
+ border-radius: 3px
3604
+ }
3605
+ .input-group-addon.input-lg {
3606
+ padding: 10px 16px;
3607
+ font-size: 18px;
3608
+ border-radius: 6px
3609
+ }
3610
+ .input-group-addon input[type=radio],
3611
+ .input-group-addon input[type=checkbox] {
3612
+ margin-top: 0
3613
+ }
3614
+ .input-group .form-control:first-child,
3615
+ .input-group-addon:first-child,
3616
+ .input-group-btn:first-child>.btn,
3617
+ .input-group-btn:first-child>.btn-group>.btn,
3618
+ .input-group-btn:first-child>.dropdown-toggle,
3619
+ .input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),
3620
+ .input-group-btn:last-child>.btn-group:not(:last-child)>.btn {
3621
+ border-top-right-radius: 0;
3622
+ border-bottom-right-radius: 0
3623
+ }
3624
+ .input-group-addon:first-child {
3625
+ border-right: 0
3626
+ }
3627
+ .input-group .form-control:last-child,
3628
+ .input-group-addon:last-child,
3629
+ .input-group-btn:last-child>.btn,
3630
+ .input-group-btn:last-child>.btn-group>.btn,
3631
+ .input-group-btn:last-child>.dropdown-toggle,
3632
+ .input-group-btn:first-child>.btn:not(:first-child),
3633
+ .input-group-btn:first-child>.btn-group:not(:first-child)>.btn {
3634
+ border-top-left-radius: 0;
3635
+ border-bottom-left-radius: 0
3636
+ }
3637
+ .input-group-addon:last-child {
3638
+ border-left: 0
3639
+ }
3640
+ .input-group-btn {
3641
+ position: relative;
3642
+ font-size: 0;
3643
+ white-space: nowrap
3644
+ }
3645
+ .input-group-btn>.btn {
3646
+ position: relative
3647
+ }
3648
+ .input-group-btn>.btn+.btn {
3649
+ margin-left: -1px
3650
+ }
3651
+ .input-group-btn>.btn:hover,
3652
+ .input-group-btn>.btn:focus,
3653
+ .input-group-btn>.btn:active {
3654
+ z-index: 2
3655
+ }
3656
+ .input-group-btn:first-child>.btn,
3657
+ .input-group-btn:first-child>.btn-group {
3658
+ margin-right: -1px
3659
+ }
3660
+ .input-group-btn:last-child>.btn,
3661
+ .input-group-btn:last-child>.btn-group {
3662
+ margin-left: -1px
3663
+ }
3664
+ .nav {
3665
+ padding-left: 0;
3666
+ margin-bottom: 0;
3667
+ list-style: none
3668
+ }
3669
+ .nav>li {
3670
+ position: relative;
3671
+ display: block
3672
+ }
3673
+ .nav>li>a {
3674
+ position: relative;
3675
+ display: block;
3676
+ padding: 10px 15px
3677
+ }
3678
+ .nav>li>a:hover,
3679
+ .nav>li>a:focus {
3680
+ text-decoration: none;
3681
+ background-color: #eee
3682
+ }
3683
+ .nav>li.disabled>a {
3684
+ color: #777
3685
+ }
3686
+ .nav>li.disabled>a:hover,
3687
+ .nav>li.disabled>a:focus {
3688
+ color: #777;
3689
+ text-decoration: none;
3690
+ cursor: not-allowed;
3691
+ background-color: transparent
3692
+ }
3693
+ .nav .open>a,
3694
+ .nav .open>a:hover,
3695
+ .nav .open>a:focus {
3696
+ background-color: #eee;
3697
+ border-color: #428bca
3698
+ }
3699
+ .nav .nav-divider {
3700
+ height: 1px;
3701
+ margin: 9px 0;
3702
+ overflow: hidden;
3703
+ background-color: #e5e5e5
3704
+ }
3705
+ .nav>li>a>img {
3706
+ max-width: none
3707
+ }
3708
+ .nav-tabs {
3709
+ border-bottom: 1px solid #ddd
3710
+ }
3711
+ .nav-tabs>li {
3712
+ float: left;
3713
+ margin-bottom: -1px
3714
+ }
3715
+ .nav-tabs>li>a {
3716
+ margin-right: 2px;
3717
+ line-height: 1.42857143;
3718
+ border: 1px solid transparent;
3719
+ border-radius: 4px 4px 0 0
3720
+ }
3721
+ .nav-tabs>li>a:hover {
3722
+ border-color: #eee #eee #ddd
3723
+ }
3724
+ .nav-tabs>li.active>a,
3725
+ .nav-tabs>li.active>a:hover,
3726
+ .nav-tabs>li.active>a:focus {
3727
+ color: #555;
3728
+ cursor: default;
3729
+ background-color: #fff;
3730
+ border: 1px solid #ddd;
3731
+ border-bottom-color: transparent
3732
+ }
3733
+ .nav-tabs.nav-justified {
3734
+ width: 100%;
3735
+ border-bottom: 0
3736
+ }
3737
+ .nav-tabs.nav-justified>li {
3738
+ float: none
3739
+ }
3740
+ .nav-tabs.nav-justified>li>a {
3741
+ margin-bottom: 5px;
3742
+ text-align: center
3743
+ }
3744
+ .nav-tabs.nav-justified>.dropdown .dropdown-menu {
3745
+ top: auto;
3746
+ left: auto
3747
+ }
3748
+ @media (min-width: 768px) {
3749
+ .nav-tabs.nav-justified>li {
3750
+ display: table-cell;
3751
+ width: 1%
3752
+ }
3753
+ .nav-tabs.nav-justified>li>a {
3754
+ margin-bottom: 0
3755
+ }
3756
+ }
3757
+ .nav-tabs.nav-justified>li>a {
3758
+ margin-right: 0;
3759
+ border-radius: 4px
3760
+ }
3761
+ .nav-tabs.nav-justified>.active>a,
3762
+ .nav-tabs.nav-justified>.active>a:hover,
3763
+ .nav-tabs.nav-justified>.active>a:focus {
3764
+ border: 1px solid #ddd
3765
+ }
3766
+ @media (min-width: 768px) {
3767
+ .nav-tabs.nav-justified>li>a {
3768
+ border-bottom: 1px solid #ddd;
3769
+ border-radius: 4px 4px 0 0
3770
+ }
3771
+ .nav-tabs.nav-justified>.active>a,
3772
+ .nav-tabs.nav-justified>.active>a:hover,
3773
+ .nav-tabs.nav-justified>.active>a:focus {
3774
+ border-bottom-color: #fff
3775
+ }
3776
+ }
3777
+ .nav-pills>li {
3778
+ float: left
3779
+ }
3780
+ .nav-pills>li>a {
3781
+ border-radius: 4px
3782
+ }
3783
+ .nav-pills>li+li {
3784
+ margin-left: 2px
3785
+ }
3786
+ .nav-pills>li.active>a,
3787
+ .nav-pills>li.active>a:hover,
3788
+ .nav-pills>li.active>a:focus {
3789
+ color: #fff;
3790
+ background-color: #428bca
3791
+ }
3792
+ .nav-stacked>li {
3793
+ float: none
3794
+ }
3795
+ .nav-stacked>li+li {
3796
+ margin-top: 2px;
3797
+ margin-left: 0
3798
+ }
3799
+ .nav-justified {
3800
+ width: 100%
3801
+ }
3802
+ .nav-justified>li {
3803
+ float: none
3804
+ }
3805
+ .nav-justified>li>a {
3806
+ margin-bottom: 5px;
3807
+ text-align: center
3808
+ }
3809
+ .nav-justified>.dropdown .dropdown-menu {
3810
+ top: auto;
3811
+ left: auto
3812
+ }
3813
+ @media (min-width: 768px) {
3814
+ .nav-justified>li {
3815
+ display: table-cell;
3816
+ width: 1%
3817
+ }
3818
+ .nav-justified>li>a {
3819
+ margin-bottom: 0
3820
+ }
3821
+ }
3822
+ .nav-tabs-justified {
3823
+ border-bottom: 0
3824
+ }
3825
+ .nav-tabs-justified>li>a {
3826
+ margin-right: 0;
3827
+ border-radius: 4px
3828
+ }
3829
+ .nav-tabs-justified>.active>a,
3830
+ .nav-tabs-justified>.active>a:hover,
3831
+ .nav-tabs-justified>.active>a:focus {
3832
+ border: 1px solid #ddd
3833
+ }
3834
+ @media (min-width: 768px) {
3835
+ .nav-tabs-justified>li>a {
3836
+ border-bottom: 1px solid #ddd;
3837
+ border-radius: 4px 4px 0 0
3838
+ }
3839
+ .nav-tabs-justified>.active>a,
3840
+ .nav-tabs-justified>.active>a:hover,
3841
+ .nav-tabs-justified>.active>a:focus {
3842
+ border-bottom-color: #fff
3843
+ }
3844
+ }
3845
+ .tab-content>.tab-pane {
3846
+ display: none
3847
+ }
3848
+ .tab-content>.active {
3849
+ display: block
3850
+ }
3851
+ .nav-tabs .dropdown-menu {
3852
+ margin-top: -1px;
3853
+ border-top-left-radius: 0;
3854
+ border-top-right-radius: 0
3855
+ }
3856
+ .navbar {
3857
+ position: relative;
3858
+ min-height: 50px;
3859
+ margin-bottom: 20px;
3860
+ border: 1px solid transparent
3861
+ }
3862
+ @media (min-width: 768px) {
3863
+ .navbar {
3864
+ border-radius: 4px
3865
+ }
3866
+ }
3867
+ @media (min-width: 768px) {
3868
+ .navbar-header {
3869
+ float: left
3870
+ }
3871
+ }
3872
+ .navbar-collapse {
3873
+ padding-right: 15px;
3874
+ padding-left: 15px;
3875
+ overflow-x: visible;
3876
+ -webkit-overflow-scrolling: touch;
3877
+ border-top: 1px solid transparent;
3878
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
3879
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1)
3880
+ }
3881
+ .navbar-collapse.in {
3882
+ overflow-y: auto
3883
+ }
3884
+ @media (min-width: 768px) {
3885
+ .navbar-collapse {
3886
+ width: auto;
3887
+ border-top: 0;
3888
+ -webkit-box-shadow: none;
3889
+ box-shadow: none
3890
+ }
3891
+ .navbar-collapse.collapse {
3892
+ display: block!important;
3893
+ height: auto!important;
3894
+ padding-bottom: 0;
3895
+ overflow: visible!important
3896
+ }
3897
+ .navbar-collapse.in {
3898
+ overflow-y: visible
3899
+ }
3900
+ .navbar-fixed-top .navbar-collapse,
3901
+ .navbar-static-top .navbar-collapse,
3902
+ .navbar-fixed-bottom .navbar-collapse {
3903
+ padding-right: 0;
3904
+ padding-left: 0
3905
+ }
3906
+ }
3907
+ .navbar-fixed-top .navbar-collapse,
3908
+ .navbar-fixed-bottom .navbar-collapse {
3909
+ max-height: 340px
3910
+ }
3911
+ @media (max-width: 480px) and (orientation: landscape) {
3912
+ .navbar-fixed-top .navbar-collapse,
3913
+ .navbar-fixed-bottom .navbar-collapse {
3914
+ max-height: 200px
3915
+ }
3916
+ }
3917
+ .container>.navbar-header,
3918
+ .container-fluid>.navbar-header,
3919
+ .container>.navbar-collapse,
3920
+ .container-fluid>.navbar-collapse {
3921
+ margin-right: -15px;
3922
+ margin-left: -15px
3923
+ }
3924
+ @media (min-width: 768px) {
3925
+ .container>.navbar-header,
3926
+ .container-fluid>.navbar-header,
3927
+ .container>.navbar-collapse,
3928
+ .container-fluid>.navbar-collapse {
3929
+ margin-right: 0;
3930
+ margin-left: 0
3931
+ }
3932
+ }
3933
+ .navbar-static-top {
3934
+ z-index: 1000;
3935
+ border-width: 0 0 1px
3936
+ }
3937
+ @media (min-width: 768px) {
3938
+ .navbar-static-top {
3939
+ border-radius: 0
3940
+ }
3941
+ }
3942
+ .navbar-fixed-top,
3943
+ .navbar-fixed-bottom {
3944
+ position: fixed;
3945
+ right: 0;
3946
+ left: 0;
3947
+ z-index: 1030;
3948
+ -webkit-transform: translate3d(0, 0, 0);
3949
+ -o-transform: translate3d(0, 0, 0);
3950
+ transform: translate3d(0, 0, 0)
3951
+ }
3952
+ @media (min-width: 768px) {
3953
+ .navbar-fixed-top,
3954
+ .navbar-fixed-bottom {
3955
+ border-radius: 0
3956
+ }
3957
+ }
3958
+ .navbar-fixed-top {
3959
+ top: 0;
3960
+ border-width: 0 0 1px
3961
+ }
3962
+ .navbar-fixed-bottom {
3963
+ bottom: 0;
3964
+ margin-bottom: 0;
3965
+ border-width: 1px 0 0
3966
+ }
3967
+ .navbar-brand {
3968
+ float: left;
3969
+ height: 50px;
3970
+ padding: 15px 15px;
3971
+ font-size: 18px;
3972
+ line-height: 20px
3973
+ }
3974
+ .navbar-brand:hover,
3975
+ .navbar-brand:focus {
3976
+ text-decoration: none
3977
+ }
3978
+ @media (min-width: 768px) {
3979
+ .navbar>.container .navbar-brand,
3980
+ .navbar>.container-fluid .navbar-brand {
3981
+ margin-left: -15px
3982
+ }
3983
+ }
3984
+ .navbar-toggle {
3985
+ position: relative;
3986
+ float: right;
3987
+ padding: 9px 10px;
3988
+ margin-top: 8px;
3989
+ margin-right: 15px;
3990
+ margin-bottom: 8px;
3991
+ background-color: transparent;
3992
+ background-image: none;
3993
+ border: 1px solid transparent;
3994
+ border-radius: 4px
3995
+ }
3996
+ .navbar-toggle:focus {
3997
+ outline: 0
3998
+ }
3999
+ .navbar-toggle .icon-bar {
4000
+ display: block;
4001
+ width: 22px;
4002
+ height: 2px;
4003
+ border-radius: 1px
4004
+ }
4005
+ .navbar-toggle .icon-bar+.icon-bar {
4006
+ margin-top: 4px
4007
+ }
4008
+ @media (min-width: 768px) {
4009
+ .navbar-toggle {
4010
+ display: none
4011
+ }
4012
+ }
4013
+ .navbar-nav {
4014
+ margin: 7.5px -15px
4015
+ }
4016
+ .navbar-nav>li>a {
4017
+ padding-top: 10px;
4018
+ padding-bottom: 10px;
4019
+ line-height: 20px
4020
+ }
4021
+ @media (max-width: 767px) {
4022
+ .navbar-nav .open .dropdown-menu {
4023
+ position: static;
4024
+ float: none;
4025
+ width: auto;
4026
+ margin-top: 0;
4027
+ background-color: transparent;
4028
+ border: 0;
4029
+ -webkit-box-shadow: none;
4030
+ box-shadow: none
4031
+ }
4032
+ .navbar-nav .open .dropdown-menu>li>a,
4033
+ .navbar-nav .open .dropdown-menu .dropdown-header {
4034
+ padding: 5px 15px 5px 25px
4035
+ }
4036
+ .navbar-nav .open .dropdown-menu>li>a {
4037
+ line-height: 20px
4038
+ }
4039
+ .navbar-nav .open .dropdown-menu>li>a:hover,
4040
+ .navbar-nav .open .dropdown-menu>li>a:focus {
4041
+ background-image: none
4042
+ }
4043
+ }
4044
+ @media (min-width: 768px) {
4045
+ .navbar-nav {
4046
+ float: left;
4047
+ margin: 0
4048
+ }
4049
+ .navbar-nav>li {
4050
+ float: left
4051
+ }
4052
+ .navbar-nav>li>a {
4053
+ padding-top: 15px;
4054
+ padding-bottom: 15px
4055
+ }
4056
+ .navbar-nav.navbar-right:last-child {
4057
+ margin-right: -15px
4058
+ }
4059
+ }
4060
+ @media (min-width: 768px) {
4061
+ .navbar-left {
4062
+ float: left!important
4063
+ }
4064
+ .navbar-right {
4065
+ float: right!important
4066
+ }
4067
+ }
4068
+ .navbar-form {
4069
+ padding: 10px 15px;
4070
+ margin-top: 8px;
4071
+ margin-right: -15px;
4072
+ margin-bottom: 8px;
4073
+ margin-left: -15px;
4074
+ border-top: 1px solid transparent;
4075
+ border-bottom: 1px solid transparent;
4076
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
4077
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1)
4078
+ }
4079
+ @media (min-width: 768px) {
4080
+ .navbar-form .form-group {
4081
+ display: inline-block;
4082
+ margin-bottom: 0;
4083
+ vertical-align: middle
4084
+ }
4085
+ .navbar-form .form-control {
4086
+ display: inline-block;
4087
+ width: auto;
4088
+ vertical-align: middle
4089
+ }
4090
+ .navbar-form .input-group {
4091
+ display: inline-table;
4092
+ vertical-align: middle
4093
+ }
4094
+ .navbar-form .input-group .input-group-addon,
4095
+ .navbar-form .input-group .input-group-btn,
4096
+ .navbar-form .input-group .form-control {
4097
+ width: auto
4098
+ }
4099
+ .navbar-form .input-group>.form-control {
4100
+ width: 100%
4101
+ }
4102
+ .navbar-form .control-label {
4103
+ margin-bottom: 0;
4104
+ vertical-align: middle
4105
+ }
4106
+ .navbar-form .radio,
4107
+ .navbar-form .checkbox {
4108
+ display: inline-block;
4109
+ margin-top: 0;
4110
+ margin-bottom: 0;
4111
+ vertical-align: middle
4112
+ }
4113
+ .navbar-form .radio label,
4114
+ .navbar-form .checkbox label {
4115
+ padding-left: 0
4116
+ }
4117
+ .navbar-form .radio input[type=radio],
4118
+ .navbar-form .checkbox input[type=checkbox] {
4119
+ position: relative;
4120
+ margin-left: 0
4121
+ }
4122
+ .navbar-form .has-feedback .form-control-feedback {
4123
+ top: 0
4124
+ }
4125
+ }
4126
+ @media (max-width: 767px) {
4127
+ .navbar-form .form-group {
4128
+ margin-bottom: 5px
4129
+ }
4130
+ }
4131
+ @media (min-width: 768px) {
4132
+ .navbar-form {
4133
+ width: auto;
4134
+ padding-top: 0;
4135
+ padding-bottom: 0;
4136
+ margin-right: 0;
4137
+ margin-left: 0;
4138
+ border: 0;
4139
+ -webkit-box-shadow: none;
4140
+ box-shadow: none
4141
+ }
4142
+ .navbar-form.navbar-right:last-child {
4143
+ margin-right: -15px
4144
+ }
4145
+ }
4146
+ .navbar-nav>li>.dropdown-menu {
4147
+ margin-top: 0;
4148
+ border-top-left-radius: 0;
4149
+ border-top-right-radius: 0
4150
+ }
4151
+ .navbar-fixed-bottom .navbar-nav>li>.dropdown-menu {
4152
+ border-bottom-right-radius: 0;
4153
+ border-bottom-left-radius: 0
4154
+ }
4155
+ .navbar-btn {
4156
+ margin-top: 8px;
4157
+ margin-bottom: 8px
4158
+ }
4159
+ .navbar-btn.btn-sm {
4160
+ margin-top: 10px;
4161
+ margin-bottom: 10px
4162
+ }
4163
+ .navbar-btn.btn-xs {
4164
+ margin-top: 14px;
4165
+ margin-bottom: 14px
4166
+ }
4167
+ .navbar-text {
4168
+ margin-top: 15px;
4169
+ margin-bottom: 15px
4170
+ }
4171
+ @media (min-width: 768px) {
4172
+ .navbar-text {
4173
+ float: left;
4174
+ margin-right: 15px;
4175
+ margin-left: 15px
4176
+ }
4177
+ .navbar-text.navbar-right:last-child {
4178
+ margin-right: 0
4179
+ }
4180
+ }
4181
+ .navbar-default {
4182
+ background-color: #f8f8f8;
4183
+ border-color: #e7e7e7
4184
+ }
4185
+ .navbar-default .navbar-brand {
4186
+ color: #777
4187
+ }
4188
+ .navbar-default .navbar-brand:hover,
4189
+ .navbar-default .navbar-brand:focus {
4190
+ color: #5e5e5e;
4191
+ background-color: transparent
4192
+ }
4193
+ .navbar-default .navbar-text {
4194
+ color: #777
4195
+ }
4196
+ .navbar-default .navbar-nav>li>a {
4197
+ color: #777
4198
+ }
4199
+ .navbar-default .navbar-nav>li>a:hover,
4200
+ .navbar-default .navbar-nav>li>a:focus {
4201
+ color: #333;
4202
+ background-color: transparent
4203
+ }
4204
+ .navbar-default .navbar-nav>.active>a,
4205
+ .navbar-default .navbar-nav>.active>a:hover,
4206
+ .navbar-default .navbar-nav>.active>a:focus {
4207
+ color: #555;
4208
+ background-color: #e7e7e7
4209
+ }
4210
+ .navbar-default .navbar-nav>.disabled>a,
4211
+ .navbar-default .navbar-nav>.disabled>a:hover,
4212
+ .navbar-default .navbar-nav>.disabled>a:focus {
4213
+ color: #ccc;
4214
+ background-color: transparent
4215
+ }
4216
+ .navbar-default .navbar-toggle {
4217
+ border-color: #ddd
4218
+ }
4219
+ .navbar-default .navbar-toggle:hover,
4220
+ .navbar-default .navbar-toggle:focus {
4221
+ background-color: #ddd
4222
+ }
4223
+ .navbar-default .navbar-toggle .icon-bar {
4224
+ background-color: #888
4225
+ }
4226
+ .navbar-default .navbar-collapse,
4227
+ .navbar-default .navbar-form {
4228
+ border-color: #e7e7e7
4229
+ }
4230
+ .navbar-default .navbar-nav>.open>a,
4231
+ .navbar-default .navbar-nav>.open>a:hover,
4232
+ .navbar-default .navbar-nav>.open>a:focus {
4233
+ color: #555;
4234
+ background-color: #e7e7e7
4235
+ }
4236
+ @media (max-width: 767px) {
4237
+ .navbar-default .navbar-nav .open .dropdown-menu>li>a {
4238
+ color: #777
4239
+ }
4240
+ .navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,
4241
+ .navbar-default .navbar-nav .open .dropdown-menu>li>a:focus {
4242
+ color: #333;
4243
+ background-color: transparent
4244
+ }
4245
+ .navbar-default .navbar-nav .open .dropdown-menu>.active>a,
4246
+ .navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,
4247
+ .navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus {
4248
+ color: #555;
4249
+ background-color: #e7e7e7
4250
+ }
4251
+ .navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,
4252
+ .navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,
4253
+ .navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus {
4254
+ color: #ccc;
4255
+ background-color: transparent
4256
+ }
4257
+ }
4258
+ .navbar-default .navbar-link {
4259
+ color: #777
4260
+ }
4261
+ .navbar-default .navbar-link:hover {
4262
+ color: #333
4263
+ }
4264
+ .navbar-default .btn-link {
4265
+ color: #777
4266
+ }
4267
+ .navbar-default .btn-link:hover,
4268
+ .navbar-default .btn-link:focus {
4269
+ color: #333
4270
+ }
4271
+ .navbar-default .btn-link[disabled]:hover,
4272
+ fieldset[disabled] .navbar-default .btn-link:hover,
4273
+ .navbar-default .btn-link[disabled]:focus,
4274
+ fieldset[disabled] .navbar-default .btn-link:focus {
4275
+ color: #ccc
4276
+ }
4277
+ .navbar-inverse {
4278
+ background-color: #222;
4279
+ border-color: #080808
4280
+ }
4281
+ .navbar-inverse .navbar-brand {
4282
+ color: #777
4283
+ }
4284
+ .navbar-inverse .navbar-brand:hover,
4285
+ .navbar-inverse .navbar-brand:focus {
4286
+ color: #fff;
4287
+ background-color: transparent
4288
+ }
4289
+ .navbar-inverse .navbar-text {
4290
+ color: #777
4291
+ }
4292
+ .navbar-inverse .navbar-nav>li>a {
4293
+ color: #777
4294
+ }
4295
+ .navbar-inverse .navbar-nav>li>a:hover,
4296
+ .navbar-inverse .navbar-nav>li>a:focus {
4297
+ color: #fff;
4298
+ background-color: transparent
4299
+ }
4300
+ .navbar-inverse .navbar-nav>.active>a,
4301
+ .navbar-inverse .navbar-nav>.active>a:hover,
4302
+ .navbar-inverse .navbar-nav>.active>a:focus {
4303
+ color: #fff;
4304
+ background-color: #080808
4305
+ }
4306
+ .navbar-inverse .navbar-nav>.disabled>a,
4307
+ .navbar-inverse .navbar-nav>.disabled>a:hover,
4308
+ .navbar-inverse .navbar-nav>.disabled>a:focus {
4309
+ color: #444;
4310
+ background-color: transparent
4311
+ }
4312
+ .navbar-inverse .navbar-toggle {
4313
+ border-color: #333
4314
+ }
4315
+ .navbar-inverse .navbar-toggle:hover,
4316
+ .navbar-inverse .navbar-toggle:focus {
4317
+ background-color: #333
4318
+ }
4319
+ .navbar-inverse .navbar-toggle .icon-bar {
4320
+ background-color: #fff
4321
+ }
4322
+ .navbar-inverse .navbar-collapse,
4323
+ .navbar-inverse .navbar-form {
4324
+ border-color: #101010
4325
+ }
4326
+ .navbar-inverse .navbar-nav>.open>a,
4327
+ .navbar-inverse .navbar-nav>.open>a:hover,
4328
+ .navbar-inverse .navbar-nav>.open>a:focus {
4329
+ color: #fff;
4330
+ background-color: #080808
4331
+ }
4332
+ @media (max-width: 767px) {
4333
+ .navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header {
4334
+ border-color: #080808
4335
+ }
4336
+ .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
4337
+ background-color: #080808
4338
+ }
4339
+ .navbar-inverse .navbar-nav .open .dropdown-menu>li>a {
4340
+ color: #777
4341
+ }
4342
+ .navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,
4343
+ .navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus {
4344
+ color: #fff;
4345
+ background-color: transparent
4346
+ }
4347
+ .navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,
4348
+ .navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,
4349
+ .navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus {
4350
+ color: #fff;
4351
+ background-color: #080808
4352
+ }
4353
+ .navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,
4354
+ .navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,
4355
+ .navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus {
4356
+ color: #444;
4357
+ background-color: transparent
4358
+ }
4359
+ }
4360
+ .navbar-inverse .navbar-link {
4361
+ color: #777
4362
+ }
4363
+ .navbar-inverse .navbar-link:hover {
4364
+ color: #fff
4365
+ }
4366
+ .navbar-inverse .btn-link {
4367
+ color: #777
4368
+ }
4369
+ .navbar-inverse .btn-link:hover,
4370
+ .navbar-inverse .btn-link:focus {
4371
+ color: #fff
4372
+ }
4373
+ .navbar-inverse .btn-link[disabled]:hover,
4374
+ fieldset[disabled] .navbar-inverse .btn-link:hover,
4375
+ .navbar-inverse .btn-link[disabled]:focus,
4376
+ fieldset[disabled] .navbar-inverse .btn-link:focus {
4377
+ color: #444
4378
+ }
4379
+ .breadcrumb {
4380
+ padding: 8px 15px;
4381
+ margin-bottom: 20px;
4382
+ list-style: none;
4383
+ background-color: #f5f5f5;
4384
+ border-radius: 4px
4385
+ }
4386
+ .breadcrumb>li {
4387
+ display: inline-block
4388
+ }
4389
+ .breadcrumb>li+li:before {
4390
+ padding: 0 5px;
4391
+ color: #ccc;
4392
+ content: "/\00a0"
4393
+ }
4394
+ .breadcrumb>.active {
4395
+ color: #777
4396
+ }
4397
+ .pagination {
4398
+ display: inline-block;
4399
+ padding-left: 0;
4400
+ margin: 20px 0;
4401
+ border-radius: 4px
4402
+ }
4403
+ .pagination>li {
4404
+ display: inline
4405
+ }
4406
+ .pagination>li>a,
4407
+ .pagination>li>span {
4408
+ position: relative;
4409
+ float: left;
4410
+ padding: 6px 12px;
4411
+ margin-left: -1px;
4412
+ line-height: 1.42857143;
4413
+ color: #428bca;
4414
+ text-decoration: none;
4415
+ background-color: #fff;
4416
+ border: 1px solid #ddd
4417
+ }
4418
+ .pagination>li:first-child>a,
4419
+ .pagination>li:first-child>span {
4420
+ margin-left: 0;
4421
+ border-top-left-radius: 4px;
4422
+ border-bottom-left-radius: 4px
4423
+ }
4424
+ .pagination>li:last-child>a,
4425
+ .pagination>li:last-child>span {
4426
+ border-top-right-radius: 4px;
4427
+ border-bottom-right-radius: 4px
4428
+ }
4429
+ .pagination>li>a:hover,
4430
+ .pagination>li>span:hover,
4431
+ .pagination>li>a:focus,
4432
+ .pagination>li>span:focus {
4433
+ color: #2a6496;
4434
+ background-color: #eee;
4435
+ border-color: #ddd
4436
+ }
4437
+ .pagination>.active>a,
4438
+ .pagination>.active>span,
4439
+ .pagination>.active>a:hover,
4440
+ .pagination>.active>span:hover,
4441
+ .pagination>.active>a:focus,
4442
+ .pagination>.active>span:focus {
4443
+ z-index: 2;
4444
+ color: #fff;
4445
+ cursor: default;
4446
+ background-color: #428bca;
4447
+ border-color: #428bca
4448
+ }
4449
+ .pagination>.disabled>span,
4450
+ .pagination>.disabled>span:hover,
4451
+ .pagination>.disabled>span:focus,
4452
+ .pagination>.disabled>a,
4453
+ .pagination>.disabled>a:hover,
4454
+ .pagination>.disabled>a:focus {
4455
+ color: #777;
4456
+ cursor: not-allowed;
4457
+ background-color: #fff;
4458
+ border-color: #ddd
4459
+ }
4460
+ .pagination-lg>li>a,
4461
+ .pagination-lg>li>span {
4462
+ padding: 10px 16px;
4463
+ font-size: 18px
4464
+ }
4465
+ .pagination-lg>li:first-child>a,
4466
+ .pagination-lg>li:first-child>span {
4467
+ border-top-left-radius: 6px;
4468
+ border-bottom-left-radius: 6px
4469
+ }
4470
+ .pagination-lg>li:last-child>a,
4471
+ .pagination-lg>li:last-child>span {
4472
+ border-top-right-radius: 6px;
4473
+ border-bottom-right-radius: 6px
4474
+ }
4475
+ .pagination-sm>li>a,
4476
+ .pagination-sm>li>span {
4477
+ padding: 5px 10px;
4478
+ font-size: 12px
4479
+ }
4480
+ .pagination-sm>li:first-child>a,
4481
+ .pagination-sm>li:first-child>span {
4482
+ border-top-left-radius: 3px;
4483
+ border-bottom-left-radius: 3px
4484
+ }
4485
+ .pagination-sm>li:last-child>a,
4486
+ .pagination-sm>li:last-child>span {
4487
+ border-top-right-radius: 3px;
4488
+ border-bottom-right-radius: 3px
4489
+ }
4490
+ .pager {
4491
+ padding-left: 0;
4492
+ margin: 20px 0;
4493
+ text-align: center;
4494
+ list-style: none
4495
+ }
4496
+ .pager li {
4497
+ display: inline
4498
+ }
4499
+ .pager li>a,
4500
+ .pager li>span {
4501
+ display: inline-block;
4502
+ padding: 5px 14px;
4503
+ background-color: #fff;
4504
+ border: 1px solid #ddd;
4505
+ border-radius: 15px
4506
+ }
4507
+ .pager li>a:hover,
4508
+ .pager li>a:focus {
4509
+ text-decoration: none;
4510
+ background-color: #eee
4511
+ }
4512
+ .pager .next>a,
4513
+ .pager .next>span {
4514
+ float: right
4515
+ }
4516
+ .pager .previous>a,
4517
+ .pager .previous>span {
4518
+ float: left
4519
+ }
4520
+ .pager .disabled>a,
4521
+ .pager .disabled>a:hover,
4522
+ .pager .disabled>a:focus,
4523
+ .pager .disabled>span {
4524
+ color: #777;
4525
+ cursor: not-allowed;
4526
+ background-color: #fff
4527
+ }
4528
+ .label {
4529
+ display: inline;
4530
+ padding: .2em .6em .3em;
4531
+ font-size: 75%;
4532
+ font-weight: 700;
4533
+ line-height: 1;
4534
+ color: #fff;
4535
+ text-align: center;
4536
+ white-space: nowrap;
4537
+ vertical-align: baseline;
4538
+ border-radius: .25em
4539
+ }
4540
+ a.label:hover,
4541
+ a.label:focus {
4542
+ color: #fff;
4543
+ text-decoration: none;
4544
+ cursor: pointer
4545
+ }
4546
+ .label:empty {
4547
+ display: none
4548
+ }
4549
+ .btn .label {
4550
+ position: relative;
4551
+ top: -1px
4552
+ }
4553
+ .label-default {
4554
+ background-color: #777
4555
+ }
4556
+ .label-default[href]:hover,
4557
+ .label-default[href]:focus {
4558
+ background-color: #5e5e5e
4559
+ }
4560
+ .label-primary {
4561
+ background-color: #428bca
4562
+ }
4563
+ .label-primary[href]:hover,
4564
+ .label-primary[href]:focus {
4565
+ background-color: #3071a9
4566
+ }
4567
+ .label-success {
4568
+ background-color: #5cb85c
4569
+ }
4570
+ .label-success[href]:hover,
4571
+ .label-success[href]:focus {
4572
+ background-color: #449d44
4573
+ }
4574
+ .label-info {
4575
+ background-color: #5bc0de
4576
+ }
4577
+ .label-info[href]:hover,
4578
+ .label-info[href]:focus {
4579
+ background-color: #31b0d5
4580
+ }
4581
+ .label-warning {
4582
+ background-color: #f0ad4e
4583
+ }
4584
+ .label-warning[href]:hover,
4585
+ .label-warning[href]:focus {
4586
+ background-color: #ec971f
4587
+ }
4588
+ .label-danger {
4589
+ background-color: #d9534f
4590
+ }
4591
+ .label-danger[href]:hover,
4592
+ .label-danger[href]:focus {
4593
+ background-color: #c9302c
4594
+ }
4595
+ .badge {
4596
+ display: inline-block;
4597
+ min-width: 10px;
4598
+ padding: 3px 7px;
4599
+ font-size: 12px;
4600
+ font-weight: 700;
4601
+ line-height: 1;
4602
+ color: #fff;
4603
+ text-align: center;
4604
+ white-space: nowrap;
4605
+ vertical-align: baseline;
4606
+ background-color: #777;
4607
+ border-radius: 10px
4608
+ }
4609
+ .badge:empty {
4610
+ display: none
4611
+ }
4612
+ .btn .badge {
4613
+ position: relative;
4614
+ top: -1px
4615
+ }
4616
+ .btn-xs .badge {
4617
+ top: 0;
4618
+ padding: 1px 5px
4619
+ }
4620
+ a.badge:hover,
4621
+ a.badge:focus {
4622
+ color: #fff;
4623
+ text-decoration: none;
4624
+ cursor: pointer
4625
+ }
4626
+ a.list-group-item.active>.badge,
4627
+ .nav-pills>.active>a>.badge {
4628
+ color: #428bca;
4629
+ background-color: #fff
4630
+ }
4631
+ .nav-pills>li>a>.badge {
4632
+ margin-left: 3px
4633
+ }
4634
+ .jumbotron {
4635
+ padding: 30px;
4636
+ margin-bottom: 30px;
4637
+ color: inherit;
4638
+ background-color: #eee
4639
+ }
4640
+ .jumbotron h1,
4641
+ .jumbotron .h1 {
4642
+ color: inherit
4643
+ }
4644
+ .jumbotron p {
4645
+ margin-bottom: 15px;
4646
+ font-size: 21px;
4647
+ font-weight: 200
4648
+ }
4649
+ .jumbotron>hr {
4650
+ border-top-color: #d5d5d5
4651
+ }
4652
+ .container .jumbotron {
4653
+ border-radius: 6px
4654
+ }
4655
+ .jumbotron .container {
4656
+ max-width: 100%
4657
+ }
4658
+ @media screen and (min-width: 768px) {
4659
+ .jumbotron {
4660
+ padding-top: 48px;
4661
+ padding-bottom: 48px
4662
+ }
4663
+ .container .jumbotron {
4664
+ padding-right: 60px;
4665
+ padding-left: 60px
4666
+ }
4667
+ .jumbotron h1,
4668
+ .jumbotron .h1 {
4669
+ font-size: 63px
4670
+ }
4671
+ }
4672
+ .thumbnail {
4673
+ display: block;
4674
+ padding: 4px;
4675
+ margin-bottom: 20px;
4676
+ line-height: 1.42857143;
4677
+ background-color: #fff;
4678
+ border: 1px solid #ddd;
4679
+ border-radius: 4px;
4680
+ -webkit-transition: all .2s ease-in-out;
4681
+ -o-transition: all .2s ease-in-out;
4682
+ transition: all .2s ease-in-out
4683
+ }
4684
+ .thumbnail>img,
4685
+ .thumbnail a>img {
4686
+ margin-right: auto;
4687
+ margin-left: auto
4688
+ }
4689
+ a.thumbnail:hover,
4690
+ a.thumbnail:focus,
4691
+ a.thumbnail.active {
4692
+ border-color: #428bca
4693
+ }
4694
+ .thumbnail .caption {
4695
+ padding: 9px;
4696
+ color: #333
4697
+ }
4698
+ .alert {
4699
+ padding: 15px;
4700
+ margin-bottom: 20px;
4701
+ border: 1px solid transparent;
4702
+ border-radius: 4px
4703
+ }
4704
+ .alert h4 {
4705
+ margin-top: 0;
4706
+ color: inherit
4707
+ }
4708
+ .alert .alert-link {
4709
+ font-weight: 700
4710
+ }
4711
+ .alert>p,
4712
+ .alert>ul {
4713
+ margin-bottom: 0
4714
+ }
4715
+ .alert>p+p {
4716
+ margin-top: 5px
4717
+ }
4718
+ .alert-dismissable,
4719
+ .alert-dismissible {
4720
+ padding-right: 35px
4721
+ }
4722
+ .alert-dismissable .close,
4723
+ .alert-dismissible .close {
4724
+ position: relative;
4725
+ top: -2px;
4726
+ right: -21px;
4727
+ color: inherit
4728
+ }
4729
+ .alert-success {
4730
+ color: #3c763d;
4731
+ background-color: #dff0d8;
4732
+ border-color: #d6e9c6
4733
+ }
4734
+ .alert-success hr {
4735
+ border-top-color: #c9e2b3
4736
+ }
4737
+ .alert-success .alert-link {
4738
+ color: #2b542c
4739
+ }
4740
+ .alert-info {
4741
+ color: #31708f;
4742
+ background-color: #d9edf7;
4743
+ border-color: #bce8f1
4744
+ }
4745
+ .alert-info hr {
4746
+ border-top-color: #a6e1ec
4747
+ }
4748
+ .alert-info .alert-link {
4749
+ color: #245269
4750
+ }
4751
+ .alert-warning {
4752
+ color: #8a6d3b;
4753
+ background-color: #fcf8e3;
4754
+ border-color: #faebcc
4755
+ }
4756
+ .alert-warning hr {
4757
+ border-top-color: #f7e1b5
4758
+ }
4759
+ .alert-warning .alert-link {
4760
+ color: #66512c
4761
+ }
4762
+ .alert-danger {
4763
+ color: #a94442;
4764
+ background-color: #f2dede;
4765
+ border-color: #ebccd1
4766
+ }
4767
+ .alert-danger hr {
4768
+ border-top-color: #e4b9c0
4769
+ }
4770
+ .alert-danger .alert-link {
4771
+ color: #843534
4772
+ }
4773
+ @-webkit-keyframes progress-bar-stripes {
4774
+ from {
4775
+ background-position: 40px 0
4776
+ }
4777
+ to {
4778
+ background-position: 0 0
4779
+ }
4780
+ }
4781
+ @-o-keyframes progress-bar-stripes {
4782
+ from {
4783
+ background-position: 40px 0
4784
+ }
4785
+ to {
4786
+ background-position: 0 0
4787
+ }
4788
+ }
4789
+ @keyframes progress-bar-stripes {
4790
+ from {
4791
+ background-position: 40px 0
4792
+ }
4793
+ to {
4794
+ background-position: 0 0
4795
+ }
4796
+ }
4797
+ .progress {
4798
+ height: 20px;
4799
+ margin-bottom: 20px;
4800
+ overflow: hidden;
4801
+ background-color: #f5f5f5;
4802
+ border-radius: 4px;
4803
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
4804
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1)
4805
+ }
4806
+ .progress-bar {
4807
+ float: left;
4808
+ width: 0;
4809
+ height: 100%;
4810
+ font-size: 12px;
4811
+ line-height: 20px;
4812
+ color: #fff;
4813
+ text-align: center;
4814
+ background-color: #428bca;
4815
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
4816
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
4817
+ -webkit-transition: width .6s ease;
4818
+ -o-transition: width .6s ease;
4819
+ transition: width .6s ease
4820
+ }
4821
+ .progress-striped .progress-bar,
4822
+ .progress-bar-striped {
4823
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4824
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4825
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4826
+ -webkit-background-size: 40px 40px;
4827
+ background-size: 40px 40px
4828
+ }
4829
+ .progress.active .progress-bar,
4830
+ .progress-bar.active {
4831
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
4832
+ -o-animation: progress-bar-stripes 2s linear infinite;
4833
+ animation: progress-bar-stripes 2s linear infinite
4834
+ }
4835
+ .progress-bar[aria-valuenow="1"],
4836
+ .progress-bar[aria-valuenow="2"] {
4837
+ min-width: 30px
4838
+ }
4839
+ .progress-bar[aria-valuenow="0"] {
4840
+ min-width: 30px;
4841
+ color: #777;
4842
+ background-color: transparent;
4843
+ background-image: none;
4844
+ -webkit-box-shadow: none;
4845
+ box-shadow: none
4846
+ }
4847
+ .progress-bar-success {
4848
+ background-color: #5cb85c
4849
+ }
4850
+ .progress-striped .progress-bar-success {
4851
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4852
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4853
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent)
4854
+ }
4855
+ .progress-bar-info {
4856
+ background-color: #5bc0de
4857
+ }
4858
+ .progress-striped .progress-bar-info {
4859
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4860
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4861
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent)
4862
+ }
4863
+ .progress-bar-warning {
4864
+ background-color: #f0ad4e
4865
+ }
4866
+ .progress-striped .progress-bar-warning {
4867
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4868
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4869
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent)
4870
+ }
4871
+ .progress-bar-danger {
4872
+ background-color: #d9534f
4873
+ }
4874
+ .progress-striped .progress-bar-danger {
4875
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4876
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4877
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent)
4878
+ }
4879
+ .media,
4880
+ .media-body {
4881
+ overflow: hidden;
4882
+ zoom: 1
4883
+ }
4884
+ .media,
4885
+ .media .media {
4886
+ margin-top: 15px
4887
+ }
4888
+ .media:first-child {
4889
+ margin-top: 0
4890
+ }
4891
+ .media-object {
4892
+ display: block
4893
+ }
4894
+ .media-heading {
4895
+ margin: 0 0 5px
4896
+ }
4897
+ .media>.pull-left {
4898
+ margin-right: 10px
4899
+ }
4900
+ .media>.pull-right {
4901
+ margin-left: 10px
4902
+ }
4903
+ .media-list {
4904
+ padding-left: 0;
4905
+ list-style: none
4906
+ }
4907
+ .list-group {
4908
+ padding-left: 0;
4909
+ margin-bottom: 20px
4910
+ }
4911
+ .list-group-item {
4912
+ position: relative;
4913
+ display: block;
4914
+ padding: 10px 15px;
4915
+ margin-bottom: -1px;
4916
+ background-color: #fff;
4917
+ border: 1px solid #ddd
4918
+ }
4919
+ .list-group-item:first-child {
4920
+ border-top-left-radius: 4px;
4921
+ border-top-right-radius: 4px
4922
+ }
4923
+ .list-group-item:last-child {
4924
+ margin-bottom: 0;
4925
+ border-bottom-right-radius: 4px;
4926
+ border-bottom-left-radius: 4px
4927
+ }
4928
+ .list-group-item>.badge {
4929
+ float: right
4930
+ }
4931
+ .list-group-item>.badge+.badge {
4932
+ margin-right: 5px
4933
+ }
4934
+ a.list-group-item {
4935
+ color: #555
4936
+ }
4937
+ a.list-group-item .list-group-item-heading {
4938
+ color: #333
4939
+ }
4940
+ a.list-group-item:hover,
4941
+ a.list-group-item:focus {
4942
+ color: #555;
4943
+ text-decoration: none;
4944
+ background-color: #f5f5f5
4945
+ }
4946
+ .list-group-item.disabled,
4947
+ .list-group-item.disabled:hover,
4948
+ .list-group-item.disabled:focus {
4949
+ color: #777;
4950
+ background-color: #eee
4951
+ }
4952
+ .list-group-item.disabled .list-group-item-heading,
4953
+ .list-group-item.disabled:hover .list-group-item-heading,
4954
+ .list-group-item.disabled:focus .list-group-item-heading {
4955
+ color: inherit
4956
+ }
4957
+ .list-group-item.disabled .list-group-item-text,
4958
+ .list-group-item.disabled:hover .list-group-item-text,
4959
+ .list-group-item.disabled:focus .list-group-item-text {
4960
+ color: #777
4961
+ }
4962
+ .list-group-item.active,
4963
+ .list-group-item.active:hover,
4964
+ .list-group-item.active:focus {
4965
+ z-index: 2;
4966
+ color: #fff;
4967
+ background-color: #428bca;
4968
+ border-color: #428bca
4969
+ }
4970
+ .list-group-item.active .list-group-item-heading,
4971
+ .list-group-item.active:hover .list-group-item-heading,
4972
+ .list-group-item.active:focus .list-group-item-heading,
4973
+ .list-group-item.active .list-group-item-heading>small,
4974
+ .list-group-item.active:hover .list-group-item-heading>small,
4975
+ .list-group-item.active:focus .list-group-item-heading>small,
4976
+ .list-group-item.active .list-group-item-heading>.small,
4977
+ .list-group-item.active:hover .list-group-item-heading>.small,
4978
+ .list-group-item.active:focus .list-group-item-heading>.small {
4979
+ color: inherit
4980
+ }
4981
+ .list-group-item.active .list-group-item-text,
4982
+ .list-group-item.active:hover .list-group-item-text,
4983
+ .list-group-item.active:focus .list-group-item-text {
4984
+ color: #e1edf7
4985
+ }
4986
+ .list-group-item-success {
4987
+ color: #3c763d;
4988
+ background-color: #dff0d8
4989
+ }
4990
+ a.list-group-item-success {
4991
+ color: #3c763d
4992
+ }
4993
+ a.list-group-item-success .list-group-item-heading {
4994
+ color: inherit
4995
+ }
4996
+ a.list-group-item-success:hover,
4997
+ a.list-group-item-success:focus {
4998
+ color: #3c763d;
4999
+ background-color: #d0e9c6
5000
+ }
5001
+ a.list-group-item-success.active,
5002
+ a.list-group-item-success.active:hover,
5003
+ a.list-group-item-success.active:focus {
5004
+ color: #fff;
5005
+ background-color: #3c763d;
5006
+ border-color: #3c763d
5007
+ }
5008
+ .list-group-item-info {
5009
+ color: #31708f;
5010
+ background-color: #d9edf7
5011
+ }
5012
+ a.list-group-item-info {
5013
+ color: #31708f
5014
+ }
5015
+ a.list-group-item-info .list-group-item-heading {
5016
+ color: inherit
5017
+ }
5018
+ a.list-group-item-info:hover,
5019
+ a.list-group-item-info:focus {
5020
+ color: #31708f;
5021
+ background-color: #c4e3f3
5022
+ }
5023
+ a.list-group-item-info.active,
5024
+ a.list-group-item-info.active:hover,
5025
+ a.list-group-item-info.active:focus {
5026
+ color: #fff;
5027
+ background-color: #31708f;
5028
+ border-color: #31708f
5029
+ }
5030
+ .list-group-item-warning {
5031
+ color: #8a6d3b;
5032
+ background-color: #fcf8e3
5033
+ }
5034
+ a.list-group-item-warning {
5035
+ color: #8a6d3b
5036
+ }
5037
+ a.list-group-item-warning .list-group-item-heading {
5038
+ color: inherit
5039
+ }
5040
+ a.list-group-item-warning:hover,
5041
+ a.list-group-item-warning:focus {
5042
+ color: #8a6d3b;
5043
+ background-color: #faf2cc
5044
+ }
5045
+ a.list-group-item-warning.active,
5046
+ a.list-group-item-warning.active:hover,
5047
+ a.list-group-item-warning.active:focus {
5048
+ color: #fff;
5049
+ background-color: #8a6d3b;
5050
+ border-color: #8a6d3b
5051
+ }
5052
+ .list-group-item-danger {
5053
+ color: #a94442;
5054
+ background-color: #f2dede
5055
+ }
5056
+ a.list-group-item-danger {
5057
+ color: #a94442
5058
+ }
5059
+ a.list-group-item-danger .list-group-item-heading {
5060
+ color: inherit
5061
+ }
5062
+ a.list-group-item-danger:hover,
5063
+ a.list-group-item-danger:focus {
5064
+ color: #a94442;
5065
+ background-color: #ebcccc
5066
+ }
5067
+ a.list-group-item-danger.active,
5068
+ a.list-group-item-danger.active:hover,
5069
+ a.list-group-item-danger.active:focus {
5070
+ color: #fff;
5071
+ background-color: #a94442;
5072
+ border-color: #a94442
5073
+ }
5074
+ .list-group-item-heading {
5075
+ margin-top: 0;
5076
+ margin-bottom: 5px
5077
+ }
5078
+ .list-group-item-text {
5079
+ margin-bottom: 0;
5080
+ line-height: 1.3
5081
+ }
5082
+ .panel {
5083
+ margin-bottom: 20px;
5084
+ background-color: #fff;
5085
+ border: 1px solid transparent;
5086
+ border-radius: 4px;
5087
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
5088
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .05)
5089
+ }
5090
+ .panel-body {
5091
+ padding: 15px
5092
+ }
5093
+ .panel-heading {
5094
+ padding: 10px 15px;
5095
+ border-bottom: 1px solid transparent;
5096
+ border-top-left-radius: 3px;
5097
+ border-top-right-radius: 3px
5098
+ }
5099
+ .panel-heading>.dropdown .dropdown-toggle {
5100
+ color: inherit
5101
+ }
5102
+ .panel-title {
5103
+ margin-top: 0;
5104
+ margin-bottom: 0;
5105
+ font-size: 16px;
5106
+ color: inherit
5107
+ }
5108
+ .panel-title>a {
5109
+ color: inherit
5110
+ }
5111
+ .panel-footer {
5112
+ padding: 10px 15px;
5113
+ background-color: #f5f5f5;
5114
+ border-top: 1px solid #ddd;
5115
+ border-bottom-right-radius: 3px;
5116
+ border-bottom-left-radius: 3px
5117
+ }
5118
+ .panel>.list-group {
5119
+ margin-bottom: 0
5120
+ }
5121
+ .panel>.list-group .list-group-item {
5122
+ border-width: 1px 0;
5123
+ border-radius: 0
5124
+ }
5125
+ .panel>.list-group:first-child .list-group-item:first-child {
5126
+ border-top: 0;
5127
+ border-top-left-radius: 3px;
5128
+ border-top-right-radius: 3px
5129
+ }
5130
+ .panel>.list-group:last-child .list-group-item:last-child {
5131
+ border-bottom: 0;
5132
+ border-bottom-right-radius: 3px;
5133
+ border-bottom-left-radius: 3px
5134
+ }
5135
+ .panel-heading+.list-group .list-group-item:first-child {
5136
+ border-top-width: 0
5137
+ }
5138
+ .list-group+.panel-footer {
5139
+ border-top-width: 0
5140
+ }
5141
+ .panel>.table,
5142
+ .panel>.table-responsive>.table,
5143
+ .panel>.panel-collapse>.table {
5144
+ margin-bottom: 0
5145
+ }
5146
+ .panel>.table:first-child,
5147
+ .panel>.table-responsive:first-child>.table:first-child {
5148
+ border-top-left-radius: 3px;
5149
+ border-top-right-radius: 3px
5150
+ }
5151
+ .panel>.table:first-child>thead:first-child>tr:first-child td:first-child,
5152
+ .panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,
5153
+ .panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,
5154
+ .panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,
5155
+ .panel>.table:first-child>thead:first-child>tr:first-child th:first-child,
5156
+ .panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,
5157
+ .panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,
5158
+ .panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child {
5159
+ border-top-left-radius: 3px
5160
+ }
5161
+ .panel>.table:first-child>thead:first-child>tr:first-child td:last-child,
5162
+ .panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,
5163
+ .panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,
5164
+ .panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,
5165
+ .panel>.table:first-child>thead:first-child>tr:first-child th:last-child,
5166
+ .panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,
5167
+ .panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,
5168
+ .panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child {
5169
+ border-top-right-radius: 3px
5170
+ }
5171
+ .panel>.table:last-child,
5172
+ .panel>.table-responsive:last-child>.table:last-child {
5173
+ border-bottom-right-radius: 3px;
5174
+ border-bottom-left-radius: 3px
5175
+ }
5176
+ .panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,
5177
+ .panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,
5178
+ .panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,
5179
+ .panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,
5180
+ .panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,
5181
+ .panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,
5182
+ .panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,
5183
+ .panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child {
5184
+ border-bottom-left-radius: 3px
5185
+ }
5186
+ .panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,
5187
+ .panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,
5188
+ .panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,
5189
+ .panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,
5190
+ .panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,
5191
+ .panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,
5192
+ .panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,
5193
+ .panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child {
5194
+ border-bottom-right-radius: 3px
5195
+ }
5196
+ .panel>.panel-body+.table,
5197
+ .panel>.panel-body+.table-responsive {
5198
+ border-top: 1px solid #ddd
5199
+ }
5200
+ .panel>.table>tbody:first-child>tr:first-child th,
5201
+ .panel>.table>tbody:first-child>tr:first-child td {
5202
+ border-top: 0
5203
+ }
5204
+ .panel>.table-bordered,
5205
+ .panel>.table-responsive>.table-bordered {
5206
+ border: 0
5207
+ }
5208
+ .panel>.table-bordered>thead>tr>th:first-child,
5209
+ .panel>.table-responsive>.table-bordered>thead>tr>th:first-child,
5210
+ .panel>.table-bordered>tbody>tr>th:first-child,
5211
+ .panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,
5212
+ .panel>.table-bordered>tfoot>tr>th:first-child,
5213
+ .panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,
5214
+ .panel>.table-bordered>thead>tr>td:first-child,
5215
+ .panel>.table-responsive>.table-bordered>thead>tr>td:first-child,
5216
+ .panel>.table-bordered>tbody>tr>td:first-child,
5217
+ .panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,
5218
+ .panel>.table-bordered>tfoot>tr>td:first-child,
5219
+ .panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child {
5220
+ border-left: 0
5221
+ }
5222
+ .panel>.table-bordered>thead>tr>th:last-child,
5223
+ .panel>.table-responsive>.table-bordered>thead>tr>th:last-child,
5224
+ .panel>.table-bordered>tbody>tr>th:last-child,
5225
+ .panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,
5226
+ .panel>.table-bordered>tfoot>tr>th:last-child,
5227
+ .panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,
5228
+ .panel>.table-bordered>thead>tr>td:last-child,
5229
+ .panel>.table-responsive>.table-bordered>thead>tr>td:last-child,
5230
+ .panel>.table-bordered>tbody>tr>td:last-child,
5231
+ .panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,
5232
+ .panel>.table-bordered>tfoot>tr>td:last-child,
5233
+ .panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child {
5234
+ border-right: 0
5235
+ }
5236
+ .panel>.table-bordered>thead>tr:first-child>td,
5237
+ .panel>.table-responsive>.table-bordered>thead>tr:first-child>td,
5238
+ .panel>.table-bordered>tbody>tr:first-child>td,
5239
+ .panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,
5240
+ .panel>.table-bordered>thead>tr:first-child>th,
5241
+ .panel>.table-responsive>.table-bordered>thead>tr:first-child>th,
5242
+ .panel>.table-bordered>tbody>tr:first-child>th,
5243
+ .panel>.table-responsive>.table-bordered>tbody>tr:first-child>th {
5244
+ border-bottom: 0
5245
+ }
5246
+ .panel>.table-bordered>tbody>tr:last-child>td,
5247
+ .panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,
5248
+ .panel>.table-bordered>tfoot>tr:last-child>td,
5249
+ .panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,
5250
+ .panel>.table-bordered>tbody>tr:last-child>th,
5251
+ .panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,
5252
+ .panel>.table-bordered>tfoot>tr:last-child>th,
5253
+ .panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th {
5254
+ border-bottom: 0
5255
+ }
5256
+ .panel>.table-responsive {
5257
+ margin-bottom: 0;
5258
+ border: 0
5259
+ }
5260
+ .panel-group {
5261
+ margin-bottom: 20px
5262
+ }
5263
+ .panel-group .panel {
5264
+ margin-bottom: 0;
5265
+ border-radius: 4px
5266
+ }
5267
+ .panel-group .panel+.panel {
5268
+ margin-top: 5px
5269
+ }
5270
+ .panel-group .panel-heading {
5271
+ border-bottom: 0
5272
+ }
5273
+ .panel-group .panel-heading+.panel-collapse>.panel-body {
5274
+ border-top: 1px solid #ddd
5275
+ }
5276
+ .panel-group .panel-footer {
5277
+ border-top: 0
5278
+ }
5279
+ .panel-group .panel-footer+.panel-collapse .panel-body {
5280
+ border-bottom: 1px solid #ddd
5281
+ }
5282
+ .panel-default {
5283
+ border-color: #ddd
5284
+ }
5285
+ .panel-default>.panel-heading {
5286
+ color: #333;
5287
+ background-color: #f5f5f5;
5288
+ border-color: #ddd
5289
+ }
5290
+ .panel-default>.panel-heading+.panel-collapse>.panel-body {
5291
+ border-top-color: #ddd
5292
+ }
5293
+ .panel-default>.panel-heading .badge {
5294
+ color: #f5f5f5;
5295
+ background-color: #333
5296
+ }
5297
+ .panel-default>.panel-footer+.panel-collapse>.panel-body {
5298
+ border-bottom-color: #ddd
5299
+ }
5300
+ .panel-primary {
5301
+ border-color: #428bca
5302
+ }
5303
+ .panel-primary>.panel-heading {
5304
+ color: #fff;
5305
+ background-color: #428bca;
5306
+ border-color: #428bca
5307
+ }
5308
+ .panel-primary>.panel-heading+.panel-collapse>.panel-body {
5309
+ border-top-color: #428bca
5310
+ }
5311
+ .panel-primary>.panel-heading .badge {
5312
+ color: #428bca;
5313
+ background-color: #fff
5314
+ }
5315
+ .panel-primary>.panel-footer+.panel-collapse>.panel-body {
5316
+ border-bottom-color: #428bca
5317
+ }
5318
+ .panel-success {
5319
+ border-color: #d6e9c6
5320
+ }
5321
+ .panel-success>.panel-heading {
5322
+ color: #3c763d;
5323
+ background-color: #dff0d8;
5324
+ border-color: #d6e9c6
5325
+ }
5326
+ .panel-success>.panel-heading+.panel-collapse>.panel-body {
5327
+ border-top-color: #d6e9c6
5328
+ }
5329
+ .panel-success>.panel-heading .badge {
5330
+ color: #dff0d8;
5331
+ background-color: #3c763d
5332
+ }
5333
+ .panel-success>.panel-footer+.panel-collapse>.panel-body {
5334
+ border-bottom-color: #d6e9c6
5335
+ }
5336
+ .panel-info {
5337
+ border-color: #bce8f1
5338
+ }
5339
+ .panel-info>.panel-heading {
5340
+ color: #31708f;
5341
+ background-color: #d9edf7;
5342
+ border-color: #bce8f1
5343
+ }
5344
+ .panel-info>.panel-heading+.panel-collapse>.panel-body {
5345
+ border-top-color: #bce8f1
5346
+ }
5347
+ .panel-info>.panel-heading .badge {
5348
+ color: #d9edf7;
5349
+ background-color: #31708f
5350
+ }
5351
+ .panel-info>.panel-footer+.panel-collapse>.panel-body {
5352
+ border-bottom-color: #bce8f1
5353
+ }
5354
+ .panel-warning {
5355
+ border-color: #faebcc
5356
+ }
5357
+ .panel-warning>.panel-heading {
5358
+ color: #8a6d3b;
5359
+ background-color: #fcf8e3;
5360
+ border-color: #faebcc
5361
+ }
5362
+ .panel-warning>.panel-heading+.panel-collapse>.panel-body {
5363
+ border-top-color: #faebcc
5364
+ }
5365
+ .panel-warning>.panel-heading .badge {
5366
+ color: #fcf8e3;
5367
+ background-color: #8a6d3b
5368
+ }
5369
+ .panel-warning>.panel-footer+.panel-collapse>.panel-body {
5370
+ border-bottom-color: #faebcc
5371
+ }
5372
+ .panel-danger {
5373
+ border-color: #ebccd1
5374
+ }
5375
+ .panel-danger>.panel-heading {
5376
+ color: #a94442;
5377
+ background-color: #f2dede;
5378
+ border-color: #ebccd1
5379
+ }
5380
+ .panel-danger>.panel-heading+.panel-collapse>.panel-body {
5381
+ border-top-color: #ebccd1
5382
+ }
5383
+ .panel-danger>.panel-heading .badge {
5384
+ color: #f2dede;
5385
+ background-color: #a94442
5386
+ }
5387
+ .panel-danger>.panel-footer+.panel-collapse>.panel-body {
5388
+ border-bottom-color: #ebccd1
5389
+ }
5390
+ .embed-responsive {
5391
+ position: relative;
5392
+ display: block;
5393
+ height: 0;
5394
+ padding: 0;
5395
+ overflow: hidden
5396
+ }
5397
+ .embed-responsive .embed-responsive-item,
5398
+ .embed-responsive iframe,
5399
+ .embed-responsive embed,
5400
+ .embed-responsive object {
5401
+ position: absolute;
5402
+ top: 0;
5403
+ bottom: 0;
5404
+ left: 0;
5405
+ width: 100%;
5406
+ height: 100%;
5407
+ border: 0
5408
+ }
5409
+ .embed-responsive.embed-responsive-16by9 {
5410
+ padding-bottom: 56.25%
5411
+ }
5412
+ .embed-responsive.embed-responsive-4by3 {
5413
+ padding-bottom: 75%
5414
+ }
5415
+ .well {
5416
+ min-height: 20px;
5417
+ padding: 19px;
5418
+ margin-bottom: 20px;
5419
+ background-color: #f5f5f5;
5420
+ border: 1px solid #e3e3e3;
5421
+ border-radius: 4px;
5422
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
5423
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05)
5424
+ }
5425
+ .well blockquote {
5426
+ border-color: #ddd;
5427
+ border-color: rgba(0, 0, 0, .15)
5428
+ }
5429
+ .well-lg {
5430
+ padding: 24px;
5431
+ border-radius: 6px
5432
+ }
5433
+ .well-sm {
5434
+ padding: 9px;
5435
+ border-radius: 3px
5436
+ }
5437
+ .close {
5438
+ float: right;
5439
+ font-size: 21px;
5440
+ font-weight: 700;
5441
+ line-height: 1;
5442
+ color: #000;
5443
+ text-shadow: 0 1px 0 #fff;
5444
+ filter: alpha(opacity=20);
5445
+ opacity: .2
5446
+ }
5447
+ .close:hover,
5448
+ .close:focus {
5449
+ color: #000;
5450
+ text-decoration: none;
5451
+ cursor: pointer;
5452
+ filter: alpha(opacity=50);
5453
+ opacity: .5
5454
+ }
5455
+ button.close {
5456
+ -webkit-appearance: none;
5457
+ padding: 0;
5458
+ cursor: pointer;
5459
+ background: 0 0;
5460
+ border: 0
5461
+ }
5462
+ .modal-open {
5463
+ overflow: hidden
5464
+ }
5465
+ .modal {
5466
+ position: fixed;
5467
+ top: 0;
5468
+ right: 0;
5469
+ bottom: 0;
5470
+ left: 0;
5471
+ z-index: 1050;
5472
+ display: none;
5473
+ overflow: hidden;
5474
+ -webkit-overflow-scrolling: touch;
5475
+ outline: 0
5476
+ }
5477
+ .modal.fade .modal-dialog {
5478
+ -webkit-transition: -webkit-transform .3s ease-out;
5479
+ -o-transition: -o-transform .3s ease-out;
5480
+ transition: transform .3s ease-out;
5481
+ -webkit-transform: translate3d(0, -25%, 0);
5482
+ -o-transform: translate3d(0, -25%, 0);
5483
+ transform: translate3d(0, -25%, 0)
5484
+ }
5485
+ .modal.in .modal-dialog {
5486
+ -webkit-transform: translate3d(0, 0, 0);
5487
+ -o-transform: translate3d(0, 0, 0);
5488
+ transform: translate3d(0, 0, 0)
5489
+ }
5490
+ .modal-open .modal {
5491
+ overflow-x: hidden;
5492
+ overflow-y: auto
5493
+ }
5494
+ .modal-dialog {
5495
+ position: relative;
5496
+ width: auto;
5497
+ margin: 10px;
5498
+ z-index: 1040;
5499
+ }
5500
+ .modal-content {
5501
+ position: relative;
5502
+ background-color: #fff;
5503
+ -webkit-background-clip: padding-box;
5504
+ background-clip: padding-box;
5505
+ border: 1px solid #999;
5506
+ border: 1px solid rgba(0, 0, 0, .2);
5507
+ border-radius: 6px;
5508
+ outline: 0;
5509
+ -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
5510
+ box-shadow: 0 3px 9px rgba(0, 0, 0, .5)
5511
+ }
5512
+ .modal-backdrop {
5513
+ position: fixed;
5514
+ top: 0;
5515
+ right: 0;
5516
+ bottom: 0;
5517
+ left: 0;
5518
+ z-index: 1040;
5519
+ background-color: transparent
5520
+ }
5521
+ .modal-backdrop.fade {
5522
+ filter: alpha(opacity=0);
5523
+ opacity: 0
5524
+ }
5525
+ .modal-backdrop.in {
5526
+ filter: alpha(opacity=50);
5527
+ opacity: .5
5528
+ }
5529
+ .modal-header {
5530
+ min-height: 16.43px;
5531
+ padding: 15px;
5532
+ border-bottom: 1px solid #e5e5e5
5533
+ }
5534
+ .modal-header .close {
5535
+ margin-top: -2px
5536
+ }
5537
+ .modal-title {
5538
+ margin: 0;
5539
+ line-height: 1.42857143
5540
+ }
5541
+ .modal-body {
5542
+ position: relative;
5543
+ padding: 15px
5544
+ }
5545
+ .modal-footer {
5546
+ padding: 15px;
5547
+ text-align: right;
5548
+ border-top: 1px solid #e5e5e5
5549
+ }
5550
+ .modal-footer .btn+.btn {
5551
+ margin-bottom: 0;
5552
+ margin-left: 5px
5553
+ }
5554
+ .modal-footer .btn-group .btn+.btn {
5555
+ margin-left: -1px
5556
+ }
5557
+ .modal-footer .btn-block+.btn-block {
5558
+ margin-left: 0
5559
+ }
5560
+ .modal-scrollbar-measure {
5561
+ position: absolute;
5562
+ top: -9999px;
5563
+ width: 50px;
5564
+ height: 50px;
5565
+ overflow: scroll
5566
+ }
5567
+ @media (min-width: 768px) {
5568
+ .modal-dialog {
5569
+ width: 600px;
5570
+ margin: 30px auto;
5571
+ z-index: 1040;
5572
+ }
5573
+ .modal-content {
5574
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
5575
+ box-shadow: 0 5px 15px rgba(0, 0, 0, .5)
5576
+ }
5577
+ .modal-sm {
5578
+ width: 300px
5579
+ }
5580
+ }
5581
+ @media (min-width: 992px) {
5582
+ .modal-lg {
5583
+ width: 900px
5584
+ }
5585
+ }
5586
+ .tooltip {
5587
+ position: absolute;
5588
+ z-index: 1070;
5589
+ display: block;
5590
+ font-size: 12px;
5591
+ line-height: 1.4;
5592
+ visibility: visible;
5593
+ filter: alpha(opacity=0);
5594
+ opacity: 0
5595
+ }
5596
+ .tooltip.in {
5597
+ filter: alpha(opacity=90);
5598
+ opacity: .9
5599
+ }
5600
+ .tooltip.top {
5601
+ padding: 5px 0;
5602
+ margin-top: -3px
5603
+ }
5604
+ .tooltip.right {
5605
+ padding: 0 5px;
5606
+ margin-left: 3px
5607
+ }
5608
+ .tooltip.bottom {
5609
+ padding: 5px 0;
5610
+ margin-top: 3px
5611
+ }
5612
+ .tooltip.left {
5613
+ padding: 0 5px;
5614
+ margin-left: -3px
5615
+ }
5616
+ .tooltip-inner {
5617
+ max-width: 200px;
5618
+ padding: 3px 8px;
5619
+ color: #fff;
5620
+ text-align: center;
5621
+ text-decoration: none;
5622
+ background-color: #000;
5623
+ border-radius: 4px
5624
+ }
5625
+ .tooltip-arrow {
5626
+ position: absolute;
5627
+ width: 0;
5628
+ height: 0;
5629
+ border-color: transparent;
5630
+ border-style: solid
5631
+ }
5632
+ .tooltip.top .tooltip-arrow {
5633
+ bottom: 0;
5634
+ left: 50%;
5635
+ margin-left: -5px;
5636
+ border-width: 5px 5px 0;
5637
+ border-top-color: #000
5638
+ }
5639
+ .tooltip.top-left .tooltip-arrow {
5640
+ bottom: 0;
5641
+ left: 5px;
5642
+ border-width: 5px 5px 0;
5643
+ border-top-color: #000
5644
+ }
5645
+ .tooltip.top-right .tooltip-arrow {
5646
+ right: 5px;
5647
+ bottom: 0;
5648
+ border-width: 5px 5px 0;
5649
+ border-top-color: #000
5650
+ }
5651
+ .tooltip.right .tooltip-arrow {
5652
+ top: 50%;
5653
+ left: 0;
5654
+ margin-top: -5px;
5655
+ border-width: 5px 5px 5px 0;
5656
+ border-right-color: #000
5657
+ }
5658
+ .tooltip.left .tooltip-arrow {
5659
+ top: 50%;
5660
+ right: 0;
5661
+ margin-top: -5px;
5662
+ border-width: 5px 0 5px 5px;
5663
+ border-left-color: #000
5664
+ }
5665
+ .tooltip.bottom .tooltip-arrow {
5666
+ top: 0;
5667
+ left: 50%;
5668
+ margin-left: -5px;
5669
+ border-width: 0 5px 5px;
5670
+ border-bottom-color: #000
5671
+ }
5672
+ .tooltip.bottom-left .tooltip-arrow {
5673
+ top: 0;
5674
+ left: 5px;
5675
+ border-width: 0 5px 5px;
5676
+ border-bottom-color: #000
5677
+ }
5678
+ .tooltip.bottom-right .tooltip-arrow {
5679
+ top: 0;
5680
+ right: 5px;
5681
+ border-width: 0 5px 5px;
5682
+ border-bottom-color: #000
5683
+ }
5684
+ .popover {
5685
+ position: absolute;
5686
+ top: 0;
5687
+ left: 0;
5688
+ z-index: 1060;
5689
+ display: none;
5690
+ max-width: 276px;
5691
+ padding: 1px;
5692
+ text-align: left;
5693
+ white-space: normal;
5694
+ background-color: #fff;
5695
+ -webkit-background-clip: padding-box;
5696
+ background-clip: padding-box;
5697
+ border: 1px solid #ccc;
5698
+ border: 1px solid rgba(0, 0, 0, .2);
5699
+ border-radius: 6px;
5700
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
5701
+ box-shadow: 0 5px 10px rgba(0, 0, 0, .2)
5702
+ }
5703
+ .popover.top {
5704
+ margin-top: -10px
5705
+ }
5706
+ .popover.right {
5707
+ margin-left: 10px
5708
+ }
5709
+ .popover.bottom {
5710
+ margin-top: 10px
5711
+ }
5712
+ .popover.left {
5713
+ margin-left: -10px
5714
+ }
5715
+ .popover-title {
5716
+ padding: 8px 14px;
5717
+ margin: 0;
5718
+ font-size: 14px;
5719
+ font-weight: 400;
5720
+ line-height: 18px;
5721
+ background-color: #f7f7f7;
5722
+ border-bottom: 1px solid #ebebeb;
5723
+ border-radius: 5px 5px 0 0
5724
+ }
5725
+ .popover-content {
5726
+ padding: 9px 14px
5727
+ }
5728
+ .popover>.arrow,
5729
+ .popover>.arrow:after {
5730
+ position: absolute;
5731
+ display: block;
5732
+ width: 0;
5733
+ height: 0;
5734
+ border-color: transparent;
5735
+ border-style: solid
5736
+ }
5737
+ .popover>.arrow {
5738
+ border-width: 11px
5739
+ }
5740
+ .popover>.arrow:after {
5741
+ content: "";
5742
+ border-width: 10px
5743
+ }
5744
+ .popover.top>.arrow {
5745
+ bottom: -11px;
5746
+ left: 50%;
5747
+ margin-left: -11px;
5748
+ border-top-color: #999;
5749
+ border-top-color: rgba(0, 0, 0, .25);
5750
+ border-bottom-width: 0
5751
+ }
5752
+ .popover.top>.arrow:after {
5753
+ bottom: 1px;
5754
+ margin-left: -10px;
5755
+ content: " ";
5756
+ border-top-color: #fff;
5757
+ border-bottom-width: 0
5758
+ }
5759
+ .popover.right>.arrow {
5760
+ top: 50%;
5761
+ left: -11px;
5762
+ margin-top: -11px;
5763
+ border-right-color: #999;
5764
+ border-right-color: rgba(0, 0, 0, .25);
5765
+ border-left-width: 0
5766
+ }
5767
+ .popover.right>.arrow:after {
5768
+ bottom: -10px;
5769
+ left: 1px;
5770
+ content: " ";
5771
+ border-right-color: #fff;
5772
+ border-left-width: 0
5773
+ }
5774
+ .popover.bottom>.arrow {
5775
+ top: -11px;
5776
+ left: 50%;
5777
+ margin-left: -11px;
5778
+ border-top-width: 0;
5779
+ border-bottom-color: #999;
5780
+ border-bottom-color: rgba(0, 0, 0, .25)
5781
+ }
5782
+ .popover.bottom>.arrow:after {
5783
+ top: 1px;
5784
+ margin-left: -10px;
5785
+ content: " ";
5786
+ border-top-width: 0;
5787
+ border-bottom-color: #fff
5788
+ }
5789
+ .popover.left>.arrow {
5790
+ top: 50%;
5791
+ right: -11px;
5792
+ margin-top: -11px;
5793
+ border-right-width: 0;
5794
+ border-left-color: #999;
5795
+ border-left-color: rgba(0, 0, 0, .25)
5796
+ }
5797
+ .popover.left>.arrow:after {
5798
+ right: 1px;
5799
+ bottom: -10px;
5800
+ content: " ";
5801
+ border-right-width: 0;
5802
+ border-left-color: #fff
5803
+ }
5804
+ .carousel {
5805
+ position: relative
5806
+ }
5807
+ .carousel-inner {
5808
+ position: relative;
5809
+ width: 100%;
5810
+ overflow: hidden
5811
+ }
5812
+ .carousel-inner>.item {
5813
+ position: relative;
5814
+ display: none;
5815
+ -webkit-transition: .6s ease-in-out left;
5816
+ -o-transition: .6s ease-in-out left;
5817
+ transition: .6s ease-in-out left
5818
+ }
5819
+ .carousel-inner>.item>img,
5820
+ .carousel-inner>.item>a>img {
5821
+ line-height: 1
5822
+ }
5823
+ .carousel-inner>.active,
5824
+ .carousel-inner>.next,
5825
+ .carousel-inner>.prev {
5826
+ display: block
5827
+ }
5828
+ .carousel-inner>.active {
5829
+ left: 0
5830
+ }
5831
+ .carousel-inner>.next,
5832
+ .carousel-inner>.prev {
5833
+ position: absolute;
5834
+ top: 0;
5835
+ width: 100%
5836
+ }
5837
+ .carousel-inner>.next {
5838
+ left: 100%
5839
+ }
5840
+ .carousel-inner>.prev {
5841
+ left: -100%
5842
+ }
5843
+ .carousel-inner>.next.left,
5844
+ .carousel-inner>.prev.right {
5845
+ left: 0
5846
+ }
5847
+ .carousel-inner>.active.left {
5848
+ left: -100%
5849
+ }
5850
+ .carousel-inner>.active.right {
5851
+ left: 100%
5852
+ }
5853
+ .carousel-control {
5854
+ position: absolute;
5855
+ top: 0;
5856
+ bottom: 0;
5857
+ left: 0;
5858
+ width: 15%;
5859
+ font-size: 20px;
5860
+ color: #fff;
5861
+ text-align: center;
5862
+ text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
5863
+ filter: alpha(opacity=50);
5864
+ opacity: .5
5865
+ }
5866
+ .carousel-control.left {
5867
+ background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0, rgba(0, 0, 0, .0001) 100%);
5868
+ background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0, rgba(0, 0, 0, .0001) 100%);
5869
+ background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));
5870
+ background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0, rgba(0, 0, 0, .0001) 100%);
5871
+ filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
5872
+ background-repeat: repeat-x
5873
+ }
5874
+ .carousel-control.right {
5875
+ right: 0;
5876
+ left: auto;
5877
+ background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0, rgba(0, 0, 0, .5) 100%);
5878
+ background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0, rgba(0, 0, 0, .5) 100%);
5879
+ background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));
5880
+ background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0, rgba(0, 0, 0, .5) 100%);
5881
+ filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
5882
+ background-repeat: repeat-x
5883
+ }
5884
+ .carousel-control:hover,
5885
+ .carousel-control:focus {
5886
+ color: #fff;
5887
+ text-decoration: none;
5888
+ filter: alpha(opacity=90);
5889
+ outline: 0;
5890
+ opacity: .9
5891
+ }
5892
+ .carousel-control .icon-prev,
5893
+ .carousel-control .icon-next,
5894
+ .carousel-control .glyphicon-chevron-left,
5895
+ .carousel-control .glyphicon-chevron-right {
5896
+ position: absolute;
5897
+ top: 50%;
5898
+ z-index: 5;
5899
+ display: inline-block
5900
+ }
5901
+ .carousel-control .icon-prev,
5902
+ .carousel-control .glyphicon-chevron-left {
5903
+ left: 50%;
5904
+ margin-left: -10px
5905
+ }
5906
+ .carousel-control .icon-next,
5907
+ .carousel-control .glyphicon-chevron-right {
5908
+ right: 50%;
5909
+ margin-right: -10px
5910
+ }
5911
+ .carousel-control .icon-prev,
5912
+ .carousel-control .icon-next {
5913
+ width: 20px;
5914
+ height: 20px;
5915
+ margin-top: -10px;
5916
+ font-family: serif
5917
+ }
5918
+ .carousel-control .icon-prev:before {
5919
+ content: '\2039'
5920
+ }
5921
+ .carousel-control .icon-next:before {
5922
+ content: '\203a'
5923
+ }
5924
+ .carousel-indicators {
5925
+ position: absolute;
5926
+ bottom: 10px;
5927
+ left: 50%;
5928
+ z-index: 15;
5929
+ width: 60%;
5930
+ padding-left: 0;
5931
+ margin-left: -30%;
5932
+ text-align: center;
5933
+ list-style: none
5934
+ }
5935
+ .carousel-indicators li {
5936
+ display: inline-block;
5937
+ width: 10px;
5938
+ height: 10px;
5939
+ margin: 1px;
5940
+ text-indent: -999px;
5941
+ cursor: pointer;
5942
+ background-color: #000 \9;
5943
+ background-color: rgba(0, 0, 0, 0);
5944
+ border: 1px solid #fff;
5945
+ border-radius: 10px
5946
+ }
5947
+ .carousel-indicators .active {
5948
+ width: 12px;
5949
+ height: 12px;
5950
+ margin: 0;
5951
+ background-color: #fff
5952
+ }
5953
+ .carousel-caption {
5954
+ position: absolute;
5955
+ right: 15%;
5956
+ bottom: 20px;
5957
+ left: 15%;
5958
+ z-index: 10;
5959
+ padding-top: 20px;
5960
+ padding-bottom: 20px;
5961
+ color: #fff;
5962
+ text-align: center;
5963
+ text-shadow: 0 1px 2px rgba(0, 0, 0, .6)
5964
+ }
5965
+ .carousel-caption .btn {
5966
+ text-shadow: none
5967
+ }
5968
+ @media screen and (min-width: 768px) {
5969
+ .carousel-control .glyphicon-chevron-left,
5970
+ .carousel-control .glyphicon-chevron-right,
5971
+ .carousel-control .icon-prev,
5972
+ .carousel-control .icon-next {
5973
+ width: 30px;
5974
+ height: 30px;
5975
+ margin-top: -15px;
5976
+ font-size: 30px
5977
+ }
5978
+ .carousel-control .glyphicon-chevron-left,
5979
+ .carousel-control .icon-prev {
5980
+ margin-left: -15px
5981
+ }
5982
+ .carousel-control .glyphicon-chevron-right,
5983
+ .carousel-control .icon-next {
5984
+ margin-right: -15px
5985
+ }
5986
+ .carousel-caption {
5987
+ right: 20%;
5988
+ left: 20%;
5989
+ padding-bottom: 30px
5990
+ }
5991
+ .carousel-indicators {
5992
+ bottom: 20px
5993
+ }
5994
+ }
5995
+ .clearfix:before,
5996
+ .clearfix:after,
5997
+ .dl-horizontal dd:before,
5998
+ .dl-horizontal dd:after,
5999
+ .container:before,
6000
+ .container:after,
6001
+ .container-fluid:before,
6002
+ .container-fluid:after,
6003
+ .row:before,
6004
+ .row:after,
6005
+ .form-horizontal .form-group:before,
6006
+ .form-horizontal .form-group:after,
6007
+ .btn-toolbar:before,
6008
+ .btn-toolbar:after,
6009
+ .btn-group-vertical>.btn-group:before,
6010
+ .btn-group-vertical>.btn-group:after,
6011
+ .nav:before,
6012
+ .nav:after,
6013
+ .navbar:before,
6014
+ .navbar:after,
6015
+ .navbar-header:before,
6016
+ .navbar-header:after,
6017
+ .navbar-collapse:before,
6018
+ .navbar-collapse:after,
6019
+ .pager:before,
6020
+ .pager:after,
6021
+ .panel-body:before,
6022
+ .panel-body:after,
6023
+ .modal-footer:before,
6024
+ .modal-footer:after {
6025
+ display: table;
6026
+ content: " "
6027
+ }
6028
+ .clearfix:after,
6029
+ .dl-horizontal dd:after,
6030
+ .container:after,
6031
+ .container-fluid:after,
6032
+ .row:after,
6033
+ .form-horizontal .form-group:after,
6034
+ .btn-toolbar:after,
6035
+ .btn-group-vertical>.btn-group:after,
6036
+ .nav:after,
6037
+ .navbar:after,
6038
+ .navbar-header:after,
6039
+ .navbar-collapse:after,
6040
+ .pager:after,
6041
+ .panel-body:after,
6042
+ .modal-footer:after {
6043
+ clear: both
6044
+ }
6045
+ .center-block {
6046
+ display: block;
6047
+ margin-right: auto;
6048
+ margin-left: auto
6049
+ }
6050
+ .pull-right {
6051
+ float: right!important
6052
+ }
6053
+ .pull-left {
6054
+ float: left!important
6055
+ }
6056
+ .hide {
6057
+ display: none!important
6058
+ }
6059
+ .show {
6060
+ display: block!important
6061
+ }
6062
+ .invisible {
6063
+ visibility: hidden
6064
+ }
6065
+ .text-hide {
6066
+ font: 0/0 a;
6067
+ color: transparent;
6068
+ text-shadow: none;
6069
+ background-color: transparent;
6070
+ border: 0
6071
+ }
6072
+ .hidden {
6073
+ display: none!important;
6074
+ visibility: hidden!important
6075
+ }
6076
+ .affix {
6077
+ position: fixed;
6078
+ -webkit-transform: translate3d(0, 0, 0);
6079
+ -o-transform: translate3d(0, 0, 0);
6080
+ transform: translate3d(0, 0, 0)
6081
+ }
6082
+ @-ms-viewport {
6083
+ width: device-width
6084
+ }
6085
+ .visible-xs,
6086
+ .visible-sm,
6087
+ .visible-md,
6088
+ .visible-lg {
6089
+ display: none!important
6090
+ }
6091
+ .visible-xs-block,
6092
+ .visible-xs-inline,
6093
+ .visible-xs-inline-block,
6094
+ .visible-sm-block,
6095
+ .visible-sm-inline,
6096
+ .visible-sm-inline-block,
6097
+ .visible-md-block,
6098
+ .visible-md-inline,
6099
+ .visible-md-inline-block,
6100
+ .visible-lg-block,
6101
+ .visible-lg-inline,
6102
+ .visible-lg-inline-block {
6103
+ display: none!important
6104
+ }
6105
+ @media (max-width: 767px) {
6106
+ .visible-xs {
6107
+ display: block!important
6108
+ }
6109
+ table.visible-xs {
6110
+ display: table
6111
+ }
6112
+ tr.visible-xs {
6113
+ display: table-row!important
6114
+ }
6115
+ th.visible-xs,
6116
+ td.visible-xs {
6117
+ display: table-cell!important
6118
+ }
6119
+ }
6120
+ @media (max-width: 767px) {
6121
+ .visible-xs-block {
6122
+ display: block!important
6123
+ }
6124
+ }
6125
+ @media (max-width: 767px) {
6126
+ .visible-xs-inline {
6127
+ display: inline!important
6128
+ }
6129
+ }
6130
+ @media (max-width: 767px) {
6131
+ .visible-xs-inline-block {
6132
+ display: inline-block!important
6133
+ }
6134
+ }
6135
+ @media (min-width: 768px) and (max-width: 991px) {
6136
+ .visible-sm {
6137
+ display: block!important
6138
+ }
6139
+ table.visible-sm {
6140
+ display: table
6141
+ }
6142
+ tr.visible-sm {
6143
+ display: table-row!important
6144
+ }
6145
+ th.visible-sm,
6146
+ td.visible-sm {
6147
+ display: table-cell!important
6148
+ }
6149
+ }
6150
+ @media (min-width: 768px) and (max-width: 991px) {
6151
+ .visible-sm-block {
6152
+ display: block!important
6153
+ }
6154
+ }
6155
+ @media (min-width: 768px) and (max-width: 991px) {
6156
+ .visible-sm-inline {
6157
+ display: inline!important
6158
+ }
6159
+ }
6160
+ @media (min-width: 768px) and (max-width: 991px) {
6161
+ .visible-sm-inline-block {
6162
+ display: inline-block!important
6163
+ }
6164
+ }
6165
+ @media (min-width: 992px) and (max-width: 1199px) {
6166
+ .visible-md {
6167
+ display: block!important
6168
+ }
6169
+ table.visible-md {
6170
+ display: table
6171
+ }
6172
+ tr.visible-md {
6173
+ display: table-row!important
6174
+ }
6175
+ th.visible-md,
6176
+ td.visible-md {
6177
+ display: table-cell!important
6178
+ }
6179
+ }
6180
+ @media (min-width: 992px) and (max-width: 1199px) {
6181
+ .visible-md-block {
6182
+ display: block!important
6183
+ }
6184
+ }
6185
+ @media (min-width: 992px) and (max-width: 1199px) {
6186
+ .visible-md-inline {
6187
+ display: inline!important
6188
+ }
6189
+ }
6190
+ @media (min-width: 992px) and (max-width: 1199px) {
6191
+ .visible-md-inline-block {
6192
+ display: inline-block!important
6193
+ }
6194
+ }
6195
+ @media (min-width: 1200px) {
6196
+ .visible-lg {
6197
+ display: block!important
6198
+ }
6199
+ table.visible-lg {
6200
+ display: table
6201
+ }
6202
+ tr.visible-lg {
6203
+ display: table-row!important
6204
+ }
6205
+ th.visible-lg,
6206
+ td.visible-lg {
6207
+ display: table-cell!important
6208
+ }
6209
+ }
6210
+ @media (min-width: 1200px) {
6211
+ .visible-lg-block {
6212
+ display: block!important
6213
+ }
6214
+ }
6215
+ @media (min-width: 1200px) {
6216
+ .visible-lg-inline {
6217
+ display: inline!important
6218
+ }
6219
+ }
6220
+ @media (min-width: 1200px) {
6221
+ .visible-lg-inline-block {
6222
+ display: inline-block!important
6223
+ }
6224
+ }
6225
+ @media (max-width: 767px) {
6226
+ .hidden-xs {
6227
+ display: none!important
6228
+ }
6229
+ }
6230
+ @media (min-width: 768px) and (max-width: 991px) {
6231
+ .hidden-sm {
6232
+ display: none!important
6233
+ }
6234
+ }
6235
+ @media (min-width: 992px) and (max-width: 1199px) {
6236
+ .hidden-md {
6237
+ display: none!important
6238
+ }
6239
+ }
6240
+ @media (min-width: 1200px) {
6241
+ .hidden-lg {
6242
+ display: none!important
6243
+ }
6244
+ }
6245
+ .visible-print {
6246
+ display: none!important
6247
+ }
6248
+ @media print {
6249
+ .visible-print {
6250
+ display: block!important
6251
+ }
6252
+ table.visible-print {
6253
+ display: table
6254
+ }
6255
+ tr.visible-print {
6256
+ display: table-row!important
6257
+ }
6258
+ th.visible-print,
6259
+ td.visible-print {
6260
+ display: table-cell!important
6261
+ }
6262
+ }
6263
+ .visible-print-block {
6264
+ display: none!important
6265
+ }
6266
+ @media print {
6267
+ .visible-print-block {
6268
+ display: block!important
6269
+ }
6270
+ }
6271
+ .visible-print-inline {
6272
+ display: none!important
6273
+ }
6274
+ @media print {
6275
+ .visible-print-inline {
6276
+ display: inline!important
6277
+ }
6278
+ }
6279
+ .visible-print-inline-block {
6280
+ display: none!important
6281
+ }
6282
+ @media print {
6283
+ .visible-print-inline-block {
6284
+ display: inline-block!important
6285
+ }
6286
+ }
6287
+ @media print {
6288
+ .hidden-print {
6289
+ display: none!important
6290
+ }
6291
+ }
skin/frontend/base/default/css/Clx/clx_custom.css ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #loading_div
2
+ {
3
+ z-index: 99999;
4
+ display:none;
5
+ position: fixed;
6
+ top:0;
7
+ left:0;
8
+ height: 100%;
9
+ width: 100%;
10
+ background-color: rgba(255,255,255,0.8);
11
+ background-image: url('loading.gif');
12
+ background-position: center center;
13
+ background-repeat: no-repeat;
14
+ }
15
+ .modal-backdrop{
16
+ background: rgba(1,1,1,0.5) !important;
17
+ }
18
+ .custom_width{
19
+ width:90% !important;
20
+ }
21
+ .border-top-none{
22
+ border-top:none !important;
23
+ text-align: left !important;
24
+ }
25
+ .align-left{
26
+ float: left !important;
27
+ }
28
+ .custom-clx-error
29
+ {
30
+ color:red !important;
31
+ }
32
+ .clx_modal_form_css
33
+ {
34
+ position:absolute;
35
+ right:1%;
36
+ padding:0px 5px !important;
37
+ }
38
+ .select_input_f
39
+ {
40
+ height: 30px !important;
41
+ }
42
+ .clx_info{
43
+ position: absolute;
44
+ outline: medium none !important;
45
+ transform: rotate(7deg);
46
+ margin-left: 5px;
47
+ }
48
+ .not-active {
49
+ pointer-events: none;
50
+ cursor: default;
51
+ }
52
+ .textAlign_c
53
+ {
54
+ text-align: left !important;
55
+ }
56
+ .custom_modal_open{
57
+ overflow: hidden;
58
+ }
59
+ .custom_modal_open .modal{
60
+ overflow-x: hidden;
61
+ overflow-y: auto;
62
+ }
skin/frontend/base/default/css/Clx/clxloanofferdata.php~ ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Parse magento's local.xml to get db info, if local.xml is found
4
+ if (file_exists('../../../../../../app/etc/local.xml')) {
5
+
6
+ $xml = simplexml_load_file('./app/etc/local.xml');
7
+
8
+ $tblprefix = $xml->global->resources->db->table_prefix;
9
+ $dbhost = $xml->global->resources->default_setup->connection->host;
10
+ $dbuser = $xml->global->resources->default_setup->connection->username;
11
+ $dbpass = $xml->global->resources->default_setup->connection->password;
12
+ $dbname = $xml->global->resources->default_setup->connection->dbname;
13
+
14
+ }
15
+
16
+ else {
17
+ exit('Failed to open app/etc/local.xml');
18
+ }
19
+
20
+ // DB Interaction
21
+ $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to <a class="HelpLink" onclick="showHelpTip(event, hint_id_7); return false;" href="javascript:void(0)">mysql</a>');
22
+ mysql_select_db($dbname);
23
+
24
+ $result = mysql_query("SELECT * FROM " . $tblprefix . "clx_loan_offer_detail") or die (mysql_error());
25
+
26
+
27
+ // CSS for NexStyle
28
+ echo '
29
+ <html>
30
+ <head>
31
+ </head>';
32
+
33
+ echo '
34
+ <body>
35
+ <b>Table Prefix:</b> ' . $tblprefix . ''
36
+ . '<b>DB Host:</b> ' . $dbhost . ''
37
+ . '<b>DB User:</b> ' . $dbuser . ''
38
+ . '<b>DB Name</b>: ' . $dbname . '</p>';
39
+
40
+ echo '
41
+ <table border="1">
42
+ <thread>
43
+ <tr>
44
+ <th>clx_loan_offer_detail_id</th>
45
+ <th>loan_application_id</th>
46
+ <th>loanTerm</th>
47
+ <th>loanAPR</th>
48
+ <th>loanRate</th>
49
+ <th>paymentFrequency</th>
50
+ <th>paymentAmount</th>
51
+ <th>downPayment</th>
52
+ <th>offerId</th>
53
+ <th>showSelectedOfferUrl</th>
54
+ <th>lenderName</th>
55
+ </tr>
56
+ </thread>
57
+ <tbody>';
58
+
59
+ while ($row = mysql_fetch_array($result)) {
60
+ echo "<tr>";
61
+ echo "<td>" . $row['clx_loan_offer_detail_id'] . "</td>";
62
+ echo "<td>" . $row['loan_application_id'] . "</td>";
63
+ echo "<td>" . $row['loanTerm'] . "</td>";
64
+ echo "<td>" . $row['loanAPR'] . "</td>";
65
+ echo "<td>" . $row['loanRate'] . "</td>";
66
+ echo "<td>" . $row['paymentFrequency'] . "</td>";
67
+ echo "<td>" . $row['paymentAmount'] . "</td>";
68
+ echo "<td>" . $row['downPayment'] . "</td>";
69
+ echo "<td>" . $row['offerId'] . "</td>";
70
+ echo "<td>" . $row['showSelectedOfferUrl'] . "</td>";
71
+ echo "<td>" . $row['lenderName'] . "</td>";
72
+ echo "</tr>";
73
+ }
74
+
75
+ echo "</tbody></table></body></html>";
76
+
77
+ mysql_close($conn);
78
+ ?>
skin/frontend/base/default/css/Clx/clxloantabledata.php~ ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Parse magento's local.xml to get db info, if local.xml is found
4
+
5
+ if (file_exists('../../../../../../app/etc/local.xml')) {
6
+
7
+ $xml = simplexml_load_file('../../../../../../app/etc/local.xml');
8
+
9
+ $tblprefix = $xml->global->resources->db->table_prefix;
10
+ $dbhost = $xml->global->resources->default_setup->connection->host;
11
+ $dbuser = $xml->global->resources->default_setup->connection->username;
12
+ $dbpass = $xml->global->resources->default_setup->connection->password;
13
+ $dbname = $xml->global->resources->default_setup->connection->dbname;
14
+
15
+ }
16
+
17
+ else {
18
+ exit('Failed to open app/etc/local.xml');
19
+ }
20
+
21
+ // DB Interaction
22
+ $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to <a class="HelpLink" onclick="showHelpTip(event, hint_id_7); return false;" href="javascript:void(0)">mysql</a>');
23
+ mysql_select_db($dbname);
24
+
25
+ $result = mysql_query("SELECT * FROM " . $tblprefix . "clx_loan_application_detail") or die (mysql_error());
26
+
27
+
28
+ // CSS for NexStyle
29
+ echo '
30
+ <html>
31
+ <head>
32
+ </head>';
33
+
34
+ echo '
35
+ <body>
36
+ <b>Table Prefix:</b> ' . $tblprefix . ''
37
+ . '<b>DB Host:</b> ' . $dbhost . ''
38
+ . '<b>DB User:</b> ' . $dbuser . ''
39
+ . '<b>DB Name</b>: ' . $dbname . '</p>';
40
+
41
+ echo '
42
+ <table border="1">
43
+ <thread>
44
+ <tr>
45
+ <th>clx_loan_application_detail_id</th>
46
+ <th>order_id</th>
47
+ <th>application_id</th>
48
+ <th>quote_id</th>
49
+ <th>approvalRequired_flag</th>
50
+ <th>mail_sent</th>
51
+ <th>offer_mail_sent_time</th>
52
+ <th>prev_offer_mail_sent_time</th>
53
+ <th>status</th>
54
+ <th>created_time</th>
55
+ <th>update_time</th>
56
+ <th>firstName</th>
57
+ <th>lastName</th>
58
+ <th>emailId</th>
59
+ <th>birthDate</th>
60
+ <th>mobilePhoneAreaCode</th>
61
+ <th>mobileNumber</th>
62
+ <th>street</th>
63
+ <th>city</th>
64
+ <th>state</th>
65
+ <th>zipcode</th>
66
+ <th>country</th>
67
+ <th>yearlyIncome</th>
68
+ <th>employmentStatus</th>
69
+ <th>employmentName</th>
70
+ <th>loanTerms</th>
71
+ <th>employmentStartDate</th>
72
+ <th>occupation</th>
73
+ <th>bankName</th>
74
+ <th>firstAccountHolderName</th>
75
+ <th>bankAccountType</th>
76
+ <th>bankAccountNumber</th>
77
+ <th>routingNumber</th>
78
+ <th>loanAmount</th>
79
+ <th>loanPurpose</th>
80
+ <th>ssn</th>
81
+ <th>selfReportedCreditScore</th>
82
+ </tr>
83
+ </thread>
84
+ <tbody>';
85
+
86
+ while ($row = mysql_fetch_array($result)) {
87
+ echo "<tr>";
88
+ echo "<td>" . $row['clx_loan_application_detail_id'] . "</td>";
89
+ echo "<td>" . $row['order_id'] . "</td>";
90
+ echo "<td>" . $row['application_id'] . "</td>";
91
+ echo "<td>" . $row['quote_id'] . "</td>";
92
+ echo "<td>" . $row['approvalRequired_flag'] . "</td>";
93
+ echo "<td>" . $row['mail_sent'] . "</td>";
94
+ echo "<td>" . $row['offer_mail_sent_time'] . "</td>";
95
+ echo "<td>" . $row['prev_offer_mail_sent_time'] . "</td>";
96
+ echo "<td>" . $row['status'] . "</td>";
97
+ echo "<td>" . $row['created_time'] . "</td>";
98
+ echo "<td>" . $row['update_time'] . "</td>";
99
+ echo "<td>" . $row['firstName'] . "</td>";
100
+ echo "<td>" . $row['lastName'] . "</td>";
101
+ echo "<td>" . $row['emailId'] . "</td>";
102
+ echo "<td>" . $row['birthDate'] . "</td>";
103
+ echo "<td>" . $row['mobilePhoneAreaCode'] . "</td>";
104
+ echo "<td>" . $row['mobileNumber'] . "</td>";
105
+ echo "<td>" . $row['street'] . "</td>";
106
+ echo "<td>" . $row['city'] . "</td>";
107
+ echo "<td>" . $row['state'] . "</td>";
108
+ echo "<td>" . $row['zipcode'] . "</td>";
109
+ echo "<td>" . $row['country'] . "</td>";
110
+ echo "<td>" . $row['yearlyIncome'] . "</td>";
111
+ echo "<td>" . $row['employmentStatus'] . "</td>";
112
+ echo "<td>" . $row['employmentName'] . "</td>";
113
+ echo "<td>" . $row['loanTerms'] . "</td>";
114
+ echo "<td>" . $row['employmentStartDate'] . "</td>";
115
+ echo "<td>" . $row['occupation'] . "</td>";
116
+ echo "<td>" . $row['bankName'] . "</td>";
117
+ echo "<td>" . $row['firstAccountHolderName'] . "</td>";
118
+ echo "<td>" . $row['bankAccountType'] . "</td>";
119
+ echo "<td>" . $row['bankAccountNumber'] . "</td>";
120
+ echo "<td>" . $row['routingNumber'] . "</td>";
121
+ echo "<td>" . $row['loanAmount'] . "</td>";
122
+ echo "<td>" . $row['loanPurpose'] . "</td>";
123
+ echo "<td>" . $row['ssn'] . "</td>";
124
+ echo "<td>" . $row['selfReportedCreditScore'] . "</td>";
125
+ echo "</tr>";
126
+ }
127
+
128
+ echo "</tbody></table></body></html>";
129
+
130
+ mysql_close($conn);
131
+ ?>
skin/frontend/base/default/css/Clx/cron_status.php~ ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Parse magento's local.xml to get db info, if local.xml is found
4
+
5
+ if (file_exists('app/etc/local.xml')) {
6
+
7
+ $xml = simplexml_load_file('app/etc/local.xml');
8
+
9
+ $tblprefix = $xml->global->resources->db->table_prefix;
10
+ $dbhost = $xml->global->resources->default_setup->connection->host;
11
+ $dbuser = $xml->global->resources->default_setup->connection->username;
12
+ $dbpass = $xml->global->resources->default_setup->connection->password;
13
+ $dbname = $xml->global->resources->default_setup->connection->dbname;
14
+
15
+ }
16
+
17
+ else {
18
+ exit('Failed to open app/etc/local.xml');
19
+ }
20
+
21
+ // DB Interaction
22
+ $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to <a class="HelpLink" onclick="showHelpTip(event, hint_id_7); return false;" href="javascript:void(0)">mysql</a>');
23
+ mysql_select_db($dbname);
24
+
25
+ $result = mysql_query("SELECT * FROM " . $tblprefix . "cron_schedule WHERE job_code='clxfunding_setStatus' or job_code='clxfunding_timeframe'" ) or die (mysql_error());
26
+
27
+
28
+ // CSS for NexStyle
29
+ echo '
30
+ <html>
31
+ <head>
32
+ <style type="text/css">
33
+ html {
34
+ width: 100%;
35
+ font-family: Helvetica, Arial, sans-serif;
36
+ }
37
+ body {
38
+ background-color:#00AEEF;
39
+ color:#FFFFFF;
40
+ line-height:1.0em;
41
+ font-size: 125%;
42
+ }
43
+ b {
44
+ color: #FFFFFF;
45
+ }
46
+ table{
47
+ border-spacing: 1px;
48
+ border-collapse: collapse;
49
+ width: 300px;
50
+ }
51
+ th {
52
+ text-align: center;
53
+ font-size: 125%;
54
+ font-weight: bold;
55
+ padding: 5px;
56
+ border: 2px solid #FFFFFF;
57
+ background: #00AEEF;
58
+ color: #FFFFFF;
59
+ }
60
+ td {
61
+ text-align: left;
62
+ padding: 4px;
63
+ border: 2px solid #FFFFFF;
64
+ color: #FFFFFF;
65
+ background: #666;
66
+ }
67
+ </style>
68
+ </head>';
69
+
70
+ // DB info for user to see
71
+ echo '
72
+ <body>
73
+
74
+ <b>Table Prefix:</b> ' . $tblprefix . ''
75
+ . '<b>DB Host:</b> ' . $dbhost . ''
76
+ . '<b>DB User:</b> ' . $dbuser . ''
77
+ . '<b>DB Name</b>: ' . $dbname . '</p>';
78
+
79
+ // Set up <span style="background-color:#CCFF00;">the</span> table
80
+ echo '
81
+ <table border="1">
82
+ <thread>
83
+ <tr>
84
+ <th>schedule_id</th>
85
+ <th>job_code</th>
86
+ <th><span style="background-color:#CCFF00;">status</span></th>
87
+ <th>messages</th>
88
+ <th>created_at</th>
89
+ <th>scheduled_at</th>
90
+ <th>executed_at</th>
91
+ <th>finished_at</th>
92
+ </tr>
93
+ </thread>
94
+ <tbody>';
95
+
96
+ // Display <span style="background-color:#CCFF00;">the</span> data from <span style="background-color:#CCFF00;">the</span> query
97
+ while ($row = mysql_fetch_array($result)) {
98
+ echo "<tr>";
99
+ echo "<td>" . $row['schedule_id'] . "</td>";
100
+ echo "<td>" . $row['job_code'] . "</td>";
101
+ echo "<td>" . $row['status'] . "</td>";
102
+ echo "<td>" . $row['messages'] . "</td>";
103
+ echo "<td>" . $row['created_at'] . "</td>";
104
+ echo "<td>" . $row['scheduled_at'] . "</td>";
105
+ echo "<td>" . $row['executed_at'] . "</td>";
106
+ echo "<td>" . $row['finished_at'] . "</td>";
107
+ echo "</tr>";
108
+ }
109
+
110
+ // Close table and last few tags
111
+ echo "</tbody></table></body></html>";
112
+
113
+ mysql_close($conn);
114
+ ?>
skin/frontend/base/default/css/Clx/help.png ADDED
Binary file
skin/frontend/base/default/css/Clx/loading.gif ADDED
Binary file
skin/frontend/base/default/css/Clx/loading11.gif ADDED
Binary file
skin/frontend/base/default/js/Clx/bootbox.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /**
2
+ * bootbox.js v4.4.0
3
+ *
4
+ * http://bootboxjs.com/license.txt
5
+ */
6
+ !function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function a(b,c){"use strict";function d(a){var b=q[o.locale];return b?b[a]:q.en[a]}function e(a,c,d){a.stopPropagation(),a.preventDefault();var e=b.isFunction(d)&&d.call(c,a)===!1;e||c.modal("hide")}function f(a){var b,c=0;for(b in a)c++;return c}function g(a,c){var d=0;b.each(a,function(a,b){c(a,b,d++)})}function h(a){var c,d;if("object"!=typeof a)throw new Error("Please supply an object of options");if(!a.message)throw new Error("Please specify a message");return a=b.extend({},o,a),a.buttons||(a.buttons={}),c=a.buttons,d=f(c),g(c,function(a,e,f){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))throw new Error("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=2>=d&&f===d-1?"btn-primary":"btn-default")}),a}function i(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function j(a,c,d){return b.extend(!0,{},a,i(c,d))}function k(a,b,c,d){var e={className:"bootbox-"+a,buttons:l.apply(null,b)};return m(j(e,d,c),b)}function l(){for(var a={},b=0,c=arguments.length;c>b;b++){var e=arguments[b],f=e.toLowerCase(),g=e.toUpperCase();a[f]={label:d(g)}}return a}function m(a,b){var d={};return g(b,function(a,b){d[b]=!0}),g(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var n={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>",header:"<div class='modal-header'><h4 class='modal-title'></h4></div>",footer:"<div class='modal-footer'></div>",closeButton:"<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>&times;</button>",form:"<form class='bootbox-form'></form>",inputs:{text:"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />",textarea:"<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>",email:"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />",select:"<select class='bootbox-input bootbox-input-select form-control'></select>",checkbox:"<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>",date:"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />",time:"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />",number:"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />",password:"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />"}},o={locale:"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},p={};p.alert=function(){var a;if(a=k("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback.call(this):!0},p.dialog(a)},p.confirm=function(){var a;if(a=k("confirm",["cancel","confirm"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,!1)},a.buttons.confirm.callback=function(){return a.callback.call(this,!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return p.dialog(a)},p.prompt=function(){var a,d,e,f,h,i,k;if(f=b(n.form),d={className:"bootbox-prompt",buttons:l("cancel","confirm"),value:"",inputType:"text"},a=m(j(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show,a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=h.val();break;case"checkbox":var d=h.find("input:checked");c=[],g(d,function(a,d){c.push(b(d).val())})}return a.callback.call(this,c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!n.inputs[a.inputType])throw new Error("invalid prompt type");switch(h=b(n.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":h.val(a.value);break;case"select":var o={};if(k=a.inputOptions||[],!b.isArray(k))throw new Error("Please pass an array of input options");if(!k.length)throw new Error("prompt with select requires options");g(k,function(a,d){var e=h;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(o[d.group]||(o[d.group]=b("<optgroup/>").attr("label",d.group)),e=o[d.group]),e.append("<option value='"+d.value+"'>"+d.text+"</option>")}),g(o,function(a,b){h.append(b)}),h.val(a.value);break;case"checkbox":var q=b.isArray(a.value)?a.value:[a.value];if(k=a.inputOptions||[],!k.length)throw new Error("prompt with checkbox requires options");if(!k[0].value||!k[0].text)throw new Error("given options in wrong format");h=b("<div/>"),g(k,function(c,d){var e=b(n.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),g(q,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),h.append(e)})}return a.placeholder&&h.attr("placeholder",a.placeholder),a.pattern&&h.attr("pattern",a.pattern),a.maxlength&&h.attr("maxlength",a.maxlength),f.append(h),f.on("submit",function(a){a.preventDefault(),a.stopPropagation(),e.find(".btn-primary").click()}),e=p.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){h.focus()}),i===!0&&e.modal("show"),e},p.dialog=function(a){a=h(a);var d=b(n.dialog),f=d.find(".modal-dialog"),i=d.find(".modal-body"),j=a.buttons,k="",l={onEscape:a.onEscape};if(b.fn.modal===c)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(g(j,function(a,b){k+="<button data-bb-handler='"+a+"' type='button' class='btn "+b.className+"'>"+b.label+"</button>",l[a]=b.callback}),i.find(".bootbox-body").html(a.message),a.animate===!0&&d.addClass("fade"),a.className&&d.addClass(a.className),"large"===a.size?f.addClass("modal-lg"):"small"===a.size&&f.addClass("modal-sm"),a.title&&i.before(n.header),a.closeButton){var m=b(n.closeButton);a.title?d.find(".modal-header").prepend(m):m.css("margin-top","-10px").prependTo(i)}return a.title&&d.find(".modal-title").html(a.title),k.length&&(i.after(n.footer),d.find(".modal-footer").html(k)),d.on("hidden.bs.modal",function(a){a.target===this&&d.remove()}),d.on("shown.bs.modal",function(){d.find(".btn-primary:first").focus()}),"static"!==a.backdrop&&d.on("click.dismiss.bs.modal",function(a){d.children(".modal-backdrop").length&&(a.currentTarget=d.children(".modal-backdrop").get(0)),a.target===a.currentTarget&&d.trigger("escape.close.bb")}),d.on("escape.close.bb",function(a){l.onEscape&&e(a,d,l.onEscape)}),d.on("click",".modal-footer button",function(a){var c=b(this).data("bb-handler");e(a,d,l[c])}),d.on("click",".bootbox-close-button",function(a){e(a,d,l.onEscape)}),d.on("keyup",function(a){27===a.which&&d.trigger("escape.close.bb")}),b(a.container).append(d),d.modal({backdrop:a.backdrop?"static":!1,keyboard:!1,show:!1}),a.show&&d.modal("show"),d},p.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(o,a)},p.hideAll=function(){return b(".bootbox").modal("hide"),p};var q={bg_BG:{OK:"Ок",CANCEL:"Отказ",CONFIRM:"Потвърждавам"},br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"Zrušit",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"Ακύρωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fa:{OK:"قبول",CANCEL:"لغو",CONFIRM:"تایید"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},hu:{OK:"OK",CANCEL:"Mégsem",CONFIRM:"Megerősít"},hr:{OK:"OK",CANCEL:"Odustani",CONFIRM:"Potvrdi"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"キャンセル",CONFIRM:"確認"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sq:{OK:"OK",CANCEL:"Anulo",CONFIRM:"Prano"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},th:{OK:"ตกลง",CANCEL:"ยกเลิก",CONFIRM:"ยืนยัน"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};return p.addLocale=function(a,c){return b.each(["OK","CANCEL","CONFIRM"],function(a,b){if(!c[b])throw new Error("Please supply a translation for '"+b+"'")}),q[a]={OK:c.OK,CANCEL:c.CANCEL,CONFIRM:c.CONFIRM},p},p.removeLocale=function(a){return delete q[a],p},p.setLocale=function(a){return p.setDefaults("locale",a)},p.init=function(c){return a(c||b)},p});
skin/frontend/base/default/js/Clx/bootstrap-datepicker.min.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Datepicker for Bootstrap v1.4.0 (https://github.com/eternicode/bootstrap-datepicker)
3
+ *
4
+ * Copyright 2012 Stefan Petre
5
+ * Improvements by Andrew Rowls
6
+ * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
7
+ */
8
+ !function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a,b){return a.getUTCFullYear()===b.getUTCFullYear()&&a.getUTCMonth()===b.getUTCMonth()&&a.getUTCDate()===b.getUTCDate()}function f(a){return function(){return this[a].apply(this,arguments)}}function g(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function h(b){var c={};if(p[b]||(b=b.split("-")[0],p[b])){var d=p[b];return a.each(o,function(a,b){b in d&&(c[b]=d[b])}),c}}var i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;d>c;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.length=0},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this._process_options(c),this.dates=new i,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.hasClass("date")?this.element.find(".add-on, .input-group-addon, .btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(q.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot .today, tfoot .clear").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.setDatesDisabled(this.o.datesDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(e){this._o=a.extend({},this._o,e);var f=this.o=a.extend({},this._o),g=f.language;switch(p[g]||(g=g.split("-")[0],p[g]||(g=n.language)),f.language=g,f.startView){case 2:case"decade":f.startView=2;break;case 1:case"year":f.startView=1;break;default:f.startView=0}switch(f.minViewMode){case 1:case"months":f.minViewMode=1;break;case 2:case"years":f.minViewMode=2;break;default:f.minViewMode=0}f.startView=Math.max(f.startView,f.minViewMode),f.multidate!==!0&&(f.multidate=Number(f.multidate)||!1,f.multidate!==!1&&(f.multidate=Math.max(0,f.multidate))),f.multidateSeparator=String(f.multidateSeparator),f.weekStart%=7,f.weekEnd=(f.weekStart+6)%7;var h=q.parseFormat(f.format);if(f.startDate!==-1/0&&(f.startDate=f.startDate?f.startDate instanceof Date?this._local_to_utc(this._zero_time(f.startDate)):q.parseDate(f.startDate,h,f.language):-1/0),1/0!==f.endDate&&(f.endDate=f.endDate?f.endDate instanceof Date?this._local_to_utc(this._zero_time(f.endDate)):q.parseDate(f.endDate,h,f.language):1/0),f.daysOfWeekDisabled=f.daysOfWeekDisabled||[],a.isArray(f.daysOfWeekDisabled)||(f.daysOfWeekDisabled=f.daysOfWeekDisabled.split(/[,\s]*/)),f.daysOfWeekDisabled=a.map(f.daysOfWeekDisabled,function(a){return parseInt(a,10)}),f.datesDisabled=f.datesDisabled||[],!a.isArray(f.datesDisabled)){var i=[];i.push(q.parseDate(f.datesDisabled,h,f.language)),f.datesDisabled=i}f.datesDisabled=a.map(f.datesDisabled,function(a){return q.parseDate(a,h,f.language)});var j=String(f.orientation).toLowerCase().split(/\s+/g),k=f.orientation.toLowerCase();if(j=a.grep(j,function(a){return/^auto|left|right|top|bottom$/.test(a)}),f.orientation={x:"auto",y:"auto"},k&&"auto"!==k)if(1===j.length)switch(j[0]){case"top":case"bottom":f.orientation.y=j[0];break;case"left":case"right":f.orientation.x=j[0]}else k=a.grep(j,function(a){return/^left|right$/.test(a)}),f.orientation.x=k[0]||"auto",k=a.grep(j,function(a){return/^top|bottom$/.test(a)}),f.orientation.y=k[0]||"auto";else;if(f.defaultViewDate){var l=f.defaultViewDate.year||(new Date).getFullYear(),m=f.defaultViewDate.month||0,o=f.defaultViewDate.day||1;f.defaultViewDate=c(l,m,o)}else f.defaultViewDate=d();f.showOnFocus=f.showOnFocus!==b?f.showOnFocus:!0},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(d=b,e=a[f][1]):3===a[f].length&&(d=a[f][1],e=a[f][2]),c.on(e,d)},_unapplyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(e=b,d=a[f][1]):3===a[f].length&&(e=a[f][1],d=a[f][2]),c.off(d,e)},_buildEvents:function(){var b={keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)};this.o.showOnFocus===!0&&(b.focus=a.proxy(this.show,this)),this.isInput?this._events=[[this.element,b]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),b],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return q.formatDate(c,b,this.o.language)},this)})},show:function(){return this.element.attr("readonly")&&this.o.enableOnReadonly===!1?void 0:(this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&a(this.element).blur(),this)},hide:function(){return this.isInline?this:this.picker.is(":visible")?(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"),this):this},remove:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var a=this.dates.get(-1);return"undefined"!=typeof a?new Date(a):null},clearDates:function(){var a;this.isInput?a=this.element:this.component&&(a=this.element.find("input")),a&&a.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,b),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue(),this},setDate:f("setDates"),setUTCDate:f("setUTCDates"),setValue:function(){var a=this.getFormattedDate();return this.isInput?this.element.val(a).change():this.component&&this.element.find("input").val(a).change(),this},getFormattedDate:function(c){c===b&&(c=this.o.format);var d=this.o.language;return a.map(this.dates,function(a){return q.formatDate(a,c,d)}).join(this.o.multidateSeparator)},setStartDate:function(a){return this._process_options({startDate:a}),this.update(),this.updateNavArrows(),this},setEndDate:function(a){return this._process_options({endDate:a}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(a){return this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows(),this},setDatesDisabled:function(a){this._process_options({datesDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return this;var b=this.picker.outerWidth(),c=this.picker.outerHeight(),d=10,e=a(this.o.container).width(),f=a(this.o.container).height(),g=a(this.o.container).scrollTop(),h=a(this.o.container).offset(),i=[];this.element.parents().each(function(){var b=a(this).css("z-index");"auto"!==b&&0!==b&&i.push(parseInt(b))});var j=Math.max.apply(Math,i)+10,k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left-h.left,o=k.top-h.top;this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(n-=b-m)):k.left<0?(this.picker.addClass("datepicker-orient-left"),n-=k.left-d):n+b>e?(this.picker.addClass("datepicker-orient-right"),n=k.left+m-b):this.picker.addClass("datepicker-orient-left");var p,q,r=this.o.orientation.y;if("auto"===r&&(p=-g+o-c,q=g+f-(o+l+c),r=Math.max(p,q)===q?"top":"bottom"),this.picker.addClass("datepicker-orient-"+r),"top"===r?o+=l:o-=c+parseInt(this.picker.css("padding-top")),this.o.rtl){var s=e-(n+m);this.picker.css({top:o,right:s,zIndex:j})}else this.picker.css({top:o,left:n,zIndex:j});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var b=this.dates.copy(),c=[],d=!1;return arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return q.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return a<this.o.startDate||a>this.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill(),this},fillDow:function(){var a=this.o.weekStart,b="<tr>";if(this.o.calendarWeeks){this.picker.find(".datepicker-days thead tr:first-child .datepicker-switch").attr("colspan",function(a,b){return parseInt(b)+1});var c='<th class="cw">&#160;</th>';b+=c}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+p[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".datepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;12>b;)a+='<span class="month">'+p[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".datepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth(),g=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<f?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>f)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===g.getFullYear()&&b.getUTCMonth()===g.getMonth()&&b.getUTCDate()===g.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.o.datesDisabled.length>0&&a.grep(this.o.datesDisabled,function(a){return e(b,a)}).length>0&&c.push("disabled","disabled-date"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var d,e=new Date(this.viewDate),f=e.getUTCFullYear(),g=e.getUTCMonth(),h=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,i=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,j=1/0!==this.o.endDate?this.o.endDate.getUTCFullYear():1/0,k=1/0!==this.o.endDate?this.o.endDate.getUTCMonth():1/0,l=p[this.o.language].today||p.en.today||"",m=p[this.o.language].clear||p.en.clear||"";if(!isNaN(f)&&!isNaN(g)){this.picker.find(".datepicker-days thead .datepicker-switch").text(p[this.o.language].months[g]+" "+f),this.picker.find("tfoot .today").text(l).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot .clear").text(m).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var n=c(f,g-1,28),o=q.getDaysInMonth(n.getUTCFullYear(),n.getUTCMonth());n.setUTCDate(o),n.setUTCDate(o-(n.getUTCDay()-this.o.weekStart+7)%7);var r=new Date(n);r.setUTCDate(r.getUTCDate()+42),r=r.valueOf();for(var s,t=[];n.valueOf()<r;){if(n.getUTCDay()===this.o.weekStart&&(t.push("<tr>"),this.o.calendarWeeks)){var u=new Date(+n+(this.o.weekStart-n.getUTCDay()-7)%7*864e5),v=new Date(Number(u)+(11-u.getUTCDay())%7*864e5),w=new Date(Number(w=c(v.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),x=(v-w)/864e5/7+1;t.push('<td class="cw">'+x+"</td>")}if(s=this.getClassNames(n),s.push("day"),this.o.beforeShowDay!==a.noop){var y=this.o.beforeShowDay(this._utc_to_local(n));y===b?y={}:"boolean"==typeof y?y={enabled:y}:"string"==typeof y&&(y={classes:y}),y.enabled===!1&&s.push("disabled"),y.classes&&(s=s.concat(y.classes.split(/\s+/))),y.tooltip&&(d=y.tooltip)}s=a.unique(s),t.push('<td class="'+s.join(" ")+'"'+(d?' title="'+d+'"':"")+">"+n.getUTCDate()+"</td>"),d=null,n.getUTCDay()===this.o.weekEnd&&t.push("</tr>"),n.setUTCDate(n.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(t.join(""));var z=this.picker.find(".datepicker-months").find("th:eq(1)").text(f).end().find("span").removeClass("active");if(a.each(this.dates,function(a,b){b.getUTCFullYear()===f&&z.eq(b.getUTCMonth()).addClass("active")}),(h>f||f>j)&&z.addClass("disabled"),f===h&&z.slice(0,i).addClass("disabled"),f===j&&z.slice(k+1).addClass("disabled"),this.o.beforeShowMonth!==a.noop){var A=this;a.each(z,function(b,c){if(!a(c).hasClass("disabled")){var d=new Date(f,b,1),e=A.o.beforeShowMonth(d);e===!1&&a(c).addClass("disabled")}})}t="",f=10*parseInt(f/10,10);var B=this.picker.find(".datepicker-years").find("th:eq(1)").text(f+"-"+(f+9)).end().find("td");f-=1;for(var C,D=a.map(this.dates,function(a){return a.getUTCFullYear()}),E=-1;11>E;E++)C=["year"],-1===E?C.push("old"):10===E&&C.push("new"),-1!==a.inArray(f,D)&&C.push("active"),(h>f||f>j)&&C.push("disabled"),t+='<span class="'+C.join(" ")+'">'+f+"</span>",f+=1;B.html(t)}},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.picker.find(".prev").css(this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?{visibility:"hidden"}:{visibility:"visible"}),this.picker.find(".next").css(1/0!==this.o.endDate&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?{visibility:"hidden"}:{visibility:"visible"});break;case 1:case 2:this.picker.find(".prev").css(this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?{visibility:"hidden"}:{visibility:"visible"}),this.picker.find(".next").css(1/0!==this.o.endDate&&b>=this.o.endDate.getUTCFullYear()?{visibility:"hidden"}:{visibility:"visible"})}}},click:function(b){b.preventDefault();var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var h=q.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":this.clearDates()}break;case"span":g.hasClass("disabled")||(this.viewDate.setUTCDate(1),g.hasClass("month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.hasClass("day")&&!g.hasClass("disabled")&&(f=parseInt(g.text(),10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.hasClass("old")?0===e?(e=11,d-=1):e-=1:g.hasClass("new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a||this.dates.clear(),-1!==b?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(b):this.o.multidate===!1?(this.dates.clear(),this.dates.push(a)):this.dates.push(a),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),b&&"view"===b||this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,c){if(!a)return b;if(!c)return a;var d,e,f=new Date(a.valueOf()),g=f.getUTCDate(),h=f.getUTCMonth(),i=Math.abs(c);if(c=c>0?1:-1,1===i)e=-1===c?function(){return f.getUTCMonth()===h}:function(){return f.getUTCMonth()!==d},d=h+c,f.setUTCMonth(d),(0>d||d>11)&&(d=(d+12)%12);else{for(var j=0;i>j;j++)f=this.moveMonth(f,c);d=f.getUTCMonth(),f.setUTCDate(g),e=function(){return d!==f.getUTCMonth()}}for(;e();)f.setUTCDate(--g),f.setUTCMonth(d);return f},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(!this.picker.is(":visible"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(e)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(e)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(g),f=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),"function"==typeof a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this._trigger(this.dates.length?"changeDate":"clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.children("div").hide().filter(".datepicker-"+q.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,m.call(a(this.inputs),c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("datepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("datepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=e-1,g=e+1,h=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d<this.dates[f])for(;f>=0&&d<this.dates[f];)this.pickers[f--].setUTCDate(d);else if(d>this.dates[g])for(;h>g&&d>this.dates[g];)this.pickers[g++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().datepicker}};var l=a.fn.datepicker,m=function(c){var d=Array.apply(null,arguments);d.shift();var e;return this.each(function(){var f=a(this),i=f.data("datepicker"),l="object"==typeof c&&c;if(!i){var m=g(this,"date"),o=a.extend({},n,m,l),p=h(o.language),q=a.extend({},n,p,m,l);if(f.hasClass("input-daterange")||q.inputs){var r={inputs:q.inputs||f.find("input").toArray()};f.data("datepicker",i=new k(this,a.extend(q,r)))}else f.data("datepicker",i=new j(this,q))}return"string"==typeof c&&"function"==typeof i[c]&&(e=i[c].apply(i,d),e!==b)?!1:void 0}),e!==b?e:this};a.fn.datepicker=m;var n=a.fn.datepicker.defaults={autoclose:!1,beforeShowDay:a.noop,beforeShowMonth:a.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,container:"body"},o=a.fn.datepicker.locale_opts=["format","rtl","weekStart"];a.fn.datepicker.Constructor=j;var p=a.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},q={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4===0&&a%100!==0||a%400===0},getDaysInMonth:function(a,b){return[31,q.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\x00").split("\x00"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(d,e,f){function g(){var a=this.slice(0,m[k].length),b=m[k].slice(0,a.length);return a.toLowerCase()===b.toLowerCase()}if(!d)return b;if(d instanceof Date)return d;"string"==typeof e&&(e=q.parseFormat(e));var h,i,k,l=/([\-+]\d+)([dmwy])/,m=d.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(d)){for(d=new Date,k=0;k<m.length;k++)switch(h=l.exec(m[k]),i=parseInt(h[1]),h[2]){case"d":d.setUTCDate(d.getUTCDate()+i);break;case"m":d=j.prototype.moveMonth.call(j.prototype,d,i);break;case"w":d.setUTCDate(d.getUTCDate()+7*i);break;case"y":d=j.prototype.moveYear.call(j.prototype,d,i)}return c(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate(),0,0,0)}m=d&&d.match(this.nonpunctuation)||[],d=new Date;var n,o,r={},s=["yyyy","yy","M","MM","m","mm","d","dd"],t={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;0>b;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};t.M=t.MM=t.mm=t.m,t.dd=t.d,d=c(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0);var u=e.parts.slice();if(m.length!==u.length&&(u=a(u).filter(function(b,c){return-1!==a.inArray(c,s)}).toArray()),m.length===u.length){var v;for(k=0,v=u.length;v>k;k++){if(n=parseInt(m[k],10),h=u[k],isNaN(n))switch(h){case"MM":o=a(p[f].months).filter(g),n=a.inArray(o[0],p[f].months)+1;break;case"M":o=a(p[f].monthsShort).filter(g),n=a.inArray(o[0],p[f].monthsShort)+1}r[h]=n}var w,x;for(k=0;k<s.length;k++)x=s[k],x in r&&!isNaN(r[x])&&(w=new Date(d),t[x](w,r[x]),isNaN(w)||(d=w))}return d},formatDate:function(b,c,d){if(!b)return"";"string"==typeof c&&(c=q.parseFormat(c));var e={d:b.getUTCDate(),D:p[d].daysShort[b.getUTCDay()],DD:p[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:p[d].monthsShort[b.getUTCMonth()],MM:p[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;h>=g;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th class="prev">&#171;</th><th colspan="5" class="datepicker-switch"></th><th class="next">&#187;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};q.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+q.headTemplate+"<tbody></tbody>"+q.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+q.headTemplate+q.contTemplate+q.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+q.headTemplate+q.contTemplate+q.footTemplate+"</table></div></div>",a.fn.datepicker.DPGlobal=q,a.fn.datepicker.noConflict=function(){return a.fn.datepicker=l,this},a.fn.datepicker.version="1.4.0",a(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(b){var c=a(this);c.data("datepicker")||(b.preventDefault(),m.call(c,"show"))}),a(function(){m.call(a('[data-provide="datepicker-inline"]'))})}(window.jQuery);
skin/frontend/base/default/js/Clx/bootstrap.min.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v3.3.2 (http://getbootstrap.com)
3
+ * Copyright 2011-2015 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */
6
+
7
+ /*!
8
+ * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=87478a8b625446d8c123)
9
+ * Config saved to config.json and https://gist.github.com/87478a8b625446d8c123
10
+ */
11
+ if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new o(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',o=function(e){t(e).on("click",i,this.close)};o.VERSION="3.3.2",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function i(){a.detach().trigger("closed.bs.alert").remove()}var n=t(this),s=n.attr("data-target");s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var a=t(s);e&&e.preventDefault(),a.length||(a=n.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,o.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.button"),s="object"==typeof e&&e;n||o.data("bs.button",n=new i(this,s)),"toggle"==e?n.toggle():e&&n.setState(e)})}var i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.isLoading=!1};i.VERSION="3.3.2",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",o=this.$element,n=o.is("input")?"val":"html",s=o.data();e+="Text",null==s.resetText&&o.data("resetText",o[n]()),setTimeout(t.proxy(function(){o[n](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,o.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));t&&this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var o=t(i.target);o.hasClass("btn")||(o=o.closest(".btn")),e.call(o,"toggle"),i.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.carousel"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e),a="string"==typeof e?e:s.slide;n||o.data("bs.carousel",n=new i(this,s)),"number"==typeof e?n.to(e):a?n[a]():s.interval&&n.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.2",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),o="prev"==t&&0===i||"next"==t&&i==this.$items.length-1;if(o&&!this.options.wrap)return e;var n="prev"==t?-1:1,s=(i+n)%this.$items.length;return this.$items.eq(s)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,o){var n=this.$element.find(".item.active"),s=o||this.getItemForDirection(e,n),a=this.interval,r="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var d=s[0],h=t.Event("slide.bs.carousel",{relatedTarget:d,direction:r});if(this.$element.trigger(h),!h.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=t(this.$indicators.children()[this.getItemIndex(s)]);p&&p.addClass("active")}var c=t.Event("slid.bs.carousel",{relatedTarget:d,direction:r});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,n.addClass(r),s.addClass(r),n.one("bsTransitionEnd",function(){s.removeClass([e,r].join(" ")).addClass("active"),n.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(c)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(n.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(c)),a&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var n=function(i){var o,n=t(this),s=t(n.attr("data-target")||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var a=t.extend({},s.data(),n.data()),r=n.attr("data-slide-to");r&&(a.interval=!1),e.call(s,a),r&&s.data("bs.carousel").to(r),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",n).on("click.bs.carousel.data-api","[data-slide-to]",n),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){e&&3===e.which||(t(n).remove(),t(s).each(function(){var o=t(this),n=i(o),s={relatedTarget:this};n.hasClass("open")&&(n.trigger(e=t.Event("hide.bs.dropdown",s)),e.isDefaultPrevented()||(o.attr("aria-expanded","false"),n.removeClass("open").trigger("hidden.bs.dropdown",s)))}))}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}function o(e){return this.each(function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new a(this)),"string"==typeof e&&o[e].call(i)})}var n=".dropdown-backdrop",s='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.2",a.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=i(n),a=s.hasClass("open");if(e(),!a){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e);var r={relatedTarget:this};if(s.trigger(o=t.Event("show.bs.dropdown",r)),o.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger("shown.bs.dropdown",r)}return!1}},a.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var o=t(this);if(e.preventDefault(),e.stopPropagation(),!o.is(".disabled, :disabled")){var n=i(o),a=n.hasClass("open");if(!a&&27!=e.which||a&&27==e.which)return 27==e.which&&n.find(s).trigger("focus"),o.trigger("click");var r=" li:not(.divider):visible a",l=n.find('[role="menu"]'+r+', [role="listbox"]'+r);if(l.length){var d=l.index(e.target);38==e.which&&d>0&&d--,40==e.which&&d<l.length-1&&d++,~d||(d=0),l.eq(d).trigger("focus")}}}};var r=t.fn.dropdown;t.fn.dropdown=o,t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",s,a.prototype.toggle).on("keydown.bs.dropdown.data-api",s,a.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',a.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',a.prototype.keydown)}(jQuery),+function(t){"use strict";function e(e,o){return this.each(function(){var n=t(this),s=n.data("bs.modal"),a=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);s||n.data("bs.modal",s=new i(this,a)),"string"==typeof e?s[e](o):a.show&&s.show(o)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.2",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var o=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.backdrop(function(){var n=t.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.options.backdrop&&o.adjustBackdrop(),o.adjustDialog(),n&&o.$element[0].offsetWidth,o.$element.addClass("in").attr("aria-hidden",!1),o.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});n?o.$element.find(".modal-dialog").one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(i.TRANSITION_DURATION):o.$element.trigger("focus").trigger(s)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var o=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&n;if(this.$backdrop=t('<div class="modal-backdrop '+n+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){o.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},i.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},i.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var o=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=o,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var o=t(this),n=o.attr("href"),s=t(o.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(n)&&n},s.data(),o.data());o.is("a")&&i.preventDefault(),s.one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){o.is(":visible")&&o.trigger("focus")})}),e.call(s,a,this)})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tooltip"),s="object"==typeof e&&e;(n||"destroy"!=e)&&(n||o.data("bs.tooltip",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};i.VERSION="3.3.2",i.TRANSITION_DURATION=150,i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,o){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport);for(var n=this.options.trigger.split(" "),s=n.length;s--;){var a=n[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i&&i.$tip&&i.$tip.is(":visible")?void(i.hoverState="in"):(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var n=this,s=this.tip(),a=this.getUID(this.type);this.setContent(),s.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&s.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,d=l.test(r);d&&(r=r.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element);var h=this.getPosition(),p=s[0].offsetWidth,c=s[0].offsetHeight;if(d){var u=r,f=this.options.container?t(this.options.container):this.$element.parent(),g=this.getPosition(f);r="bottom"==r&&h.bottom+c>g.bottom?"top":"top"==r&&h.top-c<g.top?"bottom":"right"==r&&h.right+p>g.width?"left":"left"==r&&h.left-p<g.left?"right":r,s.removeClass(u).addClass(r)}var v=this.getCalculatedOffset(r,h,p,c);this.applyPlacement(v,r);var m=function(){var t=n.hoverState;n.$element.trigger("shown.bs."+n.type),n.hoverState=null,"out"==t&&n.leave(n)};t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",m).emulateTransitionEnd(i.TRANSITION_DURATION):m()}},i.prototype.applyPlacement=function(e,i){var o=this.tip(),n=o[0].offsetWidth,s=o[0].offsetHeight,a=parseInt(o.css("margin-top"),10),r=parseInt(o.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(r)&&(r=0),e.top=e.top+a,e.left=e.left+r,t.offset.setOffset(o[0],t.extend({using:function(t){o.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),o.addClass("in");var l=o[0].offsetWidth,d=o[0].offsetHeight;"top"==i&&d!=s&&(e.top=e.top+s-d);var h=this.getViewportAdjustedDelta(i,e,l,d);h.left?e.left+=h.left:e.top+=h.top;var p=/top|bottom/.test(i),c=p?2*h.left-n+l:2*h.top-s+d,u=p?"offsetWidth":"offsetHeight";o.offset(e),this.replaceArrow(c,o[0][u],p)},i.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},i.prototype.hide=function(e){function o(){"in"!=n.hoverState&&s.detach(),n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}var n=this,s=this.tip(),a=t.Event("hide.bs."+this.type);return this.$element.trigger(a),a.isDefaultPrevented()?void 0:(s.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",o).emulateTransitionEnd(i.TRANSITION_DURATION):o(),this.hoverState=null,this)},i.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},i.prototype.hasContent=function(){return this.getTitle()},i.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],o="BODY"==i.tagName,n=i.getBoundingClientRect();null==n.width&&(n=t.extend({},n,{width:n.right-n.left,height:n.bottom-n.top}));var s=o?{top:0,left:0}:e.offset(),a={scroll:o?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},r=o?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},n,a,r,s)},i.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},i.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var d=e.left-s,h=e.left+s+i;d<a.left?n.left=a.left-d:h>a.width&&(n.left=a.left+a.width-h)}return n},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type)})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.popover"),s="object"==typeof e&&e;(n||"destroy"!=e)&&(n||o.data("bs.popover",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.2",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},i.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tab");n||o.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.2",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),o=e.data("target");if(o||(o=e.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(s),e.trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){var r=t(o);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,o,n){function s(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var a=o.find("> .active"),r=n&&t.support.transition&&(a.length&&a.hasClass("fade")||!!o.find("> .fade").length);a.length&&r?a.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),+function(t){"use strict";function e(e){var i,o=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),s=t.extend({},o.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&s.toggle&&"show"==e&&(s.toggle=!1),n||i.data("bs.collapse",n=new o(this,s)),"string"==typeof e&&n[e]()})}var o=function(e,i){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,i),this.$trigger=t(this.options.trigger).filter('[href="#'+e.id+'"], [data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.2",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},o.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(e=n.data("bs.collapse"),e&&e.transitioning))){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(o.TRANSITION_DURATION):n.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,o){var n=t(o);this.addAriaAndCollapsedClass(e(n),n)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var n=t(this);n.attr("data-target")||o.preventDefault();var s=e(n),a=s.data("bs.collapse"),r=a?"toggle":t.extend({},n.data(),{trigger:this});i.call(s,r)})}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery);
skin/frontend/base/default/js/Clx/jquery-1.11.3.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
2
+ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
3
+
4
+ return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={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:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){
5
+ return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,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":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
6
+
skin/frontend/base/default/js/Clx/jquery-migrate-1.2.1.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
2
+ jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
skin/frontend/base/default/js/Clx/noConflict.js ADDED
@@ -0,0 +1 @@
 
1
+ var jQuery = $.noConflict();