Plumrocket_Twitter_Facebook_Login - Version 1.0.0

Version Notes

Provide a combination of both Magento Facebook login extension and magento Twitter login extension completely free of charge.

Download this release

Release Info

Developer Plumrocket Team
Extension Plumrocket_Twitter_Facebook_Login
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (49) hide show
  1. app/code/community/Plumrocket/SocialLogin/Block/Buttons.php +122 -0
  2. app/code/community/Plumrocket/SocialLogin/Block/General.php +35 -0
  3. app/code/community/Plumrocket/SocialLogin/Block/Page/Html/Welcome.php +53 -0
  4. app/code/community/Plumrocket/SocialLogin/Block/Share.php +112 -0
  5. app/code/community/Plumrocket/SocialLogin/Block/System/Config/Notinstalled.php +31 -0
  6. app/code/community/Plumrocket/SocialLogin/Block/System/Config/Sortable.php +99 -0
  7. app/code/community/Plumrocket/SocialLogin/Block/System/Config/Version.php +44 -0
  8. app/code/community/Plumrocket/SocialLogin/Helper/Data.php +226 -0
  9. app/code/community/Plumrocket/SocialLogin/Model/Account.php +374 -0
  10. app/code/community/Plumrocket/SocialLogin/Model/Facebook.php +107 -0
  11. app/code/community/Plumrocket/SocialLogin/Model/Mysql4/Account.php +25 -0
  12. app/code/community/Plumrocket/SocialLogin/Model/Mysql4/Account/Collection.php +25 -0
  13. app/code/community/Plumrocket/SocialLogin/Model/Observer.php +104 -0
  14. app/code/community/Plumrocket/SocialLogin/Model/System/Config/Source/Redirectto.php +71 -0
  15. app/code/community/Plumrocket/SocialLogin/Model/System/Config/Source/Shareurl.php +72 -0
  16. app/code/community/Plumrocket/SocialLogin/Model/Twitter.php +211 -0
  17. app/code/community/Plumrocket/SocialLogin/controllers/AccountController.php +172 -0
  18. app/code/community/Plumrocket/SocialLogin/etc/adminhtml.xml +36 -0
  19. app/code/community/Plumrocket/SocialLogin/etc/config.xml +146 -0
  20. app/code/community/Plumrocket/SocialLogin/etc/system.xml +1365 -0
  21. app/code/community/Plumrocket/SocialLogin/sql/pslogin_setup/install-1.0.0.php +62 -0
  22. app/design/adminhtml/default/default/layout/pslogin.xml +22 -0
  23. app/design/adminhtml/default/default/template/pslogin/system/config/sortable.phtml +45 -0
  24. app/design/frontend/base/default/layout/pslogin.xml +52 -0
  25. app/design/frontend/base/default/template/pslogin/checkout/onepage/login.phtml +142 -0
  26. app/design/frontend/base/default/template/pslogin/checkout/onepage/message/fake_email.phtml +28 -0
  27. app/design/frontend/base/default/template/pslogin/customer/form/edit/fake_email.phtml +25 -0
  28. app/design/frontend/base/default/template/pslogin/customer/form/login.phtml +89 -0
  29. app/design/frontend/base/default/template/pslogin/customer/form/login/buttons.phtml +85 -0
  30. app/design/frontend/base/default/template/pslogin/customer/form/register.phtml +173 -0
  31. app/design/frontend/base/default/template/pslogin/customer/form/register/buttons.phtml +74 -0
  32. app/design/frontend/base/default/template/pslogin/customer/form/register/sharedata.phtml +47 -0
  33. app/design/frontend/base/default/template/pslogin/customer/form/register/sharepopup.phtml +44 -0
  34. app/design/frontend/base/default/template/pslogin/page/html/welcome.phtml +24 -0
  35. app/etc/modules/Plumrocket_SocialLogin.xml +15 -0
  36. app/locale/en_US/Plumrocket_SocialLogin.csv +12 -0
  37. package.xml +18 -0
  38. skin/adminhtml/default/default/css/plumrocket/pslogin/pslogin.css +241 -0
  39. skin/adminhtml/default/default/images/plumrocket/pslogin/social_admin.png +0 -0
  40. skin/adminhtml/default/default/js/plumrocket/jquery-1.10.2.min.js +24 -0
  41. skin/adminhtml/default/default/js/plumrocket/pslogin/config.js +108 -0
  42. skin/adminhtml/default/default/js/plumrocket/pslogin/jquery-ui.min.js +7 -0
  43. skin/adminhtml/default/default/js/plumrocket/pslogin/pslogin.js +98 -0
  44. skin/frontend/base/default/css/plumrocket/pslogin/pslogin.css +1241 -0
  45. skin/frontend/base/default/images/plumrocket/pslogin/loader.gif +0 -0
  46. skin/frontend/base/default/images/plumrocket/pslogin/social.png +0 -0
  47. skin/frontend/base/default/images/plumrocket/pslogin/social_retina.png +0 -0
  48. skin/frontend/base/default/js/plumrocket/jquery-1.10.2.min.js +24 -0
  49. skin/frontend/base/default/js/plumrocket/pslogin/pslogin.js +103 -0
app/code/community/Plumrocket/SocialLogin/Block/Buttons.php ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Block_Buttons extends Mage_Core_Block_Template
20
+ {
21
+ protected $_buttons = null;
22
+ protected $_buttonsPrepared = null;
23
+ protected $_loaderImg = 'loader.gif';
24
+
25
+ public function getButtons()
26
+ {
27
+ if (is_null($this->_buttons)) {
28
+ $types = Mage::helper('pslogin')->getTypes();
29
+
30
+ $this->_buttons = array();
31
+ foreach ($types as $type) {
32
+ $type = Mage::getSingleton("pslogin/$type");
33
+ if($type->enabled()) {
34
+ $button = $type->getButton();
35
+ $this->_buttons[ $button['type'] ] = $button;
36
+ }
37
+ }
38
+ }
39
+ return $this->_buttons;
40
+ }
41
+
42
+ public function getPreparedButtons($part = null)
43
+ {
44
+ if(is_null($this->_buttonsPrepared)) {
45
+ $this->_buttonsPrepared = array(
46
+ 'visible' => array(),
47
+ 'hidden' => array()
48
+ );
49
+ $buttons = $this->getButtons();
50
+
51
+ $sortableString = Mage::getStoreConfig('pslogin/general/sortable');
52
+ $sortable = null;
53
+ parse_str($sortableString, $sortable);
54
+
55
+ if(is_array($sortable)) {
56
+ foreach ($sortable as $partName => $partButtons) {
57
+ foreach ($partButtons as $button) {
58
+ if(isset($buttons[$button])) {
59
+ $this->_buttonsPrepared[$partName][] = $buttons[$button];
60
+ unset($buttons[$button]);
61
+ }
62
+ }
63
+ }
64
+
65
+ // If has not sortabled enabled buttons.
66
+ if(!empty($buttons)) {
67
+ if(empty($this->_buttonsPrepared['visible'])) {
68
+ $this->_buttonsPrepared['visible'] = array();
69
+ }
70
+ $this->_buttonsPrepared['visible'] = array_merge($this->_buttonsPrepared['visible'], $buttons);
71
+ }
72
+
73
+ // If visible list is empty.
74
+ if(empty($this->_buttonsPrepared['visible'])) {
75
+ $this->_buttonsPrepared['visible'] = $this->_buttonsPrepared['hidden'];
76
+ $this->_buttonsPrepared['hidden'] = array();
77
+ }
78
+
79
+ // Set visible.
80
+ foreach($this->_buttonsPrepared['visible'] as &$btn) {
81
+ $btn['visible'] = true;
82
+ }
83
+ }
84
+ }
85
+
86
+ return isset($this->_buttonsPrepared[$part]) ?
87
+ $this->_buttonsPrepared[$part] :
88
+ array_merge($this->_buttonsPrepared['visible'], $this->_buttonsPrepared['hidden']);
89
+ }
90
+
91
+ public function hasButtons()
92
+ {
93
+ return (bool)$this->getPreparedButtons();
94
+ }
95
+
96
+ public function showLoginFullButtons()
97
+ {
98
+ $visible = $this->getPreparedButtons('visible');
99
+ return count($visible) <= 3;
100
+ }
101
+
102
+ public function showRegisterFullButtons()
103
+ {
104
+ $all = $this->getPreparedButtons();
105
+ return count($all) <= 6;
106
+ }
107
+
108
+ public function enableForLogin()
109
+ {
110
+ return Mage::helper('pslogin')->moduleEnabled() && Mage::helper('pslogin')->forLoginEnabled();
111
+ }
112
+
113
+ public function enableForRegister()
114
+ {
115
+ return Mage::helper('pslogin')->moduleEnabled() && Mage::helper('pslogin')->forRegisterEnabled();
116
+ }
117
+
118
+ public function getLoaderUrl()
119
+ {
120
+ return Mage::getDesign()->getSkinUrl('images/plumrocket/pslogin/'. $this->_loaderImg);
121
+ }
122
+ }
app/code/community/Plumrocket/SocialLogin/Block/General.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Block_General extends Mage_Core_Block_Template
20
+ {
21
+ protected function _toHtml()
22
+ {
23
+ // Set referer.
24
+ if(!$customerId = Mage::getSingleton('customer/session')->getCustomerId()) {
25
+ $moduleName = $this->getRequest()->getModuleName();
26
+ $skipModules = Mage::helper('pslogin')->getRefererLinkSkipModules();
27
+ if( ($moduleName != 'cms' && $this->getRequest()->getActionName() != 'noRoute') && !in_array($moduleName, $skipModules)) {
28
+ $referer = $this->helper('core/url')->getCurrentBase64Url();
29
+ Mage::helper('pslogin')->refererLink($referer);
30
+ }
31
+ }
32
+
33
+ return parent::_toHtml();
34
+ }
35
+ }
app/code/community/Plumrocket/SocialLogin/Block/Page/Html/Welcome.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Block_Page_Html_Welcome extends Mage_Page_Block_Html_Welcome
20
+ {
21
+
22
+ protected function _toHtml()
23
+ {
24
+ $this->setTemplate('pslogin/page/html/welcome.phtml');
25
+ return Mage_Core_Block_Template::_toHtml();
26
+ }
27
+
28
+ public function getMessage() {
29
+ return parent::_toHtml();
30
+ }
31
+
32
+ public function photoEnabled()
33
+ {
34
+ return Mage::helper('pslogin')->photoEnabled();
35
+ }
36
+
37
+ public function getPhotoPath()
38
+ {
39
+ if(!$customerId = Mage::getSingleton('customer/session')->getCustomerId()) {
40
+ return false;
41
+ }
42
+
43
+ $path = Mage::getBaseDir(Mage_Core_Model_Store::URL_TYPE_MEDIA) . DS .'pslogin'. DS .'photo'. DS . $customerId .'.'. Plumrocket_SocialLogin_Model_Account::PHOTO_FILE_EXT;
44
+ $pathUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) .'pslogin/photo/' . $customerId .'.'. Plumrocket_SocialLogin_Model_Account::PHOTO_FILE_EXT;
45
+
46
+ if(!file_exists($path)) {
47
+ return false;
48
+ }
49
+
50
+ return $pathUrl;
51
+ }
52
+
53
+ }
app/code/community/Plumrocket/SocialLogin/Block/Share.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Block_Share extends Mage_Core_Block_Template
20
+ {
21
+ protected $_share = array(
22
+ 'facebook',
23
+ 'twitter',
24
+ 'google_plusone_share' => 'Google+',
25
+ 'linkedin' => 'LinkedIn',
26
+ 'pinterest',
27
+ 'amazonwishlist' => 'Amazon',
28
+ 'vk' => 'Vkontakte',
29
+ 'odnoklassniki_ru' => 'Odnoklassniki',
30
+ 'mymailru' => 'Mail',
31
+ 'blogger',
32
+ 'delicious',
33
+ 'wordpress',
34
+ );
35
+
36
+ public function showPopup()
37
+ {
38
+ return Mage::helper('pslogin')->showPopup() && Mage::helper('pslogin')->shareEnabled();
39
+ }
40
+
41
+ public function getButtons()
42
+ {
43
+ $buttons = array();
44
+
45
+ $url = urlencode($this->getPageUrl());
46
+ $title = urlencode($this->getTitle());
47
+
48
+ foreach ($this->_share as $key1 => $key2) {
49
+ $key = (!is_numeric($key1)) ? $key1 : $key2;
50
+ $name = ucfirst($key2);
51
+
52
+ $buttons[] = array(
53
+ 'href' => "https://api.addthis.com/oexchange/0.8/forward/{$key}/offer?url={$url}&ct=1&pco=tbxnj-1.0",
54
+ // 'href' => "https://api.addthis.com/oexchange/0.8/forward/{$key}/offer?url={$url}&title={$title}&ct=1&pco=tbxnj-1.0",
55
+ 'image' => "https://cache.addthiscdn.com/icons/v2/thumbs/32x32/{$key}.png",
56
+ 'name' => $name,
57
+ );
58
+ }
59
+
60
+ return $buttons;
61
+ }
62
+
63
+ public function getPageUrl()
64
+ {
65
+ $pageUrl = null;
66
+ $shareData = Mage::helper('pslogin')->getShareData();
67
+
68
+ switch($shareData['page']) {
69
+
70
+ case '__custom__':
71
+ $pageUrl = $shareData['page_link'];
72
+ if (!Mage::helper('pslogin')->isUrlInternal($pageUrl)) {
73
+ $pageUrl = Mage::getBaseUrl() . $pageUrl;
74
+ }
75
+ break;
76
+
77
+ case '__invitations__':
78
+ if(Mage::helper('pslogin')->moduleInvitationsEnabled()) {
79
+ $pageUrl = Mage::helper('invitations')->getRefferalLink();
80
+ }else{
81
+ $pageUrl = Mage::getBaseUrl();
82
+ }
83
+ break;
84
+
85
+ default:
86
+ if(is_numeric($shareData['page'])) {
87
+ $pageUrl = Mage::helper('cms/page')->getPageUrl($shareData['page']);
88
+ }
89
+ }
90
+
91
+ // Disable addsis analytics anchor.
92
+ $pageUrl .= '#';
93
+
94
+ return $pageUrl;
95
+ }
96
+
97
+ public function getTitle()
98
+ {
99
+ $shareData = Mage::helper('pslogin')->getShareData();
100
+ return $shareData['title'];
101
+ }
102
+
103
+ public function getDescription()
104
+ {
105
+ $cms = Mage::helper('cms');
106
+ $process = $cms->getBlockTemplateProcessor();
107
+
108
+ $shareData = Mage::helper('pslogin')->getShareData();
109
+ return $process->filter($shareData['description']);
110
+ }
111
+
112
+ }
app/code/community/Plumrocket/SocialLogin/Block/System/Config/Notinstalled.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Block_System_Config_Notinstalled extends Mage_Adminhtml_Block_System_Config_Form_Field
20
+ {
21
+ public function render(Varien_Data_Form_Element_Abstract $element)
22
+ {
23
+ $moduleNode = Mage::getConfig()->getNode('modules/Plumrocket_SocialLogin');
24
+ $name = $moduleNode->name;
25
+ $url = 'https://store.plumrocket.com/magento-extensions/social-login-pro-magento-extension.html';
26
+
27
+ return '<div class="pslogin-notinstalled" style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">'.
28
+ $this->__('The free version of "%s" extension does not include this network. Please <a href="%s" target="_blank">upgrade to Social Login Pro magento extension</a> in order to receive 50+ social login networks.', $name, $url)
29
+ .'</div>';
30
+ }
31
+ }
app/code/community/Plumrocket/SocialLogin/Block/System/Config/Sortable.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Block_System_Config_Sortable extends Mage_Adminhtml_Block_System_Config_Form_Field
20
+ {
21
+ protected $_buttons = null;
22
+ protected $_buttonsPrepared = null;
23
+
24
+ public function _construct() {
25
+ parent::_construct();
26
+ $this->setTemplate('pslogin/system/config/sortable.phtml');
27
+ return $this;
28
+ }
29
+
30
+ public function render(Varien_Data_Form_Element_Abstract $element)
31
+ {
32
+ // $this->assign('element', $element);
33
+ $this->element = $element;
34
+ return $this->toHtml();
35
+ }
36
+
37
+ public function getButtons()
38
+ {
39
+ if (is_null($this->_buttons)) {
40
+ $types = Mage::helper('pslogin')->getTypes();
41
+
42
+ $this->_buttons = array();
43
+ foreach ($types as $type) {
44
+ $type = Mage::getSingleton("pslogin/$type");
45
+ if($type->enabled()) {
46
+ $button = $type->getButton();
47
+ $this->_buttons[ $button['type'] ] = $button;
48
+ }
49
+ }
50
+ }
51
+ return $this->_buttons;
52
+ }
53
+
54
+ public function getPreparedButtons($part)
55
+ {
56
+ if(is_null($this->_buttonsPrepared)) {
57
+ $this->_buttonsPrepared = array(
58
+ 'visible' => array(),
59
+ 'hidden' => array()
60
+ );
61
+ $buttons = $this->getButtons();
62
+
63
+ $storeName = $this->getRequest()->getParam('store');
64
+ $sortableString = Mage::getStoreConfig('pslogin/general/sortable', $storeName);
65
+ $sortable = null;
66
+ parse_str($sortableString, $sortable);
67
+
68
+ if(is_array($sortable)) {
69
+ foreach ($sortable as $partName => $partButtons) {
70
+ foreach ($partButtons as $button) {
71
+ if(isset($buttons[$button])) {
72
+ $this->_buttonsPrepared[$partName][] = $buttons[$button];
73
+ unset($buttons[$button]);
74
+ }
75
+ }
76
+ }
77
+
78
+ // If has not sortabled enabled buttons.
79
+ if(!empty($buttons)) {
80
+ if(empty($this->_buttonsPrepared['visible'])) {
81
+ $this->_buttonsPrepared['visible'] = array();
82
+ }
83
+ $this->_buttonsPrepared['visible'] = array_merge($this->_buttonsPrepared['visible'], $buttons);
84
+ }
85
+
86
+ // If visible list is empty.
87
+ if(empty($this->_buttonsPrepared['visible'])) {
88
+ $this->_buttonsPrepared['visible'] = $this->_buttonsPrepared['hidden'];
89
+ $this->_buttonsPrepared['hidden'] = array();
90
+ }
91
+
92
+
93
+ }
94
+ }
95
+
96
+ return isset($this->_buttonsPrepared[$part])? $this->_buttonsPrepared[$part] : array();
97
+ }
98
+
99
+ }
app/code/community/Plumrocket/SocialLogin/Block/System/Config/Version.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Block_System_Config_Version extends Mage_Adminhtml_Block_System_Config_Form_Field
20
+ {
21
+ public function render(Varien_Data_Form_Element_Abstract $element)
22
+ {
23
+ $moduleNode = Mage::getConfig()->getNode('modules/Plumrocket_SocialLogin');
24
+ $name = $moduleNode->name;
25
+ $version = $moduleNode->version;
26
+ $wiki = $moduleNode->wiki;
27
+
28
+ return $this->_includeJs() . '<div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">
29
+ '. sprintf('Plumrocket %s v%s was developed by <a href="http://www.plumrocket.com" target="_blank">Plumrocket Inc</a>. For manual &amp; video tutorials please refer to <a href="%s" target="_blank">our online documentation</a>.', $name, $version, $wiki) .'
30
+ </div>';
31
+ }
32
+
33
+ protected function _includeJs()
34
+ {
35
+ $baseJsUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
36
+ $baseSkinUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
37
+
38
+ return '<script type="text/javascript">
39
+ var basePopupPath = "' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . '";
40
+ var basePopupSkinPath = "' . $baseSkinUrl . '";
41
+ var wysiwygEditorPath = "' . Mage::getUrl('adminhtml/catalog_category/wysiwyg') . '";
42
+ </script>';
43
+ }
44
+ }
app/code/community/Plumrocket/SocialLogin/Helper/Data.php ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Helper_Data extends Mage_Core_Helper_Abstract
20
+ {
21
+ const REFERER_QUERY_PARAM_NAME = 'pslogin_referer';
22
+ const SHOW_POPUP_PARAM_NAME = 'pslogin_show_popup';
23
+ const FAKE_EMAIL_PREFIX = 'temp-email-ps';
24
+ const TIME_TO_EDIT = 300;
25
+ const DEBUG_MODE = false;
26
+
27
+ public function moduleEnabled()
28
+ {
29
+ return (bool)Mage::getStoreConfig('pslogin/general/enable');
30
+ }
31
+
32
+ public function validateIgnore()
33
+ {
34
+ return (bool)Mage::getStoreConfig('pslogin/general/validate_ignore');
35
+ }
36
+
37
+ public function getShareData()
38
+ {
39
+ return Mage::getStoreConfig('pslogin/share');
40
+ }
41
+
42
+ public function shareEnabled()
43
+ {
44
+ return $this->moduleEnabled() && Mage::getStoreConfig('pslogin/share/enable');
45
+ }
46
+
47
+ public function forLoginEnabled()
48
+ {
49
+ return (bool)Mage::getStoreConfig('pslogin/general/enable_for_login');
50
+ }
51
+
52
+ public function forRegisterEnabled()
53
+ {
54
+ return (bool)Mage::getStoreConfig('pslogin/general/enable_for_register');
55
+ }
56
+
57
+ public function photoEnabled()
58
+ {
59
+ return $this->moduleEnabled() && Mage::getStoreConfig('pslogin/general/enable_photo');
60
+ }
61
+
62
+ public function isGlobalScope()
63
+ {
64
+ return Mage::getSingleton('customer/customer')->getSharingConfig()->isGlobalScope();
65
+ // return (bool)(Mage::getStoreConfig('customer/account_share/scope') == 0);
66
+ }
67
+
68
+ public function getRedirect()
69
+ {
70
+ return array(
71
+ 'login' => Mage::getStoreConfig('pslogin/general/redirect_for_login'),
72
+ 'login_link' => Mage::getStoreConfig('pslogin/general/redirect_for_login_link'),
73
+ 'register' => Mage::getStoreConfig('pslogin/general/redirect_for_register'),
74
+ 'register_link' => Mage::getStoreConfig('pslogin/general/redirect_for_register_link'),
75
+ );
76
+ }
77
+
78
+ public function getTypes($onlyEnabled = true)
79
+ {
80
+ $groups = Mage::getStoreConfig('pslogin');
81
+ unset(
82
+ $groups['general'],
83
+ $groups['share']
84
+ );
85
+
86
+ $types = array();
87
+ foreach ($groups as $name => $fields) {
88
+ if($onlyEnabled && empty($fields['enable'])) {
89
+ continue;
90
+ }
91
+ $types[] = $name;
92
+ }
93
+
94
+ return $types;
95
+ }
96
+
97
+ public function refererLink($value = false)
98
+ {
99
+ Mage::log(base64_decode($value), null, 'pslogin_referer', true);
100
+ // Core session.
101
+ $session = Mage::getSingleton('core/session');
102
+ $prevValueByCore = $session->getLoginMainRedirectUrl();
103
+
104
+ if($value) {
105
+ $session->setLoginMainRedirectUrl($value);
106
+ }elseif($value === null) {
107
+ $session->unsLoginMainRedirectUrl();
108
+ }
109
+
110
+ // Customer session.
111
+ $session = Mage::getSingleton('customer/session');
112
+ $prevValueByCustomer = $session->getData(self::REFERER_QUERY_PARAM_NAME);
113
+
114
+ if($value) {
115
+ $session->setData(self::REFERER_QUERY_PARAM_NAME, $value);
116
+ }elseif($value === null) {
117
+ $session->unsetData(self::REFERER_QUERY_PARAM_NAME);
118
+ }
119
+
120
+ return $prevValueByCore? $prevValueByCore : $prevValueByCustomer;
121
+ }
122
+
123
+ public function getRefererLinkSkipModules()
124
+ {
125
+ return array('customer', /*'checkout',*/ 'pslogin');
126
+ }
127
+
128
+ public function showPopup($flag = null)
129
+ {
130
+ $session = Mage::getSingleton('customer/session');
131
+ $show = $session->getData(self::SHOW_POPUP_PARAM_NAME);
132
+
133
+ if($flag) {
134
+ $session->setData(self::SHOW_POPUP_PARAM_NAME, true);
135
+ }else{
136
+ $session->unsetData(self::SHOW_POPUP_PARAM_NAME);
137
+ }
138
+
139
+ return $show;
140
+ }
141
+
142
+ public function getRedirectUrl($after = 'login')
143
+ {
144
+ $redirectUrl = null;
145
+ $redirect = $this->getRedirect();
146
+ switch($redirect[$after]) {
147
+
148
+ case '__referer__':
149
+ if(!$referer = Mage::app()->getRequest()->getParam(self::REFERER_QUERY_PARAM_NAME)) {
150
+ $referer = $this->refererLink();
151
+ }
152
+
153
+ if ($referer) {
154
+ // Rebuild referer URL to handle the case when SID was changed
155
+ $referer = Mage::getSingleton('core/url')
156
+ ->getRebuiltUrl( Mage::helper('core')->urlDecode($referer));
157
+ if ($this->isUrlInternal($referer)) {
158
+ $redirectUrl = $referer;
159
+ }
160
+ }else{
161
+ $redirectUrl = Mage::helper('customer')->getDashboardUrl();
162
+ }
163
+ break;
164
+
165
+ case '__custom__':
166
+ $redirectUrl = $redirect["{$after}_link"];
167
+ if (!$this->isUrlInternal($redirectUrl)) {
168
+ $redirectUrl = Mage::getBaseUrl() . $redirectUrl;
169
+ }
170
+ break;
171
+
172
+ case '__dashboard__':
173
+ $redirectUrl = Mage::helper('customer')->getDashboardUrl();
174
+ break;
175
+
176
+ default:
177
+ if(is_numeric($redirect[$after])) {
178
+ $redirectUrl = Mage::helper('cms/page')->getPageUrl($redirect[$after]);
179
+ }
180
+ }
181
+
182
+ return $redirectUrl;
183
+ }
184
+
185
+ public function isUrlInternal($url)
186
+ {
187
+ if (strpos($url, 'http') !== false) {
188
+ /**
189
+ * Url must start from base secure or base unsecure url
190
+ */
191
+ if ((strpos($url, Mage::app()->getStore()->getBaseUrl()) === 0)
192
+ || (strpos($url, Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true)) === 0)
193
+ ) {
194
+ return true;
195
+ }
196
+ }
197
+ return false;
198
+ }
199
+
200
+ public function moduleInvitationsEnabled()
201
+ {
202
+ $hasModule = Mage::helper('core')->isModuleEnabled('Plumrocket_Invitations');
203
+ if($hasModule) {
204
+ return Mage::helper('invitations')->moduleEnabled();
205
+ }
206
+
207
+ return false;
208
+ }
209
+
210
+ public function isFakeMail($email = null)
211
+ {
212
+ if(is_null($email)) {
213
+ $session = Mage::getSingleton('customer/session');
214
+ if($session->isLoggedIn()) {
215
+ $email = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
216
+ }
217
+ }
218
+ return (bool)(strpos($email, self::FAKE_EMAIL_PREFIX) === 0);
219
+ }
220
+
221
+ public function getDebugMode()
222
+ {
223
+ return self::DEBUG_MODE;
224
+ }
225
+
226
+ }
app/code/community/Plumrocket/SocialLogin/Model/Account.php ADDED
@@ -0,0 +1,374 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Model_Account extends Mage_Core_Model_Abstract
20
+ {
21
+ const PHOTO_FILE_EXT = 'png';
22
+
23
+ protected $_type = null;
24
+ protected $_websiteId = null;
25
+ protected $_redirectUri = null;
26
+ protected $_userData = array();
27
+ protected $_passwordLength = 6;
28
+
29
+ protected $_photoDir = null;
30
+ protected $_photoSize = 40;
31
+
32
+ protected $_applicationId = null;
33
+ protected $_secret = null;
34
+ protected $_responseType = 'code';
35
+ protected $_dob = array();
36
+ protected $_gender = array('male', 'female');
37
+
38
+
39
+ public function _construct()
40
+ {
41
+ $this->_init('pslogin/account');
42
+ $this->_websiteId = Mage::app()->getStore()->getWebsiteId();
43
+ $this->_redirectUri = Mage::getBaseUrl() .'pslogin/account/login/type/'. $this->_type;
44
+ $this->_photoDir = Mage::getBaseDir('media') . DS .'pslogin'. DS .'photo';
45
+
46
+ $this->_applicationId = trim(Mage::getStoreConfig('pslogin/'. $this->_type .'/application_id'));
47
+ $this->_secret = trim(Mage::helper('core')->decrypt(Mage::getStoreConfig('pslogin/'. $this->_type .'/secret')));
48
+ }
49
+
50
+ public function enabled()
51
+ {
52
+ return (bool)Mage::getStoreConfig('pslogin/'. $this->_type .'/enable');
53
+ }
54
+
55
+ public function setCustomerIdByUserId($customerId)
56
+ {
57
+ $data = array(
58
+ 'type' => $this->_type,
59
+ 'user_id' => $this->getUserData('user_id'),
60
+ 'customer_id' => $customerId
61
+ );
62
+
63
+ $this->setData($data)->save();
64
+ return $this;
65
+ }
66
+
67
+ public function getCustomerIdByUserId()
68
+ {
69
+ $customerId = $this->_getCustomerIdByUserId();
70
+ if(!$customerId && Mage::helper('pslogin')->isGlobalScope()) {
71
+ $customerId = $this->_getCustomerIdByUserId(true);
72
+ }
73
+
74
+ return $customerId;
75
+ }
76
+
77
+ protected function _getCustomerIdByUserId($useGlobalScope = false)
78
+ {
79
+ $customerId = 0;
80
+
81
+ if($this->getUserData('user_id')) {
82
+ $collection = $this->getCollection()
83
+ ->join(array('ce' => 'customer/entity'), 'ce.entity_id = main_table.customer_id', null)
84
+ ->addFieldToFilter('main_table.type', $this->_type)
85
+ ->addFieldToFilter('main_table.user_id', $this->getUserData('user_id'))
86
+ ->setPageSize(1);
87
+
88
+ if($useGlobalScope == false) {
89
+ $collection->addFieldToFilter('ce.website_id', $this->_websiteId);
90
+ }
91
+
92
+ $customerId = $collection->getFirstItem()->getData('customer_id');
93
+ }
94
+
95
+ return $customerId;
96
+ }
97
+
98
+ public function getCustomerIdByEmail()
99
+ {
100
+ $customerId = $this->_getCustomerIdByEmail();
101
+ if(!$customerId && Mage::helper('pslogin')->isGlobalScope()) {
102
+ $customerId = $this->_getCustomerIdByEmail(true);
103
+ }
104
+ return $customerId;
105
+ }
106
+
107
+ protected function _getCustomerIdByEmail($useGlobalScope = false)
108
+ {
109
+ $customerId = 0;
110
+
111
+ if(is_string($this->getUserData('email'))) {
112
+ $collection = Mage::getSingleton('customer/customer')->getCollection()
113
+ ->addFieldToFilter('email', $this->getUserData('email'))
114
+ ->setPageSize(1);
115
+
116
+ if($useGlobalScope == false) {
117
+ $collection->addFieldToFilter('website_id', $this->_websiteId);
118
+ }
119
+
120
+ $customerId = $collection->getFirstItem()->getId();
121
+ }
122
+
123
+ return $customerId;
124
+ }
125
+
126
+ public function registrationCustomer()
127
+ {
128
+ $customerId = 0;
129
+ $errors = array();
130
+ $customer = Mage::getSingleton('customer/customer')->setId(null);
131
+
132
+ try{
133
+ $customer->setData($this->getUserData())
134
+ ->setConfirmation($this->getUserData('password'))
135
+ ->setData('is_active', 1)
136
+ ->getGroupId();
137
+
138
+ if(!Mage::helper('pslogin')->isFakeMail( $this->getUserData('email') )) {
139
+ $customer->setIsSubscribed(1);
140
+ }
141
+
142
+ $errors = $this->_validateErrors($customer);
143
+
144
+ // If email is not valid, always error.
145
+ $correctEmail = Zend_Validate::is($this->getUserData('email'), 'EmailAddress');
146
+
147
+ if( (empty($errors) || Mage::helper('pslogin')->validateIgnore()) && $correctEmail) {
148
+ $customerId = $customer->save()->getId();
149
+ }
150
+ } catch (Exception $e) {
151
+ $errors[] = $e->getMessage();
152
+ }
153
+
154
+ $this->setCustomer($customer);
155
+ $this->setErrors($errors);
156
+
157
+ return $customerId;
158
+ }
159
+
160
+ protected function _validateErrors($customer)
161
+ {
162
+ $errors = array();
163
+
164
+ // Date of birth.
165
+ $entityType = Mage::getSingleton('eav/config')->getEntityType('customer');
166
+ $attribute = Mage::getModel('customer/attribute')->loadByCode($entityType, 'dob');
167
+ if($attribute->getIsRequired() && $this->getUserData('dob') && !Zend_Validate::is($this->getUserData('dob'), 'Date')) {
168
+ $errors[] = Mage::helper('pslogin')->__('The Date of Birth is not correct.');
169
+ }
170
+
171
+ if(true !== ($customerErrors = $customer->validate())) {
172
+ $errors = array_merge($customerErrors, $errors);
173
+ }
174
+
175
+ return $errors;
176
+ }
177
+
178
+ public function getResponseType()
179
+ {
180
+ return $this->_responseType;
181
+ }
182
+
183
+ public function setUserData($key, $value = null)
184
+ {
185
+ if(is_array($key)) {
186
+ $this->_userData = array_merge($this->_userData, $key);
187
+ }else{
188
+ $this->_userData[$key] = $value;
189
+ }
190
+ return $this;
191
+ }
192
+
193
+ public function getUserData($key = null)
194
+ {
195
+ if($key !== null) {
196
+ return isset($this->_userData[$key]) ? $this->_userData[$key] : null;
197
+ }
198
+ return $this->_userData;
199
+ }
200
+
201
+ protected function _call($url, $params = null)
202
+ {
203
+ $result = null;
204
+ if(is_array($params) && $params) {
205
+ $url = $url .'?'. urldecode(http_build_query($params));
206
+ }elseif($params) {
207
+ $url = $url .'?'. urldecode($params);
208
+ }
209
+
210
+ try {
211
+ $result = file_get_contents($url);
212
+ } catch (Exception $e) {}
213
+
214
+ return $result;
215
+ }
216
+
217
+ protected function _prepareData(array $data)
218
+ {
219
+ $_data = array();
220
+ foreach ($this->_fields as $customerField => $userField) {
221
+ $_data[$customerField] = ($userField && isset($data[$userField])) ? $data[$userField] : null;
222
+ }
223
+
224
+ // Generate email.
225
+ if(empty($_data['email']) && Mage::helper('pslogin')->validateIgnore()) {
226
+ $_data['email'] = $this->_getRandomEmail();
227
+ }
228
+
229
+ // Prepare date of birth.
230
+ if(!empty($_data['dob'])) {
231
+ $_data['dob'] = call_user_func_array(array($this, '_prepareDob'), array_merge(array($_data['dob']), $this->_dob) );
232
+ }
233
+
234
+ // Convert gender.
235
+ if(!empty($_data['gender'])) {
236
+ switch($_data['gender']) {
237
+ case $this->_gender[0]: $_data['gender'] = 1; break;
238
+ case $this->_gender[1]: $_data['gender'] = 2; break;
239
+ default: $_data['gender'] = 0;
240
+ }
241
+ }
242
+
243
+ // Tax/Vat number.
244
+ $_data['taxvat'] = 0;
245
+
246
+ // Set password.
247
+ $_data['password'] = $this->_getRandomPassword();
248
+
249
+ return $_data;
250
+ }
251
+
252
+ protected function _prepareDob($date, $p1 = 'month', $p2 = 'day', $p3 = 'year', $separator = '/')
253
+ {
254
+ $date = explode($separator, $date);
255
+
256
+ $result = array(
257
+ 'year' => '0000',
258
+ 'month' => '00',
259
+ 'day' => '00'
260
+ );
261
+
262
+ $result[$p1] = $date[0];
263
+ if(isset($date[1])) $result[$p2] = $date[1];
264
+ if(isset($date[2])) $result[$p3] = $date[2];
265
+
266
+ return implode('-', array_values($result));
267
+ }
268
+
269
+ protected function _getRandomEmail()
270
+ {
271
+ $len = 10;
272
+ $chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
273
+ $domain = parse_url(Mage::getBaseUrl(), PHP_URL_HOST);
274
+ $address = Plumrocket_SocialLogin_Helper_Data::FAKE_EMAIL_PREFIX . Mage::helper('core')->getRandomString($len, $chars) .'@'. $domain;
275
+ return $address;
276
+ }
277
+
278
+ protected function _getRandomPassword()
279
+ {
280
+ $len = $this->_passwordLength;
281
+ $chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
282
+ return Mage::helper('core')->getRandomString($len, $chars);
283
+ }
284
+
285
+ public function setCustomerPhoto($customerId)
286
+ {
287
+ $upload = false;
288
+
289
+ $fileUrl = $this->getUserData('photo');
290
+ if(empty($fileUrl) || !is_numeric($customerId) || $customerId < 1) {
291
+ return;
292
+ }
293
+
294
+ try{
295
+ if($content = file_get_contents($fileUrl)) {
296
+ $tmpPath = $this->_photoDir . DS . $customerId .'.tmp';
297
+
298
+ $io = new Varien_Io_File();
299
+ $io->mkdir($this->_photoDir);
300
+
301
+ if(file_put_contents($tmpPath, $content) > 0) {
302
+ $image = new Varien_Image($tmpPath);
303
+ $image->resize($this->_photoSize);
304
+
305
+ $fileName = $customerId .'.'. self::PHOTO_FILE_EXT;
306
+ $image->save(null, $fileName);
307
+
308
+ $upload = true;
309
+ }
310
+
311
+ $io->rm($tmpPath);
312
+ }
313
+ } catch(Exception $e) {}
314
+
315
+ return $upload;
316
+ }
317
+
318
+ public function postToMail()
319
+ {
320
+ if(!Mage::helper('pslogin')->isFakeMail( $this->getUserData('email') )) {
321
+ Mage::getSingleton('customer/customer')->sendNewAccountEmail();
322
+ }
323
+
324
+ return true;
325
+ }
326
+
327
+ public function getButton()
328
+ {
329
+ if(empty($this->_applicationId) || empty($this->_secret)) {
330
+ $uri = null;
331
+ }elseif(is_array($this->_buttonLinkParams)) {
332
+ $uri = $this->_url .'?'. urldecode(http_build_query($this->_buttonLinkParams));
333
+ }else{
334
+ $uri = $this->_buttonLinkParams;
335
+ }
336
+
337
+ // Images.
338
+ $image = array();
339
+ $media = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) .'pslogin/';
340
+
341
+ // ..icon
342
+ $iconBtn = Mage::getStoreConfig('pslogin/'. $this->_type .'/icon_btn');
343
+ $image['icon'] = $iconBtn? $media . $iconBtn : null;
344
+
345
+ // ..login
346
+ $loginBtn = Mage::getStoreConfig('pslogin/'. $this->_type .'/login_btn');
347
+ $image['login'] = $loginBtn? $media . $loginBtn : null;
348
+
349
+ // ..register
350
+ $registerBtn = Mage::getStoreConfig('pslogin/'. $this->_type .'/register_btn');
351
+ $image['register'] = $registerBtn? $media . $registerBtn : null;
352
+
353
+ return array(
354
+ 'href' => $uri,
355
+ 'type' => $this->_type,
356
+ 'image' => $image,
357
+ 'login_text' => Mage::getStoreConfig('pslogin/'. $this->_type .'/login_btn_text'),
358
+ 'register_text' => Mage::getStoreConfig('pslogin/'. $this->_type .'/register_btn_text'),
359
+ 'popup_width' => $this->_popupSize[0],
360
+ 'popup_height' => $this->_popupSize[1],
361
+ );
362
+ }
363
+
364
+ public function getProvider()
365
+ {
366
+ return $this->_type;
367
+ }
368
+
369
+ public function _setLog($data, $append = false)
370
+ {
371
+ return;
372
+ }
373
+
374
+ }
app/code/community/Plumrocket/SocialLogin/Model/Facebook.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Model_Facebook extends Plumrocket_SocialLogin_Model_Account
20
+ {
21
+ protected $_type = 'facebook';
22
+
23
+ protected $_url = 'https://www.facebook.com/dialog/oauth';
24
+
25
+ protected $_fields = array(
26
+ 'user_id' => 'id',
27
+ 'firstname' => 'first_name',
28
+ 'lastname' => 'last_name',
29
+ 'email' => 'email',
30
+ 'dob' => 'birthday',
31
+ 'gender' => 'gender',
32
+ 'photo' => 'picture',
33
+ );
34
+
35
+ protected $_buttonLinkParams = array(
36
+ 'scope' => 'email,user_birthday',
37
+ 'display' => 'popup',
38
+ );
39
+
40
+ protected $_popupSize = array(650, 350);
41
+
42
+ public function _construct()
43
+ {
44
+ parent::_construct();
45
+
46
+ $this->_buttonLinkParams = array_merge($this->_buttonLinkParams, array(
47
+ 'client_id' => $this->_applicationId,
48
+ 'redirect_uri' => $this->_redirectUri,
49
+ 'response_type' => $this->_responseType
50
+ ));
51
+ }
52
+
53
+ public function loadUserData($response)
54
+ {
55
+ if(!trim($response)) {
56
+ return false;
57
+ }
58
+
59
+ $data = array();
60
+
61
+ $params = array(
62
+ 'client_id' => $this->_applicationId,
63
+ 'client_secret' => $this->_secret,
64
+ 'code' => $response,
65
+ 'redirect_uri' => $this->_redirectUri
66
+ );
67
+
68
+ $token = null;
69
+ if($response = $this->_call('https://graph.facebook.com/oauth/access_token', $params)) {
70
+ parse_str($response, $token);
71
+ }
72
+
73
+ if (isset($token['access_token'])) {
74
+ $params = array(
75
+ 'access_token' => $token['access_token']
76
+ );
77
+
78
+ if($response = $this->_call('https://graph.facebook.com/me', $params)) {
79
+ $data = json_decode($response, true);
80
+ }
81
+
82
+ if(!empty($data['id'])) {
83
+ $data['picture'] = 'https://graph.facebook.com/'. $data['id'] .'/picture?return_ssl_resources=true';
84
+ }
85
+
86
+ $this->_setLog($data);
87
+ }
88
+
89
+ if(!$this->_userData = $this->_prepareData($data)) {
90
+ return false;
91
+ }
92
+
93
+ $this->_setLog($this->_userData, true);
94
+
95
+ return true;
96
+ }
97
+
98
+ protected function _prepareData(array $data)
99
+ {
100
+ if(empty($data['id'])) {
101
+ return false;
102
+ }
103
+
104
+ return parent::_prepareData($data);
105
+ }
106
+
107
+ }
app/code/community/Plumrocket/SocialLogin/Model/Mysql4/Account.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Model_Mysql4_Account extends Mage_Core_Model_Mysql4_Abstract
20
+ {
21
+ public function _construct()
22
+ {
23
+ $this->_init('pslogin/account', 'id');
24
+ }
25
+ }
app/code/community/Plumrocket/SocialLogin/Model/Mysql4/Account/Collection.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Model_Mysql4_Account_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
20
+ {
21
+ public function _construct()
22
+ {
23
+ $this->_init('pslogin/account');
24
+ }
25
+ }
app/code/community/Plumrocket/SocialLogin/Model/Observer.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Model_Observer
20
+ {
21
+
22
+ public function controllerActionPredispatch()
23
+ {
24
+ // Check email.
25
+ $request = Mage::app()->getRequest();
26
+ $requestString = $request->getRequestString();
27
+ $module = $request->getModuleName();
28
+ $controller = $request->getControllerName();
29
+ $action = $request->getActionName();
30
+
31
+ $editUri = 'customer/account/edit';
32
+
33
+ switch(true) {
34
+
35
+ case (stripos($requestString, 'customer/account/logout') !== false):
36
+ break;
37
+
38
+ case $moduleName = (stripos($module, 'customer') !== false) ? 'customer' : null:
39
+ // case $moduleName = (stripos($module, 'checkout') !== false && stripos($controller, 'onepage') !== false && stripos($action, 'index') !== false) ? 'checkout' : null:
40
+
41
+ $session = Mage::getSingleton('customer/session');
42
+ if($session->isLoggedIn() && Mage::helper('pslogin')->isFakeMail()) {
43
+
44
+ $session->getMessages()->deleteMessageByIdentifier('fakeemail');
45
+ $message = Mage::helper('pslogin')->__('Your account needs to be updated. The email address in your profile is invalid. Please indicate your valid email address by going to the <a href="%s">Account edit page</a>', Mage::getUrl($editUri));
46
+
47
+ switch($moduleName) {
48
+ case 'customer':
49
+ if(stripos($requestString, $editUri) !== false) {
50
+ // Set new message and red field.
51
+ $message = Mage::helper('pslogin')->__('Your account needs to be updated. The email address in your profile is invalid. Please indicate your valid email address.');
52
+ }
53
+ $session->addUniqueMessages(Mage::getSingleton('core/message')->notice($message)->setIdentifier('fakeemail'));
54
+ break;
55
+
56
+ /*case 'checkout':
57
+ $session->addUniqueMessages(Mage::getSingleton('core/message')->notice($message)->setIdentifier('fakeemail'));
58
+ break;*/
59
+ }
60
+
61
+ }
62
+ break;
63
+ }
64
+ }
65
+
66
+ public function customerLogin($observer)
67
+ {
68
+ // Set redirect url.
69
+ $redirectUrl = Mage::helper('pslogin')->getRedirectUrl('login');
70
+ Mage::getSingleton('customer/session')->setBeforeAuthUrl($redirectUrl);
71
+ }
72
+
73
+ public function customerRegisterSuccess($observer)
74
+ {
75
+ $helper = Mage::helper('pslogin');
76
+ $data = Mage::getSingleton('customer/session')->getData('pslogin');
77
+
78
+ if(!empty($data['provider']) && !empty($data['timeout']) && $data['timeout'] > time()) {
79
+ $model = Mage::getSingleton("pslogin/{$data['provider']}");
80
+
81
+ $customerId = $observer->getCustomer()->getId();
82
+ if($customerId) {
83
+ $model->setUserData($data);
84
+
85
+ // Remember customer.
86
+ $model->setCustomerIdByUserId($customerId);
87
+
88
+ // Load photo.
89
+ if($helper->photoEnabled()) {
90
+ $model->setCustomerPhoto($customerId);
91
+ }
92
+ }
93
+
94
+ }
95
+
96
+ // Show share-popup.
97
+ $helper->showPopup(true);
98
+
99
+ // Set redirect url.
100
+ $redirectUrl = $helper->getRedirectUrl('register');
101
+ Mage::app()->getRequest()->setParam(Mage_Core_Controller_Varien_Action::PARAM_NAME_SUCCESS_URL, $redirectUrl);
102
+ }
103
+
104
+ }
app/code/community/Plumrocket/SocialLogin/Model/System/Config/Source/Redirectto.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Model_System_Config_Source_RedirectTo
20
+ {
21
+
22
+ protected $_options = null;
23
+
24
+ /**
25
+ * Options getter
26
+ *
27
+ * @return array
28
+ */
29
+ public function toOptionArray()
30
+ {
31
+ return $this->_getOptions();
32
+ }
33
+
34
+ /**
35
+ * Get options in "key-value" format
36
+ *
37
+ * @return array
38
+ */
39
+ public function toArray()
40
+ {
41
+ $options = array();
42
+ foreach ($this->_getOptions() as $option) {
43
+ $options[ $option['value'] ] = $option['label'];
44
+ }
45
+
46
+ return $options;
47
+ }
48
+
49
+ protected function _getOptions()
50
+ {
51
+ if(is_null($this->_options)) {
52
+ $options = array(
53
+ array('value' => '__referer__', 'label' => Mage::helper('pslogin')->__('Stay on the current page') ),
54
+ array('value' => '__custom__', 'label' => Mage::helper('pslogin')->__('Redirect to Custom URL') ),
55
+ array('value' => '__none__', 'label' => Mage::helper('pslogin')->__('---') ),
56
+ array('value' => '__dashboard__', 'label' => Mage::helper('pslogin')->__('Customer -> Account Dashboard') ),
57
+ );
58
+
59
+ $items = Mage::getSingleton('cms/page')->getCollection()->getItems();
60
+ foreach ($items as $item) {
61
+ if($item->getId() == 1) continue;
62
+ $options[] = array('value' => $item->getId(), 'label' => $item->getTitle());
63
+ }
64
+
65
+ $this->_options = $options;
66
+ }
67
+
68
+ return $this->_options;
69
+ }
70
+
71
+ }
app/code/community/Plumrocket/SocialLogin/Model/System/Config/Source/Shareurl.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Model_System_Config_Source_ShareUrl
20
+ {
21
+
22
+ protected $_options = null;
23
+
24
+ /**
25
+ * Options getter
26
+ *
27
+ * @return array
28
+ */
29
+ public function toOptionArray()
30
+ {
31
+ return $this->_getOptions();
32
+ }
33
+
34
+ /**
35
+ * Get options in "key-value" format
36
+ *
37
+ * @return array
38
+ */
39
+ public function toArray()
40
+ {
41
+ $options = array();
42
+ foreach ($this->_getOptions() as $option) {
43
+ $options[ $option['value'] ] = $option['label'];
44
+ }
45
+
46
+ return $options;
47
+ }
48
+
49
+ protected function _getOptions()
50
+ {
51
+ if(is_null($this->_options)) {
52
+ $invitationsEnabled = Mage::helper('pslogin')->moduleInvitationsEnabled();
53
+
54
+ $options = array(
55
+ array('value' => '__custom__', 'label' => Mage::helper('pslogin')->__('Redirect to Custom URL') ),
56
+ array('value' => '__invitations'. (!$invitationsEnabled? 'off' : '') .'__', 'label' => Mage::helper('pslogin')->__('Plumrocket Invitations Promo Page'. (!$invitationsEnabled? ' (Not installed)' : '')) ),
57
+ array('value' => '__none__', 'label' => Mage::helper('pslogin')->__('---') ),
58
+ );
59
+
60
+ $items = Mage::getSingleton('cms/page')->getCollection()->getItems();
61
+ foreach ($items as $item) {
62
+ if($item->getId() == 1) continue;
63
+ $options[] = array('value' => $item->getId(), 'label' => $item->getTitle());
64
+ }
65
+
66
+ $this->_options = $options;
67
+ }
68
+
69
+ return $this->_options;
70
+ }
71
+
72
+ }
app/code/community/Plumrocket/SocialLogin/Model/Twitter.php ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_Model_Twitter extends Plumrocket_SocialLogin_Model_Account
20
+ {
21
+ protected $_type = 'twitter';
22
+
23
+ const URL_REQUEST_TOKEN = 'https://api.twitter.com/oauth/request_token';
24
+ const URL_AUTHORIZE = 'https://api.twitter.com/oauth/authorize';
25
+ const URL_ACCESS_TOKEN = 'https://api.twitter.com/oauth/access_token';
26
+ const URL_ACCOUNT_DATA = 'https://api.twitter.com/1.1/users/show.json';
27
+
28
+ protected $_responseType = array('oauth_token', 'oauth_verifier');
29
+
30
+ protected $_fields = array(
31
+ 'user_id' => 'id',
32
+ 'firstname' => 'name',
33
+ 'lastname' => 'name2',
34
+ 'email' => null,
35
+ 'dob' => null,
36
+ 'gender' => null,
37
+ 'photo' => 'profile_image_url',
38
+ );
39
+
40
+ protected $_buttonLinkParams = null;
41
+
42
+ protected $_popupSize = array(630, 650);
43
+
44
+ public function _construct()
45
+ {
46
+ parent::_construct();
47
+
48
+ $token = $this->_getStartToken();
49
+ if(!empty($token['oauth_token'])) {
50
+ $this->_buttonLinkParams = self::URL_AUTHORIZE .'?oauth_token='. $token['oauth_token'];
51
+ }
52
+ }
53
+
54
+ // Step 2.
55
+ public function loadUserData($response)
56
+ {
57
+ if(empty($response['oauth_token']) || empty($response['oauth_verifier'])) {
58
+ return false;
59
+ }
60
+
61
+ $data = array();
62
+ $session = Mage::getSingleton('customer/session');
63
+
64
+ $oauth_nonce = md5(uniqid(rand(), true));
65
+ $oauth_timestamp = time();
66
+
67
+ if(empty($response['oauth_token']) || empty($response['oauth_verifier']) || !$session->getData('oauth_token_secret')) {
68
+ return false;
69
+ }
70
+
71
+ $oauth_token = $response['oauth_token'];
72
+ $oauth_verifier = $response['oauth_verifier'];
73
+ $oauth_token_secret = $session->getData('oauth_token_secret');
74
+
75
+ $oauth_base_text = "GET&";
76
+ $oauth_base_text .= urlencode(self::URL_ACCESS_TOKEN)."&";
77
+ $oauth_base_text .= urlencode("oauth_consumer_key=".$this->_applicationId."&");
78
+ $oauth_base_text .= urlencode("oauth_nonce=".$oauth_nonce."&");
79
+ $oauth_base_text .= urlencode("oauth_signature_method=HMAC-SHA1&");
80
+ $oauth_base_text .= urlencode("oauth_token=".$oauth_token."&");
81
+ $oauth_base_text .= urlencode("oauth_timestamp=".$oauth_timestamp."&");
82
+ $oauth_base_text .= urlencode("oauth_verifier=".$oauth_verifier."&");
83
+ $oauth_base_text .= urlencode("oauth_version=1.0");
84
+
85
+
86
+ $key = $this->_secret .'&'. $oauth_token_secret;
87
+ $oauth_signature = base64_encode(hash_hmac('sha1', $oauth_base_text, $key, true));
88
+
89
+ $url = self::URL_ACCESS_TOKEN;
90
+ $url .= '?oauth_nonce='.$oauth_nonce;
91
+ $url .= '&oauth_signature_method=HMAC-SHA1';
92
+ $url .= '&oauth_timestamp='.$oauth_timestamp;
93
+ $url .= '&oauth_consumer_key='.$this->_applicationId;
94
+ $url .= '&oauth_token='.urlencode($oauth_token);
95
+ $url .= '&oauth_verifier='.urlencode($oauth_verifier);
96
+ $url .= '&oauth_signature='.urlencode($oauth_signature);
97
+ $url .= '&oauth_version=1.0';
98
+
99
+ $result = null;
100
+ if($response = $this->_call($url)) {
101
+ parse_str($response, $result);
102
+ }
103
+ $this->_setLog($result);
104
+
105
+ // Get user data.
106
+ if(!empty($result['oauth_token']) && !empty($result['oauth_token_secret'])) {
107
+ $oauth_nonce = md5(uniqid(rand(), true));
108
+ $oauth_timestamp = time();
109
+
110
+ $oauth_token = $result['oauth_token'];
111
+ $oauth_token_secret = $result['oauth_token_secret'];
112
+ $screen_name = $result['screen_name'];
113
+
114
+ $oauth_base_text = "GET&";
115
+ $oauth_base_text .= urlencode(self::URL_ACCOUNT_DATA).'&';
116
+ $oauth_base_text .= urlencode('oauth_consumer_key='.$this->_applicationId.'&');
117
+ $oauth_base_text .= urlencode('oauth_nonce='.$oauth_nonce.'&');
118
+ $oauth_base_text .= urlencode('oauth_signature_method=HMAC-SHA1&');
119
+ $oauth_base_text .= urlencode('oauth_timestamp='.$oauth_timestamp."&");
120
+ $oauth_base_text .= urlencode('oauth_token='.$oauth_token."&");
121
+ $oauth_base_text .= urlencode('oauth_version=1.0&');
122
+ $oauth_base_text .= urlencode('screen_name=' . $screen_name);
123
+
124
+ $key = $this->_secret .'&'. $oauth_token_secret;
125
+ $signature = base64_encode(hash_hmac("sha1", $oauth_base_text, $key, true));
126
+
127
+ $url = self::URL_ACCOUNT_DATA;
128
+ $url .= '?oauth_consumer_key=' . $this->_applicationId;
129
+ $url .= '&oauth_nonce=' . $oauth_nonce;
130
+ $url .= '&oauth_signature=' . urlencode($signature);
131
+ $url .= '&oauth_signature_method=HMAC-SHA1';
132
+ $url .= '&oauth_timestamp=' . $oauth_timestamp;
133
+ $url .= '&oauth_token=' . urlencode($oauth_token);
134
+ $url .= '&oauth_version=1.0';
135
+ $url .= '&screen_name=' . $screen_name;
136
+
137
+ $data = array();
138
+ if($response = $this->_call($url)) {
139
+ $data = json_decode($response, true);
140
+ }
141
+
142
+ $this->_setLog($data, true);
143
+ }
144
+
145
+ if(!$this->_userData = $this->_prepareData($data)) {
146
+ return false;
147
+ }
148
+
149
+ $this->_setLog($this->_userData, true);
150
+
151
+ return true;
152
+ }
153
+
154
+ // Step 1.
155
+ protected function _getStartToken()
156
+ {
157
+ $result = null;
158
+
159
+ $oauth_nonce = md5(uniqid(rand(), true));
160
+ $oauth_timestamp = time();
161
+
162
+ $oauth_base_text = "GET&";
163
+ $oauth_base_text .= urlencode(self::URL_REQUEST_TOKEN)."&";
164
+ $oauth_base_text .= urlencode("oauth_callback=".urlencode($this->_redirectUri)."&");
165
+ $oauth_base_text .= urlencode("oauth_consumer_key=".$this->_applicationId."&");
166
+ $oauth_base_text .= urlencode("oauth_nonce=".$oauth_nonce."&");
167
+ $oauth_base_text .= urlencode("oauth_signature_method=HMAC-SHA1&");
168
+ $oauth_base_text .= urlencode("oauth_timestamp=".$oauth_timestamp."&");
169
+ $oauth_base_text .= urlencode("oauth_version=1.0");
170
+
171
+ $key = $this->_secret."&";
172
+ $oauth_signature = base64_encode(hash_hmac("sha1", $oauth_base_text, $key, true));
173
+
174
+ $url = self::URL_REQUEST_TOKEN;
175
+ $url .= '?oauth_callback='.urlencode($this->_redirectUri);
176
+ $url .= '&oauth_consumer_key='.$this->_applicationId;
177
+ $url .= '&oauth_nonce='.$oauth_nonce;
178
+ $url .= '&oauth_signature='.urlencode($oauth_signature);
179
+ $url .= '&oauth_signature_method=HMAC-SHA1';
180
+ $url .= '&oauth_timestamp='.$oauth_timestamp;
181
+ $url .= '&oauth_version=1.0';
182
+
183
+ if($response = $this->_call($url)) {
184
+ parse_str($response, $result);
185
+ }
186
+
187
+ if(!empty($result['oauth_token_secret'])) {
188
+ $session = Mage::getSingleton('customer/session');
189
+ // $_SESSION['oauth_token'] = $result['oauth_token'];
190
+ $session->setData('oauth_token_secret', $result['oauth_token_secret']);
191
+ }
192
+
193
+ return $result;
194
+ }
195
+
196
+ protected function _prepareData(array $data)
197
+ {
198
+ if(empty($data['id'])) {
199
+ return false;
200
+ }
201
+
202
+ if(!empty($data['name'])) {
203
+ $nameParts = explode(' ', $data['name'], 2);
204
+ $data['name'] = $nameParts[0];
205
+ $data['name2'] = !empty($nameParts[1])? $nameParts[1] : '';
206
+ }
207
+
208
+ return parent::_prepareData($data);
209
+ }
210
+
211
+ }
app/code/community/Plumrocket/SocialLogin/controllers/AccountController.php ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ class Plumrocket_SocialLogin_AccountController extends Mage_Core_Controller_Front_Action
20
+ {
21
+
22
+ public function loginAction()
23
+ {
24
+ $session = $this->_getSession();
25
+ if ($session->isLoggedIn()) {
26
+ return $this->_windowClose();
27
+ // $this->_redirect('.');
28
+ }
29
+
30
+ $type = $this->getRequest()->getParam('type');
31
+ $className = "Plumrocket_SocialLogin_Model_$type";
32
+ if(!$type || !class_exists($className)) {
33
+ return $this->_windowClose();
34
+ // $this->_redirect('customer/account/login');
35
+ }
36
+ $model = Mage::getSingleton("pslogin/$type");
37
+
38
+ if(!$this->_getHelper()->moduleEnabled() || !$model->enabled()) {
39
+ return $this->_windowClose();
40
+ // $this->_redirect('customer/account/login');
41
+ }
42
+
43
+ $responseTypes = $model->getResponseType();
44
+ if(is_array($responseTypes)) {
45
+ $response = array();
46
+ foreach ($responseTypes as $responseType) {
47
+ $response[$responseType] = $this->getRequest()->getParam($responseType);
48
+ }
49
+ }else{
50
+ $response = $this->getRequest()->getParam($responseTypes);
51
+ }
52
+ $model->_setLog($this->getRequest()->getParams());
53
+
54
+ if(!$model->loadUserData($response)) {
55
+ return $this->_windowClose();
56
+ // $this->_redirect('customer/account/login');
57
+ }
58
+
59
+ if($customerId = $model->getCustomerIdByUserId()) {
60
+ # Do auth.
61
+ $redirectUrl = $this->_getHelper()->getRedirectUrl();
62
+ }elseif($customerId = $model->getCustomerIdByEmail()) {
63
+ # Customer with received email was placed in db.
64
+ // Remember customer.
65
+ $model->setCustomerIdByUserId($customerId);
66
+ // System message.
67
+ $url = $this->_getUrl('customer/account/forgotpassword');
68
+ $message = $this->__('Customer with email (%s) already exists in the database. If you are sure that it is your email address, please <a href="%s">click here</a> to retrieve your password and access your account.', $model->getUserData('email'), $url);
69
+ $session->addNotice($message);
70
+
71
+ $redirectUrl = $this->_getHelper()->getRedirectUrl();
72
+ }else{
73
+ # Registration customer.
74
+ if($customerId = $model->registrationCustomer()) {
75
+ # Success.
76
+ // Display system messages (before setCustomerIdByUserId(), because reset messages).
77
+ if($this->_getHelper()->isFakeMail($model->getUserData('email'))) {
78
+ $session->addSuccess($this->__('Customer registration successful.'));
79
+ }else{
80
+ $session->addSuccess($this->__('Customer registration successful. Your password was send to the email: %s', $model->getUserData('email')));
81
+ }
82
+
83
+ if($errors = $model->getErrors()) {
84
+ foreach ($errors as $error) {
85
+ $session->addNotice($error);
86
+ }
87
+ }
88
+
89
+ // Remember customer.
90
+ $model->setCustomerIdByUserId($customerId);
91
+
92
+ // Dispatch event.
93
+ $this->_dispatchRegisterSuccess($model->getCustomer());
94
+
95
+ // Post mail.
96
+ $model->postToMail();
97
+
98
+ // Show share-popup.
99
+ $this->_getHelper()->showPopup(true);
100
+
101
+ $redirectUrl = $this->_getHelper()->getRedirectUrl('register');
102
+ }else{
103
+ # Error.
104
+ $session->setCustomerFormData($model->getUserData());
105
+ $redirectUrl = $errUrl = $this->_getUrl('customer/account/create', array('_secure' => true));
106
+
107
+ if($errors = $model->getErrors()) {
108
+ foreach ($errors as $error) {
109
+ $session->addError($error);
110
+ }
111
+ }
112
+
113
+ // Remember current provider data.
114
+ $session->setData('pslogin', array(
115
+ 'provider' => $model->getProvider(),
116
+ 'user_id' => $model->getUserData('user_id'),
117
+ 'photo' => $model->getUserData('photo'),
118
+ 'timeout' => time() + Plumrocket_SocialLogin_Helper_Data::TIME_TO_EDIT,
119
+ ));
120
+ }
121
+ }
122
+
123
+ if($customerId) {
124
+ // Load photo.
125
+ if($this->_getHelper()->photoEnabled()) {
126
+ $model->setCustomerPhoto($customerId);
127
+ }
128
+
129
+ // Loged in.
130
+ $session->loginById($customerId);
131
+
132
+ // Unset referer link.
133
+ $this->_getHelper()->refererLink(null);
134
+ }
135
+
136
+ $this->getResponse()->setBody('<script type="text/javascript">window.close(); window.opener.location.href = "'.$redirectUrl.'";</script>');
137
+ }
138
+
139
+ protected function _windowClose()
140
+ {
141
+ $this->getResponse()->setBody('<script type="text/javascript">if(window.name == "pslogin_popup") { window.close(); }</script>');
142
+ return true;
143
+ }
144
+
145
+ protected function _dispatchRegisterSuccess($customer)
146
+ {
147
+ Mage::dispatchEvent('customer_register_success',
148
+ array('account_controller' => $this, 'customer' => $customer)
149
+ );
150
+ }
151
+
152
+ protected function _getModel($path = 'pslogin/account', $arguments = array())
153
+ {
154
+ return Mage::getModel($path, $arguments);
155
+ }
156
+
157
+ protected function _getSession()
158
+ {
159
+ return Mage::getSingleton('customer/session');
160
+ }
161
+
162
+ protected function _getUrl($url, $params = array())
163
+ {
164
+ return Mage::getUrl($url, $params);
165
+ }
166
+
167
+ protected function _getHelper($path = 'pslogin')
168
+ {
169
+ return Mage::helper($path);
170
+ }
171
+
172
+ }
app/code/community/Plumrocket/SocialLogin/etc/adminhtml.xml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <menu>
4
+ <plumrocket>
5
+ <title>Plumrocket</title>
6
+ <sort_order>80</sort_order>
7
+ <children>
8
+ <pslogin>
9
+ <title>Twitter &amp; Facebook Login</title>
10
+ <sort_order>350</sort_order>
11
+ <action>adminhtml/system_config/edit/section/pslogin</action>
12
+ </pslogin>
13
+ </children>
14
+ </plumrocket>
15
+ </menu>
16
+ <acl>
17
+ <resources>
18
+ <admin>
19
+ <children>
20
+ <system>
21
+ <children>
22
+ <config>
23
+ <children>
24
+ <pslogin translate="title" module="pslogin">
25
+ <title>Twitter &amp; Facebook Login Section</title>
26
+ <sort_order>102</sort_order>
27
+ </pslogin>
28
+ </children>
29
+ </config>
30
+ </children>
31
+ </system>
32
+ </children>
33
+ </admin>
34
+ </resources>
35
+ </acl>
36
+ </config>
app/code/community/Plumrocket/SocialLogin/etc/config.xml ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Plumrocket_SocialLogin>
5
+ <version>1.0.0</version>
6
+ </Plumrocket_SocialLogin>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <pslogin>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Plumrocket_SocialLogin</module>
14
+ <frontName>pslogin</frontName>
15
+ </args>
16
+ </pslogin>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <pslogin>
21
+ <file>pslogin.xml</file>
22
+ </pslogin>
23
+ </updates>
24
+ </layout>
25
+ <translate>
26
+ <modules>
27
+ <Plumrocket_SocialLogin>
28
+ <files>
29
+ <default>Plumrocket_SocialLogin.csv</default>
30
+ </files>
31
+ </Plumrocket_SocialLogin>
32
+ </modules>
33
+ </translate>
34
+ </frontend>
35
+ <adminhtml>
36
+ <layout>
37
+ <updates>
38
+ <pslogin>
39
+ <file>pslogin.xml</file>
40
+ </pslogin>
41
+ </updates>
42
+ </layout>
43
+ <translate>
44
+ <modules>
45
+ <Plumrocket_SocialLogin>
46
+ <files>
47
+ <default>Plumrocket_SocialLogin.csv</default>
48
+ </files>
49
+ </Plumrocket_SocialLogin>
50
+ </modules>
51
+ </translate>
52
+ </adminhtml>
53
+ <global>
54
+ <models>
55
+ <pslogin>
56
+ <class>Plumrocket_SocialLogin_Model</class>
57
+ <resourceModel>pslogin_resource</resourceModel>
58
+ </pslogin>
59
+ <pslogin_resource>
60
+ <class>Plumrocket_SocialLogin_Model_Mysql4</class>
61
+ <entities>
62
+ <account>
63
+ <table>plumrocket_sociallogin_account</table>
64
+ </account>
65
+ </entities>
66
+ </pslogin_resource>
67
+ </models>
68
+ <helpers>
69
+ <pslogin>
70
+ <class>Plumrocket_SocialLogin_Helper</class>
71
+ </pslogin>
72
+ </helpers>
73
+ <blocks>
74
+ <pslogin>
75
+ <class>Plumrocket_SocialLogin_Block</class>
76
+ </pslogin>
77
+ <page>
78
+ <rewrite>
79
+ <html_welcome>Plumrocket_SocialLogin_Block_Page_Html_Welcome</html_welcome>
80
+ </rewrite>
81
+ </page>
82
+ </blocks>
83
+ <resources>
84
+ <pslogin_setup>
85
+ <setup>
86
+ <module>Plumrocket_SocialLogin</module>
87
+ </setup>
88
+ </pslogin_setup>
89
+ </resources>
90
+ <events>
91
+ <controller_action_predispatch>
92
+ <observers>
93
+ <pslogin_observer>
94
+ <type>singleton</type>
95
+ <class>pslogin/observer</class>
96
+ <method>controllerActionPredispatch</method>
97
+ </pslogin_observer>
98
+ </observers>
99
+ </controller_action_predispatch>
100
+ <customer_login>
101
+ <observers>
102
+ <pslogin_observer>
103
+ <type>singleton</type>
104
+ <class>pslogin/observer</class>
105
+ <method>customerLogin</method>
106
+ </pslogin_observer>
107
+ </observers>
108
+ </customer_login>
109
+ <customer_register_success>
110
+ <observers>
111
+ <pslogin_observer>
112
+ <type>singleton</type>
113
+ <class>pslogin/observer</class>
114
+ <method>customerRegisterSuccess</method>
115
+ </pslogin_observer>
116
+ </observers>
117
+ </customer_register_success>
118
+ </events>
119
+ </global>
120
+ <default>
121
+ <pslogin>
122
+ <general>
123
+ <enable_for_login>1</enable_for_login>
124
+ <enable_for_register>1</enable_for_register>
125
+ <validate_ignore>1</validate_ignore>
126
+ <enable_photo>1</enable_photo>
127
+ <redirect_for_login>__referer__</redirect_for_login>
128
+ <redirect_for_register>__referer__</redirect_for_register>
129
+ </general>
130
+ <share>
131
+ <enable>1</enable>
132
+ <title>Please share us with your friends!</title>
133
+ <description>Spread the word about this great Magento Store! Let everyone know about our great offers and everyday deals!</description>
134
+ <page>2</page>
135
+ </share>
136
+ <facebook>
137
+ <login_btn_text>Login with Facebook</login_btn_text>
138
+ <register_btn_text>Register with Facebook</register_btn_text>
139
+ </facebook>
140
+ <twitter>
141
+ <login_btn_text>Login with Twitter</login_btn_text>
142
+ <register_btn_text>Register with Twitter</register_btn_text>
143
+ </twitter>
144
+ </pslogin>
145
+ </default>
146
+ </config>
app/code/community/Plumrocket/SocialLogin/etc/system.xml ADDED
@@ -0,0 +1,1365 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <plumrocket>
5
+ <label>
6
+ <![CDATA[
7
+ <div style="padding-left:22px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEIxMEIyRkRCOTg1MTFFMkI4Qjg5OEZGNjcwRUQ4MDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEIxMEIyRkVCOTg1MTFFMkI4Qjg5OEZGNjcwRUQ4MDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QjEwQjJGQkI5ODUxMUUyQjhCODk4RkY2NzBFRDgwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QjEwQjJGQ0I5ODUxMUUyQjhCODk4RkY2NzBFRDgwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoBY2kYAAAJCSURBVHjaJFJNaxVBEOzu2cfDZPflkSgkfsSP5CKBoBeDigeRgIgk4MWDePemqJHgBwgiCEFB9C94CkYMEuK/iF4CXgJ6UCOikBCyb6a7rVmX3WVmt6e6qrr49VppHknYXYMFFcfFzUXmRCROxmzsbPguhVpPqYcjLGSm7oRCIzo1fP/XztrG1grhlJMzBSUTKkyBnYFQDCCs8HRbB6aG539s7nz9ewhgaEa5hZuKqFtMFBvw5JyUcHBqdGFnW4Pb8b031HJHM6+N8Fc0Zky8NbFGVyv2FScmBq9CSNnfnmg/6vOhVKOUHVhqYi7RoAfA7oZ1ujD+kkk6AwPGUva3Th95nARlnBENHmhuB4IEk9QmB6+NVuegcmt7izVA2367MrJn0jOzrASQDoopgr0Gqc6PPYNNuNFPgmViZd/02Cs1VvWknm2HdkhXpWPdS2bRLcE2WILGkk3mQTk5NnS5hwYGl2CRwqPwZNo//3z74cu937sb5Fp1ugz7g3vA2d7s0TeSigTFWYOKJX2w2vKYrk8urq7P/6m/gVfV6ZRl2alKzznws4fnUnKpQcms0zf+9GKtKvdWik/flz6uP9ze3QQdwTBJBqouBnpmZL5qH+S7y232XiIOTguzemc5PJ+p5963VCjAGP6fJWlCZXkLeDR6MYPR2c13jO3tpZZmniE2M04IRcKAPCKYiQrKFtGtRc4YjIApkkmBJGqCR9lG48B1s0JR0dMaAc3posaBPIM8daMsVBpmMLiwHPhI/k+AAQDYqY0eXeLHAgAAAABJRU5ErkJggg==) left 50% no-repeat;">Plumrocket Inc.</div> ]]>
8
+ </label>
9
+ <sort_order>101</sort_order>
10
+ </plumrocket>
11
+ </tabs>
12
+
13
+ <sections>
14
+ <pslogin>
15
+ <label>Twitter &amp; Facebook Login</label>
16
+ <tab>plumrocket</tab>
17
+ <sort_order>102</sort_order>
18
+ <frontend_type>text</frontend_type>
19
+ <show_in_default>1</show_in_default>
20
+ <show_in_website>1</show_in_website>
21
+ <show_in_store>1</show_in_store>
22
+
23
+ <groups>
24
+ <general>
25
+ <label>General</label>
26
+ <expanded>1</expanded>
27
+ <sort_order>1</sort_order>
28
+ <frontend_type>text</frontend_type>
29
+ <show_in_default>1</show_in_default>
30
+ <show_in_website>1</show_in_website>
31
+ <show_in_store>1</show_in_store>
32
+
33
+ <fields>
34
+ <version translate="label">
35
+ <frontend_type>text</frontend_type>
36
+ <frontend_model>pslogin/system_config_version</frontend_model>
37
+ <sort_order>1</sort_order>
38
+ <show_in_default>1</show_in_default>
39
+ <show_in_website>1</show_in_website>
40
+ <show_in_store>1</show_in_store>
41
+ </version>
42
+ <enable translate="label">
43
+ <label>Enable Extension</label>
44
+ <frontend_type>select</frontend_type>
45
+ <source_model>adminhtml/system_config_source_yesno</source_model>
46
+ <sort_order>2</sort_order>
47
+ <show_in_default>1</show_in_default>
48
+ <show_in_website>1</show_in_website>
49
+ <show_in_store>1</show_in_store>
50
+ </enable>
51
+ <replace_templates translate="label">
52
+ <label>Replace Templates</label>
53
+ <frontend_type>select</frontend_type>
54
+ <source_model>adminhtml/system_config_source_yesno</source_model>
55
+ <sort_order>3</sort_order>
56
+ <show_in_default>1</show_in_default>
57
+ <show_in_website>1</show_in_website>
58
+ <show_in_store>1</show_in_store>
59
+ <comment>Set "Yes" to replace your customer login/registration template with this extension template and display the social login buttons automatically. Please see our online documentation if you want to keep your own template and install social buttons manually.</comment>
60
+ </replace_templates>
61
+ <enable_for_login translate="label">
62
+ <label>Display on Login Form</label>
63
+ <frontend_type>select</frontend_type>
64
+ <source_model>adminhtml/system_config_source_yesno</source_model>
65
+ <sort_order>4</sort_order>
66
+ <show_in_default>1</show_in_default>
67
+ <show_in_website>1</show_in_website>
68
+ <show_in_store>1</show_in_store>
69
+ <comment>Display Social Login buttons on magento customer login form</comment>
70
+ </enable_for_login>
71
+ <enable_for_register translate="label">
72
+ <label>Display on Registration Form</label>
73
+ <frontend_type>select</frontend_type>
74
+ <source_model>adminhtml/system_config_source_yesno</source_model>
75
+ <sort_order>5</sort_order>
76
+ <show_in_default>1</show_in_default>
77
+ <show_in_website>1</show_in_website>
78
+ <show_in_store>1</show_in_store>
79
+ <comment>Display Social Login buttons on magento customer registration form</comment>
80
+ </enable_for_register>
81
+ <validate_ignore translate="label">
82
+ <label>Ignore Missing Data from Social Networks</label>
83
+ <frontend_type>select</frontend_type>
84
+ <source_model>adminhtml/system_config_source_yesno</source_model>
85
+ <sort_order>6</sort_order>
86
+ <show_in_default>1</show_in_default>
87
+ <show_in_website>1</show_in_website>
88
+ <show_in_store>1</show_in_store>
89
+ <comment>Many (but not all) social networks share only limited user profile/personal information. If this option is enabled, all required fields in magento that are missing will be pre-filled with temporary data to speed-up the registration process. If this option is set to "No" - the user will be sent to the registration form to enter missing info.</comment>
90
+ </validate_ignore>
91
+ <enable_photo translate="label">
92
+ <label>Display Customer Photo</label>
93
+ <frontend_type>select</frontend_type>
94
+ <source_model>adminhtml/system_config_source_yesno</source_model>
95
+ <sort_order>7</sort_order>
96
+ <show_in_default>1</show_in_default>
97
+ <show_in_website>1</show_in_website>
98
+ <show_in_store>1</show_in_store>
99
+ <comment>Display customer photo from social network in your website header. Please see our online documentation for manual installation instructions if the photo is not shown.</comment>
100
+ </enable_photo>
101
+ <redirect_for_login translate="label">
102
+ <label>Login Success Page</label>
103
+ <frontend_type>select</frontend_type>
104
+ <source_model>pslogin/system_config_source_redirectto</source_model>
105
+ <sort_order>8</sort_order>
106
+ <show_in_default>1</show_in_default>
107
+ <show_in_website>1</show_in_website>
108
+ <show_in_store>1</show_in_store>
109
+ <comment>User will be redirected to this page after each successful login</comment>
110
+ </redirect_for_login>
111
+ <redirect_for_login_link translate="label">
112
+ <label>Login Custom Success Page URL</label>
113
+ <frontend_type>text</frontend_type>
114
+ <sort_order>9</sort_order>
115
+ <show_in_default>1</show_in_default>
116
+ <show_in_website>1</show_in_website>
117
+ <show_in_store>1</show_in_store>
118
+ <comment>Please enter the full URL of the page, including the domain name, to which you will be redirecting.</comment>
119
+ </redirect_for_login_link>
120
+ <redirect_for_register translate="label">
121
+ <label>Registration Success Page</label>
122
+ <frontend_type>select</frontend_type>
123
+ <source_model>pslogin/system_config_source_redirectto</source_model>
124
+ <sort_order>10</sort_order>
125
+ <show_in_default>1</show_in_default>
126
+ <show_in_website>1</show_in_website>
127
+ <show_in_store>1</show_in_store>
128
+ <comment>User will be redirected to this page after successful registration</comment>
129
+ </redirect_for_register>
130
+ <redirect_for_register_link translate="label">
131
+ <label>Registration Custom Success Page URL</label>
132
+ <frontend_type>text</frontend_type>
133
+ <sort_order>11</sort_order>
134
+ <show_in_default>1</show_in_default>
135
+ <show_in_website>1</show_in_website>
136
+ <show_in_store>1</show_in_store>
137
+ <comment>Please enter the full URL of the page, including the domain name, to which you will be redirecting.</comment>
138
+ </redirect_for_register_link>
139
+ <sortable_drag_and_drop translate="label">
140
+ <label>Social Buttons Sorting</label>
141
+ <frontend_type>text</frontend_type>
142
+ <frontend_model>pslogin/system_config_sortable</frontend_model>
143
+ <sort_order>12</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>1</show_in_website>
146
+ <show_in_store>1</show_in_store>
147
+ </sortable_drag_and_drop>
148
+ <sortable translate="label">
149
+ <frontend_type>hidden</frontend_type>
150
+ <sort_order>13</sort_order>
151
+ <show_in_default>1</show_in_default>
152
+ <show_in_website>1</show_in_website>
153
+ <show_in_store>1</show_in_store>
154
+ <comment>Visible buttons will be displayed by default. Hidden buttons will be listed under "show more" section in the front-end.</comment>
155
+ </sortable>
156
+ </fields>
157
+ </general>
158
+
159
+ <share>
160
+ <label>Social Share</label>
161
+ <expanded>1</expanded>
162
+ <sort_order>25</sort_order>
163
+ <frontend_type>text</frontend_type>
164
+ <show_in_default>1</show_in_default>
165
+ <show_in_website>1</show_in_website>
166
+ <show_in_store>1</show_in_store>
167
+
168
+ <fields>
169
+ <enable translate="label">
170
+ <label>Enable</label>
171
+ <frontend_type>select</frontend_type>
172
+ <source_model>adminhtml/system_config_source_yesno</source_model>
173
+ <sort_order>1</sort_order>
174
+ <show_in_default>1</show_in_default>
175
+ <show_in_website>1</show_in_website>
176
+ <show_in_store>1</show_in_store>
177
+ <comment>Display social share popup after successfull user registration</comment>
178
+ </enable>
179
+ <title translate="label">
180
+ <label>Popup Title</label>
181
+ <frontend_type>text</frontend_type>
182
+ <sort_order>2</sort_order>
183
+ <show_in_default>1</show_in_default>
184
+ <show_in_website>1</show_in_website>
185
+ <show_in_store>1</show_in_store>
186
+ </title>
187
+ <description translate="label">
188
+ <label>Popup Message</label>
189
+ <frontend_type>textarea</frontend_type>
190
+ <sort_order>3</sort_order>
191
+ <show_in_default>1</show_in_default>
192
+ <show_in_website>1</show_in_website>
193
+ <show_in_store>1</show_in_store>
194
+ <comment>
195
+ <![CDATA[
196
+ <button style="" onclick="catalogWysiwygEditor.open(wysiwygEditorPath, 'pslogin_share_description')" class="scalable " type="button"><span>WYSIWYG Editor</span></button>
197
+ ]]>
198
+ </comment>
199
+ </description>
200
+ <page translate="label">
201
+ <label>Share Page</label>
202
+ <frontend_type>select</frontend_type>
203
+ <source_model>pslogin/system_config_source_shareurl</source_model>
204
+ <sort_order>4</sort_order>
205
+ <show_in_default>1</show_in_default>
206
+ <show_in_website>1</show_in_website>
207
+ <show_in_store>1</show_in_store>
208
+ <comment>Selected page of your store will be shared on social networks.</comment>
209
+ </page>
210
+ <page_link translate="label">
211
+ <label>Custom Share Page URL</label>
212
+ <frontend_type>text</frontend_type>
213
+ <sort_order>5</sort_order>
214
+ <show_in_default>1</show_in_default>
215
+ <show_in_website>1</show_in_website>
216
+ <show_in_store>1</show_in_store>
217
+ <comment>Please enter the full URL of the page, including the domain name.</comment>
218
+ </page_link>
219
+ </fields>
220
+ </share>
221
+
222
+ <facebook>
223
+ <label>Facebook</label>
224
+ <expanded>1</expanded>
225
+ <sort_order>50</sort_order>
226
+ <frontend_type>text</frontend_type>
227
+ <show_in_default>1</show_in_default>
228
+ <show_in_website>1</show_in_website>
229
+ <show_in_store>1</show_in_store>
230
+
231
+ <fields>
232
+ <enable translate="label">
233
+ <label>Enable</label>
234
+ <frontend_type>select</frontend_type>
235
+ <source_model>adminhtml/system_config_source_yesno</source_model>
236
+ <sort_order>1</sort_order>
237
+ <show_in_default>1</show_in_default>
238
+ <show_in_website>1</show_in_website>
239
+ <show_in_store>1</show_in_store>
240
+ <comment>For configuration instructions, please &lt;a href="http://wiki.plumrocket.com/wiki/Magento_Twitter_and_Facebook_Login_v1.x_Facebook_Login_Configuration" target="_blank"&gt;click here&lt;/a&gt;.</comment>
241
+ </enable>
242
+ <application_id translate="label">
243
+ <label>Application ID</label>
244
+ <frontend_type>text</frontend_type>
245
+ <sort_order>2</sort_order>
246
+ <show_in_default>1</show_in_default>
247
+ <show_in_website>1</show_in_website>
248
+ <show_in_store>1</show_in_store>
249
+ </application_id>
250
+ <secret translate="label">
251
+ <label>Secret Key</label>
252
+ <frontend_type>obscure</frontend_type>
253
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
254
+ <sort_order>3</sort_order>
255
+ <show_in_default>1</show_in_default>
256
+ <show_in_website>1</show_in_website>
257
+ <show_in_store>1</show_in_store>
258
+ </secret>
259
+ <icon_btn translate="label">
260
+ <label>Small Icon Button</label>
261
+ <frontend_type>image</frontend_type>
262
+ <backend_model>adminhtml/system_config_backend_image</backend_model>
263
+ <upload_dir config="system/filesystem/media" scope_info="1">pslogin</upload_dir>
264
+ <base_url type="media" scope_info="1">pslogin</base_url>
265
+ <sort_order>4</sort_order>
266
+ <show_in_default>1</show_in_default>
267
+ <show_in_website>1</show_in_website>
268
+ <show_in_store>1</show_in_store>
269
+ </icon_btn>
270
+ <login_btn translate="label">
271
+ <label>Login Button</label>
272
+ <frontend_type>image</frontend_type>
273
+ <backend_model>adminhtml/system_config_backend_image</backend_model>
274
+ <upload_dir config="system/filesystem/media" scope_info="1">pslogin</upload_dir>
275
+ <base_url type="media" scope_info="1">pslogin</base_url>
276
+ <sort_order>5</sort_order>
277
+ <show_in_default>1</show_in_default>
278
+ <show_in_website>1</show_in_website>
279
+ <show_in_store>1</show_in_store>
280
+ </login_btn>
281
+ <register_btn translate="label">
282
+ <label>Registration Button</label>
283
+ <frontend_type>image</frontend_type>
284
+ <backend_model>adminhtml/system_config_backend_image</backend_model>
285
+ <upload_dir config="system/filesystem/media" scope_info="1">pslogin</upload_dir>
286
+ <base_url type="media" scope_info="1">pslogin</base_url>
287
+ <sort_order>6</sort_order>
288
+ <show_in_default>1</show_in_default>
289
+ <show_in_website>1</show_in_website>
290
+ <show_in_store>1</show_in_store>
291
+ <comment>Optional fields. Default images of buttons are provided with extension.</comment>
292
+ </register_btn>
293
+ <login_btn_text translate="label">
294
+ <label>Login Button Text</label>
295
+ <frontend_type>text</frontend_type>
296
+ <sort_order>7</sort_order>
297
+ <show_in_default>1</show_in_default>
298
+ <show_in_website>1</show_in_website>
299
+ <show_in_store>1</show_in_store>
300
+ </login_btn_text>
301
+ <register_btn_text translate="label">
302
+ <label>Registration Button Text</label>
303
+ <frontend_type>text</frontend_type>
304
+ <sort_order>8</sort_order>
305
+ <show_in_default>1</show_in_default>
306
+ <show_in_website>1</show_in_website>
307
+ <show_in_store>1</show_in_store>
308
+ </register_btn_text>
309
+ </fields>
310
+ </facebook>
311
+
312
+ <twitter>
313
+ <label>Twitter</label>
314
+ <expanded>1</expanded>
315
+ <sort_order>60</sort_order>
316
+ <frontend_type>text</frontend_type>
317
+ <show_in_default>1</show_in_default>
318
+ <show_in_website>1</show_in_website>
319
+ <show_in_store>1</show_in_store>
320
+
321
+ <fields>
322
+ <enable translate="label">
323
+ <label>Enable</label>
324
+ <frontend_type>select</frontend_type>
325
+ <source_model>adminhtml/system_config_source_yesno</source_model>
326
+ <sort_order>1</sort_order>
327
+ <show_in_default>1</show_in_default>
328
+ <show_in_website>1</show_in_website>
329
+ <show_in_store>1</show_in_store>
330
+ <comment>For configuration instructions, please &lt;a href="http://wiki.plumrocket.com/wiki/Magento_Twitter_and_Facebook_Login_v1.x_Twitter_Login_Configuration" target="_blank"&gt;click here&lt;/a&gt;.</comment>
331
+ </enable>
332
+ <application_id translate="label">
333
+ <label>Consumer key (API Key)</label>
334
+ <frontend_type>text</frontend_type>
335
+ <sort_order>2</sort_order>
336
+ <show_in_default>1</show_in_default>
337
+ <show_in_website>1</show_in_website>
338
+ <show_in_store>1</show_in_store>
339
+ </application_id>
340
+ <secret translate="label">
341
+ <label>Consumer secret (API Secret)</label>
342
+ <frontend_type>obscure</frontend_type>
343
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
344
+ <sort_order>3</sort_order>
345
+ <show_in_default>1</show_in_default>
346
+ <show_in_website>1</show_in_website>
347
+ <show_in_store>1</show_in_store>
348
+ </secret>
349
+ <icon_btn translate="label">
350
+ <label>Small Icon Button</label>
351
+ <frontend_type>image</frontend_type>
352
+ <backend_model>adminhtml/system_config_backend_image</backend_model>
353
+ <upload_dir config="system/filesystem/media" scope_info="1">pslogin</upload_dir>
354
+ <base_url type="media" scope_info="1">pslogin</base_url>
355
+ <sort_order>4</sort_order>
356
+ <show_in_default>1</show_in_default>
357
+ <show_in_website>1</show_in_website>
358
+ <show_in_store>1</show_in_store>
359
+ </icon_btn>
360
+ <login_btn translate="label">
361
+ <label>Login Button</label>
362
+ <frontend_type>image</frontend_type>
363
+ <backend_model>adminhtml/system_config_backend_image</backend_model>
364
+ <upload_dir config="system/filesystem/media" scope_info="1">pslogin</upload_dir>
365
+ <base_url type="media" scope_info="1">pslogin</base_url>
366
+ <sort_order>5</sort_order>
367
+ <show_in_default>1</show_in_default>
368
+ <show_in_website>1</show_in_website>
369
+ <show_in_store>1</show_in_store>
370
+ </login_btn>
371
+ <register_btn translate="label">
372
+ <label>Registration Button</label>
373
+ <frontend_type>image</frontend_type>
374
+ <backend_model>adminhtml/system_config_backend_image</backend_model>
375
+ <upload_dir config="system/filesystem/media" scope_info="1">pslogin</upload_dir>
376
+ <base_url type="media" scope_info="1">pslogin</base_url>
377
+ <sort_order>6</sort_order>
378
+ <show_in_default>1</show_in_default>
379
+ <show_in_website>1</show_in_website>
380
+ <show_in_store>1</show_in_store>
381
+ <comment>Optional fields. Default images of buttons are provided with extension.</comment>
382
+ </register_btn>
383
+ <login_btn_text translate="label">
384
+ <label>Login Button Text</label>
385
+ <frontend_type>text</frontend_type>
386
+ <sort_order>7</sort_order>
387
+ <show_in_default>1</show_in_default>
388
+ <show_in_website>1</show_in_website>
389
+ <show_in_store>1</show_in_store>
390
+ </login_btn_text>
391
+ <register_btn_text translate="label">
392
+ <label>Registration Button Text</label>
393
+ <frontend_type>text</frontend_type>
394
+ <sort_order>8</sort_order>
395
+ <show_in_default>1</show_in_default>
396
+ <show_in_website>1</show_in_website>
397
+ <show_in_store>1</show_in_store>
398
+ </register_btn_text>
399
+ </fields>
400
+ </twitter>
401
+
402
+ <googleplus>
403
+ <label>Google+ / Blogger</label>
404
+ <sort_order>70</sort_order>
405
+ <frontend_type>text</frontend_type>
406
+ <show_in_default>1</show_in_default>
407
+ <show_in_website>1</show_in_website>
408
+ <show_in_store>1</show_in_store>
409
+
410
+ <fields>
411
+ <version translate="label">
412
+ <frontend_type>text</frontend_type>
413
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
414
+ <sort_order>1</sort_order>
415
+ <show_in_default>1</show_in_default>
416
+ <show_in_website>1</show_in_website>
417
+ <show_in_store>1</show_in_store>
418
+ </version>
419
+ </fields>
420
+ </googleplus>
421
+
422
+ <linkedin>
423
+ <label>LinkedIn</label>
424
+ <sort_order>80</sort_order>
425
+ <frontend_type>text</frontend_type>
426
+ <show_in_default>1</show_in_default>
427
+ <show_in_website>1</show_in_website>
428
+ <show_in_store>1</show_in_store>
429
+
430
+ <fields>
431
+ <version translate="label">
432
+ <frontend_type>text</frontend_type>
433
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
434
+ <sort_order>1</sort_order>
435
+ <show_in_default>1</show_in_default>
436
+ <show_in_website>1</show_in_website>
437
+ <show_in_store>1</show_in_store>
438
+ </version>
439
+ </fields>
440
+ </linkedin>
441
+
442
+ <yahoo>
443
+ <label>Yahoo!</label>
444
+ <sort_order>90</sort_order>
445
+ <frontend_type>text</frontend_type>
446
+ <show_in_default>1</show_in_default>
447
+ <show_in_website>1</show_in_website>
448
+ <show_in_store>1</show_in_store>
449
+
450
+ <fields>
451
+ <version translate="label">
452
+ <frontend_type>text</frontend_type>
453
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
454
+ <sort_order>1</sort_order>
455
+ <show_in_default>1</show_in_default>
456
+ <show_in_website>1</show_in_website>
457
+ <show_in_store>1</show_in_store>
458
+ </version>
459
+ </fields>
460
+ </yahoo>
461
+
462
+ <live>
463
+ <label>Live / Hotmail / MSN (Microsoft Account)</label>
464
+ <sort_order>100</sort_order>
465
+ <frontend_type>text</frontend_type>
466
+ <show_in_default>1</show_in_default>
467
+ <show_in_website>1</show_in_website>
468
+ <show_in_store>1</show_in_store>
469
+
470
+ <fields>
471
+ <version translate="label">
472
+ <frontend_type>text</frontend_type>
473
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
474
+ <sort_order>1</sort_order>
475
+ <show_in_default>1</show_in_default>
476
+ <show_in_website>1</show_in_website>
477
+ <show_in_store>1</show_in_store>
478
+ </version>
479
+ </fields>
480
+ </live>
481
+
482
+ <pinterest>
483
+ <label>Pinterest</label>
484
+ <sort_order>110</sort_order>
485
+ <frontend_type>text</frontend_type>
486
+ <show_in_default>1</show_in_default>
487
+ <show_in_website>1</show_in_website>
488
+ <show_in_store>1</show_in_store>
489
+
490
+ <fields>
491
+ <version translate="label">
492
+ <frontend_type>text</frontend_type>
493
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
494
+ <sort_order>1</sort_order>
495
+ <show_in_default>1</show_in_default>
496
+ <show_in_website>1</show_in_website>
497
+ <show_in_store>1</show_in_store>
498
+ </version>
499
+ </fields>
500
+ </pinterest>
501
+
502
+ <amazon>
503
+ <label>Amazon</label>
504
+ <sort_order>120</sort_order>
505
+ <frontend_type>text</frontend_type>
506
+ <show_in_default>1</show_in_default>
507
+ <show_in_website>1</show_in_website>
508
+ <show_in_store>1</show_in_store>
509
+
510
+ <fields>
511
+ <version translate="label">
512
+ <frontend_type>text</frontend_type>
513
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
514
+ <sort_order>1</sort_order>
515
+ <show_in_default>1</show_in_default>
516
+ <show_in_website>1</show_in_website>
517
+ <show_in_store>1</show_in_store>
518
+ </version>
519
+ </fields>
520
+ </amazon>
521
+
522
+ <aol>
523
+ <label>AOL.</label>
524
+ <sort_order>130</sort_order>
525
+ <frontend_type>text</frontend_type>
526
+ <show_in_default>1</show_in_default>
527
+ <show_in_website>1</show_in_website>
528
+ <show_in_store>1</show_in_store>
529
+
530
+ <fields>
531
+ <version translate="label">
532
+ <frontend_type>text</frontend_type>
533
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
534
+ <sort_order>1</sort_order>
535
+ <show_in_default>1</show_in_default>
536
+ <show_in_website>1</show_in_website>
537
+ <show_in_store>1</show_in_store>
538
+ </version>
539
+ </fields>
540
+ </aol>
541
+
542
+ <github>
543
+ <label>GitHub</label>
544
+ <sort_order>140</sort_order>
545
+ <frontend_type>text</frontend_type>
546
+ <show_in_default>1</show_in_default>
547
+ <show_in_website>1</show_in_website>
548
+ <show_in_store>1</show_in_store>
549
+
550
+ <fields>
551
+ <version translate="label">
552
+ <frontend_type>text</frontend_type>
553
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
554
+ <sort_order>1</sort_order>
555
+ <show_in_default>1</show_in_default>
556
+ <show_in_website>1</show_in_website>
557
+ <show_in_store>1</show_in_store>
558
+ </version>
559
+ </fields>
560
+ </github>
561
+
562
+ <instagram>
563
+ <label>Instagram</label>
564
+ <sort_order>150</sort_order>
565
+ <frontend_type>text</frontend_type>
566
+ <show_in_default>1</show_in_default>
567
+ <show_in_website>1</show_in_website>
568
+ <show_in_store>1</show_in_store>
569
+
570
+ <fields>
571
+ <version translate="label">
572
+ <frontend_type>text</frontend_type>
573
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
574
+ <sort_order>1</sort_order>
575
+ <show_in_default>1</show_in_default>
576
+ <show_in_website>1</show_in_website>
577
+ <show_in_store>1</show_in_store>
578
+ </version>
579
+ </fields>
580
+ </instagram>
581
+
582
+ <foursquare>
583
+ <label>Foursquare</label>
584
+ <sort_order>160</sort_order>
585
+ <frontend_type>text</frontend_type>
586
+ <show_in_default>1</show_in_default>
587
+ <show_in_website>1</show_in_website>
588
+ <show_in_store>1</show_in_store>
589
+
590
+ <fields>
591
+ <version translate="label">
592
+ <frontend_type>text</frontend_type>
593
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
594
+ <sort_order>1</sort_order>
595
+ <show_in_default>1</show_in_default>
596
+ <show_in_website>1</show_in_website>
597
+ <show_in_store>1</show_in_store>
598
+ </version>
599
+ </fields>
600
+ </foursquare>
601
+
602
+ <dropbox>
603
+ <label>DropBox</label>
604
+ <sort_order>170</sort_order>
605
+ <frontend_type>text</frontend_type>
606
+ <show_in_default>1</show_in_default>
607
+ <show_in_website>1</show_in_website>
608
+ <show_in_store>1</show_in_store>
609
+
610
+ <fields>
611
+ <version translate="label">
612
+ <frontend_type>text</frontend_type>
613
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
614
+ <sort_order>1</sort_order>
615
+ <show_in_default>1</show_in_default>
616
+ <show_in_website>1</show_in_website>
617
+ <show_in_store>1</show_in_store>
618
+ </version>
619
+ </fields>
620
+ </dropbox>
621
+
622
+ <disqus>
623
+ <label>Disqus</label>
624
+ <sort_order>180</sort_order>
625
+ <frontend_type>text</frontend_type>
626
+ <show_in_default>1</show_in_default>
627
+ <show_in_website>1</show_in_website>
628
+ <show_in_store>1</show_in_store>
629
+
630
+ <fields>
631
+ <version translate="label">
632
+ <frontend_type>text</frontend_type>
633
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
634
+ <sort_order>1</sort_order>
635
+ <show_in_default>1</show_in_default>
636
+ <show_in_website>1</show_in_website>
637
+ <show_in_store>1</show_in_store>
638
+ </version>
639
+ </fields>
640
+ </disqus>
641
+
642
+ <livejournal>
643
+ <label>LiveJournal</label>
644
+ <sort_order>190</sort_order>
645
+ <frontend_type>text</frontend_type>
646
+ <show_in_default>1</show_in_default>
647
+ <show_in_website>1</show_in_website>
648
+ <show_in_store>1</show_in_store>
649
+
650
+ <fields>
651
+ <version translate="label">
652
+ <frontend_type>text</frontend_type>
653
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
654
+ <sort_order>1</sort_order>
655
+ <show_in_default>1</show_in_default>
656
+ <show_in_website>1</show_in_website>
657
+ <show_in_store>1</show_in_store>
658
+ </version>
659
+ </fields>
660
+ </livejournal>
661
+
662
+ <tumblr>
663
+ <label>Tumblr</label>
664
+ <sort_order>200</sort_order>
665
+ <frontend_type>text</frontend_type>
666
+ <show_in_default>1</show_in_default>
667
+ <show_in_website>1</show_in_website>
668
+ <show_in_store>1</show_in_store>
669
+
670
+ <fields>
671
+ <version translate="label">
672
+ <frontend_type>text</frontend_type>
673
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
674
+ <sort_order>1</sort_order>
675
+ <show_in_default>1</show_in_default>
676
+ <show_in_website>1</show_in_website>
677
+ <show_in_store>1</show_in_store>
678
+ </version>
679
+ </fields>
680
+ </tumblr>
681
+
682
+ <openid>
683
+ <label>OpenID</label>
684
+ <sort_order>210</sort_order>
685
+ <frontend_type>text</frontend_type>
686
+ <show_in_default>1</show_in_default>
687
+ <show_in_website>1</show_in_website>
688
+ <show_in_store>1</show_in_store>
689
+
690
+ <fields>
691
+ <version translate="label">
692
+ <frontend_type>text</frontend_type>
693
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
694
+ <sort_order>1</sort_order>
695
+ <show_in_default>1</show_in_default>
696
+ <show_in_website>1</show_in_website>
697
+ <show_in_store>1</show_in_store>
698
+ </version>
699
+ </fields>
700
+ </openid>
701
+
702
+ <flickr>
703
+ <label>Flickr</label>
704
+ <sort_order>220</sort_order>
705
+ <frontend_type>text</frontend_type>
706
+ <show_in_default>1</show_in_default>
707
+ <show_in_website>1</show_in_website>
708
+ <show_in_store>1</show_in_store>
709
+
710
+ <fields>
711
+ <version translate="label">
712
+ <frontend_type>text</frontend_type>
713
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
714
+ <sort_order>1</sort_order>
715
+ <show_in_default>1</show_in_default>
716
+ <show_in_website>1</show_in_website>
717
+ <show_in_store>1</show_in_store>
718
+ </version>
719
+ </fields>
720
+ </flickr>
721
+
722
+ <wordpress>
723
+ <label>WordPress</label>
724
+ <sort_order>230</sort_order>
725
+ <frontend_type>text</frontend_type>
726
+ <show_in_default>1</show_in_default>
727
+ <show_in_website>1</show_in_website>
728
+ <show_in_store>1</show_in_store>
729
+
730
+ <fields>
731
+ <version translate="label">
732
+ <frontend_type>text</frontend_type>
733
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
734
+ <sort_order>1</sort_order>
735
+ <show_in_default>1</show_in_default>
736
+ <show_in_website>1</show_in_website>
737
+ <show_in_store>1</show_in_store>
738
+ </version>
739
+ </fields>
740
+ </wordpress>
741
+
742
+ <vkontakte>
743
+ <label>Vkontakte</label>
744
+ <sort_order>240</sort_order>
745
+ <frontend_type>text</frontend_type>
746
+ <show_in_default>1</show_in_default>
747
+ <show_in_website>1</show_in_website>
748
+ <show_in_store>1</show_in_store>
749
+
750
+ <fields>
751
+ <version translate="label">
752
+ <frontend_type>text</frontend_type>
753
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
754
+ <sort_order>1</sort_order>
755
+ <show_in_default>1</show_in_default>
756
+ <show_in_website>1</show_in_website>
757
+ <show_in_store>1</show_in_store>
758
+ </version>
759
+ </fields>
760
+ </vkontakte>
761
+
762
+ <odnoklassniki>
763
+ <label>Odnoklassniki</label>
764
+ <sort_order>250</sort_order>
765
+ <frontend_type>text</frontend_type>
766
+ <show_in_default>1</show_in_default>
767
+ <show_in_website>1</show_in_website>
768
+ <show_in_store>1</show_in_store>
769
+
770
+ <fields>
771
+ <version translate="label">
772
+ <frontend_type>text</frontend_type>
773
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
774
+ <sort_order>1</sort_order>
775
+ <show_in_default>1</show_in_default>
776
+ <show_in_website>1</show_in_website>
777
+ <show_in_store>1</show_in_store>
778
+ </version>
779
+ </fields>
780
+ </odnoklassniki>
781
+
782
+ <mailru>
783
+ <label>Mail.ru</label>
784
+ <sort_order>260</sort_order>
785
+ <frontend_type>text</frontend_type>
786
+ <show_in_default>1</show_in_default>
787
+ <show_in_website>1</show_in_website>
788
+ <show_in_store>1</show_in_store>
789
+
790
+ <fields>
791
+ <version translate="label">
792
+ <frontend_type>text</frontend_type>
793
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
794
+ <sort_order>1</sort_order>
795
+ <show_in_default>1</show_in_default>
796
+ <show_in_website>1</show_in_website>
797
+ <show_in_store>1</show_in_store>
798
+ </version>
799
+ </fields>
800
+ </mailru>
801
+
802
+ <yandex>
803
+ <label>Yandex</label>
804
+ <sort_order>270</sort_order>
805
+ <frontend_type>text</frontend_type>
806
+ <show_in_default>1</show_in_default>
807
+ <show_in_website>1</show_in_website>
808
+ <show_in_store>1</show_in_store>
809
+
810
+ <fields>
811
+ <version translate="label">
812
+ <frontend_type>text</frontend_type>
813
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
814
+ <sort_order>1</sort_order>
815
+ <show_in_default>1</show_in_default>
816
+ <show_in_website>1</show_in_website>
817
+ <show_in_store>1</show_in_store>
818
+ </version>
819
+ </fields>
820
+ </yandex>
821
+
822
+ <paypal>
823
+ <label>PayPal</label>
824
+ <sort_order>280</sort_order>
825
+ <frontend_type>text</frontend_type>
826
+ <show_in_default>1</show_in_default>
827
+ <show_in_website>1</show_in_website>
828
+ <show_in_store>1</show_in_store>
829
+
830
+ <fields>
831
+ <version translate="label">
832
+ <frontend_type>text</frontend_type>
833
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
834
+ <sort_order>1</sort_order>
835
+ <show_in_default>1</show_in_default>
836
+ <show_in_website>1</show_in_website>
837
+ <show_in_store>1</show_in_store>
838
+ </version>
839
+ </fields>
840
+ </paypal>
841
+
842
+ <myspace>
843
+ <label>MySpace</label>
844
+ <sort_order>290</sort_order>
845
+ <frontend_type>text</frontend_type>
846
+ <show_in_default>1</show_in_default>
847
+ <show_in_website>1</show_in_website>
848
+ <show_in_store>1</show_in_store>
849
+
850
+ <fields>
851
+ <version translate="label">
852
+ <frontend_type>text</frontend_type>
853
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
854
+ <sort_order>1</sort_order>
855
+ <show_in_default>1</show_in_default>
856
+ <show_in_website>1</show_in_website>
857
+ <show_in_store>1</show_in_store>
858
+ </version>
859
+ </fields>
860
+ </myspace>
861
+
862
+ <salesforce>
863
+ <label>Salesforce</label>
864
+ <sort_order>300</sort_order>
865
+ <frontend_type>text</frontend_type>
866
+ <show_in_default>1</show_in_default>
867
+ <show_in_website>1</show_in_website>
868
+ <show_in_store>1</show_in_store>
869
+
870
+ <fields>
871
+ <version translate="label">
872
+ <frontend_type>text</frontend_type>
873
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
874
+ <sort_order>1</sort_order>
875
+ <show_in_default>1</show_in_default>
876
+ <show_in_website>1</show_in_website>
877
+ <show_in_store>1</show_in_store>
878
+ </version>
879
+ </fields>
880
+ </salesforce>
881
+
882
+ <steam>
883
+ <label>Steam Community</label>
884
+ <sort_order>310</sort_order>
885
+ <frontend_type>text</frontend_type>
886
+ <show_in_default>1</show_in_default>
887
+ <show_in_website>1</show_in_website>
888
+ <show_in_store>1</show_in_store>
889
+
890
+ <fields>
891
+ <version translate="label">
892
+ <frontend_type>text</frontend_type>
893
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
894
+ <sort_order>1</sort_order>
895
+ <show_in_default>1</show_in_default>
896
+ <show_in_website>1</show_in_website>
897
+ <show_in_store>1</show_in_store>
898
+ </version>
899
+ </fields>
900
+ </steam>
901
+
902
+ <hyves>
903
+ <label>Hyves</label>
904
+ <sort_order>320</sort_order>
905
+ <frontend_type>text</frontend_type>
906
+ <show_in_default>1</show_in_default>
907
+ <show_in_website>1</show_in_website>
908
+ <show_in_store>1</show_in_store>
909
+
910
+ <fields>
911
+ <version translate="label">
912
+ <frontend_type>text</frontend_type>
913
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
914
+ <sort_order>1</sort_order>
915
+ <show_in_default>1</show_in_default>
916
+ <show_in_website>1</show_in_website>
917
+ <show_in_store>1</show_in_store>
918
+ </version>
919
+ </fields>
920
+ </hyves>
921
+
922
+ <stackexchange>
923
+ <label>StackExchange</label>
924
+ <sort_order>330</sort_order>
925
+ <frontend_type>text</frontend_type>
926
+ <show_in_default>1</show_in_default>
927
+ <show_in_website>1</show_in_website>
928
+ <show_in_store>1</show_in_store>
929
+
930
+ <fields>
931
+ <version translate="label">
932
+ <frontend_type>text</frontend_type>
933
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
934
+ <sort_order>1</sort_order>
935
+ <show_in_default>1</show_in_default>
936
+ <show_in_website>1</show_in_website>
937
+ <show_in_store>1</show_in_store>
938
+ </version>
939
+ </fields>
940
+ </stackexchange>
941
+
942
+ <evernote>
943
+ <label>Evernote</label>
944
+ <sort_order>340</sort_order>
945
+ <frontend_type>text</frontend_type>
946
+ <show_in_default>1</show_in_default>
947
+ <show_in_website>1</show_in_website>
948
+ <show_in_store>1</show_in_store>
949
+
950
+ <fields>
951
+ <version translate="label">
952
+ <frontend_type>text</frontend_type>
953
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
954
+ <sort_order>1</sort_order>
955
+ <show_in_default>1</show_in_default>
956
+ <show_in_website>1</show_in_website>
957
+ <show_in_store>1</show_in_store>
958
+ </version>
959
+ </fields>
960
+ </evernote>
961
+
962
+ <mixi>
963
+ <label>Mixi</label>
964
+ <sort_order>350</sort_order>
965
+ <frontend_type>text</frontend_type>
966
+ <show_in_default>1</show_in_default>
967
+ <show_in_website>1</show_in_website>
968
+ <show_in_store>1</show_in_store>
969
+
970
+ <fields>
971
+ <version translate="label">
972
+ <frontend_type>text</frontend_type>
973
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
974
+ <sort_order>1</sort_order>
975
+ <show_in_default>1</show_in_default>
976
+ <show_in_website>1</show_in_website>
977
+ <show_in_store>1</show_in_store>
978
+ </version>
979
+ </fields>
980
+ </mixi>
981
+
982
+ <mydigipass>
983
+ <label>MYDIGIPASS.COM</label>
984
+ <sort_order>360</sort_order>
985
+ <frontend_type>text</frontend_type>
986
+ <show_in_default>1</show_in_default>
987
+ <show_in_website>1</show_in_website>
988
+ <show_in_store>1</show_in_store>
989
+
990
+ <fields>
991
+ <version translate="label">
992
+ <frontend_type>text</frontend_type>
993
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
994
+ <sort_order>1</sort_order>
995
+ <show_in_default>1</show_in_default>
996
+ <show_in_website>1</show_in_website>
997
+ <show_in_store>1</show_in_store>
998
+ </version>
999
+ </fields>
1000
+ </mydigipass>
1001
+
1002
+ <netlog>
1003
+ <label>Netlog</label>
1004
+ <sort_order>370</sort_order>
1005
+ <frontend_type>text</frontend_type>
1006
+ <show_in_default>1</show_in_default>
1007
+ <show_in_website>1</show_in_website>
1008
+ <show_in_store>1</show_in_store>
1009
+
1010
+ <fields>
1011
+ <version translate="label">
1012
+ <frontend_type>text</frontend_type>
1013
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1014
+ <sort_order>1</sort_order>
1015
+ <show_in_default>1</show_in_default>
1016
+ <show_in_website>1</show_in_website>
1017
+ <show_in_store>1</show_in_store>
1018
+ </version>
1019
+ </fields>
1020
+ </netlog>
1021
+
1022
+ <qq>
1023
+ <label>QQ</label>
1024
+ <sort_order>380</sort_order>
1025
+ <frontend_type>text</frontend_type>
1026
+ <show_in_default>1</show_in_default>
1027
+ <show_in_website>1</show_in_website>
1028
+ <show_in_store>1</show_in_store>
1029
+
1030
+ <fields>
1031
+ <version translate="label">
1032
+ <frontend_type>text</frontend_type>
1033
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1034
+ <sort_order>1</sort_order>
1035
+ <show_in_default>1</show_in_default>
1036
+ <show_in_website>1</show_in_website>
1037
+ <show_in_store>1</show_in_store>
1038
+ </version>
1039
+ </fields>
1040
+ </qq>
1041
+
1042
+ <sinaweibo>
1043
+ <label>Sina Weibo</label>
1044
+ <sort_order>390</sort_order>
1045
+ <frontend_type>text</frontend_type>
1046
+ <show_in_default>1</show_in_default>
1047
+ <show_in_website>1</show_in_website>
1048
+ <show_in_store>1</show_in_store>
1049
+
1050
+ <fields>
1051
+ <version translate="label">
1052
+ <frontend_type>text</frontend_type>
1053
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1054
+ <sort_order>1</sort_order>
1055
+ <show_in_default>1</show_in_default>
1056
+ <show_in_website>1</show_in_website>
1057
+ <show_in_store>1</show_in_store>
1058
+ </version>
1059
+ </fields>
1060
+ </sinaweibo>
1061
+
1062
+ <soundcloud>
1063
+ <label>SoundCloud</label>
1064
+ <sort_order>400</sort_order>
1065
+ <frontend_type>text</frontend_type>
1066
+ <show_in_default>1</show_in_default>
1067
+ <show_in_website>1</show_in_website>
1068
+ <show_in_store>1</show_in_store>
1069
+
1070
+ <fields>
1071
+ <version translate="label">
1072
+ <frontend_type>text</frontend_type>
1073
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1074
+ <sort_order>1</sort_order>
1075
+ <show_in_default>1</show_in_default>
1076
+ <show_in_website>1</show_in_website>
1077
+ <show_in_store>1</show_in_store>
1078
+ </version>
1079
+ </fields>
1080
+ </soundcloud>
1081
+
1082
+ <tencentweibo>
1083
+ <label>Tencent Weibo</label>
1084
+ <sort_order>410</sort_order>
1085
+ <frontend_type>text</frontend_type>
1086
+ <show_in_default>1</show_in_default>
1087
+ <show_in_website>1</show_in_website>
1088
+ <show_in_store>1</show_in_store>
1089
+
1090
+ <fields>
1091
+ <version translate="label">
1092
+ <frontend_type>text</frontend_type>
1093
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1094
+ <sort_order>1</sort_order>
1095
+ <show_in_default>1</show_in_default>
1096
+ <show_in_website>1</show_in_website>
1097
+ <show_in_store>1</show_in_store>
1098
+ </version>
1099
+ </fields>
1100
+ </tencentweibo>
1101
+
1102
+ <verisign>
1103
+ <label>Verisign</label>
1104
+ <sort_order>420</sort_order>
1105
+ <frontend_type>text</frontend_type>
1106
+ <show_in_default>1</show_in_default>
1107
+ <show_in_website>1</show_in_website>
1108
+ <show_in_store>1</show_in_store>
1109
+
1110
+ <fields>
1111
+ <version translate="label">
1112
+ <frontend_type>text</frontend_type>
1113
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1114
+ <sort_order>1</sort_order>
1115
+ <show_in_default>1</show_in_default>
1116
+ <show_in_website>1</show_in_website>
1117
+ <show_in_store>1</show_in_store>
1118
+ </version>
1119
+ </fields>
1120
+ </verisign>
1121
+
1122
+ <xing>
1123
+ <label>XING</label>
1124
+ <sort_order>430</sort_order>
1125
+ <frontend_type>text</frontend_type>
1126
+ <show_in_default>1</show_in_default>
1127
+ <show_in_website>1</show_in_website>
1128
+ <show_in_store>1</show_in_store>
1129
+
1130
+ <fields>
1131
+ <version translate="label">
1132
+ <frontend_type>text</frontend_type>
1133
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1134
+ <sort_order>1</sort_order>
1135
+ <show_in_default>1</show_in_default>
1136
+ <show_in_website>1</show_in_website>
1137
+ <show_in_store>1</show_in_store>
1138
+ </version>
1139
+ </fields>
1140
+ </xing>
1141
+
1142
+ <kaixin>
1143
+ <label>Kaixin</label>
1144
+ <sort_order>440</sort_order>
1145
+ <frontend_type>text</frontend_type>
1146
+ <show_in_default>1</show_in_default>
1147
+ <show_in_website>1</show_in_website>
1148
+ <show_in_store>1</show_in_store>
1149
+
1150
+ <fields>
1151
+ <version translate="label">
1152
+ <frontend_type>text</frontend_type>
1153
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1154
+ <sort_order>1</sort_order>
1155
+ <show_in_default>1</show_in_default>
1156
+ <show_in_website>1</show_in_website>
1157
+ <show_in_store>1</show_in_store>
1158
+ </version>
1159
+ </fields>
1160
+ </kaixin>
1161
+
1162
+ <orange>
1163
+ <label>Orange</label>
1164
+ <sort_order>450</sort_order>
1165
+ <frontend_type>text</frontend_type>
1166
+ <show_in_default>1</show_in_default>
1167
+ <show_in_website>1</show_in_website>
1168
+ <show_in_store>1</show_in_store>
1169
+
1170
+ <fields>
1171
+ <version translate="label">
1172
+ <frontend_type>text</frontend_type>
1173
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1174
+ <sort_order>1</sort_order>
1175
+ <show_in_default>1</show_in_default>
1176
+ <show_in_website>1</show_in_website>
1177
+ <show_in_store>1</show_in_store>
1178
+ </version>
1179
+ </fields>
1180
+ </orange>
1181
+
1182
+ <persona>
1183
+ <label>Persona</label>
1184
+ <sort_order>460</sort_order>
1185
+ <frontend_type>text</frontend_type>
1186
+ <show_in_default>1</show_in_default>
1187
+ <show_in_website>1</show_in_website>
1188
+ <show_in_store>1</show_in_store>
1189
+
1190
+ <fields>
1191
+ <version translate="label">
1192
+ <frontend_type>text</frontend_type>
1193
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1194
+ <sort_order>1</sort_order>
1195
+ <show_in_default>1</show_in_default>
1196
+ <show_in_website>1</show_in_website>
1197
+ <show_in_store>1</show_in_store>
1198
+ </version>
1199
+ </fields>
1200
+ </persona>
1201
+
1202
+ <ulogin>
1203
+ <label>Ulogin</label>
1204
+ <sort_order>470</sort_order>
1205
+ <frontend_type>text</frontend_type>
1206
+ <show_in_default>1</show_in_default>
1207
+ <show_in_website>1</show_in_website>
1208
+ <show_in_store>1</show_in_store>
1209
+
1210
+ <fields>
1211
+ <version translate="label">
1212
+ <frontend_type>text</frontend_type>
1213
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1214
+ <sort_order>1</sort_order>
1215
+ <show_in_default>1</show_in_default>
1216
+ <show_in_website>1</show_in_website>
1217
+ <show_in_store>1</show_in_store>
1218
+ </version>
1219
+ </fields>
1220
+ </ulogin>
1221
+
1222
+ <oauth>
1223
+ <label>OAuth</label>
1224
+ <sort_order>480</sort_order>
1225
+ <frontend_type>text</frontend_type>
1226
+ <show_in_default>1</show_in_default>
1227
+ <show_in_website>1</show_in_website>
1228
+ <show_in_store>1</show_in_store>
1229
+
1230
+ <fields>
1231
+ <version translate="label">
1232
+ <frontend_type>text</frontend_type>
1233
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1234
+ <sort_order>1</sort_order>
1235
+ <show_in_default>1</show_in_default>
1236
+ <show_in_website>1</show_in_website>
1237
+ <show_in_store>1</show_in_store>
1238
+ </version>
1239
+ </fields>
1240
+ </oauth>
1241
+
1242
+ <orkut>
1243
+ <label>Orkut</label>
1244
+ <sort_order>490</sort_order>
1245
+ <frontend_type>text</frontend_type>
1246
+ <show_in_default>1</show_in_default>
1247
+ <show_in_website>1</show_in_website>
1248
+ <show_in_store>1</show_in_store>
1249
+
1250
+ <fields>
1251
+ <version translate="label">
1252
+ <frontend_type>text</frontend_type>
1253
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1254
+ <sort_order>1</sort_order>
1255
+ <show_in_default>1</show_in_default>
1256
+ <show_in_website>1</show_in_website>
1257
+ <show_in_store>1</show_in_store>
1258
+ </version>
1259
+ </fields>
1260
+ </orkut>
1261
+
1262
+ <bitbucket>
1263
+ <label>Bitbucket</label>
1264
+ <sort_order>500</sort_order>
1265
+ <frontend_type>text</frontend_type>
1266
+ <show_in_default>1</show_in_default>
1267
+ <show_in_website>1</show_in_website>
1268
+ <show_in_store>1</show_in_store>
1269
+
1270
+ <fields>
1271
+ <version translate="label">
1272
+ <frontend_type>text</frontend_type>
1273
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1274
+ <sort_order>1</sort_order>
1275
+ <show_in_default>1</show_in_default>
1276
+ <show_in_website>1</show_in_website>
1277
+ <show_in_store>1</show_in_store>
1278
+ </version>
1279
+ </fields>
1280
+ </bitbucket>
1281
+
1282
+ <browserid>
1283
+ <label>BrowserID</label>
1284
+ <sort_order>510</sort_order>
1285
+ <frontend_type>text</frontend_type>
1286
+ <show_in_default>1</show_in_default>
1287
+ <show_in_website>1</show_in_website>
1288
+ <show_in_store>1</show_in_store>
1289
+
1290
+ <fields>
1291
+ <version translate="label">
1292
+ <frontend_type>text</frontend_type>
1293
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1294
+ <sort_order>1</sort_order>
1295
+ <show_in_default>1</show_in_default>
1296
+ <show_in_website>1</show_in_website>
1297
+ <show_in_store>1</show_in_store>
1298
+ </version>
1299
+ </fields>
1300
+ </browserid>
1301
+
1302
+ <skyrock>
1303
+ <label>Skyrock</label>
1304
+ <sort_order>520</sort_order>
1305
+ <frontend_type>text</frontend_type>
1306
+ <show_in_default>1</show_in_default>
1307
+ <show_in_website>1</show_in_website>
1308
+ <show_in_store>1</show_in_store>
1309
+
1310
+ <fields>
1311
+ <version translate="label">
1312
+ <frontend_type>text</frontend_type>
1313
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1314
+ <sort_order>1</sort_order>
1315
+ <show_in_default>1</show_in_default>
1316
+ <show_in_website>1</show_in_website>
1317
+ <show_in_store>1</show_in_store>
1318
+ </version>
1319
+ </fields>
1320
+ </skyrock>
1321
+
1322
+ <virgilioit>
1323
+ <label>Virgilio.it</label>
1324
+ <sort_order>530</sort_order>
1325
+ <frontend_type>text</frontend_type>
1326
+ <show_in_default>1</show_in_default>
1327
+ <show_in_website>1</show_in_website>
1328
+ <show_in_store>1</show_in_store>
1329
+
1330
+ <fields>
1331
+ <version translate="label">
1332
+ <frontend_type>text</frontend_type>
1333
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1334
+ <sort_order>1</sort_order>
1335
+ <show_in_default>1</show_in_default>
1336
+ <show_in_website>1</show_in_website>
1337
+ <show_in_store>1</show_in_store>
1338
+ </version>
1339
+ </fields>
1340
+ </virgilioit>
1341
+
1342
+ <renren>
1343
+ <label>RenRen</label>
1344
+ <sort_order>540</sort_order>
1345
+ <frontend_type>text</frontend_type>
1346
+ <show_in_default>1</show_in_default>
1347
+ <show_in_website>1</show_in_website>
1348
+ <show_in_store>1</show_in_store>
1349
+
1350
+ <fields>
1351
+ <version translate="label">
1352
+ <frontend_type>text</frontend_type>
1353
+ <frontend_model>pslogin/system_config_notinstalled</frontend_model>
1354
+ <sort_order>1</sort_order>
1355
+ <show_in_default>1</show_in_default>
1356
+ <show_in_website>1</show_in_website>
1357
+ <show_in_store>1</show_in_store>
1358
+ </version>
1359
+ </fields>
1360
+ </renren>
1361
+
1362
+ </groups>
1363
+ </pslogin>
1364
+ </sections>
1365
+ </config>
app/code/community/Plumrocket/SocialLogin/sql/pslogin_setup/install-1.0.0.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+
18
+
19
+ $installer = $this;
20
+
21
+ $installer->startSetup();
22
+
23
+ /**
24
+ * Create table
25
+ */
26
+ // $installer->getConnection()->dropTable($installer->getTable('pslogin/account'));
27
+ $table = $installer->getConnection()
28
+ ->newTable($installer->getTable('pslogin/account'))
29
+ ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
30
+ 'identity' => true,
31
+ 'unsigned' => true,
32
+ 'nullable' => false,
33
+ 'primary' => true,
34
+ ), 'Id')
35
+ ->addColumn('type', Varien_Db_Ddl_Table::TYPE_CHAR, 30, array(
36
+ 'nullable' => false,
37
+ ), 'Login type')
38
+ // ->addColumn('user_id', Varien_Db_Ddl_Table::TYPE_BIGINT, null, array(
39
+ ->addColumn('user_id', Varien_Db_Ddl_Table::TYPE_CHAR, 255, array(
40
+ // 'unsigned' => true,
41
+ 'nullable' => false,
42
+ // 'default' => '0',
43
+ ), 'User Id')
44
+ ->addColumn('customer_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
45
+ 'unsigned' => true,
46
+ 'nullable' => false,
47
+ 'default' => '0',
48
+ ), 'Customer Id')
49
+ ->addIndex($installer->getIdxName('pslogin/account', array('type')),
50
+ array('type'))
51
+ ->addIndex($installer->getIdxName('pslogin/account', array('user_id')),
52
+ array('user_id'))
53
+ ->addIndex($installer->getIdxName('pslogin/account', array('customer_id')),
54
+ array('customer_id'))
55
+ ->addForeignKey($installer->getFkName('pslogin/account', 'customer_id', 'customer/entity', 'entity_id'),
56
+ 'customer_id', $installer->getTable('customer/entity'), 'entity_id',
57
+ Varien_Db_Ddl_Table::ACTION_CASCADE,
58
+ Varien_Db_Ddl_Table::ACTION_CASCADE)
59
+ ->setComment('Social Login Customer');
60
+ $installer->getConnection()->createTable($table);
61
+
62
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/pslogin.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <adminhtml_system_config_edit translate="label">
4
+ <update handle="editor" />
5
+ <reference name="head">
6
+ <action method="addCss"><stylesheet>css/plumrocket/pslogin/pslogin.css</stylesheet></action>
7
+ <!-- <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
8
+ <action method="addItem"><type>js_css</type><name>prototype/windows/themes/magento.css</name></action>
9
+ <action method="addCss"><stylesheet>lib/prototype/windows/themes/magento.css</stylesheet></action> -->
10
+
11
+ <action method="addItem"><type>skin_js</type><name>js/plumrocket/jquery-1.10.2.min.js</name></action>
12
+ <action method="addItem"><type>skin_js</type><name>js/plumrocket/pslogin/jquery-ui.min.js</name></action>
13
+ <action method="addItem"><type>skin_js</type><name>js/plumrocket/pslogin/pslogin.js</name></action>
14
+
15
+ <action method="addJs"><script>tiny_mce/tiny_mce.js</script></action>
16
+ <action method="addJs"><script>mage/adminhtml/wysiwyg/tiny_mce/setup.js</script></action>
17
+ <!-- <action method="addJs"><script>mage/adminhtml/variables.js</script></action> -->
18
+ <!-- <action method="addJs"><script>mage/adminhtml/wysiwyg/widget.js</script></action> -->
19
+ <action method="addItem"><type>skin_js</type><name>js/plumrocket/pslogin/config.js</name></action>
20
+ </reference>
21
+ </adminhtml_system_config_edit>
22
+ </layout>
app/design/adminhtml/default/default/template/pslogin/system/config/sortable.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+
19
+ <tr id="pslogin_general_sortable_drag_and_drop" <?php echo (!$buttons = $this->getButtons()) || count($buttons) <= 1 ? 'style="display: none;"' : ''; ?>>
20
+ <td class="label"><?php echo $this->element->getLabel(); ?></td>
21
+ <td colspan="3" class="social-td">
22
+ <div class="div-visible"><?php echo $this->__('Visible Buttons'); ?></div>
23
+ <div class="div-hidden"><?php echo $this->__('Hidden Buttons'); ?></div>
24
+
25
+ <div class="pslogin-form">
26
+ <ul id="sortable-visible" data-list="visible" class="soc-networks">
27
+ <?php foreach ($this->getPreparedButtons('visible') as $button) { ?>
28
+ <li id="visible-<?php echo $button['type']; ?>" class="ui-state-default <?php echo $button['type']; ?>" data-enable="pslogin_<?php echo $button['type']; ?>_enable">
29
+ <span class="soc-li-icon"></span>
30
+ <span class="soc-li-text"><?php echo $this->escapeHtml(ucfirst($button['type'])); ?></span>
31
+ </li>
32
+ <?php } ?>
33
+ </ul>
34
+
35
+ <ul id="sortable-hidden" data-list="hidden" class="soc-networks">
36
+ <?php foreach ($this->getPreparedButtons('hidden') as $button) { ?>
37
+ <li id="hidden-<?php echo $button['type']; ?>" class="ui-state-highlight <?php echo $button['type']; ?>" data-enable="pslogin_<?php echo $button['type']; ?>_enable">
38
+ <span class="soc-li-icon"></span>
39
+ <span class="soc-li-text"><?php echo $this->escapeHtml(ucfirst($button['type'])); ?></span>
40
+ </li>
41
+ <?php } ?>
42
+ </ul>
43
+ </div>
44
+ </td>
45
+ </tr>
app/design/frontend/base/default/layout/pslogin.xml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+
4
+ <default>
5
+ <reference name="head">
6
+ <action ifconfig="pslogin/general/enable" method="addCss"><stylesheet>css/plumrocket/pslogin/pslogin.css</stylesheet></action>
7
+ <action ifconfig="pslogin/general/enable" method="addItem"><type>skin_js</type><name>js/plumrocket/jquery-1.10.2.min.js</name></action>
8
+ <action ifconfig="pslogin/general/enable" method="addItem"><type>skin_js</type><name>js/plumrocket/pslogin/pslogin.js</name></action>
9
+ </reference>
10
+ <reference name="after_body_start">
11
+ <block type="pslogin/share" name="pslogin.customer.form.register.sharepopup" as="pslogin_sharepopup" template="pslogin/customer/form/register/sharepopup.phtml" before="content" />
12
+ <block type="pslogin/general" name="pslogin_general" />
13
+ </reference>
14
+ </default>
15
+
16
+ <customer_account_login translate="label">
17
+ <reference name="customer_form_login">
18
+ <action ifconfig="pslogin/general/replace_templates" method="setTemplate"><template>pslogin/customer/form/login.phtml</template></action>
19
+ <block type="pslogin/buttons" name="pslogin.customer.form.login.buttons" as="pslogin_buttons" template="pslogin/customer/form/login/buttons.phtml" />
20
+ </reference>
21
+ </customer_account_login>
22
+
23
+ <customer_account_create translate="label">
24
+ <reference name="customer_form_register">
25
+ <action ifconfig="pslogin/general/replace_templates" method="setTemplate"><template>pslogin/customer/form/register.phtml</template></action>
26
+ <block type="pslogin/buttons" name="pslogin.customer.form.register.buttons" as="pslogin_buttons" template="pslogin/customer/form/register/buttons.phtml" />
27
+ <!-- <block type="pslogin/share" name="pslogin.customer.form.register.share" as="pslogin_share" template="pslogin/customer/form/register/share.phtml" /> -->
28
+ </reference>
29
+ </customer_account_create>
30
+
31
+ <customer_account_edit>
32
+ <reference name="after_body_start">
33
+ <block type="core/template" name="pslogin_fake_email_edit" template="pslogin/customer/form/edit/fake_email.phtml" before="content" />
34
+ </reference>
35
+ </customer_account_edit>
36
+
37
+ <checkout_onepage_index translate="label">
38
+ <reference name="after_body_start">
39
+ <block type="core/template" name="pslogin_fake_email_message" template="pslogin/checkout/onepage/message/fake_email.phtml" before="content" />
40
+ </reference>
41
+ <reference name="checkout.onepage.login">
42
+ <action ifconfig="pslogin/general/replace_templates" method="setTemplate"><template>pslogin/checkout/onepage/login.phtml</template></action>
43
+ <block type="pslogin/buttons" name="pslogin.customer.form.login.buttons" as="pslogin_buttons" template="pslogin/customer/form/login/buttons.phtml" />
44
+ </reference>
45
+ </checkout_onepage_index>
46
+
47
+ <!-- <pslogin_account_sharedata>
48
+ <reference name="root">
49
+ <action ifconfig="pslogin/general/enable" method="setTemplate"><template>pslogin/customer/form/register/sharedata.phtml</template></action>
50
+ </reference>
51
+ </pslogin_account_sharedata> -->
52
+ </layout>
app/design/frontend/base/default/template/pslogin/checkout/onepage/login.phtml ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+
19
+ <?php echo $this->getChildHtml('login_before') ?>
20
+ <div class="col2-set<?php if (!$this->helper('customer')->isRegistrationAllowed() && !$this->getQuote()->isAllowedGuestCheckout()) echo ' login-only' ?> pslogin-form">
21
+ <div class="col-1">
22
+ <h3>
23
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() && $this->helper('customer')->isRegistrationAllowed() ): ?>
24
+ <?php echo $this->__('Checkout as a Guest or Register') ?>
25
+ <?php elseif ( $this->getQuote()->isAllowedGuestCheckout() && !$this->helper('customer')->isRegistrationAllowed() ): ?>
26
+ <?php echo $this->__('Checkout as a Guest') ?>
27
+ <?php else: ?>
28
+ <?php echo $this->__('Register to Create an Account') ?>
29
+ <?php endif; ?>
30
+ </h3>
31
+ <?php if( !$this->getQuote()->isAllowedGuestCheckout() && $this->helper('customer')->isRegistrationAllowed() ): ?>
32
+ <p class="description"><?php echo $this->__('Register and save time!') ?></strong><br />
33
+ <?php echo $this->__('Register with us for future convenience:') ?></p>
34
+ <ul>
35
+ <li><?php echo $this->__('Fast and easy check out') ?></li>
36
+ <li><?php echo $this->__('Easy access to your order history and status') ?></li>
37
+ </ul>
38
+ <?php elseif( $this->getQuote()->isAllowedGuestCheckout() && $this->helper('customer')->isRegistrationAllowed() ): ?>
39
+ <p class="description"><?php echo $this->__('Register with us for future convenience:') ?></p>
40
+ <?php endif ?>
41
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
42
+ <ul class="form-list">
43
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
44
+ <li class="control">
45
+ <input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()!=Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER): ?> checked="checked"<?php endif; ?> class="radio" /><label for="login:guest"><?php echo $this->__('Checkout as Guest') ?></label>
46
+ </li>
47
+ <?php endif; ?>
48
+ <?php if( $this->helper('customer')->isRegistrationAllowed() ): ?>
49
+ <li class="control">
50
+ <input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" />
51
+ <label for="login:register"><?php echo $this->__('Register and Checkout') ?></label>
52
+ </li>
53
+ <?php endif; ?>
54
+ </ul>
55
+ <?php else: ?>
56
+ <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" />
57
+ <?php endif; ?>
58
+ <div class="buttons-set">
59
+ <p class="required">&nbsp;</p>
60
+ <?php if ($this->getQuote()->isAllowedGuestCheckout()): ?>
61
+ <button id="onepage-guest-register-button" type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo $this->__('Continue') ?></span></span></button>
62
+ <?php elseif ($this->helper('checkout')->isCustomerMustBeLogged()): ?>
63
+ <button id="onepage-guest-register-button" type="button" class="button" onclick="window.location='<?php echo $this->helper('checkout/url')->getRegistrationUrl();?>'"><span><span><?php echo $this->__('Register') ?></span></span></button>
64
+ <?php else: ?>
65
+ <form action="<?php echo $this->getUrl('persistent/index/saveMethod'); ?>">
66
+ <button id="onepage-guest-register-button" type="submit" class="button"><span><span><?php echo $this->__('Register') ?></span></span></button>
67
+ </form>
68
+ <?php endif; ?>
69
+ </div>
70
+ </div>
71
+ <div class="col-2">
72
+ <h3><?php echo $this->__('Returning Customers') ?></h3>
73
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
74
+ <form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
75
+ <div class="fieldset">
76
+ <?php echo $this->getBlockHtml('formkey'); ?>
77
+ <p class="description"><?php echo $this->__('Sign in to speed up your checkout process') ?></p>
78
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
79
+ <ul class="form-list">
80
+ <li>
81
+ <label for="login-email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
82
+ <div class="input-box">
83
+ <input type="email" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-email" id="login-email" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" />
84
+ </div>
85
+ </li>
86
+ <li>
87
+ <label for="login-password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
88
+ <div class="input-box">
89
+ <input type="password" class="input-text validate-password required-entry" id="login-password" name="login[password]" />
90
+ </div>
91
+ </li>
92
+ <li>
93
+ <a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-left"><?php echo $this->__('Forgot your password?') ?></a>
94
+ </li>
95
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
96
+ <?php echo $this->getChildHtml('persistent.remember.me'); ?>
97
+ </ul>
98
+ <?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
99
+ <input name="context" type="hidden" value="checkout" />
100
+ </div>
101
+ </form>
102
+ <div class="buttons-set">
103
+ <button type="submit" class="button" onclick="onepageLogin(this)"><span><span><?php echo $this->__('Login') ?></span></span></button>
104
+ </div>
105
+ <?php echo $this->getChildHtml('pslogin_buttons'); ?>
106
+ </div>
107
+ </div>
108
+
109
+ <script type="text/javascript">
110
+ //<![CDATA[
111
+ var loginForm = new VarienForm('login-form', true);
112
+ $('login-email').observe('keypress', bindLoginPost);
113
+ $('login-password').observe('keypress', bindLoginPost);
114
+ function bindLoginPost(evt){
115
+ if (evt.keyCode == Event.KEY_RETURN) {
116
+ loginForm.submit();
117
+ }
118
+ }
119
+ function onepageLogin(button)
120
+ {
121
+ if(loginForm.validator && loginForm.validator.validate()){
122
+ button.disabled = true;
123
+ loginForm.submit();
124
+ }
125
+ }
126
+ //]]>
127
+ </script>
128
+ <?php
129
+ $registerParam = $this->getRequest()->getParam('register');
130
+ if ($registerParam || $registerParam === ''):
131
+ ?>
132
+ <script type="text/javascript">
133
+ //<![CDATA[
134
+ document.observe("dom:loaded", function() {
135
+ if($('login:register')) {
136
+ $('login:register').checked = true;
137
+ checkout.setMethod();
138
+ }
139
+ })
140
+ //]]>
141
+ </script>
142
+ <?php endif; ?>
app/design/frontend/base/default/template/pslogin/checkout/onepage/message/fake_email.phtml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+
19
+ <?php if(Mage::helper('pslogin')->isFakeMail()) : ?>
20
+ <div class="pslogin-fake-email-message">
21
+ <div class="content">
22
+ <div class="close-message">&#10005;</div>
23
+ <p>
24
+ <?php echo Mage::helper('pslogin')->__('Your account needs to be updated. The email address in your profile is invalid. Please indicate your valid email address by going to the <a href="%s">Account edit page</a>', Mage::getUrl('customer/account/edit')); ?>
25
+ </p>
26
+ </div>
27
+ </div>
28
+ <?php endif; ?>
app/design/frontend/base/default/template/pslogin/customer/form/edit/fake_email.phtml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+
19
+ <?php if(Mage::helper('pslogin')->isFakeMail()) : ?>
20
+ <script type="text/javascript">
21
+ pjQuery_1_10_2(document).ready(function() {
22
+ customerEditFakeEmail();
23
+ });
24
+ </script>
25
+ <?php endif; ?>
app/design/frontend/base/default/template/pslogin/customer/form/login.phtml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+
19
+ <div class="account-login<?php if (!$this->helper('customer')->isRegistrationAllowed()) echo ' login-only' ?> pslogin-form">
20
+ <div class="page-title">
21
+ <h1><?php if ($this->helper('customer')->isRegistrationAllowed()): ?>
22
+ <?php echo $this->__('Login or Create an Account') ?>
23
+ <?php else: ?>
24
+ <?php echo $this->__('Login'); ?>
25
+ <?php endif; ?></h1>
26
+ </div>
27
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
28
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form" class="scaffold-form">
29
+ <?php echo $this->getBlockHtml('formkey'); ?>
30
+ <div class="col2-set">
31
+ <?php if ($this->helper('customer')->isRegistrationAllowed()): ?>
32
+ <div class="col-1 new-users">
33
+ <div class="content">
34
+ <h2><?php echo $this->__('New Here?') ?></h2>
35
+ <p class="form-instructions"><?php echo $this->__('Registration is free and easy!') ?></p>
36
+ <ul class="benefits">
37
+ <li><?php echo $this->__('Faster checkout') ?></li>
38
+ <li><?php echo $this->__('Save multiple shipping addresses') ?></li>
39
+ <li><?php echo $this->__('View and track orders and more') ?></li>
40
+ </ul>
41
+ </div>
42
+ <div class="buttons-set">
43
+ <button type="button" title="Create an Account" class="button" onclick="window.location='<?php echo $this->getCreateAccountUrl() ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>
44
+ </div>
45
+ </div>
46
+ <?php endif; ?>
47
+ <?php // This column should be col-1 if the registration column is not displayed ?>
48
+ <div class="<?php if ($this->helper('customer')->isRegistrationAllowed()): ?>col-2<?php else: ?>col-1<?php endif; ?> registered-users">
49
+ <div class="content fieldset">
50
+ <h2><?php echo $this->__('Already registered?') ?></h2>
51
+ <p class="form-instructions"><?php echo $this->__('If you have an account with us, please log in.') ?></p>
52
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
53
+ <ul class="form-list">
54
+ <li>
55
+ <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
56
+ <div class="input-box">
57
+ <input type="email" autocapitalize="off" autocorrect="off" spellcheck="false" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
58
+ </div>
59
+ </li>
60
+ <li>
61
+ <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
62
+ <div class="input-box">
63
+ <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
64
+ </div>
65
+ </li>
66
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
67
+ <li>
68
+ <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
69
+ </li>
70
+ <?php echo $this->getChildHtml('persistent.remember.me'); ?>
71
+ </ul>
72
+ <?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
73
+ </div>
74
+ <div class="buttons-set">
75
+ <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
76
+ </div>
77
+ <?php echo $this->getChildHtml('pslogin_buttons'); ?>
78
+ </div>
79
+ </div>
80
+ <?php if (Mage::helper('checkout')->isContextCheckout()): ?>
81
+ <input name="context" type="hidden" value="checkout" />
82
+ <?php endif; ?>
83
+ </form>
84
+ <script type="text/javascript">
85
+ //<![CDATA[
86
+ var dataForm = new VarienForm('login-form', true);
87
+ //]]>
88
+ </script>
89
+ </div>
app/design/frontend/base/default/template/pslogin/customer/form/login/buttons.phtml ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+
19
+ <?php if($this->enableForLogin() && $this->hasButtons()) : ?>
20
+ <div class="pslogin-form pageform-login">
21
+
22
+ <div class="spacer pslogin-clearfix">
23
+ <table>
24
+ <tr>
25
+ <td><div class="border"></div></td>
26
+ <td class="w25 text_or"><?php echo $this->__('OR'); ?></td>
27
+ <td><div class="border"></div></td>
28
+ </tr>
29
+ </table>
30
+ <span class="xs"><?php echo $this->__('Login with your social account'); ?></span>
31
+ </div>
32
+
33
+ <div class="pslogin-buttons">
34
+ <ul class="pslogin-clearfix">
35
+ <?php foreach ($this->getPreparedButtons() as $button) : ?>
36
+ <li class="<?php echo $button['type']; ?> <?php echo empty($button['visible'])? 'pslogin-hidden' : 'pslogin-visible'; ?>" <?php echo empty($button['visible'])? 'style="display: none;"' : ''; ?> title="<?php echo $this->escapeHtml($button['login_text']); ?>">
37
+ <a rel="nofollow" href="<?php echo $button['href']; ?>" data-width="<?php echo $button['popup_width']; ?>" data-height="<?php echo $button['popup_height']; ?>" data-loader="<?php echo $this->getLoaderUrl(); ?>">
38
+
39
+ <?php if($this->showLoginFullButtons()) : ?>
40
+ <?php if(!empty($button['image']['login'])) : ?>
41
+ <img src="<?php echo $this->escapeHtml($button['image']['login']); ?>" class="md" />
42
+ <span class="background xs">
43
+ <span class="soc-li-icon">
44
+ <?php echo !empty($button['image']['icon'])? '<img src="'. $this->escapeHtml($button['image']['icon']) .'" />' : ''; ?>
45
+ </span>
46
+ </span>
47
+ <?php else : ?>
48
+ <span class="background">
49
+ <span class="soc-li-icon">
50
+ <?php echo !empty($button['image']['icon'])? '<img src="'. $this->escapeHtml($button['image']['icon']) .'" />' : ''; ?>
51
+ </span>
52
+ <span class="soc-li-text"><?php echo $this->escapeHtml($button['login_text']); ?></span>
53
+ </span>
54
+ <?php endif; ?>
55
+ <?php else : ?>
56
+ <?php if(!empty($button['image']['icon'])) : ?>
57
+ <img src="<?php echo $this->escapeHtml($button['image']['icon']); ?>" />
58
+ <?php else : ?>
59
+ <span class="background">
60
+ <span class="soc-li-icon"></span>
61
+ <span class="soc-li-text text-hidden"><?php echo $this->escapeHtml($button['login_text']); ?></span>
62
+ </span>
63
+ <?php endif; ?>
64
+ <?php endif; ?>
65
+ </a>
66
+ </li>
67
+ <?php endforeach; ?>
68
+ </ul>
69
+
70
+ <?php if($this->getPreparedButtons('hidden')) : ?>
71
+ <div class="spacer pslogin-clearfix show-hidden">
72
+ <table>
73
+ <tr>
74
+ <td><div class="border"></div></td>
75
+ <td class="w100"><div id="psloginShowBtn" class="text_or"><?php echo $this->__('show more'); ?></div></td>
76
+ <td><div class="border"></div></td>
77
+ </tr>
78
+ </table>
79
+ </div>
80
+ <?php endif; ?>
81
+ </div>
82
+
83
+ </div>
84
+ <div style="clear: both;"></div>
85
+ <?php endif; ?>
app/design/frontend/base/default/template/pslogin/customer/form/register.phtml ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+
19
+ <div class="account-create pslogin-form">
20
+ <div class="page-title">
21
+ <h1><?php echo $this->__('Create an Account') ?></h1>
22
+ </div>
23
+ <?php echo $this->getChildHtml('form_fields_before')?>
24
+ <?php echo $this->getChildHtml('pslogin_buttons'); ?>
25
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
26
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate" class="scaffold-form" enctype="multipart/form-data">
27
+ <div class="fieldset">
28
+ <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
29
+ <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
30
+ <p class="form-instructions"><?php echo $this->__('Please enter the following information to create your account.') ?></p>
31
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
32
+ <ul class="form-list">
33
+ <li class="fields">
34
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
35
+ </li>
36
+ <li>
37
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
38
+ <div class="input-box">
39
+ <input type="email" autocapitalize="off" autocorrect="off" spellcheck="false" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
40
+ </div>
41
+ </li>
42
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
43
+ <?php if ($_dob->isEnabled()): ?>
44
+ <li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
45
+ <?php endif ?>
46
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
47
+ <?php if ($_taxvat->isEnabled()): ?>
48
+ <li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
49
+ <?php endif ?>
50
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
51
+ <?php if ($_gender->isEnabled()): ?>
52
+ <li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
53
+ <?php endif ?>
54
+
55
+ <?php if($this->getShowAddressFields()): ?>
56
+ <li class="hidden">
57
+ <input type="hidden" name="create_address" value="1" />
58
+ </li>
59
+ <li class="fields">
60
+ <div class="field">
61
+ <label for="company"><?php echo $this->__('Company') ?></label>
62
+ <div class="input-box">
63
+ <input type="text" name="company" id="company" value="<?php echo $this->escapeHtml($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
64
+ </div>
65
+ </div>
66
+ <div class="field">
67
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
68
+ <div class="input-box">
69
+ <input type="tel" name="telephone" id="telephone" value="<?php echo $this->escapeHtml($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" />
70
+ </div>
71
+ </div>
72
+ </li>
73
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
74
+ <li class="wide">
75
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
76
+ <div class="input-box">
77
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet(0)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
78
+ </div>
79
+ </li>
80
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
81
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
82
+ <li class="wide">
83
+ <label for="billing:street<?php echo $_i ?>"><?php echo $this->__('Street Address %s', $_i) ?></label>
84
+ <div class="input-box">
85
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet($_i - 1)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
86
+ </div>
87
+ </li>
88
+ <?php endfor; ?>
89
+ <li class="fields">
90
+ <div class="field">
91
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
92
+ <div class="input-box">
93
+ <input type="text" name="city" value="<?php echo $this->escapeHtml($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="city" />
94
+ </div>
95
+ </div>
96
+ <div class="field">
97
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
98
+ <div class="input-box">
99
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
100
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
101
+ </select>
102
+ <script type="text/javascript">
103
+ //<![CDATA[
104
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
105
+ //]]>
106
+ </script>
107
+ <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
108
+ </div>
109
+ </div>
110
+ </li>
111
+ <li class="fields">
112
+ <div class="field">
113
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
114
+ <div class="input-box">
115
+ <input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
116
+ </div>
117
+ </div>
118
+ <div class="field">
119
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
120
+ <div class="input-box">
121
+ <?php echo $this->getCountryHtmlSelect() ?>
122
+ </div>
123
+ </div>
124
+ </li>
125
+ <li class="hidden">
126
+ <input type="hidden" name="default_billing" value="1" />
127
+ <input type="hidden" name="default_shipping" value="1" />
128
+ </li>
129
+ <?php endif; ?>
130
+ <li class="fields">
131
+ <div class="field">
132
+ <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
133
+ <div class="input-box">
134
+ <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
135
+ </div>
136
+ </div>
137
+ <div class="field">
138
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
139
+ <div class="input-box">
140
+ <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
141
+ </div>
142
+ </div>
143
+ </li>
144
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
145
+ <?php if ($this->isNewsletterEnabled()): ?>
146
+ <li class="control">
147
+ <div class="input-box">
148
+ <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
149
+ </div>
150
+ <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
151
+ </li>
152
+ <?php endif ?>
153
+ <?php echo $this->getChildHtml('persistent.remember.me'); ?>
154
+ </ul>
155
+ <?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
156
+ </div>
157
+ <div class="buttons-set">
158
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
159
+ <button type="submit" title="<?php echo $this->__('Register') ?>" class="button"><span><span><?php echo $this->__('Register') ?></span></span></button>
160
+ </div>
161
+ <?php if (Mage::helper('checkout')->isContextCheckout()): ?>
162
+ <input name="context" type="hidden" value="checkout" />
163
+ <?php endif; ?>
164
+ </form>
165
+ <script type="text/javascript">
166
+ //<![CDATA[
167
+ var dataForm = new VarienForm('form-validate', true);
168
+ <?php if($this->getShowAddressFields()): ?>
169
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
170
+ <?php endif; ?>
171
+ //]]>
172
+ </script>
173
+ </div>
app/design/frontend/base/default/template/pslogin/customer/form/register/buttons.phtml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+
19
+ <?php if($this->enableForRegister() && $this->hasButtons()) : ?>
20
+ <div class="pslogin-form pageform-register pslogin">
21
+
22
+ <div class="pslogin-buttons">
23
+ <div class="xs spacer"><?php echo $this->__('Register with your social account'); ?></div><br />
24
+ <ul data-jsresize="true">
25
+ <?php foreach ($this->getPreparedButtons() as $button) : ?>
26
+ <li class="<?php echo $button['type']; ?>" title="<?php echo $this->escapeHtml($button['register_text']); ?>">
27
+ <a rel="nofollow" href="<?php echo $button['href']; ?>" data-width="<?php echo $button['popup_width']; ?>" data-height="<?php echo $button['popup_height']; ?>" data-loader="<?php echo $this->getLoaderUrl(); ?>">
28
+
29
+ <?php if($this->showRegisterFullButtons()) : ?>
30
+ <?php if(!empty($button['image']['register'])) : ?>
31
+ <img src="<?php echo $this->escapeHtml($button['image']['register']); ?>" class="md" />
32
+ <span class="background xs">
33
+ <span class="soc-li-icon">
34
+ <?php echo !empty($button['image']['icon'])? '<img src="'. $this->escapeHtml($button['image']['icon']) .'" />' : ''; ?>
35
+ </span>
36
+ </span>
37
+ <?php else : ?>
38
+ <span class="background">
39
+ <span class="soc-li-icon">
40
+ <?php echo !empty($button['image']['icon'])? '<img src="'. $this->escapeHtml($button['image']['icon']) .'" />' : ''; ?>
41
+ </span>
42
+ <span class="soc-li-text"><?php echo $this->escapeHtml($button['register_text']); ?></span>
43
+ </span>
44
+ <?php endif; ?>
45
+ <?php else : ?>
46
+ <?php if(!empty($button['image']['icon'])) : ?>
47
+ <img src="<?php echo $this->escapeHtml($button['image']['icon']); ?>" />
48
+ <?php else : ?>
49
+ <span class="background">
50
+ <span class="soc-li-icon"></span>
51
+ <span class="soc-li-text text-hidden"><?php echo $this->escapeHtml($button['register_text']); ?></span>
52
+ </span>
53
+ <?php endif; ?>
54
+ <?php endif; ?>
55
+ </a>
56
+ </li>
57
+ <?php endforeach; ?>
58
+ </ul>
59
+
60
+ <div class="spacer pslogin-clearfix">
61
+ <table>
62
+ <tr>
63
+ <td><div class="border"></div></td>
64
+ <td class="w25 text_or"><?php echo $this->__('OR'); ?></td>
65
+ <td><div class="border"></div></td>
66
+ </tr>
67
+ </table>
68
+ </div>
69
+
70
+ </div>
71
+
72
+ </div>
73
+ <div style="clear: both;"></div>
74
+ <?php endif; ?>
app/design/frontend/base/default/template/pslogin/customer/form/register/sharedata.phtml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+
19
+ <!DOCTYPE HTML>
20
+ <html style="height: 100%;">
21
+ <head>
22
+ </head>
23
+ <body style="height: 100%;margin: 0;padding: 0;">
24
+
25
+
26
+ <div style="text-align: center;height: 100%;">
27
+ <img src="/skin/frontend/base/default/images/plumrocket/pslogin/page_load.gif" style="top: 50%;position: relative;margin-top: -64px;" />
28
+ </div>
29
+ <!-- https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Flab3.tneu.org%2Findex.php&t=BT+Social+Share+Plugin+For+Joomla
30
+ -->
31
+ <!-- <meta name="keywords" content="joomla extensions, joomla extensions demo, bowthemes extensions" />
32
+ <meta name="author" content="Super User" />
33
+ <meta name="description" content="Joomla Extension Online Demo - Bowthemes" />
34
+ <meta name="generator" content="Joomla! - Open Source Content Management" />
35
+ <title>BT Social Share Plugin</title> -->
36
+
37
+
38
+ <!-- <meta property="og:type" content="website" />
39
+ <meta property="og:title" content="BT Social Share Plugin For Joomla" />
40
+ <meta property="og:url" content="http://extensions.bowthemes.com/bt-social-share-plugin.html" />
41
+ <meta property="og:description" content="BT Social Share plugin adds all major Social Networks into your Joomla articles. Plugin can be published at various locations in content, with 2 options display top or bottom of article. Plugin has backend settings where you can customise it. You can enable/disable each social network individually o" />
42
+ <meta property="og:image" content="http://extensions.bowthemes.com/images/bt-social-sharing-plugin.PNG" />
43
+ <meta property="fb:app_id" content="446576495406303" />
44
+ <meta property="fb:admins" content="100000098730984,100004389064595" /> -->
45
+
46
+ </body>
47
+ </html>
app/design/frontend/base/default/template/pslogin/customer/form/register/sharepopup.phtml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+
19
+ <?php if($this->showPopup()) { ?>
20
+ <div class="pslogin-addedoverlay"></div>
21
+
22
+ <div class="pslogin-pop-up-form">
23
+ <div id="pslogin-pop-up-bg" class="pslogin-cf fadeInDownBig">
24
+ <div class="pslogin-share">
25
+ <h2><?php echo $this->escapeHtml($this->getTitle()); ?></h2>
26
+ <a href="#" class="prpop-close-btn">&#10005;</a>
27
+ <p><?php echo nl2br($this->getDescription()); ?></p>
28
+ <div class="button-top"></div>
29
+ <p class="ta-center">
30
+ <?php foreach ($this->getButtons() as $button) { ?>
31
+ <a href="<?php echo $this->escapeHtml($button['href']); ?>" target="_blank" title="<?php echo $this->escapeHtml($button['name']); ?>">
32
+ <img src="<?php echo $this->escapeHtml($button['image']); ?>" border="0" alt="<?php echo $this->escapeHtml($button['name']); ?>"/>
33
+ </a>
34
+ <?php } ?>
35
+
36
+ <br />
37
+ <a href="https://api.addthis.com/oexchange/0.8/forward/email/offer?url=<?php echo $this->escapeHtml(urlencode($this->getPageUrl())); ?>&ct=1&title=-&pco=tbxnj-1.0" target="_blank"><img src="https://cache.addthiscdn.com/icons/v2/thumbs/32x32/email.png" border="0" alt="Email"/></a>
38
+ <a href="https://www.addthis.com/bookmark.php?source=tbx32nj-1.0&v=300&url=<?php echo $this->escapeHtml(urlencode($this->getPageUrl())); ?>&ct=1&title=-&pco=tbxnj-1.0" target="_blank"><img src="https://cache.addthiscdn.com/icons/v2/thumbs/32x32/addthis.png" border="0" alt="Addthis"/></a>
39
+ </p>
40
+
41
+ </div>
42
+ </div>
43
+ </div>
44
+ <?php } ?>
app/design/frontend/base/default/template/pslogin/page/html/welcome.phtml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plumrocket Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the End-user License Agreement
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://wiki.plumrocket.net/wiki/EULA
10
+ * If you are unable to obtain it through the world-wide-web, please
11
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
12
+ *
13
+ * @package Plumrocket_SocialLogin
14
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
15
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
16
+ */
17
+ ?>
18
+ <span class="pslogin-welcome-msg">
19
+ <?php if( ($image = $this->getPhotoPath()) && $this->photoEnabled() ) { ?>
20
+ <img src="<?php echo $image; ?>" />
21
+ <?php } ?>
22
+
23
+ <?php echo $this->getMessage(); ?>
24
+ </span>
app/etc/modules/Plumrocket_SocialLogin.xml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Plumrocket_SocialLogin>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>1.0.0</version>
8
+ <name>Twitter &amp; Facebook Login</name>
9
+ <wiki>http://wiki.plumrocket.com/wiki/Magento_Twitter_and_Facebook_Login_v1.x_Extension</wiki>
10
+ <depends>
11
+ <Plumrocket_Base />
12
+ </depends>
13
+ </Plumrocket_SocialLogin>
14
+ </modules>
15
+ </config>
app/locale/en_US/Plumrocket_SocialLogin.csv ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "The free version of ""%s"" extension does not include this network. Please <a href=""%s"" target=""_blank"">upgrade to Social Login Pro magento extension</a> in order to receive 50+ social login networks.","The free version of ""%s"" extension does not include this network. Please <a href=""%s"" target=""_blank"">upgrade to Social Login Pro magento extension</a> in order to receive 50+ social login networks."
2
+
3
+ "Customer with email (%s) already exists in the database. If you are sure that it is your email address, please <a href=""%s"">click here</a> to retrieve your password and access your account.","Customer with email (%s) already exists in the database. If you are sure that it is your email address, please <a href=""%s"">click here</a> to retrieve your password and access your account."
4
+ "Customer registration successful. Your password was send to the email: %s","Customer registration successful. Your password was send to the email: %s"
5
+ "Customer registration successful.","Customer registration successful."
6
+ "The Date of Birth is incorrect.","The Date of Birth is incorrect."
7
+ "Visible Buttons","Visible Buttons"
8
+ "Hidden Buttons","Hidden Buttons"
9
+ "Login with your social account","Login with your social account"
10
+ "Register with your social account","Register with your social account"
11
+ "show more","show more"
12
+ "Your account needs to be updated. The email address in your profile is invalid. Please indicate your valid email address by going to the <a href=""%s"">Account edit page</a>","Your account needs to be updated. The email address in your profile is invalid. Please indicate your valid email address by going to the <a href=""%s"">Account edit page</a>"
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Plumrocket_Twitter_Facebook_Login</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://wiki.plumrocket.net/wiki/EULA">End-user License Agreement</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Plumrocket Twitter &amp; Facebook Login v1.x was designed to help online store owners reach as many customers as possible. Offering facebook login or twitter login as registration options is a proven tool to increase the number of clients.</summary>
10
+ <description>Facebook login &amp;amp; Twitter Login is a free magento extension that will let online store owners benefit from all the social media advantages. It helps to increase conversion rates by allowing your customers quickly login and place order.</description>
11
+ <notes>Provide a combination of both Magento Facebook login extension and magento Twitter login extension completely free of charge.</notes>
12
+ <authors><author><name>Plumrocket Team</name><user>plumrocket</user><email>support@plumrocket.com</email></author></authors>
13
+ <date>2014-11-25</date>
14
+ <time>10:00:12</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Plumrocket_SocialLogin.xml" hash="10a122334d6d10f73376eeebeba05699"/></dir></target><target name="magecommunity"><dir name="Plumrocket"><dir name="SocialLogin"><dir name="Block"><file name="Buttons.php" hash="788d98adb37d7e32a3e7c7ebfe84a7db"/><file name="General.php" hash="d259fedff67cc632b9847783a0d77326"/><dir name="Page"><dir name="Html"><file name="Welcome.php" hash="06638b250f672343e2e5c5f717775a88"/></dir></dir><file name="Share.php" hash="8447182219873dee7caaf620950157e4"/><dir name="System"><dir name="Config"><file name="Notinstalled.php" hash="c263ec689c84b028dc4abdf06c7f0e5d"/><file name="Sortable.php" hash="f3e5916d09c5f9801547b543942e77bd"/><file name="Version.php" hash="335b5d09fe18e3e2a83869ef15a43e87"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="2d9b54902bd83d4093ef471f8678f219"/></dir><dir name="Model"><file name="Account.php" hash="742b75e701e090a04422fb5b8da6b84a"/><file name="Facebook.php" hash="f488a2b96b945c29a7bf10326fc7d16f"/><dir name="Mysql4"><dir name="Account"><file name="Collection.php" hash="ca4211392ef934ce33391408092a9737"/></dir><file name="Account.php" hash="3fd0a1c891d31577d873247e17ce01ce"/></dir><file name="Observer.php" hash="87d2514a6bb6d4b9e910acf324c24973"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Redirectto.php" hash="c2bcb34b36ae88ce3bfdfe242463ba9a"/><file name="Shareurl.php" hash="a28729927bf70baa36ebade8e3919d3b"/></dir></dir></dir><file name="Twitter.php" hash="9858dfa5473b42cfa98ffd00be31a1c4"/></dir><dir name="controllers"><file name="AccountController.php" hash="596099414bf1a9c2bd9f7dfb2782cf16"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0aa82ee4ebe19c26943b496f45ce590d"/><file name="config.xml" hash="9841972e69f854b8482596c3155010e6"/><file name="system.xml" hash="5d91c53042dfbc1c9f8c046dedf3670c"/></dir><dir name="sql"><dir name="pslogin_setup"><file name="install-1.0.0.php" hash="553fa30329657c4ae11cd85e8abd9784"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pslogin.xml" hash="6298940d5f26d8a8c27ccb10ca87614f"/></dir><dir name="template"><dir name="pslogin"><dir name="system"><dir name="config"><file name="sortable.phtml" hash="398697865280d2f7d516645d62b1569d"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pslogin.xml" hash="e152281f10ea553cef98950f2c9b15df"/></dir><dir name="template"><dir name="pslogin"><dir name="checkout"><dir name="onepage"><file name="login.phtml" hash="4b8042863efcd50c38f4a47b7bc79265"/><dir name="message"><file name="fake_email.phtml" hash="4df9c4f220333606f758d730b9246942"/></dir></dir></dir><dir name="customer"><dir name="form"><dir name="edit"><file name="fake_email.phtml" hash="acb5c4fb1792f5a327a47c4196c78d65"/></dir><dir name="login"><file name="buttons.phtml" hash="1512630095d53cb70e4e709a100edea7"/></dir><file name="login.phtml" hash="b0f6ddf92c8ec22faedb9b5213a0a6ad"/><dir name="register"><file name="buttons.phtml" hash="d4d79e57af7daf2561f37601e5d0bb39"/><file name="sharedata.phtml" hash="21e3d413a95289b676033f6ca254f018"/><file name="sharepopup.phtml" hash="834dd13f11319f5fc58931463fdbd4f0"/></dir><file name="register.phtml" hash="353707dcf76c56be0612d050c5453b51"/></dir></dir><dir name="page"><dir name="html"><file name="welcome.phtml" hash="d310025c812db6a4e7409b5b4cbe29e1"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Plumrocket_SocialLogin.csv" hash="7572e6085fbc927180c11c7fcb060389"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><dir name="plumrocket"><dir name="pslogin"><file name="pslogin.css" hash="00847482b79dcf88220b97bcd22dc6e2"/></dir></dir></dir><dir name="images"><dir name="plumrocket"><dir name="pslogin"><file name="social_admin.png" hash="0ed6a34c0b5863a5539def39b76945ca"/></dir></dir></dir><dir name="js"><dir name="plumrocket"><dir name="pslogin"><file name="config.js" hash="a2c074dcd3c228afc2f144b8de8103c8"/><file name="jquery-ui.min.js" hash="a0e434a17ebc022fb565e08fd446baef"/><file name="pslogin.js" hash="17dc0bca630d2d73b39de328f007342e"/></dir><file name="jquery-1.10.2.min.js" hash="0b211fb723c7e6cfa4da5ca4ee10a836"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="plumrocket"><dir name="pslogin"><file name="pslogin.css" hash="2479013667aebc0b424603a46233cd28"/></dir></dir></dir><dir name="images"><dir name="plumrocket"><dir name="pslogin"><file name="loader.gif" hash="013fe7725d917198766631696bbe40d1"/><file name="social.png" hash="3eb0769eb3997729b3e8d71d47800105"/><file name="social_retina.png" hash="ef02e6bad12ac5dcacb2c92ca15932c4"/></dir></dir></dir><dir name="js"><dir name="plumrocket"><dir name="pslogin"><file name="pslogin.js" hash="9d53e0f43c122cf6b48c2676d5782456"/></dir><file name="jquery-1.10.2.min.js" hash="0b211fb723c7e6cfa4da5ca4ee10a836"/></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Plumrocket_Base</name><channel>community</channel><min></min><max></max></package></required></dependencies>
18
+ </package>
skin/adminhtml/default/default/css/plumrocket/pslogin/pslogin.css ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .social-td {
2
+ padding-left: 5px;
3
+ padding-top: 5px;
4
+ }
5
+
6
+ #sortable-visible {
7
+ background-color: #FFFFFF;
8
+ }
9
+
10
+ #sortable-hidden {
11
+ background: #EAEAEA;
12
+ margin-left: 2%;
13
+ }
14
+
15
+ .soc-networks {
16
+ list-style-type: none;
17
+ margin: 0;
18
+ padding: 0;
19
+ float: left;
20
+ padding: 0px;
21
+ width: 49%;
22
+ box-sizing: border-box;
23
+ height: 110px;
24
+ overflow-x: hidden;
25
+ overflow-y: auto;
26
+ border: 1px solid #aaa;
27
+ }
28
+
29
+ .soc-networks.ui-sortable-disabled {
30
+ background: #EAEAEA!important;
31
+ color: #8E8E8E;
32
+ }
33
+
34
+ .soc-networks.ui-sortable-disabled li:hover {
35
+ background: #EAEAEA!important;
36
+ cursor: auto;
37
+ }
38
+
39
+ .soc-networks.ui-sortable-disabled li .soc-li-icon {
40
+ opacity: 0.6;
41
+ filter: aplha(opacity=60);
42
+ }
43
+
44
+ .soc-networks li.ui-sortable-helper {
45
+ border: 1px solid #CCC;
46
+ }
47
+
48
+ .div-visible {
49
+ width: 49%;
50
+ float: left;
51
+ font-size: 13px;
52
+ }
53
+
54
+ .div-hidden {
55
+ width: 49%;
56
+ float: left;
57
+ margin-left: 2%;
58
+ font-size: 13px;
59
+ }
60
+
61
+ .soc-networks li {
62
+ line-height: 30px;
63
+ border-bottom: 1px solid #CCC;
64
+ font-size: 13px;
65
+ }
66
+
67
+ .soc-networks li:hover {
68
+ background: #F6F6F6;
69
+ cursor: pointer;
70
+ }
71
+
72
+ .soc-networks li img {
73
+ float: left;
74
+ margin-right: 5px;
75
+ height: 16px;
76
+ }
77
+
78
+ #sortable-visible li, #sortable-hidden li, #sortable3 li {
79
+ margin: 0px;
80
+ padding: 5px;
81
+ font-size: 13px;
82
+ line-height: 16px;
83
+ }
84
+
85
+ .pslogin-form ul li .soc-li-icon {
86
+ background: url('../../../images/plumrocket/pslogin/social_admin.png');
87
+ display: block;
88
+ float: left;
89
+ width: 16px;
90
+ height: 16px;
91
+ margin: 0 5px 0 0;
92
+ padding: 0;
93
+ box-sizing: border-box;
94
+ }
95
+
96
+ .pslogin-form ul li .soc-li-text {
97
+ display: block;
98
+ float: left;
99
+ height: 16px;
100
+ line-height: 16px;
101
+ }
102
+
103
+
104
+ .pslogin-form ul li.facebook .soc-li-icon { background-position: 0px 0px; background-color: #1e4389; }
105
+ .pslogin-form ul li.twitter .soc-li-icon { background-position: -17px 0px; background-color: #28a9e2; }
106
+ .pslogin-form ul li.linkedin .soc-li-icon { background-position: -85px 0px; background-color: #11669c; }
107
+ .pslogin-form ul li.yahoo .soc-li-icon { background-position: -102px 0px; background-color: #85228f; }
108
+ .pslogin-form ul li.vkontakte .soc-li-icon { background-position: -34px 0px; background-color: #3f658c; }
109
+ .pslogin-form ul li.googleplus .soc-li-icon { background-position: -68px 0px; background-color: #df4b38; }
110
+
111
+
112
+ .pslogin-form ul li.hotmail .soc-li-icon { background-color: #f67d20; }
113
+ .pslogin-form ul li.hotmail .soc-li-icon { background-position: 0px -16px; }
114
+
115
+ .pslogin-form ul li.live .soc-li-icon { background-color: #f67d20; }
116
+ .pslogin-form ul li.live .soc-li-icon { background-position: -17px -102px; }
117
+
118
+ .pslogin-form ul li.pinterest .soc-li-icon { background-color: #cb2028; }
119
+ .pslogin-form ul li.pinterest .soc-li-icon { background-position: -17px -17px; }
120
+
121
+ .pslogin-form ul li.amazon .soc-li-icon { background-color: #ff8e2e; }
122
+ .pslogin-form ul li.amazon .soc-li-icon { background-position: -34px -17px; }
123
+
124
+ .pslogin-form ul li.aol .soc-li-icon { background-color: #008bd3; }
125
+ .pslogin-form ul li.aol .soc-li-icon { background-position: -51px -17px; }
126
+
127
+ .pslogin-form ul li.github .soc-li-icon { background-color: #4382c5; }
128
+ .pslogin-form ul li.github .soc-li-icon { background-position: -68px -17px; }
129
+
130
+ .pslogin-form ul li.instagram .soc-li-icon { background-color: #9a6e51; }
131
+ .pslogin-form ul li.instagram .soc-li-icon { background-position: -84px -17px; }
132
+
133
+ .pslogin-form ul li.foursquare .soc-li-icon { background-color: #3472ad; }
134
+ .pslogin-form ul li.foursquare .soc-li-icon { background-position: -102px -17px; }
135
+
136
+ .pslogin-form ul li.dropbox .soc-li-icon { background-color: #008bd3; }
137
+ .pslogin-form ul li.dropbox .soc-li-icon { background-position: -0px -34px; }
138
+
139
+ .pslogin-form ul li.disqus .soc-li-icon { background-color: #3d7198; }
140
+ .pslogin-form ul li.disqus .soc-li-icon { background-position: -16px -34px; }
141
+
142
+ .pslogin-form ul li.livejournal .soc-li-icon { background-color: #104378; }
143
+ .pslogin-form ul li.livejournal .soc-li-icon { background-position: -33px -34px; }
144
+
145
+ .pslogin-form ul li.tumblr .soc-li-icon { background-color: #304e6c; }
146
+ .pslogin-form ul li.tumblr .soc-li-icon { background-position: -51px -34px; }
147
+
148
+ .pslogin-form ul li.openid .soc-li-icon { background-color: #f8931f; }
149
+ .pslogin-form ul li.openid .soc-li-icon { background-position: -68px -37px; }
150
+
151
+ .pslogin-form ul li.flickr .soc-li-icon { background-color: #ff0084; }
152
+ .pslogin-form ul li.flickr .soc-li-icon { background-position: -85px -34px; }
153
+
154
+ .pslogin-form ul li.wordpress .soc-li-icon { background-color: #1b3f57; }
155
+ .pslogin-form ul li.wordpress .soc-li-icon { background-position: -102px -34px; }
156
+
157
+ .pslogin-form ul li.blogger .soc-li-icon { background-color: #ec7825; }
158
+ .pslogin-form ul li.blogger .soc-li-icon { background-position: 0px -52px; }
159
+
160
+ .pslogin-form ul li.odnoklassniki .soc-li-icon { background-color: #ee6600; }
161
+ .pslogin-form ul li.odnoklassniki .soc-li-icon { background-position: -17px -52px; }
162
+
163
+ .pslogin-form ul li.mailru .soc-li-icon { background-color: #168de2; }
164
+ .pslogin-form ul li.mailru .soc-li-icon { background-position: -34px -52px; }
165
+
166
+ .pslogin-form ul li.yandex .soc-li-icon { background-color: #dd0000; }
167
+ .pslogin-form ul li.yandex .soc-li-icon { background-position: -51px -51px; }
168
+
169
+ .pslogin-form ul li.paypal .soc-li-icon { background-color: #195d82; }
170
+ .pslogin-form ul li.paypal .soc-li-icon { background-position: -67px -51px; }
171
+
172
+ .pslogin-form ul li.myspace .soc-li-icon { background-color: #0022a0;}
173
+ .pslogin-form ul li.myspace .soc-li-icon { background-position: -85px -51px; }
174
+
175
+ .pslogin-form ul li.salesforce .soc-li-icon { background-color: #00a0de; }
176
+ .pslogin-form ul li.salesforce .soc-li-icon { background-position: -102px -51px; }
177
+
178
+ .pslogin-form ul li.steamcommunity .soc-li-icon { background-color: #282828; }
179
+ .pslogin-form ul li.steamcommunity .soc-li-icon { background-position: -1px -69px; }
180
+
181
+ .pslogin-form ul li.hyves .soc-li-icon { background-color: #ffca63; }
182
+ .pslogin-form ul li.hyves .soc-li-icon { background-position: -17px -69px; }
183
+
184
+ .pslogin-form ul li.stackexchange .soc-li-icon { background-color: #557cbf; }
185
+ .pslogin-form ul li.stackexchange .soc-li-icon { background-position: -34px -69px; }
186
+
187
+ .pslogin-form ul li.evernote .soc-li-icon { background-color: #7ac141; }
188
+ .pslogin-form ul li.evernote .soc-li-icon { background-position: -51px -69px; }
189
+
190
+ .pslogin-form ul li.mixi .soc-li-icon { background-color: #d1ac5b; }
191
+ .pslogin-form ul li.mixi .soc-li-icon { background-position: -68px -68px; }
192
+
193
+ .pslogin-form ul li.mydigipass .soc-li-icon { background-color: #49bbeb; }
194
+ .pslogin-form ul li.mydigipass .soc-li-icon { background-position: -85px -69px; }
195
+
196
+ .pslogin-form ul li.netlog .soc-li-icon { background-color: #bb2026; }
197
+ .pslogin-form ul li.netlog .soc-li-icon { background-position: -101px -69px; }
198
+
199
+ .pslogin-form ul li.qq .soc-li-icon { background-color: #c46f1c; }
200
+ .pslogin-form ul li.qq .soc-li-icon { background-position: 0px -86px; }
201
+
202
+ .pslogin-form ul li.sinaweibo .soc-li-icon { background-color: #bd4342; }
203
+ .pslogin-form ul li.sinaweibo .soc-li-icon { background-position: -17px -85px; }
204
+
205
+ .pslogin-form ul li.soundcloud .soc-li-icon { background-color: #ff5419; }
206
+ .pslogin-form ul li.soundcloud .soc-li-icon { background-position: -33px -85px; }
207
+
208
+ .pslogin-form ul li.tencentweibo .soc-li-icon { background-color: #28a4e4; }
209
+ .pslogin-form ul li.tencentweibo .soc-li-icon { background-position: -50px -85px; }
210
+
211
+ .pslogin-form ul li.verisign .soc-li-icon { background-color: #b22253; }
212
+ .pslogin-form ul li.verisign .soc-li-icon { background-position: -67px -85px; }
213
+
214
+ .pslogin-form ul li.xing .soc-li-icon { background-color: #005d5e;}
215
+ .pslogin-form ul li.xing .soc-li-icon { background-position: -84px -85px; }
216
+
217
+ .pslogin-form ul li.kaixin .soc-li-icon { background-color: #e2332e; }
218
+ .pslogin-form ul li.kaixin .soc-li-icon { background-position: -102px -85px; }
219
+
220
+ .pslogin-form ul li.orange .soc-li-icon { background-color: #ff6600; }
221
+ .pslogin-form ul li.orange .soc-li-icon { background-position: -0px -102px; }
222
+
223
+
224
+ .entry-edit-head.pslogin-notinstalled-section {
225
+ background: #BDBDBD;
226
+ }
227
+
228
+ .entry-edit-head.pslogin-notinstalled-section a span.pslogin-notinstalled-title {
229
+ font-weight: 400;
230
+ padding-left: 5px;
231
+ /*color: #ea7601;*/
232
+ }
233
+
234
+ /*.entry-edit-head.pslogin-notinstalled-section a:hover .pslogin-notinstalled-title {
235
+ text-decoration: underline;
236
+ }*/
237
+
238
+ .pslogin-notinstalled-section .entry-edit-head {
239
+ background: none;
240
+ }
241
+
skin/adminhtml/default/default/images/plumrocket/pslogin/social_admin.png ADDED
Binary file
skin/adminhtml/default/default/js/plumrocket/jquery-1.10.2.min.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
2
+ //@ sourceMappingURL=jquery-1.10.2.min.map
3
+ */
4
+ ;if (typeof(pjQuery_1_10_2) == 'undefined'
5
+ || !((typeof(pjQuery_1_10_2) == 'function') && ('fn' in pjQuery_1_10_2))
6
+ || !(pjQuery_1_10_2.fn.jquery.indexOf('1.10.2') === 0)
7
+ ) {
8
+ function isGreaterVersion(v1, v2) {
9
+ var a1 = v1.split('.'); var a2 = v2.split('.'); var a1l = a1.length; var a2l = a2.length;
10
+ for(var i=0; i<a1.length; i++) { if (i >= a2l) break; a1[i] = parseInt(a1[i]); a2[i] = parseInt(a2[i]); if (a1[i] > a2[i]) return true; if (a1[i] < a2[i]) return false; }
11
+ return a1l > a2l;
12
+ }
13
+
14
+ var deepNoConfict = false;
15
+ if (typeof(jQuery) == 'undefined' || isGreaterVersion('1.10.2', jQuery.fn.jquery)) {
16
+ deepNoConfict = typeof(jQuery) != 'undefined';
17
+
18
+ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
19
+ }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
20
+ u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
21
+
22
+ }
23
+ pjQuery_1_10_2 = jQuery.noConflict(deepNoConfict);
24
+ };
skin/adminhtml/default/default/js/plumrocket/pslogin/config.js ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Plumrocket Inc.
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the End-user License Agreement
7
+ * that is available through the world-wide-web at this URL:
8
+ * http://wiki.plumrocket.net/wiki/EULA
9
+ * If you are unable to obtain it through the world-wide-web, please
10
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
11
+ *
12
+ * @package Plumrocket_SocialLogin
13
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
14
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
15
+ */
16
+
17
+ var catalogWysiwygEditor;
18
+ pjQuery_1_10_2(document).ready(function() {
19
+ // document.getElementById("pslogin_share_description").setAttribute("style","width:600px;");
20
+ // document.getElementById("pslogin_share_description").style.width = "600px;";
21
+
22
+ catalogWysiwygEditor = {
23
+ overlayShowEffectOptions : null,
24
+ overlayHideEffectOptions : null,
25
+ open : function(editorUrl, elementId) {
26
+ if (editorUrl && elementId) {
27
+ new Ajax.Request(editorUrl, {
28
+ parameters: {
29
+ element_id: elementId+'_editor',
30
+ store_id: '0'
31
+ },
32
+ onSuccess: function(transport) {
33
+ try {
34
+ this.openDialogWindow(transport.responseText, elementId);
35
+ } catch(e) {
36
+ alert(e.message);
37
+ }
38
+ }.bind(this)
39
+ });
40
+ }
41
+ },
42
+ openDialogWindow : function(content, elementId) {
43
+ this.overlayShowEffectOptions = Windows.overlayShowEffectOptions;
44
+ this.overlayHideEffectOptions = Windows.overlayHideEffectOptions;
45
+ Windows.overlayShowEffectOptions = {duration:0};
46
+ Windows.overlayHideEffectOptions = {duration:0};
47
+
48
+ Dialog.confirm(content, {
49
+ draggable:true,
50
+ resizable:true,
51
+ closable:true,
52
+ className:"magento",
53
+ windowClassName:"popup-window",
54
+ title:'WYSIWYG Editor',
55
+ width:950,
56
+ height:555,
57
+ zIndex:1000,
58
+ recenterAuto:false,
59
+ hideEffect:Element.hide,
60
+ showEffect:Element.show,
61
+ id:"catalog-wysiwyg-editor",
62
+ buttonClass:"form-button",
63
+ okLabel:"Submit",
64
+ ok: this.okDialogWindow.bind(this),
65
+ cancel: this.closeDialogWindow.bind(this),
66
+ onClose: this.closeDialogWindow.bind(this),
67
+ firedElementId: elementId
68
+ });
69
+
70
+ content.evalScripts.bind(content).defer();
71
+
72
+ $(elementId+'_editor').value = $(elementId).value;
73
+ },
74
+ okDialogWindow : function(dialogWindow) {
75
+ if (dialogWindow.options.firedElementId) {
76
+ wysiwygObj = eval('wysiwyg'+dialogWindow.options.firedElementId+'_editor');
77
+ wysiwygObj.turnOff();
78
+ if (tinyMCE.get(wysiwygObj.id)) {
79
+ $(dialogWindow.options.firedElementId).value = tinyMCE.get(wysiwygObj.id).getContent();
80
+ } else {
81
+ if ($(dialogWindow.options.firedElementId+'_editor')) {
82
+ $(dialogWindow.options.firedElementId).value = $(dialogWindow.options.firedElementId+'_editor').value;
83
+ }
84
+ }
85
+ }
86
+ this.closeDialogWindow(dialogWindow);
87
+ },
88
+ closeDialogWindow : function(dialogWindow) {
89
+ // remove form validation event after closing editor to prevent errors during save main form
90
+ if (typeof varienGlobalEvents != undefined && editorFormValidationHandler) {
91
+ varienGlobalEvents.removeEventHandler('formSubmit', editorFormValidationHandler);
92
+ }
93
+
94
+ //IE fix - blocked form fields after closing
95
+ $(dialogWindow.options.firedElementId).focus();
96
+
97
+ //destroy the instance of editor
98
+ wysiwygObj = eval('wysiwyg'+dialogWindow.options.firedElementId+'_editor');
99
+ if (tinyMCE.get(wysiwygObj.id)) {
100
+ tinyMCE.execCommand('mceRemoveControl', true, wysiwygObj.id);
101
+ }
102
+
103
+ dialogWindow.close();
104
+ Windows.overlayShowEffectOptions = this.overlayShowEffectOptions;
105
+ Windows.overlayHideEffectOptions = this.overlayHideEffectOptions;
106
+ }
107
+ };
108
+ });
skin/adminhtml/default/default/js/plumrocket/pslogin/jquery-ui.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.11.2 - 2014-10-27
2
+ * http://jqueryui.com
3
+ * Includes: core.js, widget.js, mouse.js, sortable.js
4
+ * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
5
+
6
+ (function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(pjQuery_1_10_2)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var s=0,n=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,a=n.call(arguments,1),o=0,r=a.length;r>o;o++)for(i in a[o])s=a[o][i],a[o].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(a){var o="string"==typeof a,r=n.call(arguments,1),h=this;return a=!o&&r.length?e.widget.extend.apply(null,[a].concat(r)):a,o?this.each(function(){var i,n=e.data(this,s);return"instance"===a?(h=n,!1):n?e.isFunction(n[a])&&"_"!==a.charAt(0)?(i=n[a].apply(n,r),i!==n&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+a+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var t=e.data(this,s);t?(t.option(a||{}),t._init&&t._init()):e.data(this,s,new i(a,this))}),h}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var a=!1;e(document).mouseup(function(){a=!1}),e.widget("ui.mouse",{version:"1.11.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!a){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),a=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),a=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||this._isFloating(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetName+"-item")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetName+"-item")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=e("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-e(document).scrollTop()<o.scrollSensitivity?r=e(document).scrollTop(e(document).scrollTop()-o.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<o.scrollSensitivity&&(r=e(document).scrollTop(e(document).scrollTop()+o.scrollSpeed)),t.pageX-e(document).scrollLeft()<o.scrollSensitivity?r=e(document).scrollLeft(e(document).scrollLeft()-o.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<o.scrollSensitivity&&(r=e(document).scrollLeft(e(document).scrollLeft()+o.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!e.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=e.left,o=a+e.width,r=e.top,h=r+e.height,l=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||s+l>r&&h>s+l,c="y"===this.options.axis||t+u>a&&o>t+u,p=d&&c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:t+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=t&&i,n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return s?this.floating?a&&"right"===a||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){r.push(this)}var s,n,a,o,r=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(a=e(l[s]),n=a.length-1;n>=0;n--)o=e.data(a[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&h.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(h.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(i=c.length-1;i>=0;i--)for(n=e(c[i]),s=n.length-1;s>=0;s--)a=e.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(d.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(i=d.length-1;i>=0;i--)for(o=d[i][1],r=d[i][0],s=0,l=r.length;l>s;s++)h=e(r[s]),h.data(this.widgetName+"-item",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),n=e("<"+s+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?t.currentItem.children().each(function(){e("<td>&#160;</td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",t.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var i,s,n,a,o,r,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=c.floating||this._isFloating(this.currentItem),o=u?"left":"top",r=u?"width":"height",d=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[d]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(t[d]-h)&&(n=Math.abs(t[d]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])
7
+ },_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,a=t.pageX,o=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})});
skin/adminhtml/default/default/js/plumrocket/pslogin/pslogin.js ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Plumrocket Inc.
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the End-user License Agreement
7
+ * that is available through the world-wide-web at this URL:
8
+ * http://wiki.plumrocket.net/wiki/EULA
9
+ * If you are unable to obtain it through the world-wide-web, please
10
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
11
+ *
12
+ * @package Plumrocket_SocialLogin
13
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
14
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
15
+ */
16
+
17
+ pjQuery_1_10_2(document).ready(function() {
18
+
19
+ // Set Required fields.
20
+ // pjQuery_1_10_2('').addClass('validate-alphanum');
21
+
22
+ // Redirect to.
23
+ pjQuery_1_10_2('#pslogin_general_redirect_for_login, #pslogin_general_redirect_for_register').on('change', function() {
24
+ var $list = pjQuery_1_10_2(this);
25
+ if($list.val() == '__custom__') {
26
+ pjQuery_1_10_2('#row_'+ $list.attr('id') +'_link').show();
27
+ }else{
28
+ pjQuery_1_10_2('#row_'+ $list.attr('id') +'_link').hide();
29
+ }
30
+ })
31
+ .find('option[value=__none__]').prop('disabled', true)
32
+ .change();
33
+
34
+ // Sortable.
35
+ pjQuery_1_10_2('ul#sortable-visible, ul#sortable-hidden').sortable({
36
+ connectWith: "ul",
37
+ receive: function(event, ui) {
38
+ ui.item.attr('id', ui.item.attr('id').replace(ui.sender.data('list'), pjQuery_1_10_2(this).data('list')));
39
+ },
40
+ update: function(event, ui) {
41
+ var sortable = [
42
+ pjQuery_1_10_2('#sortable-visible').sortable('serialize'),
43
+ pjQuery_1_10_2('#sortable-hidden').sortable('serialize')
44
+ ];
45
+
46
+ pjQuery_1_10_2('#pslogin_general_sortable').val( sortable.join('&') );
47
+ },
48
+ stop: function(event, ui) {
49
+ if(this.id == 'sortable-visible' && pjQuery_1_10_2('#'+ this.id +' li').length < 1) {
50
+ alert('Sorry, "Visible Buttons" list can not be empty');
51
+ // return false;
52
+ pjQuery_1_10_2(this).sortable('cancel');
53
+ }
54
+ }
55
+ })
56
+ .disableSelection();
57
+
58
+
59
+ if(pjQuery_1_10_2('#pslogin_general_sortable_drag_and_drop').css('display') != 'none') {
60
+ if(pjQuery_1_10_2('#pslogin_general_sortable_inherit').length) {
61
+ pjQuery_1_10_2('#pslogin_general_sortable_inherit').on('change', function() {
62
+ var $sortLists = pjQuery_1_10_2('ul#sortable-visible, ul#sortable-hidden');
63
+ if(pjQuery_1_10_2(this).is(':checked')) {
64
+ $sortLists.sortable({ disabled: true });
65
+ }else{
66
+ $sortLists.sortable({ disabled: false });
67
+ }
68
+ }).change();
69
+ }
70
+ }else{
71
+ pjQuery_1_10_2('#row_pslogin_general_sortable').hide();
72
+ }
73
+
74
+ /*pjQuery_1_10_2('select').on('change', function() {
75
+ var $list = pjQuery_1_10_2(this);
76
+ pjQuery_1_10_2('ul#sortable-visible, ul#sortable-hidden').find('li[data-enable='+ $list.attr('id') +']').toggle( $list.val() );
77
+ });*/
78
+
79
+ // Share Url.
80
+ pjQuery_1_10_2('#pslogin_share_page').on('change', function() {
81
+ var $list = pjQuery_1_10_2(this);
82
+ if($list.val() == '__custom__') {
83
+ pjQuery_1_10_2('#row_'+ $list.attr('id') +'_link').show();
84
+ }else{
85
+ pjQuery_1_10_2('#row_'+ $list.attr('id') +'_link').hide();
86
+ }
87
+ })
88
+ .find('option[value=__invitationsoff__], option[value=__none__]').prop('disabled', true)
89
+ .change();
90
+
91
+ // Alert "Not installed".
92
+ pjQuery_1_10_2('.pslogin-notinstalled').parents('fieldset.config').each(function() {
93
+ var $section = pjQuery_1_10_2('#'+ this.id +'-head').parents('div.entry-edit-head');
94
+ $section.addClass('pslogin-notinstalled-section');
95
+ $section.find('a').append('<span class="pslogin-notinstalled-title">(Not installed)</span>');
96
+ });
97
+
98
+ });
skin/frontend/base/default/css/plumrocket/pslogin/pslogin.css ADDED
@@ -0,0 +1,1241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .pslogin-addedoverlay {
2
+ left: 0;
3
+ top: 0;
4
+ width: 100%;
5
+ height: 100%;
6
+ position: fixed;
7
+ z-index: 2010;
8
+ background-color: black;
9
+ filter: alpha(opacity=60);
10
+ opacity: 0.6;
11
+ /*display: none;*/
12
+ }
13
+
14
+ .pslogin-pop-up-form {
15
+ left: 0px;
16
+ top: 0px;
17
+ position:fixed;
18
+ width: 100%;
19
+ z-index: 2020;
20
+ height:100%;
21
+ color:#666666;
22
+ text-align:left;
23
+ /*display:none;*/
24
+ overflow-y: auto;
25
+ }
26
+
27
+ #pslogin-pop-up-bg {
28
+ max-width: 450px;
29
+ font-size: 12px;
30
+ padding: 0 10px 0 10px;
31
+ margin: 10% auto 5% auto;
32
+ color: #444;
33
+ font-family: Arial, Helvetica, sans-serif;
34
+ height: 100%;
35
+ box-sizing: border-box;
36
+ }
37
+
38
+ .pslogin-share {
39
+ background-color: white;
40
+ min-height: 270px;
41
+ padding: 18px 21px;
42
+ position: relative;
43
+ }
44
+
45
+ .pslogin-fake-email-message {
46
+ position: fixed;
47
+ top: 20px;
48
+ width: 100%;
49
+ padding: 0 5%;
50
+ box-sizing: border-box;
51
+ -moz-box-sizing: border-box;
52
+ -webkit-box-sizing: border-box;
53
+ z-index: 1000;
54
+ }
55
+
56
+ .pslogin-fake-email-message .content {
57
+ padding: 5px 10px;
58
+ background: #fff;
59
+ max-width: 960px;
60
+ min-width: 250px;
61
+ margin: 0 auto;
62
+ box-shadow: 0 2px 15px 0px rgba(0, 0, 0, 0.42);
63
+ -webkit-box-shadow: 0 2px 15px 0px rgba(0, 0, 0, 0.42);
64
+ -moz-box-shadow: 0 2px 15px 0px rgba(0, 0, 0, 0.42);
65
+ font-size: 14px;
66
+ color: #636363;
67
+ }
68
+
69
+ .pslogin-fake-email-message p {
70
+ margin: 10px auto;
71
+ text-align: left;
72
+ }
73
+
74
+ .pslogin-fake-email-message .close-message {
75
+ float: right;
76
+ }
77
+
78
+ .pslogin-fake-email-message .close-message:hover {
79
+ cursor: pointer;
80
+ color: #AEAEAE;
81
+ }
82
+
83
+
84
+ /* general classes */
85
+ .pslogin-share .ta-center {
86
+ text-align: center;
87
+ }
88
+
89
+ .pslogin-share h2 {
90
+ padding: 0px 0px 7px 0px;
91
+ color: #3399cc;
92
+ font-weight: 400;
93
+ font-size: 15px;
94
+ text-transform: uppercase;
95
+ border-bottom: 1px solid #DDD;
96
+ margin-bottom: 10px;
97
+ }
98
+
99
+
100
+ .pslogin-share .prpop-close-btn {
101
+ position: absolute;
102
+ right: 9px;
103
+ left: auto;
104
+ margin-right: 10px;
105
+ top: 14px;
106
+ text-decoration: none;
107
+ color: #727272;
108
+ font-size: 16px;
109
+ background: none;
110
+ }
111
+
112
+ .pslogin-share .prpop-close-btn:hover {
113
+ color: #b6aba5;
114
+ }
115
+
116
+ .pslogin-share p {
117
+ margin-bottom: 7px;
118
+ }
119
+
120
+ .pslogin-share img {
121
+ max-width: 100%;
122
+ height: auto;
123
+ }
124
+
125
+ .pslogin-share .button-top {
126
+ height: 7px;
127
+ }
128
+
129
+ .pslogin-share a {
130
+ display: inline-block;
131
+ height: 30px;
132
+ color: white;
133
+ margin: 0 10px 10px 0;
134
+ }
135
+
136
+ .pslogin-share a:hover {
137
+ cursor: pointer;
138
+ opacity: 0.7;
139
+ filter: apha(filter=70);
140
+ }
141
+
142
+ /*
143
+ .pslogin-share .soc-button {
144
+ background-image: url("images/social_retina.png");
145
+ background-size: 328px 185px;
146
+ display: block;
147
+ height: 30px;
148
+ width: 30px;
149
+ float: left;
150
+ }
151
+ */
152
+
153
+ /*form*/
154
+ .pslogin-form .w25 { width: 25px; }
155
+ .pslogin-form .w100 { width: 100px; }
156
+
157
+ .pslogin-form.account-login .content {
158
+ margin: 0;
159
+ }
160
+
161
+ .pslogin-form.account-login .form-list label,
162
+ #checkout-step-login .pslogin-form .form-list label {
163
+ width: auto;
164
+ float: none;
165
+ }
166
+
167
+ .pslogin-form.account-login .form-list .input-box,
168
+ #checkout-step-login .pslogin-form .form-list .input-box {
169
+ float: none;
170
+ }
171
+
172
+ #checkout-step-login .col2-set {
173
+ box-sizing: border-box;
174
+ }
175
+
176
+ .pslogin-form.account-login .buttons-set {
177
+ min-height: 40px;
178
+ }
179
+
180
+ .pslogin-form.col2-set {
181
+ margin: 0;
182
+ }
183
+
184
+ .pslogin-form.col2-set .buttons-set {
185
+ padding: 0;
186
+ }
187
+
188
+ .pslogin-form.col2-set .fieldset {
189
+ margin: 15px 0;
190
+ }
191
+
192
+ .pslogin-form button.button span,
193
+ .pslogin-form button.button span span {
194
+ height: auto;
195
+ }
196
+
197
+ .pslogin-share .soc-name {
198
+ height: 30px;
199
+ line-height: 30px;
200
+ padding: 0 7px;
201
+ display: block;
202
+ float: left;
203
+ box-sizing: border-box;
204
+ }
205
+
206
+ .pslogin-share .vkontakte {
207
+ background-position: -77px -78px;
208
+ }
209
+
210
+ .pslogin-share .facebook {
211
+ background-position: -5px -5px
212
+ }
213
+
214
+ .pslogin-share .twitter {
215
+ background-position: -41px -5px;
216
+ }
217
+
218
+ .pslogin-share .googleplus {
219
+ background-position: -113px -5px;
220
+ }
221
+
222
+ /* welcome message */
223
+ .pslogin-welcome-msg {
224
+ height: 25px;
225
+ line-height: 25px;
226
+ float: none;
227
+ display: inline-block;
228
+ margin: 0 0 5px 0;
229
+ }
230
+
231
+ .pslogin-welcome-msg:after {
232
+ clear: both;
233
+ content: "";
234
+ }
235
+
236
+ .pslogin-welcome-msg img {
237
+ height: 25px;
238
+ display: inline-block;
239
+ padding: 0 5px 0 0;
240
+ float: left;
241
+ }
242
+
243
+ /* Buttons */
244
+ .pslogin-form {
245
+ width: 100%;
246
+ margin: 20px 0;
247
+ }
248
+
249
+ .pslogin-form * {
250
+ box-sizing: border-box;
251
+ -moz-box-sizing: border-box;
252
+ -webkit-box-sizing: border-box;
253
+ }
254
+
255
+ .pslogin-form.text-hidden .soc-li-text,
256
+ .pslogin-form-register.text-hidden1 .soc-li-text {
257
+ display: none!important;
258
+ }
259
+
260
+ .pslogin-form .xs {
261
+ display: none!important;
262
+ }
263
+
264
+ .pslogin-form .md {
265
+ display: block;
266
+ }
267
+
268
+ .pslogin-form .pslogin-clearfix:after {
269
+ visibility: hidden;
270
+ display: block;
271
+ font-size: 0;
272
+ content: " ";
273
+ clear: both;
274
+ height: 0;
275
+ }
276
+
277
+ .pslogin-form .title {
278
+ text-align: center;
279
+ margin-bottom: 10px;
280
+ font-size: 12px;
281
+ }
282
+
283
+ .pslogin-form .spacer {
284
+ display: block;
285
+ margin: 10px auto;
286
+ position: relative;
287
+ text-align: center;
288
+ line-height: 16px!important;
289
+ top: auto;
290
+ left: auto;
291
+ height: auto;
292
+ width: auto;
293
+ line-height: normal;
294
+ overflow: visible;
295
+ font-size: 13px;
296
+ }
297
+
298
+ .pslogin-form .spacer table {
299
+ width: 100%;
300
+ }
301
+
302
+ .pslogin-form .spacer table td {
303
+ vertical-align: middle;
304
+ }
305
+
306
+ .pslogin-form .spacer .border {
307
+ border-top: 1px solid #e5e2e2;
308
+ width: 100%;
309
+ }
310
+
311
+ .pslogin-form .spacer .text_or {
312
+ color: #b2b2b2;
313
+ text-align: center;
314
+ font-size: 11px;
315
+ }
316
+
317
+ .pslogin-form .spacer.show-hidden .text_or {
318
+ height: 20px;
319
+ line-height: 17px;
320
+ padding: 0;
321
+ border: 1px solid #e5e2e2;
322
+ border-radius: 9px;
323
+ -moz-border-radius: 9px;
324
+ -webkit-border-radius: 9px;
325
+ }
326
+
327
+ .pslogin-form .spacer.show-hidden .text_or:hover {
328
+ color: #989898;
329
+ cursor: pointer;
330
+ }
331
+
332
+ .pslogin-form .spacer .circle {
333
+ width: 90%;
334
+ height: 25px;
335
+ line-height: 22px;
336
+ font-size: 11px;
337
+ border: 1px solid #b2b2b2;
338
+ border-radius: 0px 7px;
339
+ margin: 0 auto;
340
+ background-color: #eeeeee;
341
+ }
342
+
343
+ .pslogin-form .spacer .circle:hover {
344
+ cursor: pointer;
345
+ background-color: #FAFAFA;
346
+ }
347
+
348
+
349
+ .pslogin-form .show-hidden {
350
+ margin-top: 20px;
351
+ }
352
+
353
+ .pslogin-form.pageform-login .pslogin-buttons {
354
+ display: block;
355
+ }
356
+
357
+ .pslogin-form.pageform-register .pslogin-buttons {
358
+ display: inline-block;
359
+ }
360
+
361
+ .pslogin-form .pslogin-buttons ul li {
362
+ display: inline-block;
363
+ line-height: normal;
364
+ margin-bottom: 5px;
365
+ list-style: none!important;
366
+ padding: 0!important;
367
+ background: none!important;
368
+ }
369
+
370
+ .pslogin-form .pslogin-buttons ul li.show-button-image {
371
+ background: none!important;
372
+ }
373
+
374
+ .pslogin-form .pslogin-buttons ul li:hover {
375
+ opacity: 0.9;
376
+ filter: alpha(opacity=90);
377
+ }
378
+
379
+ .pslogin-form .pslogin-buttons ul li span.background {
380
+ background-color: #3399cc;
381
+ display: inline-block;
382
+ }
383
+
384
+ .pslogin-form .pslogin-buttons ul li .soc-li-icon {
385
+ background: url('../../../images/plumrocket/pslogin/social.png');
386
+ display: block;
387
+ float: left;
388
+ width: 32px;
389
+ height: 32px;
390
+ margin: 0;
391
+ padding: 0;
392
+ box-sizing: border-box;
393
+ }
394
+
395
+ .pslogin-form .pslogin-buttons ul li .soc-li-icon img {
396
+ width: 100%;
397
+ }
398
+
399
+ .pslogin-form .pslogin-buttons ul li a>img {
400
+
401
+ }
402
+
403
+ .pslogin-form .pslogin-buttons ul li .soc-li-text {
404
+ display: block;
405
+ float: left;
406
+ height: 32px;
407
+ line-height: 32px;
408
+ vertical-align: top;
409
+ padding: 0;
410
+ text-align: center;
411
+ min-width: 140px;
412
+ box-sizing: border-box;
413
+ font-size: 11px;
414
+ color: white;
415
+ background-color: rgba(255,255,255, 0.2);
416
+ }
417
+
418
+ .pslogin-form .pslogin-buttons ul li .soc-li-text.text-hidden {
419
+ display: none;
420
+ }
421
+
422
+ .pslogin-form .pslogin-buttons ul li.facebook span.background { background-color: #1e4389; }
423
+ .pslogin-form .pslogin-buttons ul li.facebook .soc-li-icon { background-position: 0px 0px; }
424
+
425
+ .pslogin-form .pslogin-buttons ul li.twitter span.background { background-color: #28a9e2; }
426
+ .pslogin-form .pslogin-buttons ul li.twitter .soc-li-icon { background-position: -34px 0px; }
427
+
428
+ .pslogin-form .pslogin-buttons ul li.linkedin span.background { background-color: #11669c; }
429
+ .pslogin-form .pslogin-buttons ul li.linkedin .soc-li-icon { background-position: -168px 0px; }
430
+
431
+ .pslogin-form .pslogin-buttons ul li.yahoo span.background { background-color: #85228f; }
432
+ .pslogin-form .pslogin-buttons ul li.yahoo .soc-li-icon { background-position: -204px 0px; }
433
+
434
+ .pslogin-form .pslogin-buttons ul li.vkontakte span.background { background-color: #3f658c; }
435
+ .pslogin-form .pslogin-buttons ul li.vkontakte .soc-li-icon { background-position: -68px 0px; }
436
+
437
+ .pslogin-form .pslogin-buttons ul li.googleplus span.background { background-color: #df4b38; }
438
+ .pslogin-form .pslogin-buttons ul li.googleplus .soc-li-icon { background-position: -135px 0px; }
439
+
440
+
441
+ .pslogin-form .pslogin-buttons ul li.hotmail span.background { background-color: #f67d20; }
442
+ .pslogin-form .pslogin-buttons ul li.hotmail .soc-li-icon { background-position: 0px -34px; }
443
+
444
+ .pslogin-form .pslogin-buttons ul li.live span.background { background-color: #f67d20; }
445
+ .pslogin-form .pslogin-buttons ul li.live .soc-li-icon { background-position: -34px -205px; }
446
+
447
+ .pslogin-form .pslogin-buttons ul li.pinterest span.background { background-color: #cb2028; }
448
+ .pslogin-form .pslogin-buttons ul li.pinterest .soc-li-icon { background-position: -34px -34px; }
449
+
450
+ .pslogin-form .pslogin-buttons ul li.amazon span.background { background-color: #ff8e2e; }
451
+ .pslogin-form .pslogin-buttons ul li.amazon .soc-li-icon { background-position: -68px -34px; }
452
+
453
+ .pslogin-form .pslogin-buttons ul li.aol span.background { background-color: #008bd3; }
454
+ .pslogin-form .pslogin-buttons ul li.aol .soc-li-icon { background-position: -102px -34px; }
455
+
456
+ .pslogin-form .pslogin-buttons ul li.github span.background { background-color: #4382c5; }
457
+ .pslogin-form .pslogin-buttons ul li.github .soc-li-icon { background-position: -135px -35px; }
458
+
459
+ .pslogin-form .pslogin-buttons ul li.instagram span.background { background-color: #9a6e51; }
460
+ .pslogin-form .pslogin-buttons ul li.instagram .soc-li-icon { background-position: -168px -34px; }
461
+
462
+ .pslogin-form .pslogin-buttons ul li.foursquare span.background { background-color: #3472ad; }
463
+ .pslogin-form .pslogin-buttons ul li.foursquare .soc-li-icon { background-position: -203px -34px; }
464
+
465
+ .pslogin-form .pslogin-buttons ul li.dropbox span.background { background-color: #008bd3; }
466
+ .pslogin-form .pslogin-buttons ul li.dropbox .soc-li-icon { background-position: -0px -68px; }
467
+
468
+ .pslogin-form .pslogin-buttons ul li.disqus span.background { background-color: #3d7198; }
469
+ .pslogin-form .pslogin-buttons ul li.disqus .soc-li-icon { background-position: -32px -69px; }
470
+
471
+ .pslogin-form .pslogin-buttons ul li.livejournal span.background { background-color: #104378; }
472
+ .pslogin-form .pslogin-buttons ul li.livejournal .soc-li-icon { background-position: -66px -69px; }
473
+
474
+ .pslogin-form .pslogin-buttons ul li.tumblr span.background { background-color: #304e6c; }
475
+ .pslogin-form .pslogin-buttons ul li.tumblr .soc-li-icon { background-position: -102px -69px; }
476
+
477
+ .pslogin-form .pslogin-buttons ul li.openid span.background { background-color: #f8931f; }
478
+ .pslogin-form .pslogin-buttons ul li.openid .soc-li-icon { background-position: -135px -69px; }
479
+
480
+ .pslogin-form .pslogin-buttons ul li.flickr span.background { background-color: #ff0084; }
481
+ .pslogin-form .pslogin-buttons ul li.flickr .soc-li-icon { background-position: -169px -69px; }
482
+
483
+ .pslogin-form .pslogin-buttons ul li.wordpress span.background { background-color: #1b3f57; }
484
+ .pslogin-form .pslogin-buttons ul li.wordpress .soc-li-icon { background-position: -204px -69px; }
485
+
486
+ .pslogin-form .pslogin-buttons ul li.blogger span.background { background-color: #ec7825; }
487
+ .pslogin-form .pslogin-buttons ul li.blogger .soc-li-icon { background-position: 0px -103px; }
488
+
489
+ .pslogin-form .pslogin-buttons ul li.odnoklassniki span.background { background-color: #ee6600; }
490
+ .pslogin-form .pslogin-buttons ul li.odnoklassniki .soc-li-icon { background-position: -34px -103px; }
491
+
492
+ .pslogin-form .pslogin-buttons ul li.mailru span.background { background-color: #168de2; }
493
+ .pslogin-form .pslogin-buttons ul li.mailru .soc-li-icon { background-position: -67px -103px; }
494
+
495
+ .pslogin-form .pslogin-buttons ul li.yandex span.background { background-color: #dd0000; }
496
+ .pslogin-form .pslogin-buttons ul li.yandex .soc-li-icon { background-position: -102px -103px; }
497
+
498
+ .pslogin-form .pslogin-buttons ul li.paypal span.background { background-color: #195d82; }
499
+ .pslogin-form .pslogin-buttons ul li.paypal .soc-li-icon { background-position: -134px -103px; }
500
+
501
+ .pslogin-form .pslogin-buttons ul li.myspace span.background { background-color: #0022a0;}
502
+ .pslogin-form .pslogin-buttons ul li.myspace .soc-li-icon { background-position: -169px -103px; }
503
+
504
+ .pslogin-form .pslogin-buttons ul li.salesforce span.background { background-color: #00a0de; }
505
+ .pslogin-form .pslogin-buttons ul li.salesforce .soc-li-icon { background-position: -203px -103px; }
506
+
507
+ .pslogin-form .pslogin-buttons ul li.steamcommunity span.background { background-color: #282828; }
508
+ .pslogin-form .pslogin-buttons ul li.steamcommunity .soc-li-icon { background-position: -1px -137px; }
509
+
510
+ .pslogin-form .pslogin-buttons ul li.hyves span.background { background-color: #ffca63; }
511
+ .pslogin-form .pslogin-buttons ul li.hyves .soc-li-icon { background-position: -33px -137px; }
512
+
513
+ .pslogin-form .pslogin-buttons ul li.stackexchange span.background { background-color: #557cbf; }
514
+ .pslogin-form .pslogin-buttons ul li.stackexchange .soc-li-icon { background-position: -67px -137px; }
515
+
516
+ .pslogin-form .pslogin-buttons ul li.evernote span.background { background-color: #7ac141; }
517
+ .pslogin-form .pslogin-buttons ul li.evernote .soc-li-icon { background-position: -101px -137px; }
518
+
519
+ .pslogin-form .pslogin-buttons ul li.mixi span.background { background-color: #d1ac5b; }
520
+ .pslogin-form .pslogin-buttons ul li.mixi .soc-li-icon { background-position: -135px -137px; }
521
+
522
+ .pslogin-form .pslogin-buttons ul li.mydigipass span.background { background-color: #49bbeb; }
523
+ .pslogin-form .pslogin-buttons ul li.mydigipass .soc-li-icon { background-position: -169px -137px; }
524
+
525
+ .pslogin-form .pslogin-buttons ul li.netlog span.background { background-color: #bb2026; }
526
+ .pslogin-form .pslogin-buttons ul li.netlog .soc-li-icon { background-position: -203px -137px; }
527
+
528
+ .pslogin-form .pslogin-buttons ul li.qq span.background { background-color: #c46f1c; }
529
+ .pslogin-form .pslogin-buttons ul li.qq .soc-li-icon { background-position: 0px -171px; }
530
+
531
+ .pslogin-form .pslogin-buttons ul li.sinaweibo span.background { background-color: #bd4342; }
532
+ .pslogin-form .pslogin-buttons ul li.sinaweibo .soc-li-icon { background-position: -34px -171px; }
533
+
534
+ .pslogin-form .pslogin-buttons ul li.soundcloud span.background { background-color: #ff5419; }
535
+ .pslogin-form .pslogin-buttons ul li.soundcloud .soc-li-icon { background-position: -66px -171px; }
536
+
537
+ .pslogin-form .pslogin-buttons ul li.tencentweibo span.background { background-color: #28a4e4; }
538
+ .pslogin-form .pslogin-buttons ul li.tencentweibo .soc-li-icon { background-position: -100px -171px; }
539
+
540
+ .pslogin-form .pslogin-buttons ul li.verisign span.background { background-color: #b22253; }
541
+ .pslogin-form .pslogin-buttons ul li.verisign .soc-li-icon { background-position: -134px -171px; }
542
+
543
+ .pslogin-form .pslogin-buttons ul li.xing span.background { background-color: #005d5e;}
544
+ .pslogin-form .pslogin-buttons ul li.xing .soc-li-icon { background-position: -168px -171px; }
545
+
546
+ .pslogin-form .pslogin-buttons ul li.kaixin span.background { background-color: #e2332e; }
547
+ .pslogin-form .pslogin-buttons ul li.kaixin .soc-li-icon { background-position: -203px -171px; }
548
+
549
+ .pslogin-form .pslogin-buttons ul li.orange span.background { background-color: #ff6600; }
550
+ .pslogin-form .pslogin-buttons ul li.orange .soc-li-icon { background-position: -1px -205px; }
551
+
552
+
553
+
554
+
555
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
556
+
557
+ .pslogin-form .pslogin-buttons ul li .soc-li-icon {
558
+ background: url('../../../images/plumrocket/pslogin/social_retina.png');
559
+ background-size: 236px 272px;
560
+ -webkit-background-size: 236px 272px;
561
+ -moz-background-size: 236px 272px;
562
+ }
563
+
564
+ }
565
+
566
+ @media screen and ( max-width: 767px ) {
567
+
568
+ .pslogin-form .pslogin-buttons {
569
+ width: 100%;
570
+ }
571
+
572
+ .pslogin-form .pslogin-buttons ul li .soc-li-text {
573
+ display: none;
574
+ }
575
+
576
+ .pslogin-form .spacer.show-hidden {
577
+ display: none;
578
+ }
579
+
580
+ .pslogin-form .pslogin-buttons ul li.pslogin-hidden {
581
+ display: inline-block!important;
582
+ }
583
+
584
+ .pslogin-form .xs {
585
+ display: inline-block!important;
586
+ }
587
+
588
+ .pslogin-form .md {
589
+ display: none!important;
590
+ }
591
+
592
+ .pslogin-form .spacer .text_or {
593
+
594
+ }
595
+
596
+ }
597
+
598
+ /*=== animate ===*/
599
+ #pslogin-pop-up-bg {
600
+ -webkit-animation-duration: 1s;
601
+ -moz-animation-duration:1s;
602
+ animation-duration: 1s;
603
+ -webkit-animation-fill-mode: both;
604
+ animation-fill-mode: both;
605
+ }
606
+
607
+ @-webkit-keyframes fadeIn {
608
+ 0% {opacity: 0;}
609
+ 100% {opacity: 1;}
610
+ }
611
+
612
+ @-moz-keyframes fadeIn {
613
+ 0% {opacity: 0;}
614
+ 100% {opacity: 1;}
615
+ }
616
+
617
+ @keyframes fadeIn {
618
+ 0% {opacity: 0;}
619
+ 100% {opacity: 1;}
620
+ }
621
+
622
+ .fadeIn {
623
+ -webkit-animation-name: fadeIn;
624
+ -moz-animation-name: fadeIn;
625
+ animation-name: fadeIn;
626
+ }
627
+
628
+ @-webkit-keyframes fadeInDown {
629
+ 0% {
630
+ opacity: 0;
631
+ -webkit-transform: translate3d(0, -10%, 0);
632
+ -moz-transform: translate3d(0, -10%, 0);
633
+ transform: translate3d(0, -10%, 0);
634
+ }
635
+
636
+ 100% {
637
+ opacity: 1;
638
+ -webkit-transform: none;
639
+ -moz-transform: none;
640
+ transform: none;
641
+ }
642
+ }
643
+
644
+ @-moz-keyframes fadeInDown {
645
+ 0% {
646
+ opacity: 0;
647
+ -webkit-transform: translate3d(0, -10%, 0);
648
+ -moz-transform: translate3d(0, -10%, 0);
649
+ transform: translate3d(0, -10%, 0);
650
+ }
651
+
652
+ 100% {
653
+ opacity: 1;
654
+ -webkit-transform: none;
655
+ -moz-transform: none;
656
+ transform: none;
657
+ }
658
+ }
659
+
660
+ @keyframes fadeInDown {
661
+ 0% {
662
+ opacity: 0;
663
+ -webkit-transform: translate3d(0, -10%, 0);
664
+ -moz-transform: translate3d(0, -10%, 0);
665
+ transform: translate3d(0, -10%, 0);
666
+ }
667
+
668
+ 100% {
669
+ opacity: 1;
670
+ -webkit-transform: none;
671
+ -moz-transform: none;
672
+ transform: none;
673
+ }
674
+ }
675
+
676
+ .fadeInDown {
677
+ -webkit-animation-name: fadeInDown;
678
+ -moz-animation-name: fadeInDown;
679
+ animation-name: fadeInDown;
680
+ }
681
+
682
+ @-webkit-keyframes fadeInDownBig {
683
+ 0% {
684
+ opacity: 0;
685
+ -webkit-transform: translate3d(0, -2000px, 0);
686
+ -moz-transform: translate3d(0, -2000px, 0);
687
+ transform: translate3d(0, -2000px, 0);
688
+ }
689
+
690
+ 100% {
691
+ opacity: 1;
692
+ -webkit-transform: none;
693
+ -moz-transform: none;
694
+ transform: none;
695
+ }
696
+ }
697
+
698
+ @-moz-keyframes fadeInDownBig {
699
+ 0% {
700
+ opacity: 0;
701
+ -webkit-transform: translate3d(0, -2000px, 0);
702
+ -moz-transform: translate3d(0, -2000px, 0);
703
+ transform: translate3d(0, -2000px, 0);
704
+ }
705
+
706
+ 100% {
707
+ opacity: 1;
708
+ -webkit-transform: none;
709
+ -moz-transform: none;
710
+ transform: none;
711
+ }
712
+ }
713
+
714
+ @keyframes fadeInDownBig {
715
+ 0% {
716
+ opacity: 0;
717
+ -webkit-transform: translate3d(0, -2000px, 0);
718
+ -moz-transform: translate3d(0, -2000px, 0);
719
+ transform: translate3d(0, -2000px, 0);
720
+ }
721
+
722
+ 100% {
723
+ opacity: 1;
724
+ -webkit-transform: none;
725
+ -moz-transform: none;
726
+ transform: none;
727
+ }
728
+ }
729
+
730
+ .fadeInDownBig {
731
+ -webkit-animation-name: fadeInDownBig;
732
+ -moz-animation-name: fadeInDownBig;
733
+ animation-name: fadeInDownBig;
734
+ }
735
+
736
+ @-webkit-keyframes fadeInLeft {
737
+ 0% {
738
+ opacity: 0;
739
+ -webkit-transform: translate3d(-10%, 0, 0);
740
+ -moz-transform: translate3d(-10%, 0, 0);
741
+ transform: translate3d(-10%, 0, 0);
742
+ }
743
+
744
+ 100% {
745
+ opacity: 1;
746
+ -webkit-transform: none;
747
+ -moz-transform: none;
748
+ transform: none;
749
+ }
750
+ }
751
+
752
+ @-moz-keyframes fadeInLeft {
753
+ 0% {
754
+ opacity: 0;
755
+ -webkit-transform: translate3d(-10%, 0, 0);
756
+ -moz-transform: translate3d(-10%, 0, 0);
757
+ transform: translate3d(-10%, 0, 0);
758
+ }
759
+
760
+ 100% {
761
+ opacity: 1;
762
+ -webkit-transform: none;
763
+ -moz-transform: none;
764
+ transform: none;
765
+ }
766
+ }
767
+
768
+ @keyframes fadeInLeft {
769
+ 0% {
770
+ opacity: 0;
771
+ -webkit-transform: translate3d(-10%, 0, 0);
772
+ -moz-transform: translate3d(-10%, 0, 0);
773
+ transform: translate3d(-10%, 0, 0);
774
+ }
775
+
776
+ 100% {
777
+ opacity: 1;
778
+ -webkit-transform: none;
779
+ -moz-transform: none;
780
+ transform: none;
781
+ }
782
+ }
783
+
784
+ .fadeInLeft {
785
+ -webkit-animation-name: fadeInLeft;
786
+ -moz-animation-name: fadeInLeft;
787
+ animation-name: fadeInLeft;
788
+ }
789
+
790
+ @-webkit-keyframes fadeInLeftBig {
791
+ 0% {
792
+ opacity: 0;
793
+ -webkit-transform: translate3d(-2000px, 0, 0);
794
+ -moz-transform: translate3d(-2000px, 0, 0);
795
+ transform: translate3d(-2000px, 0, 0);
796
+ }
797
+
798
+ 100% {
799
+ opacity: 1;
800
+ -webkit-transform: none;
801
+ -moz-transform: none;
802
+ transform: none;
803
+ }
804
+ }
805
+
806
+ @-moz-keyframes fadeInLeftBig {
807
+ 0% {
808
+ opacity: 0;
809
+ -webkit-transform: translate3d(-2000px, 0, 0);
810
+ -moz-transform: translate3d(-2000px, 0, 0);
811
+ transform: translate3d(-2000px, 0, 0);
812
+ }
813
+
814
+ 100% {
815
+ opacity: 1;
816
+ -webkit-transform: none;
817
+ -moz-transform: none;
818
+ transform: none;
819
+ }
820
+ }
821
+
822
+ @keyframes fadeInLeftBig {
823
+ 0% {
824
+ opacity: 0;
825
+ -webkit-transform: translate3d(-2000px, 0, 0);
826
+ -moz-transform: translate3d(-2000px, 0, 0);
827
+ transform: translate3d(-2000px, 0, 0);
828
+ }
829
+
830
+ 100% {
831
+ opacity: 1;
832
+ -webkit-transform: none;
833
+ -moz-transform: none;
834
+ transform: none;
835
+ }
836
+ }
837
+
838
+ .fadeInLeftBig {
839
+ -webkit-animation-name: fadeInLeftBig;
840
+ -moz-animation-name: fadeInLeftBig;
841
+ animation-name: fadeInLeftBig;
842
+ }
843
+
844
+ @-webkit-keyframes fadeInRight {
845
+ 0% {
846
+ opacity: 0;
847
+ -webkit-transform: translate3d(10%, 0, 0);
848
+ -moz-transform: translate3d(10%, 0, 0);
849
+ transform: translate3d(10%, 0, 0);
850
+ }
851
+
852
+ 100% {
853
+ opacity: 1;
854
+ -webkit-transform: none;
855
+ -moz-transform: none;
856
+ transform: none;
857
+ }
858
+ }
859
+
860
+ @-moz-keyframes fadeInRight {
861
+ 0% {
862
+ opacity: 0;
863
+ -webkit-transform: translate3d(10%, 0, 0);
864
+ -moz-transform: translate3d(10%, 0, 0);
865
+ transform: translate3d(10%, 0, 0);
866
+ }
867
+
868
+ 100% {
869
+ opacity: 1;
870
+ -webkit-transform: none;
871
+ -moz-transform: none;
872
+ transform: none;
873
+ }
874
+ }
875
+
876
+ @keyframes fadeInRight {
877
+ 0% {
878
+ opacity: 0;
879
+ -webkit-transform: translate3d(10%, 0, 0);
880
+ -moz-transform: translate3d(10%, 0, 0);
881
+ transform: translate3d(10%, 0, 0);
882
+ }
883
+
884
+ 100% {
885
+ opacity: 1;
886
+ -webkit-transform: none;
887
+ -moz-transform: none;
888
+ transform: none;
889
+ }
890
+ }
891
+
892
+ .fadeInRight {
893
+ -webkit-animation-name: fadeInRight;
894
+ -moz-animation-name: fadeInRight;
895
+ animation-name: fadeInRight;
896
+ }
897
+
898
+ @-webkit-keyframes fadeInRightBig {
899
+ 0% {
900
+ opacity: 0;
901
+ -webkit-transform: translate3d(2000px, 0, 0);
902
+ -moz-transform: translate3d(2000px, 0, 0);
903
+ transform: translate3d(2000px, 0, 0);
904
+ }
905
+
906
+ 100% {
907
+ opacity: 1;
908
+ -webkit-transform: none;
909
+ -moz-transform: none;
910
+ transform: none;
911
+ }
912
+ }
913
+
914
+ @-moz-keyframes fadeInRightBig {
915
+ 0% {
916
+ opacity: 0;
917
+ -webkit-transform: translate3d(2000px, 0, 0);
918
+ -moz-transform: translate3d(2000px, 0, 0);
919
+ transform: translate3d(2000px, 0, 0);
920
+ }
921
+
922
+ 100% {
923
+ opacity: 1;
924
+ -webkit-transform: none;
925
+ -moz-transform: none;
926
+ transform: none;
927
+ }
928
+ }
929
+
930
+ @keyframes fadeInRightBig {
931
+ 0% {
932
+ opacity: 0;
933
+ -webkit-transform: translate3d(2000px, 0, 0);
934
+ -moz-transform: translate3d(2000px, 0, 0);
935
+ transform: translate3d(2000px, 0, 0);
936
+ }
937
+
938
+ 100% {
939
+ opacity: 1;
940
+ -webkit-transform: none;
941
+ -moz-transform: none;
942
+ transform: none;
943
+ }
944
+ }
945
+
946
+ .fadeInRightBig {
947
+ -webkit-animation-name: fadeInRightBig;
948
+ -moz-animation-name: fadeInRightBig;
949
+ animation-name: fadeInRightBig;
950
+ }
951
+
952
+ @-webkit-keyframes fadeInUp {
953
+ 0% {
954
+ opacity: 0;
955
+ -webkit-transform: translate3d(0, 10%, 0);
956
+ -moz-transform: translate3d(0, 10%, 0);
957
+ transform: translate3d(0, 10%, 0);
958
+ }
959
+
960
+ 100% {
961
+ opacity: 1;
962
+ -webkit-transform: none;
963
+ -moz-transform: none;
964
+ transform: none;
965
+ }
966
+ }
967
+
968
+ @-moz-keyframes fadeInUp {
969
+ 0% {
970
+ opacity: 0;
971
+ -webkit-transform: translate3d(0, 10%, 0);
972
+ -moz-transform: translate3d(0, 10%, 0);
973
+ transform: translate3d(0, 10%, 0);
974
+ }
975
+
976
+ 100% {
977
+ opacity: 1;
978
+ -webkit-transform: none;
979
+ -moz-transform: none;
980
+ transform: none;
981
+ }
982
+ }
983
+
984
+ @keyframes fadeInUp {
985
+ 0% {
986
+ opacity: 0;
987
+ -webkit-transform: translate3d(0, 10%, 0);
988
+ -moz-transform: translate3d(0, 10%, 0);
989
+ transform: translate3d(0, 10%, 0);
990
+ }
991
+
992
+ 100% {
993
+ opacity: 1;
994
+ -webkit-transform: none;
995
+ -moz-transform: none;
996
+ transform: none;
997
+ }
998
+ }
999
+
1000
+ .fadeInUp {
1001
+ -webkit-animation-name: fadeInUp;
1002
+ -moz-animation-name: fadeInUp;
1003
+ animation-name: fadeInUp;
1004
+ }
1005
+
1006
+ @-webkit-keyframes fadeInUpBig {
1007
+ 0% {
1008
+ opacity: 0;
1009
+ -webkit-transform: translate3d(0, 2000px, 0);
1010
+ -moz-transform: translate3d(0, 2000px, 0);
1011
+ transform: translate3d(0, 2000px, 0);
1012
+ }
1013
+
1014
+ 100% {
1015
+ opacity: 1;
1016
+ -webkit-transform: none;
1017
+ -moz-transform: none;
1018
+ transform: none;
1019
+ }
1020
+ }
1021
+
1022
+ @-moz-keyframes fadeInUpBig {
1023
+ 0% {
1024
+ opacity: 0;
1025
+ -webkit-transform: translate3d(0, 2000px, 0);
1026
+ -moz-transform: translate3d(0, 2000px, 0);
1027
+ transform: translate3d(0, 2000px, 0);
1028
+ }
1029
+
1030
+ 100% {
1031
+ opacity: 1;
1032
+ -webkit-transform: none;
1033
+ -moz-transform: none;
1034
+ transform: none;
1035
+ }
1036
+ }
1037
+
1038
+ @keyframes fadeInUpBig {
1039
+ 0% {
1040
+ opacity: 0;
1041
+ -webkit-transform: translate3d(0, 2000px, 0);
1042
+ -moz-transform: translate3d(0, 2000px, 0);
1043
+ transform: translate3d(0, 2000px, 0);
1044
+ }
1045
+
1046
+ 100% {
1047
+ opacity: 1;
1048
+ -webkit-transform: none;
1049
+ -moz-transform: none;
1050
+ transform: none;
1051
+ }
1052
+ }
1053
+
1054
+ .fadeInUpBig {
1055
+ -webkit-animation-name: fadeInUpBig;
1056
+ -moz-animation-name: fadeInUpBig;
1057
+ animation-name: fadeInUpBig;
1058
+ }
1059
+
1060
+
1061
+ @-webkit-keyframes zoomIn {
1062
+ 0% {
1063
+ opacity: 0;
1064
+ -webkit-transform: scale3d(.3, .3, .3);
1065
+ -moz-transform: scale3d(.3, .3, .3);
1066
+ transform: scale3d(.3, .3, .3);
1067
+ }
1068
+
1069
+ 50% {
1070
+ opacity: 1;
1071
+ }
1072
+ }
1073
+
1074
+ @-moz-keyframes zoomIn {
1075
+ 0% {
1076
+ opacity: 0;
1077
+ -webkit-transform: scale3d(.3, .3, .3);
1078
+ -moz-transform: scale3d(.3, .3, .3);
1079
+ transform: scale3d(.3, .3, .3);
1080
+ }
1081
+
1082
+ 50% {
1083
+ opacity: 1;
1084
+ }
1085
+ }
1086
+
1087
+ @keyframes zoomIn {
1088
+ 0% {
1089
+ opacity: 0;
1090
+ -webkit-transform: scale3d(.3, .3, .3);
1091
+ -moz-transform: scale3d(.3, .3, .3);
1092
+ transform: scale3d(.3, .3, .3);
1093
+ }
1094
+
1095
+ 50% {
1096
+ opacity: 1;
1097
+ }
1098
+ }
1099
+
1100
+ .zoomIn .prpop-splash-container {
1101
+ -webkit-animation-name: zoomIn;
1102
+ -moz-animation-name: zoomIn;
1103
+ animation-name: zoomIn;
1104
+ -webkit-animation-duration: 1s;
1105
+ -moz-animation-duration:1s;
1106
+ animation-duration: 1s;
1107
+ -webkit-animation-fill-mode: both;
1108
+ animation-fill-mode: both;
1109
+ }
1110
+
1111
+
1112
+
1113
+ /* Effect 8: 3D flip horizontal */
1114
+ @-webkit-keyframes flip3d_hor {
1115
+ 0% {
1116
+ -webkit-transform-style: preserve-3d;
1117
+ -moz-transform-style: preserve-3d;
1118
+ transform-style: preserve-3d;
1119
+ -webkit-transform: rotateY(-110deg);
1120
+ -moz-transform: rotateY(-110deg);
1121
+ -ms-transform: rotateY(-110deg);
1122
+ transform: rotateY(-110deg);
1123
+ -webkit-transition: all 0.3s;
1124
+ -moz-transition: all 0.3s;
1125
+ transition: all 0.3s;
1126
+ opacity: 0;
1127
+ }
1128
+
1129
+ 100% {
1130
+ -webkit-transform: rotateY(0deg);
1131
+ -moz-transform: rotateY(0deg);
1132
+ -ms-transform: rotateY(0deg);
1133
+ transform: rotateY(0deg);
1134
+ opacity: 1;
1135
+ }
1136
+ }
1137
+
1138
+ @-moz-keyframes flip3d_hor {
1139
+ 0% {
1140
+ -webkit-transform-style: preserve-3d;
1141
+ -moz-transform-style: preserve-3d;
1142
+ transform-style: preserve-3d;
1143
+ -webkit-transform: rotateY(-110deg);
1144
+ -moz-transform: rotateY(-110deg);
1145
+ -ms-transform: rotateY(-110deg);
1146
+ transform: rotateY(-110deg);
1147
+ -webkit-transition: all 0.3s;
1148
+ -moz-transition: all 0.3s;
1149
+ transition: all 0.3s;
1150
+ opacity: 0;
1151
+ }
1152
+
1153
+ 100% {
1154
+ -webkit-transform: rotateY(0deg);
1155
+ -moz-transform: rotateY(0deg);
1156
+ -ms-transform: rotateY(0deg);
1157
+ transform: rotateY(0deg);
1158
+ opacity: 1;
1159
+ }
1160
+ }
1161
+
1162
+
1163
+ @keyframes flip3d_hor {
1164
+ 0% {
1165
+ -webkit-transform-style: preserve-3d;
1166
+ -moz-transform-style: preserve-3d;
1167
+ transform-style: preserve-3d;
1168
+ -webkit-transform: rotateY(-110deg);
1169
+ -moz-transform: rotateY(-110deg);
1170
+ -ms-transform: rotateY(-110deg);
1171
+ transform: rotateY(-110deg);
1172
+ -webkit-transition: all 0.3s;
1173
+ -moz-transition: all 0.3s;
1174
+ transition: all 0.3s;
1175
+ opacity: 0;
1176
+ }
1177
+
1178
+ 100% {
1179
+ -webkit-transform: rotateY(0deg);
1180
+ -moz-transform: rotateY(0deg);
1181
+ -ms-transform: rotateY(0deg);
1182
+ transform: rotateY(0deg);
1183
+ opacity: 1;
1184
+ }
1185
+ }
1186
+
1187
+ .flip3d_hor .prpop-splash-container {
1188
+ -webkit-animation-name: flip3d_hor;
1189
+ -moz-animation-name: flip3d_hor;
1190
+ animation-name: flip3d_hor;
1191
+ -webkit-animation-duration: 1s;
1192
+ -moz-animation-duration:1s;
1193
+ animation-duration: 1s;
1194
+ -webkit-animation-fill-mode: both;
1195
+ animation-fill-mode: both;
1196
+ }
1197
+
1198
+
1199
+ /*background animation*/
1200
+ #prpop-addedoverlay {
1201
+ -webkit-animation-duration: 0.25s;
1202
+ -moz-animation-duration:0.25s;
1203
+ animation-duration: 0.25s;
1204
+ -webkit-animation-fill-mode: both;
1205
+ -moz-animation-fill-mode: both;
1206
+ animation-fill-mode: both;
1207
+ -webkit-animation-name: background_a;
1208
+ -moz-animation-name: background_a;
1209
+ animation-name: background_a;
1210
+ }
1211
+
1212
+
1213
+ @-webkit-keyframes background_a {
1214
+ 0% {
1215
+ opacity: 0;
1216
+ }
1217
+
1218
+ 100% {
1219
+ opacity: 0.6;
1220
+ }
1221
+ }
1222
+
1223
+ @-moz-keyframes background_a {
1224
+ 0% {
1225
+ opacity: 0;
1226
+ }
1227
+
1228
+ 100% {
1229
+ opacity: 0.6;
1230
+ }
1231
+ }
1232
+
1233
+ @keyframes background_a {
1234
+ 0% {
1235
+ opacity: 0;
1236
+ }
1237
+
1238
+ 100% {
1239
+ opacity: 0.6;
1240
+ }
1241
+ }
skin/frontend/base/default/images/plumrocket/pslogin/loader.gif ADDED
Binary file
skin/frontend/base/default/images/plumrocket/pslogin/social.png ADDED
Binary file
skin/frontend/base/default/images/plumrocket/pslogin/social_retina.png ADDED
Binary file
skin/frontend/base/default/js/plumrocket/jquery-1.10.2.min.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
2
+ //@ sourceMappingURL=jquery-1.10.2.min.map
3
+ */
4
+ ;if (typeof(pjQuery_1_10_2) == 'undefined'
5
+ || !((typeof(pjQuery_1_10_2) == 'function') && ('fn' in pjQuery_1_10_2))
6
+ || !(pjQuery_1_10_2.fn.jquery.indexOf('1.10.2') === 0)
7
+ ) {
8
+ function isGreaterVersion(v1, v2) {
9
+ var a1 = v1.split('.'); var a2 = v2.split('.'); var a1l = a1.length; var a2l = a2.length;
10
+ for(var i=0; i<a1.length; i++) { if (i >= a2l) break; a1[i] = parseInt(a1[i]); a2[i] = parseInt(a2[i]); if (a1[i] > a2[i]) return true; if (a1[i] < a2[i]) return false; }
11
+ return a1l > a2l;
12
+ }
13
+
14
+ var deepNoConfict = false;
15
+ if (typeof(jQuery) == 'undefined' || isGreaterVersion('1.10.2', jQuery.fn.jquery)) {
16
+ deepNoConfict = typeof(jQuery) != 'undefined';
17
+
18
+ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
19
+ }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
20
+ u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
21
+
22
+ }
23
+ pjQuery_1_10_2 = jQuery.noConflict(deepNoConfict);
24
+ };
skin/frontend/base/default/js/plumrocket/pslogin/pslogin.js ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Plumrocket Inc.
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the End-user License Agreement
7
+ * that is available through the world-wide-web at this URL:
8
+ * http://wiki.plumrocket.net/wiki/EULA
9
+ * If you are unable to obtain it through the world-wide-web, please
10
+ * send an email to support@plumrocket.com so we can send you a copy immediately.
11
+ *
12
+ * @package Plumrocket_SocialLogin
13
+ * @copyright Copyright (c) 2014 Plumrocket Inc. (http://www.plumrocket.com)
14
+ * @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
15
+ */
16
+
17
+ pjQuery_1_10_2(document).ready(function() {
18
+
19
+ // Show/Hide button.
20
+ pjQuery_1_10_2('#psloginShowBtn').on('click', function() {
21
+ pjQuery_1_10_2('.pslogin-buttons .pslogin-hidden').fadeToggle(275);
22
+ pjQuery_1_10_2(this).parents('div.show-hidden').hide();
23
+ });
24
+
25
+ // Open login window.
26
+ var win = null;
27
+ pjQuery_1_10_2('.pslogin-buttons').on('click', 'a', function() {
28
+ var $link = pjQuery_1_10_2(this);
29
+
30
+ var width = $link.data('width');
31
+ var height = $link.data('height');
32
+ var left = parseInt((pjQuery_1_10_2(window).width() - width) / 2);
33
+ var top = parseInt((pjQuery_1_10_2(window).height() - height) / 2);
34
+
35
+ var params = [
36
+ 'resizable=yes',
37
+ 'scrollbars=no',
38
+ 'toolbar=no',
39
+ 'menubar=no',
40
+ 'location=no',
41
+ 'directories=no',
42
+ 'status=yes',
43
+ 'width='+ width,
44
+ 'height='+ height,
45
+ 'left='+ left,
46
+ 'top='+ top
47
+ ];
48
+
49
+ if(win) {
50
+ win.close();
51
+ }
52
+ // win = window.open('#', 'pslogin_popup', params.join(','));
53
+ if($link.attr('href')) {
54
+ win = window.open($link.attr('href'), 'pslogin_popup', params.join(','));
55
+ win.focus();
56
+
57
+ if($link.data('loader')) {
58
+ pjQuery_1_10_2(win.document).ready(function() {
59
+
60
+ var html = '<html style="height: 100%;"><head></head>';
61
+ html += '<body style="height: 100%; margin: 0; padding: 0;">';
62
+ html += '<div style="text-align: center; height: 100%;"><img src="'+ $link.data('loader') +'" style="top: 50%; position: relative; margin-top: -64px;" /></div>';
63
+ html += '</body></html>';
64
+
65
+ pjQuery_1_10_2(win.document).contents().html(html);
66
+ });
67
+ }
68
+ }else{
69
+ alert('This Login Application was not configured correctly. Please contact our customer support.');
70
+ }
71
+ return false;
72
+ });
73
+
74
+ // Share.
75
+ jQuery('.prpop-close-btn').on('click', function() {
76
+ jQuery('.pslogin-addedoverlay, .pslogin-pop-up-form').hide();
77
+ jQuery('html').css('overflow', 'auto');
78
+ return false;
79
+ });
80
+
81
+ if(jQuery('.pslogin-pop-up-form').is(':visible')) {
82
+ jQuery('html').css('overflow', 'hidden');
83
+ }
84
+
85
+ // Fake email message.
86
+ pjQuery_1_10_2('.pslogin-fake-email-message .close-message').on('click', function() {
87
+ pjQuery_1_10_2(this).parent().hide();
88
+ })
89
+
90
+ });
91
+
92
+ function customerEditFakeEmail() {
93
+ pjQuery_1_10_2("#email").removeClass("validation-passed").addClass("validation-failed").after('<div class="validation-advice pslogin-fake-email" id="advice-required-entry-email">Please enter valid email address.</div>');
94
+
95
+ var reset = true;
96
+ pjQuery_1_10_2("#email").on('click focus', function() {
97
+ if(reset) {
98
+ pjQuery_1_10_2(this).removeClass("validation-failed").addClass("validation-passed").val('');
99
+ pjQuery_1_10_2('#advice-required-entry-email.pslogin-fake-email').remove();
100
+ }
101
+ reset = false;
102
+ });
103
+ }