Onehop_SMSService - Version 1.0.0

Version Notes

This is a SMS Service extension.

Download this release

Release Info

Developer Screen-Magic Mobile Media Inc
Extension Onehop_SMSService
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (61) hide show
  1. app/code/community/Onehop/SMSService/Block/Adminhtml/Addtemplate.php +57 -0
  2. app/code/community/Onehop/SMSService/Block/Adminhtml/Addtemplate/Form.php +58 -0
  3. app/code/community/Onehop/SMSService/Block/Adminhtml/Data/Form/Element/Ondelivery.php +38 -0
  4. app/code/community/Onehop/SMSService/Block/Adminhtml/Data/Form/Element/Orderclose.php +37 -0
  5. app/code/community/Onehop/SMSService/Block/Adminhtml/Data/Form/Element/Orderconfirm.php +37 -0
  6. app/code/community/Onehop/SMSService/Block/Adminhtml/Data/Form/Element/Shipmentconfirm.php +38 -0
  7. app/code/community/Onehop/SMSService/Block/Adminhtml/Edittemplate.php +57 -0
  8. app/code/community/Onehop/SMSService/Block/Adminhtml/Edittemplate/Form.php +70 -0
  9. app/code/community/Onehop/SMSService/Block/Adminhtml/Send.php +57 -0
  10. app/code/community/Onehop/SMSService/Block/Adminhtml/Send/Form.php +84 -0
  11. app/code/community/Onehop/SMSService/Block/Adminhtml/Smsautomation.php +51 -0
  12. app/code/community/Onehop/SMSService/Block/Adminhtml/Smsautomation/Form.php +257 -0
  13. app/code/community/Onehop/SMSService/Block/Adminhtml/Template.php +57 -0
  14. app/code/community/Onehop/SMSService/Helper/Data.php +37 -0
  15. app/code/community/Onehop/SMSService/Helper/Mysql4/Install.php +176 -0
  16. app/code/community/Onehop/SMSService/Model/Config.php +108 -0
  17. app/code/community/Onehop/SMSService/Model/Configvalidation.php +53 -0
  18. app/code/community/Onehop/SMSService/Model/Mysql4/Setup.php +11 -0
  19. app/code/community/Onehop/SMSService/Model/Observer.php +285 -0
  20. app/code/community/Onehop/SMSService/Model/Service.php +308 -0
  21. app/code/community/Onehop/SMSService/Model/Sms.php +256 -0
  22. app/code/community/Onehop/SMSService/Model/Smsautomation.php +35 -0
  23. app/code/community/Onehop/SMSService/Model/Smsservice.php +35 -0
  24. app/code/community/Onehop/SMSService/Model/Smstemplates.php +35 -0
  25. app/code/community/Onehop/SMSService/Model/System/Config/Source/SmsLabels.php +122 -0
  26. app/code/community/Onehop/SMSService/Model/System/Config/Source/SmsTemplates.php +94 -0
  27. app/code/community/Onehop/SMSService/Model/System/Config/Source/Smsautomation.php +67 -0
  28. app/code/community/Onehop/SMSService/controllers/AdminhtmlController.php +584 -0
  29. app/code/community/Onehop/SMSService/etc/adminhtml.xml +52 -0
  30. app/code/community/Onehop/SMSService/etc/config.xml +192 -0
  31. app/code/community/Onehop/SMSService/etc/system.xml +65 -0
  32. app/code/community/Onehop/SMSService/sql/smsservice_setup/mysql4-install-1.0.0.php +44 -0
  33. app/design/adminhtml/default/default/layout/smsservice.xml +91 -0
  34. app/design/adminhtml/default/default/template/onehop/smsservice_templates.phtml +101 -0
  35. app/design/adminhtml/default/default/template/onehop/smsservice_welcome.phtml +209 -0
  36. app/etc/modules/Onehop_SMSService.xml +9 -0
  37. js/onehop/bootstrap.min.js +6 -0
  38. js/onehop/jquery1.11.0.min.js +4 -0
  39. js/onehop/onehop.js +20 -0
  40. lib/Onehop/SMSService/onehopservice.php +160 -0
  41. lib/Varien/Data/Form/Element/Selectonehop.php +105 -0
  42. lib/Varien/Data/Form/Element/Smsservicetextarea.php +214 -0
  43. package.xml +18 -0
  44. skin/adminhtml/default/default/onehop/css/bootstrap.min.css +6 -0
  45. skin/adminhtml/default/default/onehop/css/smsservice.css +282 -0
  46. skin/adminhtml/default/default/onehop/css/smsservice_welcome.css +241 -0
  47. skin/adminhtml/default/default/onehop/images/acc_1_1.png +0 -0
  48. skin/adminhtml/default/default/onehop/images/acc_1_2.png +0 -0
  49. skin/adminhtml/default/default/onehop/images/acc_1_3.png +0 -0
  50. skin/adminhtml/default/default/onehop/images/acc_1_4.png +0 -0
  51. skin/adminhtml/default/default/onehop/images/acc_2_1.png +0 -0
  52. skin/adminhtml/default/default/onehop/images/acc_2_2.png +0 -0
  53. skin/adminhtml/default/default/onehop/images/acc_2_3.png +0 -0
  54. skin/adminhtml/default/default/onehop/images/acc_2_4.png +0 -0
  55. skin/adminhtml/default/default/onehop/images/acc_banner.png +0 -0
  56. skin/adminhtml/default/default/onehop/images/bullet.png +0 -0
  57. skin/adminhtml/default/default/onehop/images/caret.png +0 -0
  58. skin/adminhtml/default/default/onehop/images/email_icon.png +0 -0
  59. skin/adminhtml/default/default/onehop/images/list_bg.png +0 -0
  60. skin/adminhtml/default/default/onehop/images/pdf_icon.png +0 -0
  61. skin/adminhtml/default/default/onehop/images/phone_icon.png +0 -0
app/code/community/Onehop/SMSService/Block/Adminhtml/Addtemplate.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Add template form.
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Addtemplate extends Mage_Adminhtml_Block_Widget_Form_Container
26
+ {
27
+ /**
28
+ * Onehop Constructor.
29
+ */
30
+ public function __construct()
31
+ {
32
+ $this->_objectId = 'page_id';
33
+ $this->_blockGroup = 'smsservice';
34
+ $this->_controller = 'adminhtml';
35
+
36
+ parent::__construct();
37
+
38
+ $this->_removeButton('reset');
39
+ $this->_removeButton('save');
40
+
41
+ $this->_addButton('addtemplate', array(
42
+ 'label' => Mage::helper('smsservice')->__('Save Template'),
43
+ 'onclick' => 'editForm.submit();',
44
+ 'class' => 'save',
45
+ ), 1);
46
+ }
47
+
48
+ /**
49
+ * Retrieve text for header element depending on loaded page
50
+ *
51
+ * @return string
52
+ */
53
+ public function getHeaderText()
54
+ {
55
+ return Mage::helper('smsservice')->__('Add Templates');
56
+ }
57
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Addtemplate/Form.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Preapare Add template form
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Addtemplate_Form extends Mage_Adminhtml_Block_Widget_Form
26
+ {
27
+ /**
28
+ * Prepare form.
29
+ */
30
+ protected function _prepareForm()
31
+ {
32
+ $form = new Varien_Data_Form(array(
33
+ 'name' => 'addtemplate_form',
34
+ 'id' => 'edit_form',
35
+ 'action' => $this->getUrl('smsservice/adminhtml/savetemplates'), 'method' => 'post'));
36
+
37
+ $fieldset = $form->addFieldset('addtemplate_fieldset', array(
38
+ 'legend' => Mage::helper('smsservice')->__('Add New Template'),
39
+ 'class' => 'fieldset'
40
+ ));
41
+
42
+ $fieldset->addField('templatename', 'text', array(
43
+ 'name' => 'templatename',
44
+ 'label' => Mage::helper('smsservice')->__('Template Name'),
45
+ 'required' => true
46
+ ));
47
+ $fieldset->addType('smstextarea', 'Varien_Data_Form_Element_Smsservicetextarea');
48
+ $fieldset->addField('templatebody', 'smstextarea', array(
49
+ 'name' => 'templatebody',
50
+ 'label' => Mage::helper('smsservice')->__('Template Body'),
51
+ 'required' => true
52
+ ));
53
+ $form->setUseContainer(true);
54
+ $this->setForm($form);
55
+
56
+ return parent::_prepareForm();
57
+ }
58
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Data/Form/Element/Ondelivery.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * data element
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Data_Form_Element_Ondelivery extends Varien_Data_Form_Element_Multiselect
26
+ {
27
+ /**
28
+ * bind html in a variable
29
+ *
30
+ * @return html
31
+ */
32
+
33
+ public function getElementHtml()
34
+ {
35
+ $html = '<b>Send Order Completion notification to Buyer when you Submit Invoice.</b>';
36
+ return '<tr>' . $html . '</tr>';
37
+ }
38
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Data/Form/Element/Orderclose.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * data element
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Data_Form_Element_Orderclose extends Varien_Data_Form_Element_Multiselect
26
+ {
27
+ /**
28
+ * bind html in a variable
29
+ *
30
+ * @return html
31
+ */
32
+ public function getElementHtml()
33
+ {
34
+ $html = '<b>Send Refund Processed notifications to Customer when you create a Credit Memo.</b>';
35
+ return '<tr>' . $html . '</tr>';
36
+ }
37
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Data/Form/Element/Orderconfirm.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * data element
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Data_Form_Element_Orderconfirm extends Varien_Data_Form_Element_Multiselect
26
+ {
27
+ /**
28
+ * bind html in a variable
29
+ *
30
+ * @return html
31
+ */
32
+ public function getElementHtml()
33
+ {
34
+ $html = '<b>Send notifications to your buyers whenever an order is confirmed.</b>';
35
+ return '<tr>' . $html . '</tr>';
36
+ }
37
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Data/Form/Element/Shipmentconfirm.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * data element
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Data_Form_Element_Shipmentconfirm extends Varien_Data_Form_Element_Multiselect
26
+ {
27
+ /**
28
+ * bind html in a variable
29
+ *
30
+ * @return html
31
+ */
32
+ public function getElementHtml()
33
+ {
34
+ $html = '<b>Send shipment details to buyers after a purchase.
35
+ SMS will be sent when you update the Order status to Shipped.</b>';
36
+ return '<tr>' . $html . '</tr>';
37
+ }
38
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Edittemplate.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Edit template form.
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Edittemplate extends Mage_Adminhtml_Block_Widget_Form_Container
26
+ {
27
+ /**
28
+ * Onehop Constructor.
29
+ */
30
+ public function __construct()
31
+ {
32
+ $this->_objectId = 'page_id';
33
+ $this->_blockGroup = 'smsservice';
34
+ $this->_controller = 'adminhtml';
35
+
36
+ parent::__construct();
37
+
38
+ $this->_removeButton('reset');
39
+ $this->_removeButton('save');
40
+
41
+ $this->_addButton('edittemplate', array(
42
+ 'label' => Mage::helper('smsservice')->__('Update Template'),
43
+ 'onclick' => 'editForm.submit();',
44
+ 'class' => 'save',
45
+ ), 1);
46
+ }
47
+
48
+ /**
49
+ * Retrieve text for header element depending on loaded page
50
+ *
51
+ * @return string
52
+ */
53
+ public function getHeaderText()
54
+ {
55
+ return Mage::helper('smsservice')->__('Edit Template');
56
+ }
57
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Edittemplate/Form.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Preapare Edit template form
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Edittemplate_Form extends Mage_Adminhtml_Block_Widget_Form
26
+ {
27
+ /**
28
+ * Prepare form.
29
+ */
30
+ protected function _prepareForm()
31
+ {
32
+ $templateid = $this->getRequest()->getParam('smstemplateid');
33
+ $templateinfo = Mage::getModel('smsservice/system_config_source_smsTemplates')
34
+ ->gettemplateInfoByID($templateid);
35
+ $form = new Varien_Data_Form(array(
36
+ 'name' => 'addtemplate_form',
37
+ 'id' => 'edit_form',
38
+ 'action' => $this->getUrl('smsservice/adminhtml/updatetemplate'), 'method' => 'post'));
39
+
40
+ $fieldset = $form->addFieldset('addtemplate_fieldset', array(
41
+ 'legend' => Mage::helper('smsservice')->__('Edit Template'),
42
+ 'class' => 'fieldset'
43
+ ));
44
+
45
+ $fieldset->addField('templateid', 'hidden', array(
46
+ 'name' => 'templateid',
47
+ 'value' => $templateid,
48
+ ));
49
+ $fieldset->addField('templatename', 'text', array(
50
+ 'name' => 'templatename',
51
+ 'label' => Mage::helper('smsservice')->__('Template Name'),
52
+ 'value' => Mage::getModel('smsservice/system_config_source_smstemplates')
53
+ ->getTemplateFeilds($templateinfo, 'templatename'),
54
+ 'required' => true
55
+ ));
56
+ $fieldset->addType('smstextarea', 'Varien_Data_Form_Element_Smsservicetextarea');
57
+ $fieldset->addField('templatebody', 'smstextarea', array(
58
+ 'name' => 'templatebody',
59
+ 'label' => Mage::helper('smsservice')->__('Template Body'),
60
+ 'value' => Mage::getModel('smsservice/system_config_source_smstemplates')
61
+ ->getTemplateFeilds($templateinfo, 'templatebody'),
62
+ 'required' => true
63
+ ));
64
+
65
+ $form->setUseContainer(true);
66
+ $this->setForm($form);
67
+
68
+ return parent::_prepareForm();
69
+ }
70
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Send.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Send SMS form.
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Send extends Mage_Adminhtml_Block_Widget_Form_Container
26
+ {
27
+ /**
28
+ * Onehop Constructor.
29
+ */
30
+ public function __construct()
31
+ {
32
+ $this->_objectId = 'page_id';
33
+ $this->_blockGroup = 'smsservice';
34
+ $this->_controller = 'adminhtml';
35
+
36
+ parent::__construct();
37
+
38
+ $this->_removeButton('reset');
39
+ $this->_removeButton('save');
40
+
41
+ $this->_addButton('save', array(
42
+ 'label' => Mage::helper('smsservice')->__('Send SMS'),
43
+ 'onclick' => 'editForm.submit();',
44
+ 'class' => 'save',
45
+ ), 1);
46
+ }
47
+
48
+ /**
49
+ * Retrieve text for header element depending on loaded page
50
+ *
51
+ * @return string
52
+ */
53
+ public function getHeaderText()
54
+ {
55
+ return Mage::helper('smsservice')->__('Send SMS');
56
+ }
57
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Send/Form.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Preapare send SMS form
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Send_Form extends Mage_Adminhtml_Block_Widget_Form
26
+ {
27
+ /**
28
+ * Prepare form.
29
+ */
30
+ protected function _prepareForm()
31
+ {
32
+ $templateurl = $this->getUrl('smsservice/adminhtml/index/');
33
+ $form = new Varien_Data_Form(array(
34
+ 'name' => 'send_form',
35
+ 'id' => 'edit_form',
36
+ 'action' => $this->getData('action'), 'method' => 'post')
37
+ );
38
+
39
+ $fieldset = $form->addFieldset('sendsms_fieldset', array(
40
+ 'legend' => Mage::helper('smsservice')->__('Send SMS'),
41
+ 'class' => 'fieldset'
42
+ ));
43
+
44
+ $fieldset->addField('mobilenumber', 'text', array(
45
+ 'name' => 'mobilenumber',
46
+ 'label' => Mage::helper('smsservice')->__('Mobile Number'),
47
+ 'title' => Mage::helper('smsservice')->__('Mobile Number'),
48
+ 'required' => true
49
+ ));
50
+
51
+ $fieldset->addField('senderid', 'text', array(
52
+ 'name' => 'senderid',
53
+ 'label' => Mage::helper('smsservice')->__('Sender Id'),
54
+ 'title' => Mage::helper('smsservice')->__('Sender Id'),
55
+ 'required' => true
56
+ ));
57
+
58
+ $fieldset->addField('smslabel', 'selectonehop', array(
59
+ 'name' => 'smslabel',
60
+ 'label' => Mage::helper('smsservice')->__('Select Label'),
61
+ 'required' => true,
62
+ 'options' => Mage::getModel('smsservice/system_config_source_smsLabels')->getLableslist()
63
+ ));
64
+
65
+ $fieldset->addField('smstemplate', 'selectonehop', array(
66
+ 'name' => 'smstemplate',
67
+ 'label' => Mage::helper('smsservice')->__('Select Template'),
68
+ 'options' => Mage::getModel('smsservice/system_config_source_smsTemplates')->getTemplatesList(),
69
+ 'onchange'=> 'getTemplate()'
70
+ ));
71
+
72
+ $fieldset->addType('smstextarea', 'Varien_Data_Form_Element_Smsservicetextarea');
73
+ $fieldset->addField('sms_text', 'smstextarea', array(
74
+ 'name' => 'sms_text',
75
+ 'label' => Mage::helper('smsservice')->__('Message Body'),
76
+ 'required' => true
77
+ ));
78
+
79
+ $form->setUseContainer(true);
80
+ $this->setForm($form);
81
+
82
+ return parent::_prepareForm();
83
+ }
84
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Smsautomation.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * SMS automation form.
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Smsautomation extends Mage_Adminhtml_Block_Widget_Form_Container
26
+ {
27
+ /**
28
+ * Onehop Constructor.
29
+ */
30
+ public function __construct()
31
+ {
32
+ $this->_objectId = 'page_id';
33
+ $this->_blockGroup = 'smsservice';
34
+ $this->_controller = 'adminhtml';
35
+
36
+ parent::__construct();
37
+
38
+ $this->_removeButton('reset');
39
+ $this->_removeButton('save');
40
+ }
41
+
42
+ /**
43
+ * Retrieve text for header element depending on loaded page
44
+ *
45
+ * @return string
46
+ */
47
+ public function getHeaderText()
48
+ {
49
+ return Mage::helper('smsservice')->__('SMS Automation');
50
+ }
51
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Smsautomation/Form.php ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Preapare SMS automation form
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Smsautomation_Form extends Mage_Adminhtml_Block_Widget_Form
26
+ {
27
+
28
+
29
+ /**
30
+ * Prepare form.
31
+ */
32
+ protected function _prepareForm()
33
+ {
34
+ $smsautomation = Mage::getModel('smsservice/system_config_source_smsautomation')->getDBsmsAutomation();
35
+ $key = array('orderConfirm','shipmentConfirm','onDelivery','outStock','orderClose');
36
+ $form = new Varien_Data_Form(array(
37
+ 'name' => 'send_form',
38
+ 'id' => 'edit_form',
39
+ 'action' => $this->getUrl('smsservice/adminhtml/saveautomation'), 'method' => 'post'));
40
+ // SMS Automation for order confirmation
41
+ $fieldset = $form->addFieldset('sendsms_fieldset', array(
42
+ 'legend' => Mage::helper('smsservice')->__('ORDER CONFIRMATION'),
43
+ 'class' => 'fieldset'
44
+ ));
45
+ $fieldset->addType('customtype', 'Onehop_SMSService_Block_Adminhtml_Data_Form_Element_Orderconfirm');
46
+ $fieldset->addField('orderConfirmdescr', 'customtype', array(
47
+ 'name' => 'orderConfirmdescr',
48
+ ));
49
+ $fieldset->addField('orderactivateFeature', 'checkbox', array(
50
+ 'name' => 'orderactivateFeature',
51
+ 'value' => '1',
52
+ 'checked' => Mage::getModel('smsservice/system_config_source_smsautomation')
53
+ ->getValue($smsautomation, $key[0], 'active') == '1' ? 'checked' : '',
54
+ 'label' => Mage::helper('smsservice')->__('Activate Feature'),
55
+ 'title' => Mage::helper('smsservice')->__('Activate Feature')
56
+ ));
57
+ $fieldset->addField('ordersmstemplate', 'selectonehop', array(
58
+ 'name' => 'ordersmstemplate',
59
+ 'label' => Mage::helper('smsservice')->__('Select Template'),
60
+ 'options' => Mage::getModel('smsservice/system_config_source_smsTemplates')->getTemplatesList(),
61
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
62
+ ->getValue($smsautomation, $key[0], 'template')
63
+ ));
64
+ $fieldset->addField('ordersmslabel', 'selectonehop', array(
65
+ 'name' => 'ordersmslabel',
66
+ 'label' => Mage::helper('smsservice')->__('Select Label'),
67
+
68
+ 'options' => Mage::getModel('smsservice/system_config_source_smsLabels')->getLableslist(),
69
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
70
+ ->getValue($smsautomation, $key[0], 'label')
71
+ ));
72
+ $fieldset->addField('ordersenderid', 'text', array(
73
+ 'name' => 'ordersenderid',
74
+ 'label' => Mage::helper('smsservice')->__('Sender Id'),
75
+ 'title' => Mage::helper('smsservice')->__('Sender Id'),
76
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
77
+ ->getValue($smsautomation, $key[0], 'senderid')
78
+ ));
79
+ $fieldset->addField('btnorderconfirm', 'submit', array(
80
+ 'name' => 'btnorderconfirm',
81
+ 'value' => 'Save',
82
+ 'class' => 'save'
83
+ ));
84
+ // SMS Automation for Shipment confirmation
85
+ $fieldset2 = $form->addFieldset('shipment_fieldset', array(
86
+ 'legend' => Mage::helper('smsservice')->__('SHIPMENT CONFIRMATION'),
87
+ 'class' => 'fieldset-shipment'
88
+ ));
89
+ $fieldset2->addType('customtype',
90
+ 'Onehop_SMSService_Block_Adminhtml_Data_Form_Element_Shipmentconfirm');
91
+ $fieldset2->addField('shipmentConfirmdescr', 'customtype', array(
92
+ 'name' => 'shipmentConfirmdescr',
93
+ ));
94
+ $fieldset2->addField('shipactivateFeature', 'checkbox', array(
95
+ 'name' => 'shipactivateFeature',
96
+ 'value' => '1',
97
+ 'checked' => Mage::getModel('smsservice/system_config_source_smsautomation')
98
+ ->getValue($smsautomation, $key[1], 'active') == '1' ? 'checked' : '',
99
+ 'label' => Mage::helper('smsservice')->__('Activate Feature'),
100
+ 'title' => Mage::helper('smsservice')->__('Activate Feature')
101
+ ));
102
+ $fieldset2->addField('shipsmstemplate', 'selectonehop', array(
103
+ 'name' => 'shipsmstemplate',
104
+ 'label' => Mage::helper('smsservice')->__('Select Template'),
105
+ 'options' => Mage::getModel('smsservice/system_config_source_smsTemplates')->getTemplatesList(),
106
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
107
+ ->getValue($smsautomation, $key[1], 'template')
108
+ ));
109
+ $fieldset2->addField('shipsmslabel', 'selectonehop', array(
110
+ 'name' => 'shipsmslabel',
111
+ 'label' => Mage::helper('smsservice')->__('Select Label'),
112
+ 'options' => Mage::getModel('smsservice/system_config_source_smsLabels')->getLableslist(),
113
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
114
+ ->getValue($smsautomation, $key[1], 'label') ));
115
+ $fieldset2->addField('shipsenderid', 'text', array(
116
+ 'name' => 'shipsenderid',
117
+ 'label' => Mage::helper('smsservice')->__('Sender Id'),
118
+ 'title' => Mage::helper('smsservice')->__('Sender Id'),
119
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
120
+ ->getValue($smsautomation, $key[1], 'senderid') ));
121
+ $fieldset2->addField('btnshipmentconfirm', 'submit', array(
122
+ 'name' => 'btnshipmentconfirm',
123
+ 'value' => 'Save',
124
+ 'class' => 'save'
125
+ ));
126
+ // SMS Automation for Delivery confirmation
127
+ $fieldset3 = $form->addFieldset('delivery_fieldset', array(
128
+ 'legend' => Mage::helper('smsservice')->__('ORDER COMPLETION'),
129
+ 'class' => 'fieldset-delivery'
130
+ ));
131
+ $fieldset3->addType('customtype',
132
+ 'Onehop_SMSService_Block_Adminhtml_Data_Form_Element_Ondelivery');
133
+ $fieldset3->addField('onDeliverydescr', 'customtype', array(
134
+ 'name' => 'onDeliverydescr',
135
+ ));
136
+ $fieldset3->addField('deliveryactivateFeature', 'checkbox', array(
137
+ 'name' => 'deliveryactivateFeature',
138
+ 'value' => '1',
139
+ 'checked' => Mage::getModel('smsservice/system_config_source_smsautomation')
140
+ ->getValue($smsautomation, $key[2], 'active') == '1' ? 'checked' : '',
141
+ 'label' => Mage::helper('smsservice')->__('Activate Feature'),
142
+ 'title' => Mage::helper('smsservice')->__('Activate Feature')
143
+ ));
144
+ $fieldset3->addField('deliverysmstemplate', 'selectonehop', array(
145
+ 'name' => 'deliverysmstemplate',
146
+ 'label' => Mage::helper('smsservice')->__('Select Template'),
147
+ 'options' => Mage::getModel('smsservice/system_config_source_smsTemplates')->getTemplatesList(),
148
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
149
+ ->getValue($smsautomation, $key[2], 'template')
150
+ ));
151
+ $fieldset3->addField('deliverysmslabel', 'selectonehop', array(
152
+ 'name' => 'deliverysmslabel',
153
+ 'label' => Mage::helper('smsservice')->__('Select Label'),
154
+ 'options' => Mage::getModel('smsservice/system_config_source_smsLabels')->getLableslist(),
155
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
156
+ ->getValue($smsautomation, $key[2], 'label')
157
+ ));
158
+ $fieldset3->addField('deliverysenderid', 'text', array(
159
+ 'name' => 'deliverysenderid',
160
+ 'label' => Mage::helper('smsservice')->__('Sender Id'),
161
+ 'title' => Mage::helper('smsservice')->__('Sender Id'),
162
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
163
+ ->getValue($smsautomation, $key[2], 'senderid')
164
+ ));
165
+ $fieldset3->addField('btnondelivery', 'submit', array(
166
+ 'name' => 'btnondelivery',
167
+ 'value' => 'Save'
168
+ ));
169
+ // SMS Automation for Order close
170
+ $fieldset5 = $form->addFieldset('close_fieldset', array(
171
+ 'legend' => Mage::helper('smsservice')->__('REFUND PROCESSED ALERT'),
172
+ 'class' => 'fieldset-close'
173
+ ));
174
+ $fieldset5->addType('customtype',
175
+ 'Onehop_SMSService_Block_Adminhtml_Data_Form_Element_Orderclose');
176
+ $fieldset5->addField('closeactivatedescr', 'customtype', array(
177
+ 'name' => 'closeactivatedescr',
178
+ ));
179
+ $fieldset5->addField('closeactivateFeature', 'checkbox', array(
180
+ 'name' => 'closeactivateFeature',
181
+ 'value' => '1',
182
+ 'checked' => Mage::getModel('smsservice/system_config_source_smsautomation')
183
+ ->getValue($smsautomation, $key[4], 'active') == '1' ? 'checked' : '',
184
+ 'label' => Mage::helper('smsservice')->__('Activate Feature'),
185
+ 'title' => Mage::helper('smsservice')->__('Activate Feature')
186
+ ));
187
+ $fieldset5->addField('backsmstemplate', 'selectonehop', array(
188
+ 'name' => 'closesmstemplate',
189
+ 'label' => Mage::helper('smsservice')->__('Select Template'),
190
+ 'options' => Mage::getModel('smsservice/system_config_source_smsTemplates')->getTemplatesList(),
191
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
192
+ ->getValue($smsautomation, $key[4], 'template')
193
+ ));
194
+ $fieldset5->addField('backsmslabel', 'selectonehop', array(
195
+ 'name' => 'closesmslabel',
196
+ 'label' => Mage::helper('smsservice')->__('Select Label'),
197
+ 'options' => Mage::getModel('smsservice/system_config_source_smsLabels')->getLableslist(),
198
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
199
+ ->getValue($smsautomation, $key[4], 'label')
200
+ ));
201
+ $fieldset5->addField('backsenderid', 'text', array(
202
+ 'name' => 'closesenderid',
203
+ 'label' => Mage::helper('smsservice')->__('Sender Id'),
204
+ 'title' => Mage::helper('smsservice')->__('Sender Id'),
205
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
206
+ ->getValue($smsautomation, $key[4], 'senderid')
207
+ ));
208
+ $fieldset5->addField('btnorderclose', 'submit', array(
209
+ 'name' => 'btnorderclose',
210
+ 'value' => 'Save'
211
+ ));
212
+ // SMS Automation for Out of stock
213
+ $fieldset4 = $form->addFieldset('out_fieldset', array(
214
+ 'legend' => Mage::helper('smsservice')->__('OUT OF STOCK ALERT'),
215
+ 'class' => 'fieldset-out'
216
+ ));
217
+
218
+ $fieldset4->addField('outactivateFeature', 'checkbox', array(
219
+ 'name' => 'outactivateFeature',
220
+ 'value' => '1',
221
+ 'checked' => Mage::getModel('smsservice/system_config_source_smsautomation')
222
+ ->getValue($smsautomation, $key[3], 'active') == '1' ? 'checked' : '',
223
+ 'label' => Mage::helper('smsservice')->__('Activate Feature'),
224
+ 'title' => Mage::helper('smsservice')->__('Activate Feature')
225
+ ));
226
+ $fieldset4->addField('outsmstemplate', 'selectonehop', array(
227
+ 'name' => 'outsmstemplate',
228
+ 'label' => Mage::helper('smsservice')->__('Select Template'),
229
+ 'options' => Mage::getModel('smsservice/system_config_source_smsTemplates')->getTemplatesList(),
230
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
231
+ ->getValue($smsautomation, $key[3], 'template')
232
+ ));
233
+ $fieldset4->addField('outsmslabel', 'selectonehop', array(
234
+ 'name' => 'outsmslabel',
235
+ 'label' => Mage::helper('smsservice')->__('Select Label'),
236
+ 'options' => Mage::getModel('smsservice/system_config_source_smsLabels')->getLableslist(),
237
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
238
+ ->getValue($smsautomation, $key[3], 'label')
239
+ ));
240
+ $fieldset4->addField('outsenderid', 'text', array(
241
+ 'name' => 'outsenderid',
242
+ 'label' => Mage::helper('smsservice')->__('Sender Id'),
243
+ 'title' => Mage::helper('smsservice')->__('Sender Id'),
244
+ 'value' => Mage::getModel('smsservice/system_config_source_smsautomation')
245
+ ->getValue($smsautomation, $key[3], 'senderid')
246
+ ));
247
+ $fieldset4->addField('btnoutstock', 'submit', array(
248
+ 'name' => 'btnoutstock',
249
+ 'value' => 'Save'
250
+ ));
251
+
252
+ $form->setUseContainer(true);
253
+ $this->setForm($form);
254
+
255
+ return parent::_prepareForm();
256
+ }
257
+ }
app/code/community/Onehop/SMSService/Block/Adminhtml/Template.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Manage template list layout.
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Block_Adminhtml_Template extends Mage_Adminhtml_Block_Widget_Form_Container
26
+ {
27
+ /**
28
+ * Onehop Constructor.
29
+ */
30
+ public function __construct()
31
+ {
32
+ $this->_objectId = 'page_id';
33
+ $this->_blockGroup = 'smsservice';
34
+ $this->_controller = 'adminhtml';
35
+
36
+ parent::__construct();
37
+
38
+ $this->_removeButton('reset');
39
+ $this->_removeButton('save');
40
+
41
+ $this->_addButton('save', array(
42
+ 'label' => Mage::helper('smsservice')->__('Add Template'),
43
+ 'onclick' => 'editForm.submit();',
44
+ 'class' => 'save',
45
+ ), 1);
46
+ }
47
+
48
+ /**
49
+ * Retrieve text for header element depending on loaded page
50
+ *
51
+ * @return string
52
+ */
53
+ public function getHeaderText()
54
+ {
55
+ return Mage::helper('smsservice')->__('Manage Templates');
56
+ }
57
+ }
app/code/community/Onehop/SMSService/Helper/Data.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Standard Helper
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Helper_Data extends Mage_Core_Helper_Abstract
26
+ {
27
+
28
+ /**
29
+ * Get standard configuration model.
30
+ *
31
+ * @return Onehop_SMSService_Helper_Model_Config
32
+ */
33
+ protected function _getConfig()
34
+ {
35
+ return Mage::getSingleton('smsservice/config');
36
+ }
37
+ }
app/code/community/Onehop/SMSService/Helper/Mysql4/Install.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Installation helper to make installs more consistent, trackable, repeatable and debugable.
4
+ *
5
+ *
6
+ * @category Onehop
7
+ * @package Onehop_SMSService
8
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
9
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
10
+ */
11
+ class Onehop_SMSService_Helper_Mysql4_Install extends Mage_Core_Helper_Abstract{
12
+ protected $ex_stack = array ();
13
+
14
+ protected $_setup = null;
15
+
16
+ /**
17
+ * Attempt to add a foreign key constraint on two tables
18
+ *
19
+ * @param unknown_type $installer
20
+ * @param string $table1_name
21
+ * @param string $column1
22
+ * @param string $table2_name
23
+ * @param string $column2=null (uses column1 if null)
24
+ * @param string $on_delete='CASCADE'
25
+ * @param string $on_update='NO ACTION'
26
+ * @return Onehop_SMSService_Helper_Mysql4_Install
27
+ */
28
+ public function addFKey(&$installer, $key_name, $table1_name, $column1, $table2_name, $column2=null, $on_delete='NO ACTION', $on_update='NO ACTION')
29
+ {
30
+ try {
31
+ if(empty($column2)) {
32
+ $column2 = $column1;
33
+ }
34
+ $installer->getConnection()
35
+ ->addConstraint(
36
+ $key_name,
37
+ $table1_name,
38
+ $column1,
39
+ $table2_name,
40
+ $column2,
41
+ $on_delete,
42
+ $on_update
43
+ );
44
+ } catch(Exception $ex) {
45
+ $this->addInstallProblem($ex);
46
+ }
47
+
48
+ return $this;
49
+ }
50
+
51
+ /**
52
+ * Adds an exception problem to the stack of problems that may
53
+ * have occured during installation.
54
+ * Ignores duplicate column name errors; ignore if the msg starts with "SQLSTATE[42S21]: Column already exists"
55
+ * @param Exception $ex
56
+ */
57
+ public function addInstallProblem(Exception $ex)
58
+ {
59
+ if (strpos($ex->getMessage (), "SQLSTATE[42S21]: Column already exists") !== false)
60
+ return $this;
61
+ if (strpos($ex->getMessage (), "SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP") !== false
62
+ && strpos($ex->getMessage (), "check that column/key exists") !== false )
63
+ return $this;
64
+ $this->ex_stack [] = $ex;
65
+ return $this;
66
+ }
67
+
68
+ /**
69
+ * Returns true if any problems occured after installation
70
+ * @return boolean
71
+ */
72
+ public function hasProblems()
73
+ {
74
+ return sizeof($this->ex_stack ) > 0;
75
+ }
76
+ /**
77
+ * Returns a string of problems that occured after any installation scripts were run through this helper
78
+ * @return string message to display to the user
79
+ */
80
+ public function getProblemsString()
81
+ {
82
+ $msg = $this->__("The following errors occured while trying to install the module.");
83
+ $msg .= "\n<br>";
84
+ foreach($this->ex_stack as $ex_i => $ex) {
85
+ $msg .= "<b>#{$ex_i}: </b>";
86
+ if(Mage::getIsDeveloperMode()) {
87
+ $msg .= nl2br($ex);
88
+ } else {
89
+ $msg .= $ex->getMessage ();
90
+ }
91
+ $msg .= "\n<br>";
92
+ }
93
+ $msg .= "\n<br>";
94
+ $msg .= $this->__("If any of these problems were unexpected, I recommend that you contact the module support team to avoid problems in the future.");
95
+ return $msg;
96
+ }
97
+
98
+ /**
99
+ * Clears any insall problems (exceptions) that were in the stack
100
+ */
101
+ public function clearProblems()
102
+ {
103
+ $this->ex_stack = array ();
104
+ return $this;
105
+ }
106
+
107
+ /**
108
+ * Runs a SQL query using the install resource provided and
109
+ * remembers any errors that occur.
110
+ *
111
+ * @param unknown_type $installer
112
+ * @param string $sql
113
+ * @return Onehop_SMSService_Helper_Mysql4_Install
114
+ */
115
+ public function attemptQuery(&$installer, $sql)
116
+ {
117
+ try {
118
+ $installer->run($sql);
119
+ } catch(Exception $ex) {
120
+ $this->addInstallProblem($ex);
121
+ }
122
+ return $this;
123
+ }
124
+
125
+ /**
126
+ * Creates an installation message notice in the backend.
127
+ * @param string $msg_title
128
+ * @param string $msg_desc
129
+ * @param string $url=null if null default URL is used.
130
+ */
131
+ public function createInstallNotice($msg_title, $msg_desc, $url = null, $severity = null)
132
+ {
133
+ $message = Mage::getModel('adminnotification/inbox');
134
+ if( $message ) {
135
+ $message->setDateAdded(date("c",time()));
136
+
137
+ if($url == null){
138
+ $url = "https://github.com/onehop/Magento-Onehop-SMSService-Extension";
139
+ }
140
+
141
+ if ($severity === null) {
142
+ $severity = Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE;
143
+ }
144
+
145
+ // If problems occured increase severity and append logged messages.
146
+ if(Mage::helper('smsservice/mysql4_install' )->hasProblems ()){
147
+ $severity = Mage_AdminNotification_Model_Inbox::SEVERITY_MINOR;
148
+ $msg_title .= " Problems may have occured during installation.";
149
+ $msg_desc .= " " . Mage::helper('smsservice/mysql4_install')->getProblemsString();
150
+ Mage::helper('smsservice/mysql4_install' )->clearProblems();
151
+ }
152
+ $message->setTitle($msg_title);
153
+ $message->setDescription($msg_desc);
154
+ $message->setUrl($url);
155
+ $message->setSeverity($severity);
156
+ $message->save();
157
+ }
158
+ return $this;
159
+ }
160
+
161
+ /**
162
+ * Clears cache and prepares anything that needs to generally happen before running DB install scripts.
163
+ */
164
+ public function prepareForDb()
165
+ {
166
+
167
+ try {
168
+ Mage::app()->getCacheInstance()->flush();
169
+
170
+ } catch (Exception $ex) {
171
+ $this->addInstallProblem("Problem clearing cache:". $ex);
172
+ }
173
+
174
+ return $this;
175
+ }
176
+ }
app/code/community/Onehop/SMSService/Model/Config.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Config Model
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Model_Config
26
+ {
27
+ /**
28
+ * use curl call to check $apikey is valid or not
29
+ *
30
+ * @param string $apikey
31
+ * @return json
32
+ */
33
+ public function getValidAPIKey($apikey)
34
+ {
35
+ $urllink = "http://api.onehop.co/v1/api_key/validate/";
36
+ // Header
37
+ $headers = array(
38
+ 'Accept: ',
39
+ 'apiKey:' . $apikey
40
+ );
41
+
42
+ // Send request
43
+ $iClient = new Varien_Http_Client();
44
+ $iClient->setUri($urllink)
45
+ ->setMethod('GET')
46
+ ->setConfig(array(
47
+ 'maxredirects'=>0,
48
+ 'timeout'=>30,
49
+ ));
50
+ $iClient->setHeaders($headers);
51
+ $response = $iClient->request();
52
+ $output = json_decode($response->getBody());
53
+ return $output;
54
+ }
55
+
56
+ /**
57
+ * Determine whether unicode is allowed or not.
58
+ *
59
+ * @param int $storeId
60
+ */
61
+ public function isUnicodeAllowed($storeId = null)
62
+ {
63
+ return (bool) Mage::getStoreConfig("smsservice/general/unicode", $storeId);
64
+ }
65
+
66
+ /**
67
+ * Sanitize number.
68
+ *
69
+ * Add dial prefix of local country if needed (if local country
70
+ * is not specified there will be used country from general settings).
71
+ *
72
+ * Whitespaces in $number will be automaticaly removed.
73
+ *
74
+ * @param string $number
75
+ * @return string
76
+ */
77
+ public function sanitizeNumber($number, $storeId = null)
78
+ {
79
+ $length = Mage::getStoreConfig("smsservice/general/min_length_with_prefix", $storeId);
80
+ $local = Mage::getStoreConfig("smsservice/general/local_country", $storeId);
81
+ $trimzero = Mage::getStoreConfig("smsservice/general/trim_zero", $storeId);
82
+
83
+ $prefix = $this->getDialPrefix($local);
84
+
85
+ $number = str_replace(array(" ", "\t"), array("", ""), $number);
86
+ $number = ltrim($number, ($trimzero ? "+0" : "+"));
87
+
88
+ if (strlen($number) <= $length)
89
+ $number = $prefix.$number;
90
+
91
+ return $number;
92
+ }
93
+
94
+ /**
95
+ * Extract dial prefix from $localCode.
96
+ *
97
+ * $localCode has format CODE,DIAL_PREFIX.
98
+ *
99
+ * @param string $localCode
100
+ * @return string
101
+ */
102
+ public function getDialPrefix($localCode)
103
+ {
104
+ $parts = explode(',', $localCode);
105
+
106
+ return (count($parts)==2) ? trim($parts[1]) : '';
107
+ }
108
+ }
app/code/community/Onehop/SMSService/Model/Configvalidation.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Configvalidation Model
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Model_Configvalidation extends Mage_Core_Model_Config_Data
26
+ {
27
+ /**
28
+ * check API key is valid or not
29
+ *
30
+ * @return bool
31
+ */
32
+ public function _beforesave()
33
+ {
34
+ $apiKey = $this->getValue(); //get the value from our config
35
+ $config = $this->_getConfig();
36
+ $isValidAPI = $config->getValidAPIKey($apiKey);
37
+ if ($isValidAPI->status != 'success') {
38
+ Mage::throwException(Mage::helper('smsservice')->__('Please enter valid API Key.'));
39
+ }
40
+ return true;
41
+ }
42
+
43
+
44
+ /**
45
+ * Get standard configuration model.
46
+ *
47
+ * @return Onehop_SMSService_Helper_Model_Config
48
+ */
49
+ protected function _getConfig()
50
+ {
51
+ return Mage::getSingleton('smsservice/config');
52
+ }
53
+ }
app/code/community/Onehop/SMSService/Model/Mysql4/Setup.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category Onehop
4
+ * @package Onehop_SMSService
5
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
6
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
7
+ */
8
+ class Onehop_SMSService_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup
9
+ {
10
+
11
+ }
app/code/community/Onehop/SMSService/Model/Observer.php ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Observer Model
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Model_Observer
26
+ {
27
+ /**
28
+ * Send SMS whenever order will place
29
+ *
30
+ * @param orderSuccess $observer
31
+ *
32
+ * @return null when Activate Feature is not active for order place
33
+ */
34
+ public function orderSuccess()
35
+ {
36
+ $service = $this->_getService();
37
+ $isOrderConfActive = $service->getRuleset('orderConfirm');
38
+ if (!$isOrderConfActive)
39
+ return;
40
+
41
+ $order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());
42
+
43
+ $smsbody = $service->replacePlaceholders($order, $isOrderConfActive['temp_body']);
44
+
45
+ $mobile = trim($order->getShippingAddress()->getData('telephone'));
46
+
47
+ $mobilenumber = $mobile;
48
+ $text = $smsbody;
49
+ $senderid = $isOrderConfActive['senderid'];
50
+ $smslabel = $isOrderConfActive['label'];
51
+ $source = '23000';
52
+
53
+ $sendSms = Mage::getModel('smsservice/sms');
54
+ $sendSms->setLabel($smslabel);
55
+ $sendSms->setSenderId($senderid);
56
+ $sendSms->setSource($source);
57
+ $sendSms->setNumber($mobilenumber);
58
+ $sendSms->setText($text);
59
+
60
+ if ($service->send($sendSms)) {
61
+ Mage::log('Order Confirmation : MOBILE : ' . $mobilenumber
62
+ . ' SENDER ID : ' . $senderid . ' Label : ' . $smslabel
63
+ . ' SOURCE : ' . $source
64
+ . ' MESSAGE BODY : ' . $text, null, 'smsservice.log');
65
+ }
66
+
67
+ $orderedItems = $order->getAllVisibleItems();
68
+ }
69
+ /**
70
+ * Send SMS whenever order shipped or processing
71
+ *
72
+ * @param orderShipment $observer
73
+ *
74
+ * @return null when Activate Feature is not active for order shipment
75
+ */
76
+ public function orderShipment(Varien_Event_Observer $observer)
77
+ {
78
+ $service = $this->_getService();
79
+ $isShipConfActive = $service->getRuleset('shipmentConfirm');
80
+
81
+ if (!$isShipConfActive)
82
+ return;
83
+
84
+ $shipment = $observer->getEvent()->getShipment();
85
+ $order = $shipment->getOrder();
86
+
87
+ $smsbody = $service->replacePlaceholders($order, $isShipConfActive['temp_body']);
88
+
89
+ $mobile = trim($order->getShippingAddress()->getData('telephone'));
90
+
91
+ $mobilenumber = $mobile;
92
+ $text = $smsbody;
93
+ $senderid = $isShipConfActive['senderid'];
94
+ $smslabel = $isShipConfActive['label'];
95
+ $source = '23000';
96
+
97
+ $sendSms = Mage::getModel('smsservice/sms');
98
+ $sendSms->setLabel($smslabel);
99
+ $sendSms->setSenderId($senderid);
100
+ $sendSms->setSource($source);
101
+ $sendSms->setNumber($mobilenumber);
102
+ $sendSms->setText($text);
103
+
104
+ if ($service->send($sendSms)) {
105
+ Mage::log('Shipement Confirmation : MOBILE : ' . $mobilenumber
106
+ . ' SENDER ID : ' . $senderid
107
+ . ' Label : ' . $smslabel . ' SOURCE : ' . $source
108
+ . ' MESSAGE BODY : ' . $text, null, 'smsservice.log');
109
+ }
110
+ }
111
+ /**
112
+ * Send SMS whenever order delivered
113
+ *
114
+ * @param orderComplete $observer
115
+ *
116
+ * @return null when Activate Feature is not active for order on delivery
117
+ */
118
+ public function orderComplete(Varien_Event_Observer $observer)
119
+ {
120
+ $service = $this->_getService();
121
+ $isOnDeliveryConfActive = $service->getRuleset('onDelivery');
122
+
123
+ if (!$isOnDeliveryConfActive)
124
+ return;
125
+
126
+ $_event = $observer->getEvent();
127
+ $_invoice = $_event->getInvoice();
128
+ $order = $_invoice->getOrder();
129
+
130
+ $smsbody = $service->replacePlaceholders($order, $isOnDeliveryConfActive['temp_body']);
131
+
132
+ $mobile = trim($order->getShippingAddress()->getData('telephone'));
133
+
134
+ $mobilenumber = $mobile;
135
+ $text = $smsbody;
136
+ $senderid = $isOnDeliveryConfActive['senderid'];
137
+ $smslabel = $isOnDeliveryConfActive['label'];
138
+ $source = '23000';
139
+
140
+ $sendSms = Mage::getModel('smsservice/sms');
141
+ $sendSms->setLabel($smslabel);
142
+ $sendSms->setSenderId($senderid);
143
+ $sendSms->setSource($source);
144
+ $sendSms->setNumber($mobilenumber);
145
+ $sendSms->setText($text);
146
+
147
+ if ($service->send($sendSms)) {
148
+ Mage::log('Delivery Confirmation : MOBILE : ' . $mobilenumber . ' SENDER ID : ' . $senderid
149
+ . ' Label : ' . $smslabel . ' SOURCE : ' . $source
150
+ . ' MESSAGE BODY : ' . $text, null, 'smsservice.log');
151
+ }
152
+ }
153
+ /**
154
+ * get items and call to processOutofStock function
155
+ *
156
+ * @param saveProduct $observer
157
+ */
158
+ public function saveProduct(Varien_Event_Observer $observer)
159
+ {
160
+ $service = $this->_getService();
161
+
162
+ $event = $observer->getEvent();
163
+ $item = $event->getItem();
164
+ $this->processOutofStock($item);
165
+ }
166
+ /**
167
+ * Send SMS to admin whenever product went out of stock
168
+ *
169
+ * @param processOutofStock $item
170
+ *
171
+ * @return null when Activate feature is not active for out of stock
172
+ * admin mobile is not set
173
+ * available product quntity is greater than notify out of stock quantity
174
+ */
175
+ public function processOutofStock($item)
176
+ {
177
+ $productId = $item->getData('product_id');
178
+ $product = Mage::getModel('catalog/product')->load($productId);
179
+
180
+ if(!$product->getIsInStock()){
181
+ $Productname = $product->getStockItem()->getProductName();
182
+ $service = $this->_getService();
183
+ $isoutStockActive = $service->getRuleset('outStock');
184
+ if (!$isoutStockActive)
185
+ return;
186
+
187
+ $mobile = $service->getAdminMobile();
188
+ if (!$mobile)
189
+ return;
190
+
191
+ $smsbody = $isoutStockActive['temp_body'];
192
+ $smsbody = str_replace('{Product ID}', $productId, $smsbody);
193
+ $smsbody = str_replace('{Product Name}', $Productname, $smsbody);
194
+
195
+ $senderid = $isoutStockActive['senderid'];
196
+ $smslabel = $isoutStockActive['label'];
197
+ $source = '23000';
198
+
199
+ $sendSms = Mage::getModel('smsservice/sms');
200
+ $sendSms->setLabel($smslabel);
201
+ $sendSms->setSenderId($senderid);
202
+ $sendSms->setSource($source);
203
+ $sendSms->setNumber($mobile);
204
+ $sendSms->setText($smsbody);
205
+
206
+ if ($service->send($sendSms)) {
207
+ Mage::log('Out Of Stock : ADMIN MOBILE : ' . $mobile . ' SENDER ID : ' . $senderid
208
+ . ' Label : ' . $smslabel . ' SOURCE : ' . $source
209
+ . ' MESSAGE BODY : ' . $smsbody, null, 'smsservice.log');
210
+ }
211
+ }
212
+ }
213
+
214
+ /**
215
+ * Send SMS to admin whenever admin close or refund order
216
+ *
217
+ * @param orderRefund $observer
218
+ *
219
+ * @return null when Activate feature is not active for order close ruleset
220
+ */
221
+ public function orderRefund(Varien_Event_Observer $observer)
222
+ {
223
+
224
+ $service = $this->_getService();
225
+ $isOrderCloseActive = $service->getRuleset('orderClose');
226
+ if (!$isOrderCloseActive)
227
+ return;
228
+
229
+ $creditmemo = $observer->getEvent()->getCreditmemo();
230
+ $order = $creditmemo->getOrder();
231
+
232
+ $smsbody = $service->replacePlaceholders($order, $isOrderCloseActive['temp_body']);
233
+
234
+ $mobile = trim($order->getShippingAddress()->getData('telephone'));
235
+
236
+ $mobilenumber = $mobile;
237
+ $text = $smsbody;
238
+ $senderid = $isOrderCloseActive['senderid'];
239
+ $smslabel = $isOrderCloseActive['label'];
240
+ $source = '23000';
241
+
242
+ $sendSms = Mage::getModel('smsservice/sms');
243
+ $sendSms->setLabel($smslabel);
244
+ $sendSms->setSenderId($senderid);
245
+ $sendSms->setSource($source);
246
+ $sendSms->setNumber($mobilenumber);
247
+ $sendSms->setText($text);
248
+
249
+ if ($service->send($sendSms)) {
250
+ Mage::log('Order Close : MOBILE : ' . $mobilenumber . ' SENDER ID : ' . $senderid
251
+ . ' Label : ' . $smslabel . ' SOURCE : ' . $source
252
+ . ' MESSAGE BODY : ' . $text, null, 'smsservice.log');
253
+ }
254
+ }
255
+
256
+ /**
257
+ * Get standard configuration model.
258
+ *
259
+ * @return Onehop_SMSService_Helper_Model_Config
260
+ */
261
+ protected function _getConfig()
262
+ {
263
+ return Mage::getSingleton('smsservice/config');
264
+ }
265
+
266
+ /**
267
+ * Get standard service.
268
+ *
269
+ * @return Onehop_SMSService_Model_Service
270
+ */
271
+ protected function _getService()
272
+ {
273
+ return Mage::getSingleton('smsservice/service');
274
+ }
275
+
276
+ /**
277
+ * Get backend session.
278
+ *
279
+ * @return Mage_Adminhtml_Model_Session
280
+ */
281
+ protected function _getSession()
282
+ {
283
+ return Mage::getSingleton('adminhtml/session');
284
+ }
285
+ }
app/code/community/Onehop/SMSService/Model/Service.php ADDED
@@ -0,0 +1,308 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Service Model
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ /**
26
+ * Include extern library
27
+ */
28
+ include_once Mage::getBaseDir().DS.'lib'.DS.'Onehop'.DS.'SMSService'.DS.'onehopservice.php';
29
+
30
+ class Onehop_SMSService_Model_Service
31
+ {
32
+ /**
33
+ * Send $smsdata.
34
+ *
35
+ * If $smsdata is not set or not instance of Onehop_SMSService_Model_SMS then
36
+ * method logs WARNING and returns false.
37
+ *
38
+ * If there is not set username, apikey, or number is not set or is invalid
39
+ * method generates the event 'smsservice_error' and returns false.
40
+ *
41
+ * If all is right method generates the event 'smsservice_before_sending'
42
+ * and tries to send SMS.
43
+ *
44
+ * If SMS was sent method generates the event 'smsservice_after_sending'
45
+ * and returns true, otherwise generates 'smsservice_error' and return false.
46
+ *
47
+ * @param Onehop_SMSService_Model_SMS $smsdata
48
+ * @return bool
49
+ */
50
+ public function send($smsdata)
51
+ {
52
+ if (!$smsdata || !($smsdata instanceof Onehop_SMSService_Model_SMS)) {
53
+ Mage::log(__CLASS__.":".__METHOD__.": SMS is not set or is not instance
54
+ of Onehop_SMSService_Model_SMS.", Zend_Log::WARN);
55
+ return false;
56
+ }
57
+
58
+ $apikey = $this->getApikey();
59
+
60
+ if (!$apikey) {
61
+ $smsdata->addCustomData('error_message', $this->_helper()->__('API Key is not set.
62
+ Check it in the configuration, please.'));
63
+ Mage::dispatchEvent('smsservice_error', array('sms' => $smsdata));
64
+ return false;
65
+ }
66
+
67
+ if (!$smsdata->getNumber()) {
68
+ $smsdata->addCustomData('error_message', $this->_helper()->__('Mobile Number is not set.'));
69
+ Mage::dispatchEvent('smsservice_error', array('sms' => $smsdata));
70
+ return false;
71
+ }
72
+
73
+ if (!preg_match('/^[0-9]{1,16}$/', $smsdata->getNumber())) {
74
+ $smsdata->addCustomData('error_message',
75
+ $this->_helper()->__("Mobile Number '%s' is not valid.",
76
+ $smsdata->getNumber()));
77
+ Mage::dispatchEvent('smsservice_error', array('sms' => $smsdata));
78
+ return false;
79
+ }
80
+
81
+ Mage::dispatchEvent('smsservice_before_sending', array('sms' => $smsdata));
82
+
83
+ $service = OnehopService::getInstance();
84
+
85
+ $result = $service->sendMessage($apikey,
86
+ $smsdata->getNumber(),
87
+ $smsdata->getText(),
88
+ $smsdata->getLabel(),
89
+ $smsdata->getSenderId(),
90
+ $smsdata->getSource());
91
+
92
+ if ($result) {
93
+ $smsdata->addCustomData('error_message', null);
94
+ Mage::dispatchEvent('smsservice_after_sending', array('sms' => $smsdata));
95
+ return true;
96
+ } else {
97
+ $smsdata->addCustomData('error_message', $service->getError());
98
+ Mage::dispatchEvent('smsservice_error', array('sms' => $smsdata));
99
+ return false;
100
+ }
101
+ }
102
+
103
+ /**
104
+ * Determine whether API key is valid or not.
105
+ *
106
+ * @return string
107
+ */
108
+ public function isvalidAPIKey()
109
+ {
110
+ $apikey = $this->getApikey();
111
+ if (!$apikey)
112
+ return $this->_helper()->__('API Key is not set.');
113
+ else
114
+ return '';
115
+ }
116
+
117
+ /**
118
+ * retrive ruleset data from database
119
+ *
120
+ * @param string $key
121
+ * @return string
122
+ */
123
+ public function getRuleset($key)
124
+ {
125
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
126
+ $Rulesettablename = Mage::getSingleton('core/resource')->getTableName('sms_onehop_rulesets');
127
+ $Templatetablename = Mage::getSingleton('core/resource')->getTableName('onehop_smstemplates');
128
+ $selectRule = $connection->select()
129
+ ->from(array('rule' => $Rulesettablename), array('rule.*'))
130
+ ->joinLeft(array('temp' => $Templatetablename), ' temp.smstemplates_id = rule.template',
131
+ array('temp.temp_body'))
132
+ ->where('rule.rule_name = "'.$key.'"')
133
+ ->where('rule.active = "1"');
134
+ $isRule = $connection->query($selectRule);
135
+ $getrulesets = $isRule->fetch();
136
+
137
+ return $getrulesets;
138
+ }
139
+ /**
140
+ * replace placeholders with param values
141
+ *
142
+ * @param array $order
143
+ * @param array $smsbody
144
+ * @return string
145
+ */
146
+ public function replacePlaceholders($order, $smsbody)
147
+ {
148
+ // Order Info
149
+ $orderId = $order->getId();
150
+ $incrementId = $order->getIncrementId();
151
+
152
+ $order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);
153
+ if (!$order || empty($order)) {
154
+ return false;
155
+ }
156
+
157
+ // Customer Info
158
+ $custFirstName = $order->getCustomerFirstname();
159
+ $custLastName = $order->getCustomerLastname();
160
+ $mobile = trim($order->getShippingAddress()->getData('telephone'));
161
+ $email = $order->getCustomerEmail();
162
+ // Shipment info
163
+ $address = $order->getShippingAddress();
164
+ $shipcustName = $address->getName();
165
+ $shipcustAddr = $address->getStreetFull();
166
+ $shipcustCity = $address->getCity();
167
+ $shipregion = $address->getRegion();
168
+ $shipcountry = $address->getCountry();
169
+ $shipPin = $address->getPostcode();
170
+ $shippingAddress = $shipcustName.", ".$shipcustAddr." ".$shipcustCity.", ".$shipregion.", ".$shipcountry." ".$shipPin;
171
+ // Product Info
172
+ $orderedItems = $order->getAllVisibleItems();
173
+ $idarray = array();
174
+ $allids = '';
175
+ $namearray = array();
176
+ $allnames = '';
177
+
178
+ $productDisc = 0;
179
+ foreach ($orderedItems as $item) {
180
+ $pid = $item->getData('product_id');
181
+ $idarray[] = $pid;
182
+ $namearray[] = $item->getData('name');
183
+ $productDisc += $this->getProductDiscount($pid, $item);
184
+ }
185
+
186
+ $orderDiscount = abs($order->getDiscountAmount());
187
+ if ( $productDisc > 0 ) {
188
+ $orderDiscount += $productDisc;
189
+ }
190
+
191
+ $currencyCode = '';
192
+ $currency = $order->getOrderCurrency(); //$order object
193
+ if (is_object($currency)) {
194
+ $currencyCode = $currency->getCurrencyCode();
195
+ }
196
+
197
+ $orderPrice = $currencyCode.' '.(float)$order->getGrandTotal();
198
+ $orderDiscount = $currencyCode.' '.$orderDiscount;
199
+
200
+ $allids = implode(',', $idarray);
201
+ $allnames = implode(',', $namearray);
202
+
203
+ $trackNumber = array();
204
+ $allTrackNumber = '';
205
+ foreach ($order->getTracksCollection() as $track){
206
+ $trackNumber[] = $track->getNumber();
207
+ }
208
+ $allTrackNumber = implode(',', $trackNumber);
209
+
210
+ $allInvoiceNumbers = '';
211
+ if ($order->hasInvoices()) {
212
+ foreach ($order->getInvoiceCollection() as $invoice) {
213
+ $invoiceIncId[] = $invoice->getIncrementId();
214
+ }
215
+ $allInvoiceNumbers = implode(',', $invoiceIncId);
216
+ }
217
+
218
+ $paymentTransactionId = '';
219
+ if (is_object($order->getPayment())) {
220
+ $paymentTransactionId = $order->getPayment()->getLastTransId();
221
+ }
222
+
223
+ $smsbody = str_replace('{Firstname}', $custFirstName, $smsbody);
224
+ $smsbody = str_replace('{Lastname}', $custLastName, $smsbody);
225
+ $smsbody = str_replace('{Email}', $email, $smsbody);
226
+ $smsbody = str_replace('{Mobile}', $mobile, $smsbody);
227
+ $smsbody = str_replace('{Order ID}', $incrementId, $smsbody);
228
+ $smsbody = str_replace('{Transaction ID}', $paymentTransactionId, $smsbody);
229
+ $smsbody = str_replace('{Tracking ID}', $allTrackNumber, $smsbody);
230
+ $smsbody = str_replace('{Invoice}', $allInvoiceNumbers, $smsbody);
231
+ $smsbody = str_replace('{Price}', $orderPrice, $smsbody);
232
+ $smsbody = str_replace('{Discount}', $orderDiscount, $smsbody);
233
+ $smsbody = str_replace('{Shipping_Address}', $shippingAddress, $smsbody);
234
+ $smsbody = str_replace('{Product ID}', $allids, $smsbody);
235
+ $smsbody = str_replace('{Product Name}', $allnames, $smsbody);
236
+
237
+ return $smsbody;
238
+ }
239
+
240
+ /**
241
+ * calculate product discount
242
+ *
243
+ * @param int $pid
244
+ * @param int $quantity
245
+ *
246
+ * @return float
247
+ */
248
+ public function getProductDiscount($pid, $item)
249
+ {
250
+ $productDisc = 0;
251
+
252
+ $product = Mage::getModel('catalog/product')->load($pid);
253
+ $regularPrice = (float)$product->getPrice();
254
+ $quantity = (int)$item->getData('qty_ordered');
255
+
256
+ if ( $regularPrice > 0 && $quantity > 0 ){
257
+ $salePrice = (float)$item->getData('price');
258
+ if($salePrice > 0){
259
+ $productDisc = ($regularPrice - $salePrice) * $quantity;
260
+ }
261
+ }
262
+ return $productDisc;
263
+ }
264
+
265
+ /**
266
+ * @return string
267
+ */
268
+ public function getUsername()
269
+ {
270
+ return Mage::getStoreConfig('smsservice/credentials/username');
271
+ }
272
+
273
+ /**
274
+ * @return string
275
+ */
276
+ public function getApikey()
277
+ {
278
+ return Mage::getStoreConfig('smsservice/general/sms_onehop_apiKey');
279
+ }
280
+ /**
281
+ * @return string
282
+ */
283
+ public function getAdminMobile()
284
+ {
285
+ return Mage::getStoreConfig('smsservice/mobile/sms_onehop_admin_mobile');
286
+ }
287
+
288
+ /**
289
+ * Get standard config.
290
+ *
291
+ * @return Onehop_SMSService_Model_Config
292
+ */
293
+ protected function _getConfig()
294
+ {
295
+ return Mage::getSingleton('smsservice/config');
296
+ }
297
+
298
+
299
+ /**
300
+ * Get standard helper.
301
+ *
302
+ * @return Onehop_SMSService_Helper_Data
303
+ */
304
+ protected function _helper()
305
+ {
306
+ return Mage::helper('smsservice');
307
+ }
308
+ }
app/code/community/Onehop/SMSService/Model/Sms.php ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * SMS Model
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Model_Sms extends Varien_Object
26
+ {
27
+ /**
28
+ * Store label.
29
+ *
30
+ * @var string
31
+ */
32
+ protected $_label = '';
33
+
34
+ /**
35
+ * Store senderid.
36
+ *
37
+ * @var string
38
+ */
39
+ protected $_senderid = 0;
40
+
41
+ /**
42
+ * Phone number where SMS will be sent.
43
+ *
44
+ * @var int
45
+ */
46
+ protected $_number = '';
47
+
48
+ /**
49
+ * Source source.
50
+ *
51
+ * @var integer
52
+ */
53
+ protected $_source = '';
54
+
55
+ /**
56
+ * ISO2 code of country.
57
+ * This field is optional not all SMS has to filled.
58
+ *
59
+ * @var string
60
+ */
61
+ protected $_country = '';
62
+
63
+ /**
64
+ * Fullmeaning text of SMS, thus without any replacement {{ ... }}.
65
+ *
66
+ * @var string
67
+ */
68
+ protected $_text = '';
69
+
70
+ /**
71
+ * A custom data. Here can be stored a related customer or a related order
72
+ * or whatever you want.
73
+ *
74
+ * @var Varien_Object
75
+ */
76
+ protected $_customData = null;
77
+
78
+ /**
79
+ * @param string $label
80
+ *
81
+ * @return Onehop_SMSService_Model_Sms
82
+ */
83
+ public function setLabel($label)
84
+ {
85
+ $this->_label = $label;
86
+
87
+ return $this;
88
+ }
89
+
90
+ /**
91
+ * Get current type of SMS.
92
+ *
93
+ * @return string
94
+ */
95
+ public function getLabel()
96
+ {
97
+ return $this->_label;
98
+ }
99
+
100
+ /**
101
+ * Set number where SMS will be sent.
102
+ *
103
+ * Number should be max 16 chars length and should
104
+ * contains only digits [0-9].
105
+ *
106
+ * @param string $number
107
+ * @return Onehop_SMSService_Model_Sms
108
+ */
109
+ public function setNumber($number)
110
+ {
111
+ $this->_number = $number;
112
+
113
+ return $this;
114
+ }
115
+
116
+ /**
117
+ * Set number where SMS will be sent.
118
+ *
119
+ * @return string
120
+ */
121
+ public function getNumber()
122
+ {
123
+ return $this->_number;
124
+ }
125
+
126
+ /**
127
+ * Set source number.
128
+ *
129
+ * @param string $source
130
+ * @return Onehop_SMSService_Model_Sms
131
+ */
132
+ public function setSource($source)
133
+ {
134
+ $this->_source = $source;
135
+
136
+ return $this;
137
+ }
138
+
139
+ /**
140
+ * Set source number.
141
+ *
142
+ * @return string
143
+ */
144
+ public function getSource()
145
+ {
146
+ return $this->_source;
147
+ }
148
+
149
+ /**
150
+ * Set country where SMS will be sent.
151
+ *
152
+ * Country code should be ISO2
153
+ *
154
+ * @param string $country
155
+ * @return Onehop_SMSService_Model_Sms
156
+ */
157
+ public function setCountry($country)
158
+ {
159
+ $this->_country = $country;
160
+
161
+ return $this;
162
+ }
163
+
164
+ /**
165
+ * Get country where SMS will be sent.
166
+ *
167
+ * @return string
168
+ */
169
+ public function getCountry()
170
+ {
171
+ return $this->_country;
172
+ }
173
+
174
+ /**
175
+ * Set text of SMS.
176
+ *
177
+ * @param string $text
178
+ * @return Onehop_SMSService_Model_Sms
179
+ */
180
+ public function setText($text)
181
+ {
182
+ $this->_text = $text;
183
+
184
+ return $this;
185
+ }
186
+
187
+ /**
188
+ * Get text of SMS.
189
+ *
190
+ * @return string
191
+ */
192
+ public function getText()
193
+ {
194
+ return $this->_text;
195
+ }
196
+
197
+ /**
198
+ * Set Sender id.
199
+ *
200
+ * @param string $senderId
201
+ * @return Onehop_SMSService_Model_Sms
202
+ */
203
+ public function setSenderId($senderId)
204
+ {
205
+ $this->_senderid = $senderId;
206
+
207
+ return $this;
208
+ }
209
+
210
+ /**
211
+ * Get Sender id.
212
+ *
213
+ * @return string
214
+ */
215
+ public function getSenderId()
216
+ {
217
+ return $this->_senderid;
218
+ }
219
+
220
+ /**
221
+ * Add $data to customData as $key.
222
+ *
223
+ * If there is a data as $key, then data will
224
+ * be overwritten.
225
+ *
226
+ * Method returns $this for kepp the influence interface.
227
+ *
228
+ * @param string $key
229
+ * @param mixed $data
230
+ * @return Onehop_SMSService_Model_Sms
231
+ */
232
+ public function addCustomData($key, $data)
233
+ {
234
+ if (is_null($this->_customData)) {
235
+ $this->_customData = new Varien_Object();
236
+ }
237
+ $this->_customData->setData($key, $data);
238
+
239
+ return $this;
240
+ }
241
+
242
+ /**
243
+ * Get custom data.
244
+ *
245
+ * @return Varien_Object|null
246
+ */
247
+ public function getCustomData($key = null)
248
+ {
249
+ if ($key) {
250
+ $data = $this->_customData->getData($key);
251
+ } else {
252
+ $data = $this->_customData->getData();
253
+ }
254
+ return $data;
255
+ }
256
+ }
app/code/community/Onehop/SMSService/Model/Smsautomation.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * SMS automation Model
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Model_Smsautomation extends Mage_Core_Model_Abstract
26
+ {
27
+ /**
28
+ * Onehop Constructor.
29
+ */
30
+ public function _construct()
31
+ {
32
+ parent::_construct();
33
+ $this->_init('smsservice/smsautomation');
34
+ }
35
+ }
app/code/community/Onehop/SMSService/Model/Smsservice.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * SMSservice Model
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Model_Smsservice extends Mage_Core_Model_Abstract
26
+ {
27
+ /**
28
+ * Onehop Constructor.
29
+ */
30
+ public function _construct()
31
+ {
32
+ parent::_construct();
33
+ $this->_init('smsservice/smsservice');
34
+ }
35
+ }
app/code/community/Onehop/SMSService/Model/Smstemplates.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * SMStemplates Model
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_Model_Smstemplates extends Mage_Core_Model_Abstract
26
+ {
27
+ /**
28
+ * Onehop Constructor.
29
+ */
30
+ public function _construct()
31
+ {
32
+ parent::_construct();
33
+ $this->_init('smsservice/smstemplates');
34
+ }
35
+ }
app/code/community/Onehop/SMSService/Model/System/Config/Source/SmsLabels.php ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Gateway
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+ class Onehop_SMSService_Model_System_Config_Source_SmsLabels
25
+ {
26
+ public static $labelUrl = 'http://api.onehop.co/v1/labels/';
27
+
28
+ /**
29
+ * get label list using lable API URL with valid API Key
30
+ *
31
+ * @return array
32
+ */
33
+ public function getLableslist()
34
+ {
35
+ $config = Mage::getSingleton('smsservice/config');
36
+
37
+ $options = array();
38
+
39
+ $apiKey = $this->getApikey();
40
+
41
+ // No option
42
+ $options[] = array(
43
+ 'value' => '',
44
+ 'label' => Mage::helper('smsservice')->__('Select Label')
45
+ );
46
+
47
+ // Header
48
+ $headers = array(
49
+ 'Accept: ',
50
+ 'apiKey:' . $apiKey
51
+ );
52
+
53
+ // Send request
54
+ $iClient = new Varien_Http_Client();
55
+ $iClient->setUri(self::$labelUrl)
56
+ ->setMethod('GET')
57
+ ->setConfig(array(
58
+ 'maxredirects'=>0,
59
+ 'timeout'=>30,
60
+ ));
61
+ $iClient->setHeaders($headers);
62
+ $response = $iClient->request();
63
+ $output = json_decode($response->getBody());
64
+
65
+ $labelArr = array();
66
+ $labelInfo = array();
67
+ if ($output->labelsList) {
68
+ foreach ($output->labelsList as $labelVal) {
69
+ $options[] = array(
70
+ 'value' => $labelVal,
71
+ 'label' => Mage::helper('smsservice')->__('%s', $labelVal)
72
+ );
73
+ }
74
+ } elseif ($output->message) {
75
+ $options[] = array(
76
+ 'value' => '',
77
+ 'label' => Mage::helper('smsservice')->__('Label not available'),
78
+ 'disabled' => 'disabled'
79
+ );
80
+ }
81
+
82
+ return $options;
83
+ }
84
+
85
+ /**
86
+ * save all values and label of list in $placeholders
87
+ *
88
+ * @return array
89
+ */
90
+ public function getAllPlaceholders()
91
+ {
92
+ $options = array();
93
+ $placeholders = array('Customer Firstname',
94
+ 'Customer Lastname',
95
+ 'Order ID',
96
+ 'Product Name',
97
+ 'Transaction ID',
98
+ 'Invoice');
99
+ // No option
100
+ $options[] = array(
101
+ 'value' => '',
102
+ 'label' => Mage::helper('smsservice')->__('Select Label')
103
+ );
104
+ foreach ($placeholders as $palceVal) {
105
+ $options[] = array(
106
+ 'value' => '{{'.strtolower($palceVal).'}}',
107
+ 'label' => Mage::helper('smsservice')->__('%s', $palceVal)
108
+ );
109
+ }
110
+
111
+ return $options;
112
+ }
113
+ /**
114
+ * retrive API Key from confuguration table
115
+ *
116
+ * @return string
117
+ */
118
+ public function getApikey()
119
+ {
120
+ return Mage::getStoreConfig('smsservice/general/sms_onehop_apiKey');
121
+ }
122
+ }
app/code/community/Onehop/SMSService/Model/System/Config/Source/SmsTemplates.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Gateway
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+ class Onehop_SMSService_Model_System_Config_Source_SmsTemplates
25
+ {
26
+ /**
27
+ * Get templates list
28
+ *
29
+ * @return array
30
+ */
31
+ public function getTemplatesList()
32
+ {
33
+ $config = Mage::getSingleton('smsservice/config');
34
+ $options = array();
35
+
36
+ $tablename = Mage::getSingleton('core/resource')->getTableName('onehop_smstemplates');
37
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
38
+
39
+ $selecttemp = $connection->select()
40
+ ->from(array($tablename), array('smstemplates_id','temp_name'))
41
+ ->order('temp_name');
42
+ $query = $connection->query($selecttemp);
43
+ $template = $query->fetchAll();
44
+
45
+ // No option
46
+ $options[] = array(
47
+ 'value' => '0',
48
+ 'label' => Mage::helper('smsservice')->__('Select Template')
49
+ );
50
+ foreach ($template as $temp) {
51
+ $options[] = array(
52
+ 'value' => $temp['smstemplates_id'],
53
+ 'label' => Mage::helper('smsservice')->__('%s', $temp['temp_name'])
54
+ );
55
+ }
56
+ return $options;
57
+ }
58
+
59
+ /**
60
+ * get single template info
61
+ *
62
+ * @return array
63
+ */
64
+ public function gettemplateInfoByID($templateid)
65
+ {
66
+ $tablename = Mage::getSingleton('core/resource')->getTableName('onehop_smstemplates');
67
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
68
+ $selecttemp = $connection->select()
69
+ ->from(array($tablename), array('*'))
70
+ ->where('smstemplates_id = '. $templateid);
71
+ $query = $connection->query($selecttemp);
72
+ $rows = $query->fetch();
73
+ return $rows;
74
+ }
75
+ /**
76
+ * get template name or template body
77
+ *
78
+ * @param array $templateInfo
79
+ * @param string $fieldname
80
+ *
81
+ * @return string
82
+ */
83
+ public function getTemplateFeilds($templateInfo, $fieldname)
84
+ {
85
+ $returnVal = '';
86
+ if ($fieldname == 'templatename') {
87
+ $returnVal = $templateInfo['temp_name'];
88
+ }
89
+ if ($fieldname == 'templatebody') {
90
+ $returnVal = $templateInfo['temp_body'];
91
+ }
92
+ return $returnVal;
93
+ }
94
+ }
app/code/community/Onehop/SMSService/Model/System/Config/Source/Smsautomation.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Gateway
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+ class Onehop_SMSService_Model_System_Config_Source_Smsautomation
25
+ {
26
+
27
+ /**
28
+ * retrive rule set data from database
29
+ *
30
+ * @return array
31
+ */
32
+ public function getDBsmsAutomation()
33
+ {
34
+ $config = Mage::getSingleton('smsservice/config');
35
+ $tablename = Mage::getSingleton('core/resource')->getTableName('sms_onehop_rulesets');
36
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
37
+
38
+ $selectRules = $connection->select()
39
+ ->from(array($tablename), array('*'));
40
+ $query = $connection->query($selectRules);
41
+ $rows = $query->fetchAll();
42
+
43
+ return $rows;
44
+ }
45
+
46
+ /**
47
+ * get actual data from $mainarray array
48
+ * using $automationkey and $fieldname variables
49
+ *
50
+ * @param array $mainarray
51
+ * @param string $automationkey
52
+ * @param string $fieldname
53
+ *
54
+ * @return string
55
+ */
56
+ public function getValue($mainarray, $automationkey, $fieldname)
57
+ {
58
+ $returnval = '';
59
+ foreach ($mainarray as $automation) {
60
+ if ($automation['rule_name'] == $automationkey) {
61
+ $returnval = $automation[$fieldname];
62
+ break;
63
+ }
64
+ }
65
+ return $returnval;
66
+ }
67
+ }
app/code/community/Onehop/SMSService/controllers/AdminhtmlController.php ADDED
@@ -0,0 +1,584 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Controller
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ class Onehop_SMSService_AdminhtmlController extends Mage_Adminhtml_Controller_Action
26
+ {
27
+ /**
28
+ * Display form for sending a message.
29
+ *
30
+ * If API Key is not configured properly then user
31
+ * will be redirect to configuration page.
32
+ */
33
+ public function indexAction()
34
+ {
35
+ if ($error = $this->_getService()->isvalidAPIKey()) {
36
+ $this->_getSession()->addError($error);
37
+ $this->_redirect('adminhtml/system_config/edit/section/smsservice');
38
+ return;
39
+ }
40
+ $templateid = $this->getRequest()->getParam('templateid');
41
+
42
+ if ($templateid != '') {
43
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
44
+ $tablename = Mage::getSingleton('core/resource')->getTableName('onehop_smstemplates');
45
+ $selectBody = $connection->select()
46
+ ->from(array('template' => $tablename), array('template.temp_body'));
47
+ $prepareQuery = $connection->query($selectBody);
48
+ $gettemplate = $prepareQuery->fetch();
49
+ return $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($gettemplate));
50
+ }
51
+
52
+ $this->loadLayout();
53
+ $this->renderLayout();
54
+ }
55
+
56
+ /**
57
+ * Display list of created templates.
58
+ *
59
+ * If API Key is not configured properly then user
60
+ * will be redirect to configuration page.
61
+ */
62
+ public function templateAction()
63
+ {
64
+ if ($error = $this->_getService()->isvalidAPIKey()) {
65
+ $this->_getSession()->addError($error);
66
+ $this->_redirect('adminhtml/system_config/edit/section/smsservice');
67
+ return;
68
+ }
69
+
70
+ $this->loadLayout();
71
+ $this->renderLayout();
72
+ }
73
+ /**
74
+ * Display Welcome page layout.
75
+ *
76
+ * Add necessasry css and js
77
+ * Show the get started information of onehop on Magento
78
+ */
79
+ public function welcomeAction()
80
+ {
81
+ $this->loadLayout();
82
+ $this->renderLayout();
83
+ }
84
+ /**
85
+ * Display SMS Ruleset settings layout.
86
+ *
87
+ * Retrieve required data from database
88
+ *
89
+ * User can manage ruleset settings from this page
90
+ * If API Key is not configured properly then user
91
+ * will be redirect to configuration page.
92
+ */
93
+ public function automationAction()
94
+ {
95
+ if ($error = $this->_getService()->isvalidAPIKey()) {
96
+ $this->_getSession()->addError($error);
97
+ $this->_redirect('adminhtml/system_config/edit/section/smsservice');
98
+ return;
99
+ }
100
+ $this->loadLayout();
101
+ $this->renderLayout();
102
+ }
103
+ /**
104
+ * Display form for Add Template .
105
+ *
106
+ * If API Key is not configured properly then user
107
+ * will be redirect to configuration page.
108
+ */
109
+ public function addtemplateAction()
110
+ {
111
+ if ($error = $this->_getService()->isvalidAPIKey()) {
112
+ $this->_getSession()->addError($error);
113
+ $this->_redirect('adminhtml/system_config/edit/section/smsservice');
114
+ return;
115
+ }
116
+ $this->loadLayout();
117
+ $this->renderLayout();
118
+ }
119
+ /**
120
+ * Save template data
121
+ *
122
+ * Fetch post data of add template and save to database
123
+ *
124
+ * Will redirect on manage template page after save template
125
+ */
126
+ public function savetemplatesAction()
127
+ {
128
+ $dbwrite = Mage::getSingleton("core/resource")->getConnection("core_write");
129
+ $templatename = $this->getRequest()->getPost('templatename');
130
+ $templatebody = $this->getRequest()->getPost('templatebody');
131
+ $tablename = Mage::getSingleton('core/resource')->getTableName('onehop_smstemplates');
132
+ if ($templatename && $templatebody) {
133
+ $dbwrite->insert($tablename, array("temp_name" => $templatename, "temp_body" => $templatebody, "submitdate" => 'NOW()'));
134
+ }
135
+ $this->_redirect('smsservice/adminhtml/template');
136
+ }
137
+ /**
138
+ * Display form for edit template
139
+ *
140
+ * Retrive data from database by template id
141
+ *
142
+ * If API Key is not configured properly then user
143
+ * will be redirect to configuration page.
144
+ */
145
+ public function edittemplateAction()
146
+ {
147
+ if ($error = $this->_getService()->isvalidAPIKey()) {
148
+ $this->_getSession()->addError($error);
149
+ $this->_redirect('adminhtml/system_config/edit/section/smsservice');
150
+ return;
151
+ }
152
+ $this->loadLayout();
153
+ $this->renderLayout();
154
+ }
155
+ /**
156
+ * Update template data
157
+ *
158
+ * fetch post data and update to database
159
+ *
160
+ * Will redirect on manage template page after update template
161
+ */
162
+ public function updatetemplateAction()
163
+ {
164
+ $dbwrite = Mage::getSingleton("core/resource")->getConnection("core_write");
165
+ $templateid = $this->getRequest()->getPost('templateid');
166
+ $templatename = $this->getRequest()->getPost('templatename');
167
+ $templatebody = $this->getRequest()->getPost('templatebody');
168
+ $tablename = Mage::getSingleton('core/resource')->getTableName('onehop_smstemplates');
169
+
170
+ if ($templateid && $templatename && $templatebody) {
171
+ $Updatequery = "UPDATE " . $tablename . " SET temp_name = :templatename, temp_body = :templatebody WHERE smstemplates_id = '" . $templateid . "'";
172
+ $bindData = array(
173
+ 'templatename' => $templatename,
174
+ 'templatebody' => $templatebody
175
+ );
176
+ $dbwrite->query($Updatequery, $bindData);
177
+ }
178
+ $this->_redirect('smsservice/adminhtml/template');
179
+ }
180
+ /**
181
+ * AJAX callback function for deleting template on template list page.
182
+ */
183
+ public function ajaxdeleteAction()
184
+ {
185
+ $templateid = $this->getRequest()->getParam('smstemplateid');
186
+ $Templatetablename = Mage::getSingleton('core/resource')->getTableName('onehop_smstemplates');
187
+ $rulesettablename = Mage::getSingleton('core/resource')->getTableName('sms_onehop_rulesets');
188
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
189
+ $dbwrite = Mage::getSingleton("core/resource")->getConnection("core_write");
190
+
191
+ $selectrule = $connection->select()
192
+ ->from(array('ruleset' => $rulesettablename), array('ruleset.ruleid'))
193
+ ->where('template = ' . $templateid);
194
+ $isruleset = $connection->query($selectrule);
195
+ $getruleset = $isruleset->fetch();
196
+
197
+ if ($getruleset) {
198
+ $deleArr = array('allready_assigned'=>1);
199
+ } else {
200
+ $dbwrite->delete($Templatetablename, "smstemplates_id = '" . $templateid . "'");
201
+ $deleArr = array('deleted'=>1);
202
+ }
203
+ return $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($deleArr));
204
+ }
205
+ /**
206
+ * Add and update ruleset data
207
+ *
208
+ * Manage validation for all SMS rulesets
209
+ *
210
+ * fetch post data and update to database
211
+ */
212
+ public function saveautomationAction()
213
+ {
214
+ $helper = Mage::helper('smsservice');
215
+ $key = array('orderConfirm','shipmentConfirm','onDelivery','outStock','orderClose');
216
+ $orderbtn = $this->getRequest()->getPost('btnorderconfirm');
217
+ $shipmentbtn = $this->getRequest()->getPost('btnshipmentconfirm');
218
+ $ondeliverybtn = $this->getRequest()->getPost('btnondelivery');
219
+ $outstockbtn = $this->getRequest()->getPost('btnoutstock');
220
+ $orderclosebtn = $this->getRequest()->getPost('btnorderclose');
221
+ $postdata = $this->getRequest()->getPost();
222
+ $errormessage = '';
223
+ $success = false;
224
+
225
+ if ($orderbtn) {
226
+ $success = $this->saveOrderData($postdata, $key[0], $errormessage);
227
+ } else if ($shipmentbtn) {
228
+ $success = $this->saveShipmentData($postdata, $key[1], $errormessage);
229
+ } else if ($ondeliverybtn) {
230
+ $success = $this->saveDeliveryData($postdata, $key[2], $errormessage);
231
+ } else if ($outstockbtn) {
232
+ $success = $this->saveOutStockData($postdata, $key[3], $errormessage);
233
+ } else if ($orderclosebtn) {
234
+ $success = $this->saveOrderCloseData($postdata, $key[4], $errormessage);
235
+ }
236
+ if ($success) {
237
+ $this->_getSession()
238
+ ->addSuccess($helper->__("Rule set saved successfully."));
239
+ } else {
240
+ $this->_getSession()->addError($helper->__($errormessage));
241
+ }
242
+ $this->_redirectReferer();
243
+ }
244
+
245
+ /**
246
+ * save order ruleset
247
+ *
248
+ * @param array $orderdata
249
+ * @param string $key
250
+ * @param string $errormessage
251
+ *
252
+ * @return bool
253
+ */
254
+ public function saveOrderData($orderdata, $key, &$errormessage)
255
+ {
256
+ $orderfeature = $orderdata['orderactivateFeature'];
257
+ $ordertemp = $orderdata['ordersmstemplate'];
258
+ $orderlabel = $orderdata['ordersmslabel'];
259
+ $ordersenderid = $orderdata['ordersenderid'];
260
+ if (!$ordertemp) {
261
+ $errormessage = 'Please select template for order confirmation.';
262
+ return;
263
+ } elseif (!$orderlabel) {
264
+ $errormessage = 'Label is required for order confirmation.';
265
+ return;
266
+ } elseif (!$ordersenderid) {
267
+ $errormessage = 'Sender id is required for order confirmation.';
268
+ return;
269
+ }
270
+
271
+ if ($ordertemp && $orderlabel && $ordersenderid) {
272
+ $orderfeature == '1' ? '1' : '0';
273
+ $orderdataArr['active'] = $orderfeature;
274
+ $orderdataArr['rule_name'] = $key;
275
+ $orderdataArr['template'] = $ordertemp;
276
+ $orderdataArr['label'] = $orderlabel;
277
+ $orderdataArr['senderid'] = $ordersenderid;
278
+
279
+ $isorderConfirm = $this->smsautomationRuleset($orderdataArr);
280
+ if ($isorderConfirm) {
281
+ return true;
282
+ }
283
+ }
284
+ }
285
+
286
+ /**
287
+ * save shipment ruleset
288
+ *
289
+ * @param array $shipmentdata
290
+ * @param string $key
291
+ * @param string $errormessage
292
+ *
293
+ * @return bool
294
+ */
295
+ public function saveShipmentData($shipmentdata, $key, &$errormessage)
296
+ {
297
+ $shipfeature = $shipmentdata['shipactivateFeature'];
298
+ $shiptemp = $shipmentdata['shipsmstemplate'];
299
+ $shiplabel = $shipmentdata['shipsmslabel'];
300
+ $shipsenderid = $shipmentdata['shipsenderid'];
301
+ if (!$shiptemp) {
302
+ $errormessage = 'Please select template for shipment confirmation.';
303
+ return;
304
+ } elseif (!$shiplabel) {
305
+ $errormessage = 'Label is required for shipment confirmation.';
306
+ return;
307
+ } elseif (!$shipsenderid) {
308
+ $errormessage = 'Sender id is required for shipment confirmation.';
309
+ return;
310
+ }
311
+
312
+ if ($shiptemp && $shiplabel && $shipsenderid) {
313
+ $shipfeature == '1' ? '1' : '0';
314
+ $shipdataArr['active'] = $shipfeature;
315
+ $shipdataArr['rule_name'] = $key;
316
+ $shipdataArr['template'] = $shiptemp;
317
+ $shipdataArr['label'] = $shiplabel;
318
+ $shipdataArr['senderid'] = $shipsenderid;
319
+
320
+ $isshipConfirm = $this->smsautomationRuleset($shipdataArr);
321
+ if ($isshipConfirm) {
322
+ return true;
323
+ }
324
+ }
325
+ }
326
+
327
+ /**
328
+ * save ondelivery ruleset
329
+ *
330
+ * @param array $deliverydata
331
+ * @param string $key
332
+ * @param string $errormessage
333
+ *
334
+ * @return bool
335
+ */
336
+ public function saveDeliveryData($deliverydata, $key, &$errormessage)
337
+ {
338
+ $ondeliveryfeature = $deliverydata['deliveryactivateFeature'];
339
+ $ondeliverytemp = $deliverydata['deliverysmstemplate'];
340
+ $ondeliverylabel = $deliverydata['deliverysmslabel'];
341
+ $ondeliverysenderid = $deliverydata['deliverysenderid'];
342
+ if (!$ondeliverytemp) {
343
+ $errormessage = 'Please select template for On Delivery Followups.';
344
+ return;
345
+ } elseif (!$ondeliverylabel) {
346
+ $errormessage = 'Label is required for On Delivery Followups.';
347
+ return;
348
+ } elseif (!$ondeliverysenderid) {
349
+ $errormessage = 'Sender id is required for On Delivery Followups.';
350
+ return;
351
+ }
352
+
353
+ if ($ondeliverytemp && $ondeliverylabel && $ondeliverysenderid) {
354
+ $ondeliveryfeature == '1' ? '1' : '0';
355
+ $ondeliverydataArr['active'] = $ondeliveryfeature;
356
+ $ondeliverydataArr['rule_name'] = $key;
357
+ $ondeliverydataArr['template'] = $ondeliverytemp;
358
+ $ondeliverydataArr['label'] = $ondeliverylabel;
359
+ $ondeliverydataArr['senderid'] = $ondeliverysenderid;
360
+
361
+ $isonDelivery = $this->smsautomationRuleset($ondeliverydataArr);
362
+ if ($isonDelivery) {
363
+ return true;
364
+ }
365
+ }
366
+ }
367
+
368
+ /**
369
+ * save out of stock ruleset
370
+ *
371
+ * @param array $outstockdata
372
+ * @param string $key
373
+ * @param string $errormessage
374
+ *
375
+ * @return bool
376
+ */
377
+ public function saveOutStockData($outstockdata, $key, &$errormessage)
378
+ {
379
+ $outstockfeature = $outstockdata['outactivateFeature'];
380
+ $outstocktemp = $outstockdata['outsmstemplate'];
381
+ $outstocklabel = $outstockdata['outsmslabel'];
382
+ $outstocksenderid = $outstockdata['outsenderid'];
383
+ $outstockadminmobile = $this->_getService()->getAdminMobile();
384
+ if (!$outstocktemp) {
385
+ $errormessage = 'Please select template for out of stock alerts.';
386
+ return;
387
+ } elseif (!$outstocklabel) {
388
+ $errormessage = 'Label is required for out of stock alerts.';
389
+ return;
390
+ } elseif (!$outstocksenderid) {
391
+ $errormessage = 'Sender id is required for out of stock alerts.';
392
+ return;
393
+ } elseif (!$outstockadminmobile) {
394
+ $errormessage = 'Admin mobile is not set. Please check configuration';
395
+ return;
396
+ }
397
+
398
+ if ($outstocktemp && $outstocklabel && $outstocksenderid && $outstockadminmobile) {
399
+ $outstockfeature == '1' ? '1' : '0';
400
+ $outstockdataArr['active'] = $outstockfeature;
401
+ $outstockdataArr['rule_name'] = $key;
402
+ $outstockdataArr['template'] = $outstocktemp;
403
+ $outstockdataArr['label'] = $outstocklabel;
404
+ $outstockdataArr['senderid'] = $outstocksenderid;
405
+ $outstockdataArr['adminmobile'] = $outstockadminmobile;
406
+
407
+ $isoutStock = $this->smsautomationRuleset($outstockdataArr);
408
+ if ($isoutStock) {
409
+ return true;
410
+ }
411
+ }
412
+ }
413
+
414
+ /**
415
+ * save order close ruleset
416
+ *
417
+ * @param array $ordeclosekdata
418
+ * @param string $key
419
+ * @param string $errormessage
420
+ *
421
+ * @return bool
422
+ */
423
+ public function saveOrderCloseData($ordeclosekdata, $key, &$errormessage)
424
+ {
425
+ $closeorderfeature = $ordeclosekdata['closeactivateFeature'];
426
+ $closeordertemp = $ordeclosekdata['closesmstemplate'];
427
+ $closeorderlabel = $ordeclosekdata['closesmslabel'];
428
+ $closeordersenderid = $ordeclosekdata['closesenderid'];
429
+ if (!$closeordertemp) {
430
+ $errormessage = 'Please select template for order close.';
431
+ return;
432
+ } elseif (!$closeorderlabel) {
433
+ $errormessage = 'Label is required for order close.';
434
+ return;
435
+ } elseif (!$closeordersenderid) {
436
+ $errormessage = 'Sender id is required for order close.';
437
+ return;
438
+ }
439
+
440
+ if ($closeordertemp && $closeorderlabel && $closeordersenderid) {
441
+ $closeorderfeature == '1' ? '1' : '0';
442
+ $closeorderdataArr['active'] = $closeorderfeature;
443
+ $closeorderdataArr['rule_name'] = $key;
444
+ $closeorderdataArr['template'] = $closeordertemp;
445
+ $closeorderdataArr['label'] = $closeorderlabel;
446
+ $closeorderdataArr['senderid'] = $closeordersenderid;
447
+
448
+ $isorderClose = $this->smsautomationRuleset($closeorderdataArr);
449
+ if ($isorderClose) {
450
+ return true;
451
+ }
452
+ }
453
+ }
454
+
455
+ /**
456
+ * Send SMS action.
457
+ *
458
+ * If $text is not defined then action terminates with warning message.
459
+ * If credentials (API key) is not configured properly action
460
+ * terminates with warning message.
461
+ *
462
+ * If all is right then action tries to send SMS to customer number
463
+ */
464
+ public function saveAction()
465
+ {
466
+ $mobilenumber = $this->getRequest()->getParam('mobilenumber');
467
+ $text = $this->getRequest()->getParam('sms_text');
468
+ $senderid = $this->getRequest()->getParam('senderid');
469
+ $smslabel = $this->getRequest()->getParam('smslabel');
470
+ $source = '23000';
471
+ $helper = Mage::helper('smsservice');
472
+ $config = $this->_getConfig();
473
+ $storeId = Mage::app()->getStore()->getId();
474
+ $service = $this->_getService();
475
+
476
+ // check sms text, try to send message without text has no sense
477
+ if (!$text) {
478
+ $this->_getSession()->addError($helper->__('Message text is not defined.'));
479
+ $this->_redirectReferer();
480
+ return;
481
+ }
482
+
483
+ // check credentials
484
+ if ($error = $service->isvalidAPIKey()) {
485
+ $this->_getSession()->addError($error);
486
+ $this->_redirectReferer();
487
+ return;
488
+ }
489
+
490
+ // send SMS
491
+
492
+ $sendSms = Mage::getModel('smsservice/sms');
493
+ $sendSms->setLabel($smslabel);
494
+ $sendSms->setSenderId($senderid);
495
+ $sendSms->setSource($source);
496
+ $sendSms->setNumber($mobilenumber);
497
+ $sendSms->setText($text);
498
+
499
+ if ($service->send($sendSms)) {
500
+ $this->_getSession()->addSuccess($helper->__("SMS sent successfully."));
501
+ } else {
502
+ $this->_getSession()->addError($helper->__("Error comes to send SMS"));
503
+ }
504
+
505
+ $this->_redirectReferer();
506
+ }
507
+
508
+ /**
509
+ * Add, update SMS ruleset data.
510
+ *
511
+ * @param array $ruledataArr
512
+ * @return true value
513
+ */
514
+ protected function smsautomationRuleset($ruledataArr)
515
+ {
516
+
517
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
518
+ $dbwrite = Mage::getSingleton("core/resource")->getConnection("core_write");
519
+
520
+ $tablename = Mage::getSingleton('core/resource')->getTableName('sms_onehop_rulesets');
521
+ $selectRule = $connection->select()
522
+ ->from(array($tablename), array('ruleid'))
523
+ ->where('rule_name = "'.$ruledataArr['rule_name'].'"');
524
+ $isRule = $connection->query($selectRule);
525
+ $getRule = $isRule->fetch();
526
+ if ($getRule) {
527
+ $dbwrite->update($tablename,
528
+ array(
529
+ "template" => $ruledataArr['template'],
530
+ "label" => $ruledataArr['label'],
531
+ "senderid" => $ruledataArr['senderid'],
532
+ "active" => $ruledataArr['active']
533
+ ), "rule_name = '" . $ruledataArr['rule_name'] . "'");
534
+ } else {
535
+ $dbwrite->insert($tablename,
536
+ array(
537
+ "rule_name" => $ruledataArr['rule_name'],
538
+ "template" => $ruledataArr['template'],
539
+ "label" => $ruledataArr['label'],
540
+ "senderid" => $ruledataArr['senderid'],
541
+ "active" => $ruledataArr['active']
542
+ ));
543
+ }
544
+ return true;
545
+ }
546
+ /**
547
+ * Get standard configuration model.
548
+ *
549
+ * @return Onehop_SMSService_Helper_Model_Config
550
+ */
551
+ protected function _getConfig()
552
+ {
553
+ return Mage::getSingleton('smsservice/config');
554
+ }
555
+
556
+ /**
557
+ * Get standard service.
558
+ *
559
+ * @return Onehop_SMSService_Helper_Model_Service
560
+ */
561
+ protected function _getService()
562
+ {
563
+ return Mage::getSingleton('smsservice/service');
564
+ }
565
+
566
+ /**
567
+ * Get backend session.
568
+ *
569
+ * @return Mage_Adminhtml_Model_Session
570
+ */
571
+ protected function _getSession()
572
+ {
573
+ return Mage::getSingleton('adminhtml/session');
574
+ }
575
+
576
+ /**
577
+ * is allowed.
578
+ *
579
+ * @return bool
580
+ */
581
+ public function _isAllowed() {
582
+ return true;
583
+ }
584
+ }
app/code/community/Onehop/SMSService/etc/adminhtml.xml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ /**
3
+ * SMS Service
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/afl-3.0.php
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2013 Onehop s.r.o (http://www.onehop.net/)
14
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
+ */
16
+ -->
17
+ <adminhtml>
18
+ <menu>
19
+ <smsservice translate="title" module="smsservice">
20
+ <title>Onehop SMS Service</title>
21
+ <action>smsservice/adminhtml/welcome</action>
22
+ <sort_order>100</sort_order>
23
+ <children>
24
+ <welcome>
25
+ <title>Welcome</title>
26
+ <action>smsservice/adminhtml/welcome</action>
27
+ <sort_order>10</sort_order>
28
+ </welcome>
29
+ <config>
30
+ <title>Configuration</title>
31
+ <action>adminhtml/system_config/edit/section/smsservice</action>
32
+ <sort_order>20</sort_order>
33
+ </config>
34
+ <send>
35
+ <title>Send SMS</title>
36
+ <action>smsservice/adminhtml/index</action>
37
+ <sort_order>40</sort_order>
38
+ </send>
39
+ <automation>
40
+ <title>SMS Automation</title>
41
+ <action>smsservice/adminhtml/automation</action>
42
+ <sort_order>50</sort_order>
43
+ </automation>
44
+ <template>
45
+ <title>Manage Templates</title>
46
+ <action>smsservice/adminhtml/template</action>
47
+ <sort_order>60</sort_order>
48
+ </template>
49
+ </children>
50
+ </smsservice>
51
+ </menu>
52
+ </adminhtml>
app/code/community/Onehop/SMSService/etc/config.xml ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * SMS Service
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * It is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ *
12
+ * @category Onehop
13
+ * @package Onehop_SMSService
14
+ * @copyright Copyright (c) 2013 Onehop s.r.o (http://www.onehop.net/)
15
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
16
+ */
17
+ -->
18
+ <config>
19
+ <modules>
20
+ <Onehop_SMSService>
21
+ <version>1.0.0</version>
22
+ </Onehop_SMSService>
23
+ </modules>
24
+ <admin>
25
+ <routers>
26
+ <smsservice>
27
+ <use>admin</use>
28
+ <args>
29
+ <module>Onehop_SMSService</module>
30
+ <frontName>smsservice</frontName>
31
+ </args>
32
+ </smsservice>
33
+ </routers>
34
+ </admin>
35
+ <global>
36
+ <blocks>
37
+ <smsservice>
38
+ <class>Onehop_SMSService_Block</class>
39
+ </smsservice>
40
+ </blocks>
41
+ <helpers>
42
+ <smsservice>
43
+ <class>Onehop_SMSService_Helper</class>
44
+ </smsservice>
45
+ </helpers>
46
+ <models>
47
+ <smsservice>
48
+ <class>Onehop_SMSService_Model</class>
49
+ <resourceModel>smsservice_mysql4</resourceModel>
50
+ </smsservice>
51
+ <smsservice_mysql4>
52
+ <class>Onehop_SMSService_Model_Mysql4</class>
53
+ <entities>
54
+ <smsautomation>
55
+ <table>smsautomation</table>
56
+ </smsautomation>
57
+ </entities>
58
+ </smsservice_mysql4>
59
+ </models>
60
+ <resources>
61
+ <smsservice_setup>
62
+ <setup>
63
+ <module>Onehop_SMSService</module>
64
+ </setup>
65
+ <connection>
66
+ <use>core_setup</use>
67
+ </connection>
68
+ </smsservice_setup>
69
+ <smsservice_write>
70
+ <connection>
71
+ <use>core_write</use>
72
+ </connection>
73
+ </smsservice_write>
74
+ <smsservice_read>
75
+ <connection>
76
+ <use>core_read</use>
77
+ </connection>
78
+ </smsservice_read>
79
+ </resources>
80
+ <events>
81
+ <checkout_onepage_controller_success_action>
82
+ <observers>
83
+ <smsservice>
84
+ <type>singleton</type>
85
+ <class>smsservice/observer</class>
86
+ <method>orderSuccess</method>
87
+ </smsservice>
88
+ </observers>
89
+ </checkout_onepage_controller_success_action>
90
+ <sales_order_shipment_save_after>
91
+ <observers>
92
+ <smsservice>
93
+ <type>singleton</type>
94
+ <class>smsservice/observer</class>
95
+ <method>orderShipment</method>
96
+ </smsservice>
97
+ </observers>
98
+ </sales_order_shipment_save_after>
99
+ <sales_order_invoice_save_after>
100
+ <observers>
101
+ <smsservice>
102
+ <type>singleton</type>
103
+ <class>smsservice/observer</class>
104
+ <method>orderComplete</method>
105
+ </smsservice>
106
+ </observers>
107
+ </sales_order_invoice_save_after>
108
+ <cataloginventory_stock_item_save_commit_after>
109
+ <observers>
110
+ <smsservice>
111
+ <type>singleton</type>
112
+ <class>smsservice/observer</class>
113
+ <method>saveProduct</method>
114
+ </smsservice>
115
+ </observers>
116
+ </cataloginventory_stock_item_save_commit_after>
117
+ <sales_order_creditmemo_save_before >
118
+ <observers>
119
+ <smsservice>
120
+ <type>singleton</type>
121
+ <class>smsservice/observer</class>
122
+ <method>orderRefund</method>
123
+ </smsservice>
124
+ </observers>
125
+ </sales_order_creditmemo_save_before >
126
+ <smsservice_error>
127
+ <observers>
128
+ <smsservice>
129
+ <class>smsservice/sms_observer</class>
130
+ <type>singleton</type>
131
+ <method>onError</method>
132
+ </smsservice>
133
+ </observers>
134
+ </smsservice_error>
135
+ </events>
136
+ </global>
137
+ <adminhtml>
138
+ <translate>
139
+ <modules>
140
+ <Onehop_SMSService>
141
+ <files>
142
+ <default>Onehop_SMSService.csv</default>
143
+ </files>
144
+ </Onehop_SMSService>
145
+ </modules>
146
+ </translate>
147
+ <layout>
148
+ <updates>
149
+ <smsservice>
150
+ <file>smsservice.xml</file>
151
+ </smsservice>
152
+ </updates>
153
+ </layout>
154
+ <acl>
155
+ <resources>
156
+ <admin>
157
+ <children>
158
+ <system>
159
+ <children>
160
+ <smsservice translate="title" module="smsservice">
161
+ <title>SMS Service</title>
162
+ <children>
163
+ <send translate="title" module="smsservice">
164
+ <title>Sending SMS</title>
165
+ </send>
166
+ </children>
167
+ </smsservice>
168
+ <config>
169
+ <children>
170
+ <smsservice translate="title" module="smsservice">
171
+ <title>SMS Service</title>
172
+ </smsservice>
173
+ </children>
174
+ </config>
175
+ </children>
176
+ </system>
177
+ </children>
178
+ </admin>
179
+ </resources>
180
+ </acl>
181
+ </adminhtml>
182
+ <default>
183
+ <smsservice>
184
+ <credentials>
185
+ <gateway>onehop</gateway>
186
+ </credentials>
187
+ <general>
188
+ <unicode>0</unicode>
189
+ </general>
190
+ </smsservice>
191
+ </default>
192
+ </config>
app/code/community/Onehop/SMSService/etc/system.xml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <smsmagic module="smsservice" translate="label">
5
+ <label>OneHop SMS Extensions</label>
6
+ <sort_order>600</sort_order>
7
+ <show_in_default>1</show_in_default>
8
+ <show_in_website>0</show_in_website>
9
+ <show_in_store>0</show_in_store>
10
+ </smsmagic>
11
+ </tabs>
12
+ <sections>
13
+ <smsservice translate="label" module="smsservice">
14
+ <class>separator-top</class>
15
+ <label>Onehop SMS Services</label>
16
+ <tab>smsmagic</tab>
17
+ <sort_order>100</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>1</show_in_store>
21
+ <groups>
22
+ <general translate="label" module="smsservice">
23
+ <label>Configuration</label>
24
+ <sort_order>20</sort_order>
25
+ <show_in_default>1</show_in_default>
26
+ <show_in_website>1</show_in_website>
27
+ <show_in_store>1</show_in_store>
28
+ <expanded>1</expanded>
29
+ <fields>
30
+ <sms_onehop_apiKey translate="label">
31
+ <label>apiKey</label>
32
+ <frontend_type>text</frontend_type>
33
+ <validate>required-entry</validate>
34
+ <backend_model>smsservice/configvalidation</backend_model>
35
+ <comment>The API Key is used to authenticate in order to send SMS.</comment>
36
+ <sort_order>20</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>0</show_in_website>
39
+ <show_in_store>0</show_in_store>
40
+ </sms_onehop_apiKey>
41
+ </fields>
42
+ </general>
43
+ <mobile translate="label" module="smsservice">
44
+ <label>Admin Mobile</label>
45
+ <sort_order>40</sort_order>
46
+ <show_in_default>1</show_in_default>
47
+ <show_in_website>1</show_in_website>
48
+ <show_in_store>1</show_in_store>
49
+ <expanded>1</expanded>
50
+ <fields>
51
+ <sms_onehop_admin_mobile translate="label">
52
+ <label>Admin Mobile</label>
53
+ <frontend_type>text</frontend_type>
54
+ <validate>required-entry validate-length maximum-length-10 minimum-length-10 validate-digits</validate>
55
+ <sort_order>40</sort_order>
56
+ <show_in_default>1</show_in_default>
57
+ <show_in_website>0</show_in_website>
58
+ <show_in_store>0</show_in_store>
59
+ </sms_onehop_admin_mobile>
60
+ </fields>
61
+ </mobile>
62
+ </groups>
63
+ </smsservice >
64
+ </sections>
65
+ </config>
app/code/community/Onehop/SMSService/sql/smsservice_setup/mysql4-install-1.0.0.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @category Onehop
5
+ * @package Onehop_SMSService
6
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
8
+ */
9
+
10
+
11
+ $installer = $this;
12
+
13
+ $installer->startSetup();
14
+ Mage::helper('smsservice/mysql4_install')->prepareForDb();
15
+
16
+ Mage::helper('smsservice/mysql4_install')->attemptQuery($installer, "
17
+ DROP TABLE IF EXISTS {$this->getTable('onehop_smstemplates')};
18
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('onehop_smstemplates')}` (
19
+ `smstemplates_id` int(10) NOT NULL auto_increment,
20
+ `temp_name` varchar(50) NOT NULL,
21
+ `temp_body` varchar(500) NOT NULL,
22
+ `submitdate` datetime,
23
+ PRIMARY KEY (`smstemplates_id`)
24
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
25
+
26
+ DROP TABLE IF EXISTS {$this->getTable('sms_onehop_rulesets')};
27
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('sms_onehop_rulesets')}` (
28
+ `ruleid` int(10) NOT NULL auto_increment,
29
+ `rule_name` varchar(50) NOT NULL,
30
+ `template` int(10) NOT NULL,
31
+ `label` varchar(50) NOT NULL,
32
+ `senderid` varchar(50) NOT NULL,
33
+ `active` enum('1', '0') default 1,
34
+ PRIMARY KEY (`ruleid`)
35
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
36
+ ");
37
+
38
+ Mage::helper('smsservice/mysql4_install')
39
+ ->createInstallNotice("Onehop SMSService was installed successfully.",
40
+ "Onehop SMSService has been installed successfully. Go to the system configuration
41
+ section of your Magento admin to configure Onehop SMSService and
42
+ get it up and running.");
43
+
44
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/smsservice.xml ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * SMS Service
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * It is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ *
12
+ * @category Onehop
13
+ * @package Onehop_SMSService
14
+ * @copyright Copyright (c) 2013 Onehop s.r.o (http://www.onehop.net/)
15
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
16
+ */
17
+ -->
18
+ <layout version="1.0.0">
19
+ <!--
20
+ Default layout, loads most of the pages
21
+ -->
22
+
23
+ <smsservice_adminhtml_index>
24
+ <reference name="head">
25
+ <action method="addJs"><script>onehop/onehop.js</script></action>
26
+ <action method="addCss"><name>onehop/css/smsservice.css</name></action>
27
+ </reference>
28
+ <reference name="content">
29
+ <block type="smsservice/adminhtml_send" name="smsservice" >
30
+ <block type="smsservice/adminhtml_send_form" name="form" />
31
+ </block>
32
+ </reference>
33
+ </smsservice_adminhtml_index>
34
+
35
+ <smsservice_adminhtml_template>
36
+ <reference name="head">
37
+ <action method="addCss"><name>onehop/css/smsservice.css</name></action>
38
+ </reference>
39
+ <reference name="content">
40
+ <block type="smsservice/adminhtml_template" name="smsservice" template="onehop/smsservice_templates.phtml"/>
41
+ </reference>
42
+ </smsservice_adminhtml_template>
43
+
44
+ <smsservice_adminhtml_welcome>
45
+ <reference name="head">
46
+ <action method="addJs"><script>onehop/jquery1.11.0.min.js</script></action>
47
+ <action method="addJs"><script>onehop/bootstrap.min.js</script></action>
48
+ <action method="addCss"><name>onehop/css/smsservice.css</name></action>
49
+ <action method="addCss"><name>onehop/css/smsservice_welcome.css</name></action>
50
+ <action method="addCss"><name>onehop/css/bootstrap.min.css</name></action>
51
+ </reference>
52
+ <reference name="content">
53
+ <block type="smsservice/adminhtml_template" name="smsservice" template="onehop/smsservice_welcome.phtml"/>
54
+ </reference>
55
+ </smsservice_adminhtml_welcome>
56
+
57
+ <smsservice_adminhtml_automation>
58
+ <reference name="head">
59
+ <action method="addJs"><script>onehop/onehop.js</script></action>
60
+ <action method="addCss"><name>onehop/css/smsservice.css</name></action>
61
+ </reference>
62
+ <reference name="content">
63
+ <block type="smsservice/adminhtml_smsautomation" name="smsservice" >
64
+ <block type="smsservice/adminhtml_smsautomation_form" name="form" />
65
+ </block>
66
+ </reference>
67
+ </smsservice_adminhtml_automation>
68
+
69
+ <smsservice_adminhtml_addtemplate>
70
+ <reference name="head">
71
+ <action method="addJs"><script>onehop/onehop.js</script></action>
72
+ <action method="addCss"><name>onehop/css/smsservice.css</name></action>
73
+ </reference>
74
+ <reference name="content">
75
+ <block type="smsservice/adminhtml_addtemplate" name="smsservice" >
76
+ <block type="smsservice/adminhtml_addtemplate_form" name="form" />
77
+ </block>
78
+ </reference>
79
+ </smsservice_adminhtml_addtemplate>
80
+
81
+ <smsservice_adminhtml_edittemplate>
82
+ <reference name="head">
83
+ <action method="addCss"><name>onehop/css/smsservice.css</name></action>
84
+ </reference>
85
+ <reference name="content">
86
+ <block type="smsservice/adminhtml_edittemplate" name="smsservice" >
87
+ <block type="smsservice/adminhtml_edittemplate_form" name="form" />
88
+ </block>
89
+ </reference>
90
+ </smsservice_adminhtml_edittemplate>
91
+ </layout>
app/design/adminhtml/default/default/template/onehop/smsservice_templates.phtml ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
14
+ * versions in the future. If you wish to customize Magento for your
15
+ * needs please refer to http://www.magentocommerce.com for more information.
16
+ *
17
+ * @category Onehop
18
+ * @package Onehop_SMSService
19
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
20
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
21
+ */
22
+ ?>
23
+
24
+ <?php
25
+ $tablename = Mage::getSingleton('core/resource')->getTableName('onehop_smstemplates');
26
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
27
+ $query = "Select * from ".$tablename;
28
+ $rows = $connection->fetchAll($query);
29
+ $srno = 1;
30
+ $ajaxdelete = Mage::helper("adminhtml")->getUrl("smsservice/adminhtml/ajaxdelete");
31
+ ?>
32
+ <div class="content-header">
33
+ <h3 class="icon-head head-adminhtml">List of Templates</h3>
34
+
35
+ <a class="sample" href="<?php echo Mage::helper("adminhtml")->getUrl("smsservice/adminhtml/addtemplate"); ?>"><button class="btn btn-default" name="addTemplateBtn" style="float: right;"><span style="font-size: 16px;padding-right: 5px; bold;">+</span>Add Template</button></a>
36
+
37
+ </div>
38
+ <div class="middles">
39
+ <div class="container"><!-- accomodates the section-menu by border width (for IE bug) -->
40
+ <div class="main">
41
+ <div class="content-container"><!-- content positioning -->
42
+ <div class="content"><!-- content presentation -->
43
+ <table width="100%" border="0" class="templatesList">
44
+ <tbody><tr>
45
+ <th>No.</th>
46
+ <th>Template Name</th>
47
+ <th>Edit</th>
48
+ <th>Delete</th>
49
+ </tr>
50
+ <?php foreach($rows as $val) { ?>
51
+ <tr>
52
+ <td><?php echo $srno; ?></td>
53
+ <td><?php echo $val['temp_name']; ?></td>
54
+ <td><a href="javascript:;" onclick="editTemplates(<?php echo $val['smstemplates_id']; ?>)">Edit</a></td>
55
+ <td><a href="javascript:;" id="deleteTemplates" onclick="deleteTemplates(<?php echo $val['smstemplates_id']; ?>)">Delete</a></td>
56
+ </tr>
57
+ <?php $srno++; } ?>
58
+ </tbody></table>
59
+ </div>
60
+ </div>
61
+ <!--[ends] .content-container -->
62
+ </div>
63
+ </div>
64
+ </div>
65
+ <div id="demotest"></div>
66
+ <!--[ends] .middle -->
67
+
68
+ <script type="text/javascript">
69
+ //<![CDATA[
70
+ function deleteTemplates(id) {
71
+ var isConf = confirm("Are you sure to delete this template?");
72
+ if(isConf == true) {
73
+ var deleteUrl = "<?php echo $this->getUrl('smsservice/adminhtml/ajaxdelete/'); ?>";
74
+ if(id > 0) {
75
+ xmlhttp=new XMLHttpRequest();
76
+ xmlhttp.onreadystatechange=function()
77
+ {
78
+ if (xmlhttp.readyState==4 && xmlhttp.status==200)
79
+ {
80
+ var isadded = JSON.parse(xmlhttp.responseText);
81
+
82
+ if(isadded['allready_assigned'] == 1) {
83
+ alert('You can not delete this template because it\'s already assigned in SMS Automation');
84
+ } else {
85
+ alert('Deleted successfully');
86
+ window.location.reload();
87
+ }
88
+ }
89
+ }
90
+ xmlhttp.open("GET",deleteUrl+'smstemplateid/'+id,true);
91
+ xmlhttp.send();
92
+ }
93
+ }
94
+ }
95
+ function editTemplates(id) {
96
+ var editUrl = "<?php echo $this->getUrl('smsservice/adminhtml/edittemplate'); ?>";
97
+ //window.location.href = editUrl+'smstemplateid/'+id;
98
+ window.location.href = editUrl+'smstemplateid/'+id;
99
+ }
100
+ //]]>
101
+ </script>
app/design/adminhtml/default/default/template/onehop/smsservice_welcome.phtml ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
14
+ * versions in the future. If you wish to customize Magento for your
15
+ * needs please refer to http://www.magentocommerce.com for more information.
16
+ *
17
+ * @category Onehop
18
+ * @package Onehop_SMSService
19
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
20
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
21
+ */
22
+ ?>
23
+ <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
24
+ <div class="content-header">
25
+ <h3 class="icon-head head-adminhtml">Welcome</h3>
26
+ </div>
27
+ <div class="middles">
28
+ <div class="welwrapper">
29
+ <div class="container">
30
+ <div class="row">
31
+ <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
32
+ <div class="acc_banner">
33
+ <img alt="Welcome to Onehop" src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/acc_banner.png'); ?>" usemap="#onehopmap" />
34
+ <map name="onehopmap">
35
+ <area shape="rect" coords="500,125,675,200" href="http://www.onehop.co" alt="Onehop.co" target="_blank">
36
+ </map>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ <div class="row">
41
+ <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
42
+ <div class="custom_container">
43
+ <div class="onehop_list">
44
+ <h2>With Onehop on Magento, you can SMS all your:</h2>
45
+ <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
46
+ <ul>
47
+ <li>Order Confirmations</li>
48
+ <li>Shipment Confirmations</li>
49
+ <li>Order Completion</li>
50
+ </ul>
51
+ </div>
52
+
53
+ <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
54
+ <ul>
55
+ <li>Order Closed and Order Refund</li>
56
+ <li>Out of Stock Product Alerts</li>
57
+ <li>Offers & Promotions</li>
58
+ </ul>
59
+ </div>
60
+ </div>
61
+
62
+ <h2 class="acc_title">Get Started with Onehop on Magento</h2>
63
+
64
+ <div class="panel-group" id="accordion">
65
+
66
+ <div class="panel panel-default">
67
+ <div class="panel-heading">
68
+ <h4 class="panel-title">
69
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
70
+ <span class="seq_no">1</span> Sign up on Onehop & Integrate with Magento
71
+ <i class="indicator fa fa-caret-right"></i>
72
+ </a>
73
+ </h4>
74
+ </div>
75
+
76
+ <div id="collapseOne" class="panel-collapse collapse">
77
+ <div class="panel-body">
78
+ <ul class="acc_1_list">
79
+ <li>Go to <span class="stronger">Onehop.co</span> then <span class="stronger">Sign Up</span> or <span class="stronger">Login </span>
80
+ <br />
81
+
82
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/acc_1_1.png'); ?>" />
83
+ </li>
84
+
85
+ <li>After logging into <span class="stronger">Onehop.co</span> click on your <span class="stronger">&lt;User Name&gt;</span> then click on <span class="stronger">Profile</span>
86
+ <br />
87
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/acc_1_2.png'); ?>" />
88
+ </li>
89
+
90
+ <li>On the <span class="stronger">Profile Page</span>, copy the <span class="stronger">API Key;</span><br />
91
+ &lbrace;generate a new API Key if none is present&rbrace;
92
+ <br />
93
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/acc_1_3.png'); ?>" />
94
+ </li>
95
+
96
+ <li>On <span class="stronger">Magento Dashboard</span> go to <span class="stronger">Onehop SMS Services > Configuration</span><br />
97
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/acc_1_4.png'); ?>" />
98
+ </li>
99
+
100
+ </ul>
101
+ </div>
102
+ </div>
103
+ </div>
104
+
105
+
106
+ <div class="panel panel-default">
107
+ <div class="panel-heading">
108
+ <h4 class="panel-title">
109
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
110
+ <span class="seq_no">2</span> Search, Select and Start using SMS on onehop
111
+ <i class="indicator fa fa-caret-right"></i>
112
+ </a>
113
+ </h4>
114
+ </div>
115
+ <div id="collapseTwo" class="panel-collapse collapse">
116
+ <div class="panel-body">
117
+ <ul class="acc_2_list">
118
+ <li>
119
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/acc_2_1.png'); ?>" />
120
+ On <span class="stronger">Onehop.co</span> use the <span class="stronger">Search</span> to find products according to your requirement
121
+ <br />
122
+ </li>
123
+
124
+ <li>
125
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/acc_2_2.png'); ?>" />
126
+ Proceed to <span class="stronger">Checkout</span> and purchase the products you chose
127
+ <br />
128
+ </li>
129
+
130
+ <li>
131
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/acc_2_3.png'); ?>" />
132
+ Find the products purchased in your <span class="stronger">Product Inventory</span> page
133
+ <br />
134
+ </li>
135
+
136
+ <li>
137
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/acc_2_4.png'); ?>" />
138
+ Follow the <span class="stronger">onboarding emails</span> to configure and start using SMS on Onehop
139
+ <br />
140
+ </li>
141
+
142
+
143
+ </ul>
144
+ </div>
145
+ </div>
146
+ </div>
147
+
148
+
149
+ <div class="panel panel-default">
150
+ <div class="panel-heading">
151
+ <h4 class="panel-title">
152
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
153
+ <span class="seq_no">3</span>Send SMS from Magento
154
+ <i class="indicator fa fa-caret-right"></i>
155
+ </a>
156
+ </h4>
157
+ </div>
158
+
159
+ <div id="collapseThree" class="panel-collapse collapse">
160
+ <div class="panel-body">
161
+ <p class="acc_3_data">
162
+ Upon configuring your API key in the Configuration tab,
163
+ you will notice these additional tabs on the menu screen.
164
+ </p>
165
+
166
+ <ul class="acc_3_list">
167
+ <li>You can send a single SMS using the <span class="stronger">Send SMS</span> tab on the menu screen.</li>
168
+ <li>You can add, edit or delete templates with placeholder texts using <span class="stronger">Manage Templates</span> tab</li>
169
+ <li>Set automated rules for sending SMS with <span class="stronger">SMS Automation</span> tab</li>
170
+ </ul>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ </div>
175
+ <div class="onehop_docs">
176
+ <h2 class="acc_title productdoc_title">Product Documentation</h2>
177
+ <ul class="download_sec">
178
+ <li>
179
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/pdf_icon.png'); ?>" />
180
+ <a href="http://onehop.co/blog/wp-content/uploads/Userguide_Onehop_on_Magento.pdf" target="_blank">Onehop for Magento user guide</a> </li>
181
+ <li>
182
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/pdf_icon.png'); ?>" />
183
+ <a href="http://onehop.co/blog/wp-content/uploads/Onehop_User_Manual.pdf" target="_blank">Onehop marketplace guide book</a></li>
184
+ <li>
185
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('onehop/images/pdf_icon.png'); ?>" />
186
+ <a href="http://onehop.co/docs/v1/" target="_blank">API documentation for custom development</a></li>
187
+ </ul>
188
+ </div>
189
+ </div>
190
+ </div>
191
+ </div>
192
+
193
+ </div>
194
+ </div>
195
+ </div>
196
+ <!--[ends] .middle -->
197
+ <script type="text/javascript">
198
+ //<![CDATA[
199
+ var $j = jQuery.noConflict();
200
+ function toggleInstructions(e) {
201
+ $j(e.target)
202
+ .prev('.panel-heading')
203
+ .find("i.indicator")
204
+ .toggleClass('fa-caret-down fa-caret-right');
205
+ }
206
+ $j('#accordion').on('hidden.bs.collapse', toggleInstructions);
207
+ $j('#accordion').on('shown.bs.collapse', toggleInstructions);
208
+ //]]>
209
+ </script>
app/etc/modules/Onehop_SMSService.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Onehop_SMSService>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Onehop_SMSService>
8
+ </modules>
9
+ </config>
js/onehop/bootstrap.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
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
+ if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f+', [role="menu"], [role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.2.0",c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(c.$body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one("bsTransitionEnd",function(){c.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(300):c.$element.trigger("focus").trigger(e)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;if(this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;e?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(150):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var f=function(){c.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",f).emulateTransitionEnd(150):f()}else b&&b()},c.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.2.0",c.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}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var c=a.contains(document.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!c)return;var d=this,e=this.tip(),f=this.getUID(this.type);this.setContent(),e.attr("id",f),this.$element.attr("aria-describedby",f),this.options.animation&&e.addClass("fade");var g="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,h=/\s?auto?\s?/i,i=h.test(g);i&&(g=g.replace(h,"")||"top"),e.detach().css({top:0,left:0,display:"block"}).addClass(g).data("bs."+this.type,this),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var j=this.getPosition(),k=e[0].offsetWidth,l=e[0].offsetHeight;if(i){var m=g,n=this.$element.parent(),o=this.getPosition(n);g="bottom"==g&&j.top+j.height+l-o.scroll>o.height?"top":"top"==g&&j.top-o.scroll-l<0?"bottom":"right"==g&&j.right+k>o.width?"left":"left"==g&&j.left-k<o.left?"right":g,e.removeClass(m).addClass(g)}var p=this.getCalculatedOffset(g,j,k,l);this.applyPlacement(p,g);var q=function(){d.$element.trigger("shown.bs."+d.type),d.hoverState=null};a.support.transition&&this.$tip.hasClass("fade")?e.one("bsTransitionEnd",q).emulateTransitionEnd(150):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=k.left?2*k.left-e+i:2*k.top-f+j,m=k.left?"left":"top",n=k.left?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(l,d[0][n],m)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.removeAttr("aria-describedby"),this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one("bsTransitionEnd",b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName;return a.extend({},"function"==typeof c.getBoundingClientRect?c.getBoundingClientRect():null,{scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop(),width:d?a(window).width():b.outerWidth(),height:d?a(window).height():b.outerHeight()},d?{top:0,left:0}:b.offset())},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.2.0",c.DEFAULTS=a.extend({},a.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>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").empty()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.2.0",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.2.0",c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.closest("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},c.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one("bsTransitionEnd",e).emulateTransitionEnd(150):e(),f.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(c){c.preventDefault(),b.call(a(this),"show")})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.2.0",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=a(document).height(),d=this.$target.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=b-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:b-this.$element.height()-h}))}}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},d.offsetBottom&&(d.offset.bottom=d.offsetBottom),d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
js/onehop/jquery1.11.0.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*! jQuery v1.11.0 | (c) 2005, 2014 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="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,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=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.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},n.extend=n.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||n.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&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.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(l.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&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},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=s(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:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.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=s(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),n.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||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=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)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(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 mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(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 typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.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},z=b?function(a,b){if(a===b)return j=!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===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.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=db.selectors={cacheLength:50,createPseudo:fb,match:V,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(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===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]||db.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]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(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(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.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+" ").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(),t=!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&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&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]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)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&&(t&&((l[s]||(l[s]={}))[a]=[u,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()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(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),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?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===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.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 X.test(a.nodeName)},input:function(a){return W.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:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(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]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[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?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;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=[u,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[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(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 sb(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 tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(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?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.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]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(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}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(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&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.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){n.each(b,function(b,c){var d=n.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&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.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},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.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?n.extend(a,d):d}},e={};return d.pipe=d.then,n.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&&n.isFunction(a.promise)?e:0,g=1===f?a:n.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]&&n.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 I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.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()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f
3
+ }}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.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=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.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 n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.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=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(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},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.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?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.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]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.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||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.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)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.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=((n.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?n(c,this).index(i)>=0:n.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[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),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||z,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!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.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]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._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 n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.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=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.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,n(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=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={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:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._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++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.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)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.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),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).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=xb(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=xb(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?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.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 n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(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,n.cleanData(vb(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,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.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+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.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 Mb(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=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.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 Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.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 Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(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+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.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=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.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=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)
4
+ },a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,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||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):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):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.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,n.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 gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.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=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.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],bc.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]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.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 lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),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:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.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(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.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)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._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=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.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)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.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})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.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=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.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||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.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}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.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 n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={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}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.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||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.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=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.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(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.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(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._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(vc," ").indexOf(b)>=0)return!0;return!1}}),n.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){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.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 wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.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||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.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 Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.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 Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(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 Qc(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}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.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=Dc.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||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.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]?", "+Kc+"; 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=Nc(Jc,k,b,v)){v.readyState=1,h&&m.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=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.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&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(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(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;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 Yc[g],b=void 0,f.onreadystatechange=n.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=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.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 ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.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,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.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,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(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"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.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?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
js/onehop/onehop.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function getTemplate(){
2
+ var templateid = document.getElementById("smstemplate").value;
3
+ var currentLocation = window.location;
4
+ document.getElementById("sms_text").value = '';
5
+ if(templateid > 0) {
6
+ document.getElementById("sms_text").value = 'Loading template body...';
7
+ xmlhttp=new XMLHttpRequest();
8
+ xmlhttp.onreadystatechange=function()
9
+ {
10
+ if (xmlhttp.readyState==4 && xmlhttp.status==200)
11
+ {
12
+ //document.getElementById("sms_text").innerHTML=xmlhttp.responseText;
13
+ var templatebody = JSON.parse(xmlhttp.responseText);
14
+ document.getElementById("sms_text").value=templatebody['temp_body'];
15
+ }
16
+ }
17
+ xmlhttp.open("GET",currentLocation+"templateid/"+templateid,true);
18
+ xmlhttp.send();
19
+ }
20
+ }
lib/Onehop/SMSService/onehopservice.php ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * PHP other library
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+
25
+ /**
26
+ * Allows simple access to ONEHOP SMS Services API
27
+ */
28
+ class OnehopService
29
+ {
30
+ /**
31
+ * ONEHOP SMS Service API URL
32
+ */
33
+ public static $serviceUrl = 'http://api.onehop.co/v1/sms/send/';
34
+
35
+ /**
36
+ * to push error messange
37
+ *
38
+ * @var array
39
+ */
40
+ public $errors = array();
41
+
42
+ /**
43
+ *
44
+ * @var array
45
+ */
46
+
47
+ public static $instance = null;
48
+
49
+ /**
50
+ * public constructor for singleton pattern
51
+ */
52
+ public function __construct()
53
+ {
54
+
55
+ }
56
+
57
+ /**
58
+ * Returns a singleton instance of OnehopService class
59
+ */
60
+ public static function getInstance()
61
+ {
62
+ if (is_null(self::$instance)) {
63
+ self::$instance = new OnehopService();
64
+ }
65
+
66
+ return self::$instance;
67
+ }
68
+
69
+ /**
70
+ * Adds error to the list of errors
71
+ */
72
+ protected function setError($error)
73
+ {
74
+ $this->errors[] = $error;
75
+ }
76
+
77
+ /**
78
+ * Returns the last error message
79
+ */
80
+ public function getError()
81
+ {
82
+ return end($this->errors);
83
+ }
84
+
85
+ /**
86
+ * Returns all the errors concatenated with the $newline string
87
+ */
88
+ public function getErrors($newline = "\n")
89
+ {
90
+ return implode($newline, $this->errors);
91
+ }
92
+
93
+ /**
94
+ * Sends an SMS message from user's account
95
+ *
96
+ * @param string $username SMS Service API username
97
+ * @param string $apiKey SMS Service API key
98
+ * @param string $to Recipient phone number in international format, max 16 characters, no spaces and no leading plus or zeroes
99
+ * @param string $text Text of the message have 700 characters limit for typing message. we are displayed left characters count underneath of message
100
+ * message box. uesr not be able to write more than 700 characters.
101
+ * @return bool True on success or false on error
102
+ */
103
+ public function sendMessage($apiKey, $to, $text, $label, $senderid, $source)
104
+ {
105
+ if (empty($apiKey) || empty($to) || empty($text) || empty($label) || empty($senderid)) {
106
+ $this->setError('Some parameters are not set.');
107
+ return false;
108
+ }
109
+
110
+ // Fix the phone number
111
+ $to = ltrim($to, '+0');
112
+ $to = str_replace(' ', '', $to);
113
+
114
+ // Validate the phone number
115
+ if ((strlen($to) > 16)) {
116
+ $this->setError('Invalid phone number format.');
117
+ return false;
118
+ }
119
+ // Header
120
+ $headers = array(
121
+ 'Accept: ',
122
+ 'apiKey:' . $apiKey
123
+ );
124
+ // Prepare request
125
+ $data = array(
126
+ 'label' => $label,
127
+ 'sms_text' => $text,
128
+ 'source' => $source,
129
+ 'sender_id' => $senderid,
130
+ 'mobile_number' => $to
131
+ );
132
+
133
+ // Send request
134
+ $iClient = new Varien_Http_Client();
135
+ $iClient->setUri(self::$serviceUrl)
136
+ ->setMethod('POST')
137
+ ->setConfig(array(
138
+ 'maxredirects'=>0,
139
+ 'timeout'=>30,
140
+ ));
141
+ $iClient->setHeaders($headers);
142
+ $iClient->setRawData(json_encode(array(
143
+ 'label' => $label,
144
+ 'sms_text' => $text,
145
+ 'source' => $source,
146
+ 'sender_id' => $senderid,
147
+ 'mobile_number' => $to
148
+ )), "application/json;charset=UTF-8");
149
+ $response = $iClient->request();
150
+
151
+ $output = json_decode($response->getBody());
152
+
153
+ if ($output->status != 'submitted' || !$output) {
154
+ $this->setError('Could not send the SMS.');
155
+ return false;
156
+ }
157
+ // Message sent successfully
158
+ return true;
159
+ }
160
+ }
lib/Varien/Data/Form/Element/Selectonehop.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Enhanced select
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+ class Varien_Data_Form_Element_Selectonehop extends Varien_Data_Form_Element_Select
25
+ {
26
+ /* public function __construct($attributes=array())
27
+ {
28
+ parent::__construct($attributes);
29
+ $this->setType('select');
30
+ $this->setExtType('combobox');
31
+ $this->_prepareOptions();
32
+ }*/
33
+
34
+ protected function _prepareOptions()
35
+ {
36
+ $values = $this->getValues();
37
+ if (empty($values)) {
38
+ $options = $this->getOptions();
39
+
40
+ if (is_array($options)) {
41
+ $values = array();
42
+ foreach ($options as $value => $label) {
43
+ $values[] = $label;
44
+ }
45
+ } elseif (is_string($options)) {
46
+ $values = array( array('value' => $options, 'label' => $options) );
47
+ }
48
+ $this->setValues($values);
49
+ }
50
+ }
51
+ public function getHtmlAttributes()
52
+ {
53
+ return array('title', 'class', 'style', 'onclick', 'onchange', 'disabled', 'readonly', 'tabindex');
54
+ }
55
+ public function getElementHtml()
56
+ {
57
+ $this->addClass('select');
58
+ $html = '<select id="'.$this->getHtmlId().'" name="'.$this->getName().'" '
59
+ .$this->serialize($this->getHtmlAttributes()).'>'."\n";
60
+
61
+ $value = $this->getValue();
62
+ if (!is_array($value)) {
63
+ $value = array($value);
64
+ }
65
+
66
+ if ($values = $this->getValues()) {
67
+ foreach ($values as $key => $option) {
68
+ if (is_array($option['value'])) {
69
+ $html.='<optgroup label="'.$option['label'].'">'."\n";
70
+ foreach ($option['value'] as $groupItem) {
71
+ $html.= $this->_optionToHtml($groupItem, $value);
72
+ }
73
+ $html.='</optgroup>'."\n";
74
+ } else {
75
+ $html.= $this->_optionToHtml($option, $value);
76
+ }
77
+ }
78
+ }
79
+
80
+ $html.= '</select>'."\n";
81
+ $html.= $this->getAfterElementHtml();
82
+ return $html;
83
+ }
84
+
85
+ protected function _optionToHtml($option, $selected)
86
+ {
87
+ if (is_array($option['value'])) {
88
+ $html ='<optgroup label="'.$option['label'].'">'."\n";
89
+ foreach ($option['value'] as $groupItem) {
90
+ $html .= $this->_optionToHtml($groupItem, $selected);
91
+ }
92
+ $html .='</optgroup>'."\n";
93
+ } else {
94
+ $html = '<option value="'.$this->_escape($option['value']).'"';
95
+ $html.= isset($option['title']) ? 'title="'.$this->_escape($option['title']).'"' : '';
96
+ $html.= isset($option['style']) ? 'style="'.$option['style'].'"' : '';
97
+ $html.= isset($option['disabled']) ? 'disabled="'.$option['disabled'].'"' : '';
98
+ if (in_array($option['value'], $selected)) {
99
+ $html.= ' selected="selected"';
100
+ }
101
+ $html.= '>'.$this->_escape($option['label']). '</option>'."\n";
102
+ }
103
+ return $html;
104
+ }
105
+ }
lib/Varien/Data/Form/Element/Smsservicetextarea.php ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SMS SMSService
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (GPL2)
8
+ * It is available through the world-wide-web at this URL:
9
+ * https://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * @category Onehop
12
+ * @package Onehop_SMSService
13
+ * @copyright Copyright (c) 2016 Onehop (http://www.onehop.co)
14
+ * @license https://www.gnu.org/licenses/gpl-2.0.html Open Software License (GPL2)
15
+ */
16
+
17
+ /**
18
+ * Form text element
19
+ *
20
+ * @category Onehop
21
+ * @package Onehop_SMSService
22
+ * @author Screen-Magic Mobile Media Inc. (info@onehop.co)
23
+ */
24
+ class Varien_Data_Form_Element_Smsservicetextarea extends Varien_Data_Form_Element_Textarea
25
+ {
26
+ /**
27
+ * Oneho Constructor
28
+ *
29
+ * @param array $attributes
30
+ */
31
+ public function __construct($attributes = array())
32
+ {
33
+ parent::__construct($attributes);
34
+ $this->setType('textarea');
35
+ $this->setExtType('textarea');
36
+ $this->setRows(2);
37
+ $this->setCols(20);
38
+ }
39
+
40
+ /**
41
+ *
42
+ * @return string
43
+ */
44
+ public function getName()
45
+ {
46
+ $form = $this->getForm();
47
+
48
+ if ($form && $suffix = $this->getForm()->getFieldNameSuffix()) {
49
+ $name = $this->getForm()->addSuffixToName($name, $suffix);
50
+ } else {
51
+ $name = $this->getData('name');
52
+ }
53
+ return $name;
54
+ }
55
+
56
+ /**
57
+ *
58
+ * @return string
59
+ */
60
+ public function getHtmlId()
61
+ {
62
+ $form = $this->getForm();
63
+
64
+ if ($form) {
65
+ return $form->getHtmlIdPrefix() . $this->getData('html_id') . $form->getHtmlIdSuffix();
66
+ } else {
67
+ return $this->getData('html_id');
68
+ }
69
+ }
70
+ /**
71
+ * @return array
72
+ */
73
+ public function getHtmlAttributes()
74
+ {
75
+ return array('title',
76
+ 'class',
77
+ 'style',
78
+ 'onclick',
79
+ 'onchange',
80
+ 'rows',
81
+ 'cols',
82
+ 'readonly',
83
+ 'disabled',
84
+ 'onkeyup',
85
+ 'tabindex');
86
+ }
87
+ /**
88
+ * generate html for textarea field
89
+ *
90
+ * Add js functions
91
+ *
92
+ * @return string
93
+ */
94
+ public function getElementHtml()
95
+ {
96
+ $helper = Mage::helper('smsservice');
97
+
98
+ $conurl = Mage::helper("adminhtml")->getUrl('adminhtml/system_config/edit/section/smsservice');
99
+
100
+ $allowedUnicode = (int) Mage::getSingleton('smsservice/config')->isUnicodeAllowed();
101
+
102
+ $id = $this->getHtmlId();
103
+ $remain = $this->getHtmlId().'-remain';
104
+ $chars = $this->getHtmlId().'-chars';
105
+ $messages = $this->getHtmlId().'-messages';
106
+
107
+ $selPlacehoder = array('Customer','Order','Product');
108
+
109
+ $this->addClass('textarea');
110
+ $html = '';
111
+
112
+ $html .= '<p class="button-bar">';
113
+
114
+ if ($id == 'templatebody') {
115
+ $html .= '<select name="placeholders" id="placehoders" onchange="getplaceholderVal(this)"
116
+ style="float: left; width: 100px; margin-right: 10px;">';
117
+ $html .= '<option value="">- Select Type -</option>';
118
+ foreach ($selPlacehoder as $val) {
119
+ $html .= '<option value="'.strtolower($val).'">'.$val.'</option>';
120
+ }
121
+ $html .= '</select>';
122
+ $html .= '<select name="placeholders" id="templateplaceholder" style="width:170px;">';
123
+ $html .= '<option value="">Select Placeholder</option>';
124
+ $html .= '</select>';
125
+ $html .= '<span style="margin-left:10px;">
126
+ <a href="javascript:void(0)" onclick="insertPlaceholder()"
127
+ class="insertbtn" title="'.$helper->__('Insert').'" >Insert</a></span>';
128
+ }
129
+
130
+ $html .= '</p>';
131
+ $html .= '<textarea id="'.$id.'" name="'.$this->getName().'" '
132
+ .$this->serialize($this->getHtmlAttributes()).' maxlength="700">';
133
+ $html .= $this->getEscapedValue();
134
+ $html .= "</textarea> <br>";
135
+ $html .= '<span class=""><b>You can write upto 700 characters.</b></span> <br>';
136
+ $html .= '<span id="count"></span> ';
137
+ $html .= $this->getAfterElementHtml();
138
+
139
+ $html .= "
140
+ <script type=\"text/javascript\">
141
+ //<![CDATA[
142
+ document.getElementById('$id').onkeyup = function () {
143
+ document.getElementById('count').innerHTML = 'Characters left: <b>' + (700 - this.value.length) + '</b>';
144
+ };
145
+ function getplaceholderVal(gettype) {
146
+ var selectedText = gettype.options[gettype.selectedIndex].innerHTML;
147
+ var selectedValue = gettype.value;
148
+ if(selectedValue == 'customer') {
149
+ var placeholderValues = ['Firstname', 'Lastname', 'Email', 'Mobile'];
150
+ } else if(selectedValue == 'order') {
151
+ var placeholderValues = ['Order ID',
152
+ 'Transaction ID',
153
+ 'Tracking ID',
154
+ 'Invoice',
155
+ 'Price',
156
+ 'Discount',
157
+ 'Shipping_Address'];
158
+ } else if(selectedValue == 'product') {
159
+ var placeholderValues = ['Product ID', 'Product Name'];
160
+ } else {
161
+ var placeholderValues = [];
162
+ }
163
+ var select = document.getElementById('templateplaceholder');
164
+ select.innerHTML = '';
165
+ if(placeholderValues.length > 0) {
166
+ for(var i = 0; i < placeholderValues.length; i++)
167
+ {
168
+ if(i == 0)
169
+ {
170
+ var opt = 'Select Placeholder';
171
+ var optVal = '';
172
+ var el = document.createElement('option');
173
+ el.textContent = opt;
174
+ el.value = '';
175
+ select.appendChild(el);
176
+ }
177
+ var opt = placeholderValues[i];
178
+ var optVal = placeholderValues[i];
179
+ var el = document.createElement('option');
180
+ el.textContent = opt;
181
+ el.value = '{'+optVal+'}';
182
+ select.appendChild(el);
183
+ }
184
+ } else {
185
+ var opt = 'Select Placeholder';
186
+ var optVal = '';
187
+ var el = document.createElement('option');
188
+ el.textContent = opt;
189
+ el.value = '';
190
+ select.appendChild(el);
191
+ }
192
+ }
193
+ function typeInTextarea(el, newText) {
194
+ var myTextarea = document.getElementById('$id');
195
+ myTextarea.value += newText;
196
+ }
197
+ function insertPlaceholder() {
198
+ var charlimit = document.getElementById('$id').value;
199
+ var e = document.getElementById('templateplaceholder');
200
+ var Placestr = e.options[e.selectedIndex].value;
201
+ var PlaceholderAddLength = charlimit.length+Placestr.length;
202
+ if(PlaceholderAddLength > 700) {
203
+ document.getElementById('count').innerHTML = 'Characters left: <b>' + (700 - charlimit.length) + '</b> You can not insert this placeholder because this placeholder have more characters than which you have left.';
204
+ } else {
205
+ document.getElementById('count').innerHTML = 'Characters left: <b>' + (700 - PlaceholderAddLength) + '</b>';
206
+ typeInTextarea($('textarea'), Placestr)
207
+ }
208
+ }
209
+ //]]>
210
+ </script>";
211
+
212
+ return $html;
213
+ }
214
+ }
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Onehop_SMSService</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://onehop.co/">GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Easily Send SMSes on Magento. Search, Compare and Buy the best SMS products. Switch providers with one click using Labels.</summary>
10
+ <description>Easily Send SMSes on Magento. Search, Compare and Buy the best SMS products. Switch providers with one click using Labels.</description>
11
+ <notes>This is a SMS Service extension.</notes>
12
+ <authors><author><name>Screen-Magic Mobile Media Inc</name><user>Onehop</user><email>info@onehop.com</email></author></authors>
13
+ <date>2016-08-19</date>
14
+ <time>10:05:19</time>
15
+ <contents><target name="magecommunity"><dir name="Onehop"><dir name="SMSService"><dir name="Block"><dir name="Adminhtml"><dir name="Addtemplate"><file name="Form.php" hash="d01ba75cac914b6003d70a694465ff88"/></dir><file name="Addtemplate.php" hash="8b045047ba0705c82f0830cda0e86df2"/><dir name="Data"><dir name="Form"><dir name="Element"><file name="Ondelivery.php" hash="a7faaf68fdfe3e3f08d631cb05a25695"/><file name="Orderclose.php" hash="0e3e40b85e960a9f8814b99fb97d4768"/><file name="Orderconfirm.php" hash="0401be03038284f677783b35b0495c98"/><file name="Shipmentconfirm.php" hash="71c21a9d7489d0fa87f02a350dfd21de"/></dir></dir></dir><dir name="Edittemplate"><file name="Form.php" hash="2668fc1584c6b954eea7a05cbb1fcd93"/></dir><file name="Edittemplate.php" hash="ee080be9f9f4938e49a71bcdda69e1ec"/><dir name="Send"><file name="Form.php" hash="ee8803be24c29e6e4a9401bd38ad6ec6"/></dir><file name="Send.php" hash="1f0949c399a41888350cfdcb8174f664"/><dir name="Smsautomation"><file name="Form.php" hash="e9dee75f5a6f3b3b6da82da516cf7fe5"/></dir><file name="Smsautomation.php" hash="81b2547e8ce63585b60245b6ce379c51"/><file name="Template.php" hash="ebe6b80b49130d1fe42b08f42a8f8667"/></dir></dir><dir name="Helper"><file name="Data.php" hash="a43728a99eb04abe1172f70fe355e01b"/><dir name="Mysql4"><file name="Install.php" hash="1d710965f7cd15a88110d801a131f9a8"/></dir></dir><dir name="Model"><file name="Config.php" hash="9493e985a7628272bf032f87ac7818a8"/><file name="Configvalidation.php" hash="4363d1b2faa5231431252bd63b496a9e"/><dir name="Mysql4"><file name="Setup.php" hash="46f689f072a1bd47e90b23019696a710"/></dir><file name="Observer.php" hash="5092c79c266303f55dcc00fef6d0fcdc"/><file name="Service.php" hash="25388c90e1c5f7675132895eaf7f8b6b"/><file name="Sms.php" hash="e3ff6c83b48995eab64263fc9f46939b"/><file name="Smsautomation.php" hash="3731cff74b9cf17c2d64ee200fdf5aa5"/><file name="Smsservice.php" hash="2d56bb58e7b052b84b91790c12ac8c4d"/><file name="Smstemplates.php" hash="a779ded650e262e7a0bc626f8027be0f"/><dir name="System"><dir name="Config"><dir name="Source"><file name="SmsLabels.php" hash="6b9be2dde6423e1a7a24a464e7ef4b39"/><file name="SmsTemplates.php" hash="0b51f9ec8c6a897cf7a4b4e7628aba7d"/><file name="Smsautomation.php" hash="749acadd45bbaf366766e50593c28387"/></dir></dir></dir></dir><dir name="controllers"><file name="AdminhtmlController.php" hash="d1a781b986c01ae78e66455aeb15d64c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0276d91899427b112c0e37f7049cbf3d"/><file name="config.xml" hash="64f756436f0679bfa1a550c50f6b7366"/><file name="system.xml" hash="8287bde376ab19ff959e96c7383e573a"/></dir><dir name="sql"><dir name="smsservice_setup"><file name="mysql4-install-1.0.0.php" hash="02971e068eb86ac361816cb45a78b391"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Onehop_SMSService.xml" hash="749fcc93b3a4e82412030318b723fa53"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="smsservice.xml" hash="f87f816b2ed04ab915a8b5e4b19cea66"/></dir><dir name="template"><dir name="onehop"><file name="smsservice_templates.phtml" hash="23ced6dda299fbde6b7a4ac0e3e27ebd"/><file name="smsservice_welcome.phtml" hash="2656f0450e8338f8ea1602cd5f7e3956"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Onehop"><dir name="SMSService"><file name="onehopservice.php" hash="69b446fb0f04ab6729689ce8d8db468d"/></dir></dir><dir name="Varien"><dir name="Data"><dir name="Form"><dir name="Element"><file name="Selectonehop.php" hash="bc055bb6ad86919aba6aa4a5da711f07"/><file name="Smsservicetextarea.php" hash="0e9e121ca0671e2fbc767e80a6b57de4"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="onehop"><dir name="css"><file name="bootstrap.min.css" hash="0f90338b723b8e68136aeb1f87f0ffc7"/><file name="smsservice.css" hash="8cfb5119815e97d4582fc56ba9549884"/><file name="smsservice_welcome.css" hash="ca48e0327e6bdf7ea0bf1733df9f21ee"/></dir><dir name="images"><file name="acc_1_1.png" hash="b798368587fcb04734cfa754e33f17fe"/><file name="acc_1_2.png" hash="95619b2b5976537c9f6de7193e9cfe9d"/><file name="acc_1_3.png" hash="3d21af8a2172b5cd9ec5372cc99a21bb"/><file name="acc_1_4.png" hash="dd84544d45263272094348ec89972f82"/><file name="acc_2_1.png" hash="09053795a020483e8d3b5d01b8efb44c"/><file name="acc_2_2.png" hash="c08392541fa2017b2f4f4c5726c36db6"/><file name="acc_2_3.png" hash="e6cbdf6a30c65cfd8762458c08db2572"/><file name="acc_2_4.png" hash="a0b0c57a192e5d0fcb9a9aec134fb552"/><file name="acc_banner.png" hash="c8f5aa29dbbd4e24e5dca726beaaa90f"/><file name="bullet.png" hash="476aeabbd9952716833733243094be0f"/><file name="caret.png" hash="7e8d4246610a836d4049921375a2fed5"/><file name="email_icon.png" hash="4dfbed753e9309d56d82786a6d70327f"/><file name="list_bg.png" hash="49b4b3666812bcfd0199679c5a766429"/><file name="pdf_icon.png" hash="6ae67743f21491ac761ad44e7e4841be"/><file name="phone_icon.png" hash="c616a0bf63bdd4a545d24273eb274eac"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="onehop"><file name="bootstrap.min.js" hash="abda843684d022f3bc22bc83927fe05f"/><file name="jquery1.11.0.min.js" hash="eaec1712551cd2792f4607f39fab12e7"/><file name="onehop.js" hash="d15eae3a0b05fa60012210846aaf0b0b"/></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.0.0</min><max>8.0.0</max></php></required></dependencies>
18
+ </package>
skin/adminhtml/default/default/onehop/css/bootstrap.min.css ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
3
+ * Copyright 2011-2015 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#ea7601;text-decoration:underline}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{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);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);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);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{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);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);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)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{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);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);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)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{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);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);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)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{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);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);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)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
6
+ /*# sourceMappingURL=bootstrap.min.css.map */
skin/adminhtml/default/default/onehop/css/smsservice.css ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .icon-Smsmagicsmsservice:before, .icon-Smsmagicsmsservice:before { content: "\f0e0"; }
2
+ .anchorbutton{ border:1px solid #ccc; padding:5px; text-decoration: none !important;}
3
+ .activeSMSmenu {background: #fff none repeat scroll 0 0;border: 1px solid green;color: green !important;text-decoration: none !important;}
4
+ .screen_magic_wrapper {
5
+ background: #ffffff none repeat scroll 0 0;
6
+ border: 1px solid #cccccc;
7
+ border-radius: 5px;
8
+ margin: 15px 0 10px;
9
+ padding: 25px 20px;
10
+ }
11
+
12
+ .oneHop_wrapper{
13
+ background: rgb(255, 255, 255) none repeat scroll 0% 0%;
14
+ border: 1px solid rgb(204, 204, 204);
15
+ border-radius: 5px;
16
+ padding: 10px;
17
+ overflow: auto;
18
+ margin-top: 15px;
19
+ }
20
+
21
+ .div_fields {
22
+ margin-bottom: 1%;
23
+ }
24
+ .div_fields label {
25
+ float: left;
26
+ width: 20%;
27
+ }
28
+ .templatesList th, td{
29
+ padding : 5px;
30
+ }
31
+ .template_form {
32
+ float: left;
33
+ width: 55%;
34
+ }
35
+ .templatesList tr:nth-child(odd) {
36
+ background-color: #F9F9F9;
37
+ }
38
+ .templatesList {
39
+ margin-top: 10px;
40
+ }
41
+ .clearboth{
42
+ clear:both;
43
+ }
44
+ .smsediticon{
45
+ font-size: 20px;
46
+ }
47
+ .smstemplatebtn {
48
+ background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
49
+ border: medium none;
50
+ }
51
+ .smsRequired{
52
+ color: #ff0000;
53
+ }
54
+ /*.sms-form input[type='text'], .sms-form textarea{
55
+ width: 60%;
56
+ }*/
57
+ .sms-form select{
58
+ width: auto;
59
+ min-width: 20%;
60
+ }
61
+ #manage_sms select{
62
+ width: auto;
63
+ min-width: 15.5%;
64
+ }
65
+ .formdescription{
66
+ font-style: italic;
67
+ margin-left: 20%;
68
+ }
69
+
70
+ /* Lagends CSS */
71
+ .template_legends
72
+ {
73
+ float: left;
74
+ width: 45%;
75
+ }
76
+ .lagendTabs {
77
+ background-color: #f5f8f9;
78
+ border: 1px solid #cccccc;
79
+ list-style: outside none none;
80
+ padding: 0;
81
+ }
82
+ .lagendTabs label {
83
+ width: 50%;
84
+ }
85
+ .lagendTabs > li:first-child {
86
+ background-color: #eff1f2;
87
+ font-weight: bold;
88
+ padding: 5px 0;
89
+ text-align: center;
90
+ text-transform: uppercase;
91
+ }
92
+ .lagendTabs > li {
93
+ border-bottom: 1px solid #cccccc;
94
+ padding: 5px 10px;
95
+ }
96
+ /* added at 23 May */
97
+ .form-wrapper
98
+ {
99
+ font-size: 13px;
100
+ }
101
+ .form-wrapper ul
102
+ {
103
+ margin-top: 5px;
104
+ }
105
+ .form-wrapper span
106
+ {
107
+ font-weight: bold;
108
+ }
109
+ .anchorbutton{
110
+ border:1px solid #3DABC1;background:#3DABC1; color: #fff !important;border-top-left-radius:5px; border-top-right-radius:5px; padding:5px 10px; text-decoration: none !important;
111
+ }
112
+ .activeSMSmenu
113
+ {
114
+ background: #236977;
115
+ border:1px solid #236977;
116
+ }
117
+ .bootstrap li
118
+ {
119
+ line-height: 30px;
120
+ }
121
+ .bootstrap .alert
122
+ {
123
+ margin-bottom: 10px;
124
+ }
125
+ .bootstrap .form-horizontal .control-label
126
+ {
127
+ text-align: left;
128
+ }
129
+ #SEND_SMS_API
130
+ {
131
+ width: 350px;
132
+ }
133
+ .panel-footer [class^="process-icon-"]
134
+ {
135
+ font-size: 16px;
136
+ display: inline;
137
+ padding-right: 5px;
138
+ }
139
+ .bootstrap .panel-footer .btn.btn-default, .bootstrap .panel-footer .btn-default:focus,
140
+ .bootstrap .btn-default
141
+ {
142
+ background: #268FA4;
143
+ border: 1px solid #268FA4;
144
+ font-size: 14px;
145
+ color: #fff;
146
+ }
147
+ .bootstrap .panel-footer .btn.btn-default:hover,
148
+ .bootstrap .btn-default:hover, .bootstrap .btn-default:focus
149
+ {
150
+ border: 1px solid #1B7F93 !important;
151
+ background: #1B7F93 !important;
152
+ color: #fff;
153
+ }
154
+ .bootstrap .panel-footer .btn.btn-default i
155
+ {
156
+ color: #fff;
157
+ }
158
+ .bootstrap .panel-footer .pull-right {
159
+ float: left !important;
160
+ }
161
+ .bootstrap .panel .panel-footer
162
+ {
163
+ height: 50px;
164
+ }
165
+ .automation_text
166
+ {
167
+ width: 200px !important;
168
+ }
169
+ .sms-form input[type='text'],
170
+ .sms-form textarea
171
+ {
172
+ width: 400px; /*madhuri*/
173
+ }
174
+ .bootstrap a, .icon-edit
175
+ {
176
+ color: #268FA4;
177
+ }
178
+ .lagendTabs td
179
+ {
180
+ border: 1px solid #ccc;
181
+ }
182
+ .lagendTabs tr:first-child td
183
+ {
184
+ background: #F1F1F1;
185
+ }
186
+ .header_row td, .header_td
187
+ {
188
+ background: #E6E6E6;
189
+ }
190
+ .bootstrap table
191
+ {
192
+ width: 100%;
193
+ }
194
+ .btn.btn-default.dropdown-toggle
195
+ {
196
+ background: #fff;
197
+ }
198
+
199
+ .bootstrap label
200
+ {
201
+ font-weight: normal;
202
+ }
203
+ .lagendTabs h4
204
+ {
205
+ font-size: 13px !important;
206
+ }
207
+ @-moz-document url-prefix()
208
+ {
209
+ .bootstrap .btn.btn-default.dropdown-toggle
210
+ {
211
+ padding: 5px 8px 4px;
212
+ }
213
+ }
214
+ @media (min-width: 1023px) and (max-width: 1025px)
215
+ {
216
+ .template_form
217
+ {
218
+ width: 50%;
219
+ }
220
+ .template_legends
221
+ {
222
+ width: 50%;
223
+ }
224
+ .sms-form input[type='text'],
225
+ .sms-form textarea
226
+ {
227
+ width: 330px; /*madhuri*/
228
+ }
229
+ .template_legends
230
+ {
231
+ font-size: 11px;
232
+ }
233
+ }
234
+ @media (min-width: 1367px)
235
+ {
236
+ .onehopIframe{
237
+ width: 100%;
238
+ }
239
+ }
240
+ .onehopIframe{
241
+ border: none;
242
+ }
243
+ #smsAutomationForms
244
+ {
245
+ margin-top: 15px;
246
+ }
247
+ #configurationform
248
+ {
249
+ margin-top: 15px;
250
+ }
251
+ form .form-wrapper div:first-child label
252
+ {
253
+ width: 100%;
254
+ }
255
+ form .form-wrapper div:first-child label
256
+ {
257
+ width: 100%;
258
+ font-weight: bold;
259
+ }
260
+ #templatetype {
261
+ float: left;
262
+ margin-right: 10px;
263
+ }
264
+ #templateplaceholder {
265
+ float: left;
266
+ }
267
+ .anchorBtn {
268
+ border-radius: 3px;
269
+ float: left;
270
+ margin-left: 10px;
271
+ padding: 4px;
272
+ text-decoration: none !important;
273
+ }
274
+ .module_error.alert.alert-danger {
275
+ margin-top: 15px;
276
+ }
277
+ .defaultForm.form-horizontal {
278
+ margin-top: 15px;
279
+ }
280
+ .module_confirmation.conf.confirm.alert.alert-success {
281
+ margin-top: 15px;
282
+ }
skin/adminhtml/default/default/onehop/css/smsservice_welcome.css ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);
2
+ body{
3
+ font-size: 12px !important;
4
+ }
5
+
6
+ .welwrapper {
7
+ height: 100%;
8
+ width: 100%;
9
+ position: relative;
10
+ font-family: 'Source Sans Pro', sans-serif;
11
+ line-height: 1.42857143;
12
+ font-weight: normal;
13
+ background-color: #fff;
14
+ }
15
+
16
+ .welwrapper .container {
17
+ max-width: 800px;
18
+ margin: auto;
19
+ }
20
+
21
+ .acc_banner {
22
+ width: 800px;
23
+ display: block;
24
+ margin: 0px auto;
25
+ position: relative;
26
+ background: #f4fcfc;
27
+ }
28
+
29
+ .content {
30
+ width: 800px;
31
+ display: block;
32
+ margin: 0px auto;
33
+ position: relative;
34
+ border: 1px solid #ccc;
35
+ }
36
+
37
+ .content-inner {
38
+ padding: 10px 25px 25px 25px;
39
+ width: 750px;
40
+ }
41
+
42
+ .content h3 {
43
+ font-size: 140%;
44
+ }
45
+
46
+ .welwrapper p {
47
+ font-size: 14px;
48
+ }
49
+
50
+ .welwrapper h1,
51
+ .welwrapper h2,
52
+ .welwrapper h3,
53
+ .welwrapper h4,
54
+ .welwrapper h5,
55
+ .welwrapper h6 {
56
+ font-weight: 500;
57
+ font-family: 'Source Sans Pro', sans-serif;
58
+ }
59
+
60
+ .content ul {
61
+ margin: 0px 0px 15px 0px;
62
+ padding: 0px 0px 0px 15px;
63
+ }
64
+
65
+ .content ul li {
66
+ font-size: 1em;
67
+ list-style: disc;
68
+ margin: 0px 0px 8px 0px;
69
+ }
70
+
71
+ .content ul.subpoints li {
72
+ list-style: circle;
73
+ }
74
+
75
+ .content ul li i {
76
+ font-style: italic;
77
+ }
78
+
79
+ ul,
80
+ li {
81
+ margin: 0;
82
+ padding: 0;
83
+ list-style: none;
84
+ }
85
+
86
+ .welwrapper .custom_container {
87
+ width: 800px;
88
+ margin: 0px auto;
89
+ font-family: 'Source Sans Pro', sans-serif;;
90
+ }
91
+
92
+ .onehop_list {
93
+ background: #f4fcfc;
94
+ overflow: hidden;
95
+ padding: 0 80px;
96
+ font-family: 14px;
97
+ padding-bottom: 30px;
98
+ }
99
+
100
+ .onehop_docs {
101
+ background: #f4fcfc;
102
+ font-family: 14px;
103
+ padding: 10px 0 1px 0;
104
+ margin-bottom: 30px;
105
+ }
106
+
107
+ .onehop_list li {
108
+ background: url(../images/list_bg.png) left center no-repeat;
109
+ padding-left: 30px;
110
+ margin: 10px 0;
111
+ font-size: 18px;
112
+ }
113
+
114
+ .onehop_list h2 {
115
+ color: #f89928;
116
+ text-align: center;
117
+ margin-bottom: 20px;
118
+ font-weight: 700;
119
+ font-size: 27px;
120
+ }
121
+
122
+ h2.acc_title {
123
+ color: #f89928;
124
+ text-align: center;
125
+ margin-bottom: 35px;
126
+ font-weight: 700;
127
+ font-size: 27px;
128
+ }
129
+
130
+ .productdoc_title {
131
+ color: #288e79 !important;
132
+ }
133
+
134
+ .support_title {
135
+ color: #0091b5 !important;
136
+ }
137
+
138
+ .download_sec,
139
+ .contact_info {
140
+ padding: 0 40px 0 50px;
141
+ }
142
+
143
+ .download_sec li {
144
+ margin: 30px 0;
145
+ font-size: 18px;
146
+ }
147
+
148
+ .download_sec li img {
149
+ margin-right: 10px;
150
+ }
151
+
152
+ .download_sec li a {
153
+ color: #000000;
154
+ text-decoration: none;
155
+ }
156
+
157
+ .panel-group {
158
+ padding: 0 40px;
159
+ }
160
+
161
+ .panel-group .panel {
162
+ border: none !important;
163
+ border-radius: 0px !important;
164
+ box-shadow: none !important;
165
+ margin-bottom: 20px;
166
+ }
167
+
168
+ .panel-default > .panel-heading {
169
+ background: none !important;
170
+ border: none !important;
171
+ font-family: 'Source Sans Pro' !important;
172
+ text-transform: capitalize !important;
173
+ color: #236977 !important;
174
+ }
175
+
176
+ .panel-default > .panel-heading + .panel-collapse > .panel-body {
177
+ border: none !important;
178
+ }
179
+
180
+ #accordion .panel-title a {
181
+ color: #236977;
182
+ font-size: 23px;
183
+ text-decoration: none;
184
+ }
185
+
186
+ #accordion .panel-title a .seq_no {
187
+ background: #f89928;
188
+ color: #ffffff;
189
+ border-radius: 50%;
190
+ width: 30px;
191
+ height: 30px;
192
+ display: inline-block;
193
+ text-align: center;
194
+ line-height: 27px;
195
+ margin-right: 20px;
196
+ }
197
+
198
+ #accordion .panel-title a .fa-caret-right, #accordion .panel-title a .fa-caret-down{
199
+ color: #f89928;
200
+ margin-left: 15px;
201
+ vertical-align: middle;
202
+ font-size: 46px !important;
203
+ }
204
+
205
+ .contact_info {
206
+ font-size: 18px;
207
+ color: #000000;
208
+ line-height: 40px;
209
+ margin-bottom: 50px;
210
+ }
211
+
212
+ .contact_info img {
213
+ margin-right: 10px;
214
+ }
215
+
216
+ .acc_1_list li {
217
+ font-size: 17px;
218
+ background: url(../images/bullet.png) left top no-repeat;
219
+ padding-left: 20px;
220
+ }
221
+
222
+ .acc_2_list li {
223
+ font-size: 17px;
224
+ margin: 15px 0;
225
+ }
226
+
227
+ .acc_3_data {
228
+ font-size: 17px;
229
+ }
230
+
231
+ .acc_3_list li {
232
+ font-size: 17px;
233
+ background: url(../images/bullet.png) left center no-repeat;
234
+ padding-left: 20px;
235
+ margin: 20px 0;
236
+ }
237
+
238
+ .stronger {
239
+ font-weight: bold;
240
+ }
241
+
skin/adminhtml/default/default/onehop/images/acc_1_1.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/acc_1_2.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/acc_1_3.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/acc_1_4.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/acc_2_1.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/acc_2_2.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/acc_2_3.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/acc_2_4.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/acc_banner.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/bullet.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/caret.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/email_icon.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/list_bg.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/pdf_icon.png ADDED
Binary file
skin/adminhtml/default/default/onehop/images/phone_icon.png ADDED
Binary file