magebuzz_product_slider - Version 0.1.0

Version Notes

Product slider version 0.1.0

Download this release

Release Info

Developer Magebuzz
Extension magebuzz_product_slider
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

Files changed (117) hide show
  1. app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider.php +12 -0
  2. app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider/Edit.php +45 -0
  3. app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider/Edit/Form.php +19 -0
  4. app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider/Edit/Tab/Main.php +62 -0
  5. app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider/Edit/Tabs.php +23 -0
  6. app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider/Grid.php +121 -0
  7. app/code/community/Magebuzz/Productslider/Block/Catalog/Product/List/Bestseller.php +46 -0
  8. app/code/community/Magebuzz/Productslider/Block/Catalog/Product/List/Mostviewed.php +47 -0
  9. app/code/community/Magebuzz/Productslider/Block/Catalog/Product/List/Random.php +46 -0
  10. app/code/community/Magebuzz/Productslider/Block/Catalog/Product/List/RecentlyAdd.php +68 -0
  11. app/code/community/Magebuzz/Productslider/Block/Position.php +28 -0
  12. app/code/community/Magebuzz/Productslider/Block/Productslider.php +208 -0
  13. app/code/community/Magebuzz/Productslider/Helper/Data.php +6 -0
  14. app/code/community/Magebuzz/Productslider/Model/Mysql4/Productslider.php +10 -0
  15. app/code/community/Magebuzz/Productslider/Model/Mysql4/Productslider/Collection.php +10 -0
  16. app/code/community/Magebuzz/Productslider/Model/Productslider.php +10 -0
  17. app/code/community/Magebuzz/Productslider/Model/Session.php +10 -0
  18. app/code/community/Magebuzz/Productslider/Model/Status.php +15 -0
  19. app/code/community/Magebuzz/Productslider/Model/System/Config/Position.php +13 -0
  20. app/code/community/Magebuzz/Productslider/Model/System/Config/Styles.php +13 -0
  21. app/code/community/Magebuzz/Productslider/Model/System/Config/Type.php +15 -0
  22. app/code/community/Magebuzz/Productslider/Model/Wysiwyg/Config.php +34 -0
  23. app/code/community/Magebuzz/Productslider/controllers/BestsellerController.php +9 -0
  24. app/code/community/Magebuzz/Productslider/controllers/IndexController.php +9 -0
  25. app/code/community/Magebuzz/Productslider/controllers/MostviewedController.php +9 -0
  26. app/code/community/Magebuzz/Productslider/controllers/RandomController.php +9 -0
  27. app/code/community/Magebuzz/Productslider/controllers/RecentlyAddController.php +9 -0
  28. app/code/community/Magebuzz/Productslider/etc/adminhtml.xml +26 -0
  29. app/code/community/Magebuzz/Productslider/etc/config.xml +148 -0
  30. app/code/community/Magebuzz/Productslider/etc/system.xml +113 -0
  31. app/code/community/Magebuzz/Productslider/sql/productslider_setup/mysql4-install-0.1.0.php +9 -0
  32. app/design/adminhtml/default/default/layout/productslider.xml +12 -0
  33. app/design/frontend/default/default/layout/productslider.xml +28 -0
  34. app/design/frontend/default/default/template/productslider/productslider.phtml +189 -0
  35. app/design/frontend/default/default/template/productslider/type/slider1.phtml +128 -0
  36. app/etc/modules/Magebuzz_Productslider.xml +9 -0
  37. app/locale/en_US/Magebuzz_Productslider.csv +0 -0
  38. js/magebuzz/jquery/jquery-latest.js +9266 -0
  39. js/magebuzz/jquery/jquery-ui-1.7.2.custom.min.js +298 -0
  40. js/magebuzz/jquery/jquery.bxSlider.js +1260 -0
  41. js/magebuzz/jquery/jquery.easing.1.3.js +205 -0
  42. js/magebuzz/jquery/jquery.pngFix.js +113 -0
  43. js/magebuzz/jquery/jquery.scrollShow.js +136 -0
  44. js/magebuzz/jquery/jquery.scrollTo-min.js +10 -0
  45. js/magebuzz/jquery/lightbox/jquery.lightbox-0.5.js +472 -0
  46. js/magebuzz/jquery/script.js +318 -0
  47. js/magebuzz/jquery/slider-config.js +20 -0
  48. js/magebuzz/productslider.js +1 -0
  49. package.xml +18 -0
  50. skin/frontend/default/default/css/magebuzz/productslider.css +28 -0
  51. skin/frontend/default/default/css/magebuzz/productslider/images/arrow-bg.png +0 -0
  52. skin/frontend/default/default/css/magebuzz/productslider/images/arrow-l.png +0 -0
  53. skin/frontend/default/default/css/magebuzz/productslider/images/arrow-r.png +0 -0
  54. skin/frontend/default/default/css/magebuzz/productslider/images/bg_dark.png +0 -0
  55. skin/frontend/default/default/css/magebuzz/productslider/images/bg_trans.png +0 -0
  56. skin/frontend/default/default/css/magebuzz/productslider/images/btn-cart.gif +0 -0
  57. skin/frontend/default/default/css/magebuzz/productslider/images/btn_next.png +0 -0
  58. skin/frontend/default/default/css/magebuzz/productslider/images/btn_next_active.png +0 -0
  59. skin/frontend/default/default/css/magebuzz/productslider/images/btn_prev-active.png +0 -0
  60. skin/frontend/default/default/css/magebuzz/productslider/images/btn_prev.png +0 -0
  61. skin/frontend/default/default/css/magebuzz/productslider/images/grad-bg.gif +0 -0
  62. skin/frontend/default/default/css/magebuzz/productslider/images/icon-uparrowsmallwhite.png +0 -0
  63. skin/frontend/default/default/css/magebuzz/productslider/images/lightbox-blank.gif +0 -0
  64. skin/frontend/default/default/css/magebuzz/productslider/images/lightbox-btn-close.gif +0 -0
  65. skin/frontend/default/default/css/magebuzz/productslider/images/lightbox-btn-next.gif +0 -0
  66. skin/frontend/default/default/css/magebuzz/productslider/images/lightbox-btn-prev.gif +0 -0
  67. skin/frontend/default/default/css/magebuzz/productslider/images/lightbox-ico-loading.gif +0 -0
  68. skin/frontend/default/default/css/magebuzz/productslider/images/load-indicator.gif +0 -0
  69. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/.DS_Store +0 -0
  70. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/logo.png +0 -0
  71. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/monoBack.gif +0 -0
  72. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/mopSlider-2.4.js +443 -0
  73. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/paperBack.gif +0 -0
  74. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/paperBack.jpg +0 -0
  75. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBack.png +0 -0
  76. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackLeft.png +0 -0
  77. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackLeftLeft.png +0 -0
  78. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackLeftLeftW.png +0 -0
  79. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackLeftW.png +0 -0
  80. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRight.png +0 -0
  81. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRightRight.png +0 -0
  82. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRightRightW.png +0 -0
  83. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRightRightW_f.png +0 -0
  84. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRightRight_f.png +0 -0
  85. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRightW.png +0 -0
  86. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackW.png +0 -0
  87. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtn.png +0 -0
  88. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnLeft.png +0 -0
  89. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnLeftW.png +0 -0
  90. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnLeftW_f.png +0 -0
  91. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnLeft_f.png +0 -0
  92. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnRight.png +0 -0
  93. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnRightW.png +0 -0
  94. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnRightW_f.png +0 -0
  95. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnRight_f.png +0 -0
  96. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnW.png +0 -0
  97. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderCorner_leftBottom.png +0 -0
  98. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderCorner_leftTop.png +0 -0
  99. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderCorner_rightBottom.png +0 -0
  100. skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderCorner_rightTop.png +0 -0
  101. skin/frontend/default/default/css/magebuzz/productslider/images/next_icon.png +0 -0
  102. skin/frontend/default/default/css/magebuzz/productslider/images/previous_icon.png +0 -0
  103. skin/frontend/default/default/css/magebuzz/productslider/images/product-image-bg.png +0 -0
  104. skin/frontend/default/default/css/magebuzz/productslider/images/product_bg.png +0 -0
  105. skin/frontend/default/default/css/magebuzz/productslider/images/transpBlack.png +0 -0
  106. skin/frontend/default/default/css/magebuzz/productslider/images/transparent_bg.png +0 -0
  107. skin/frontend/default/default/css/magebuzz/productslider/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  108. skin/frontend/default/default/css/magebuzz/productslider/jquery-ui-1.7.2.custom.css +395 -0
  109. skin/frontend/default/default/css/magebuzz/productslider/jquery.lightbox-0.5.css +101 -0
  110. skin/frontend/default/default/css/magebuzz/productslider/layout.css +12 -0
  111. skin/frontend/default/default/css/magebuzz/productslider/lightbox.css +27 -0
  112. skin/frontend/default/default/css/magebuzz/productslider/simple-slider.css +18 -0
  113. skin/frontend/default/default/css/magebuzz/productslider/slidebar.css +24 -0
  114. skin/frontend/default/default/css/magebuzz/productslider/slider-navright.css +165 -0
  115. skin/frontend/default/default/css/magebuzz/productslider/slider-scroll.css +32 -0
  116. skin/frontend/default/default/css/magebuzz/productslider/slider.css +102 -0
  117. skin/frontend/default/default/css/magebuzz/productslider/style.css +23 -0
app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_Block_Adminhtml_Productslider extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_controller = 'adminhtml_productslider';
7
+ $this->_blockGroup = 'productslider';
8
+ $this->_headerText = Mage::helper('productslider')->__('Item Manager');
9
+ $this->_addButtonLabel = Mage::helper('productslider')->__('Add Item');
10
+ parent::__construct();
11
+ }
12
+ }
app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider/Edit.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Block_Adminhtml_Productslider_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+
9
+ $this->_objectId = 'id';
10
+ $this->_blockGroup = 'productslider';
11
+ $this->_controller = 'adminhtml_productslider';
12
+
13
+ $this->_updateButton('save', 'label', Mage::helper('productslider')->__('Save Item'));
14
+ $this->_updateButton('delete', 'label', Mage::helper('productslider')->__('Delete Item'));
15
+
16
+ $this->_addButton('saveandcontinue', array(
17
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
18
+ 'onclick' => 'saveAndContinueEdit()',
19
+ 'class' => 'save',
20
+ ), -100);
21
+
22
+ $this->_formScripts[] = "
23
+ function toggleEditor() {
24
+ if (tinyMCE.getInstanceById('productslider_content') == null) {
25
+ tinyMCE.execCommand('mceAddControl', false, 'productslider_content');
26
+ } else {
27
+ tinyMCE.execCommand('mceRemoveControl', false, 'productslider_content');
28
+ }
29
+ }
30
+
31
+ function saveAndContinueEdit(){
32
+ editForm.submit($('edit_form').action+'back/edit/');
33
+ }
34
+ ";
35
+ }
36
+
37
+ public function getHeaderText()
38
+ {
39
+ if( Mage::registry('productslider_data') && Mage::registry('productslider_data')->getId() ) {
40
+ return Mage::helper('productslider')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('productslider_data')->getTitle()));
41
+ } else {
42
+ return Mage::helper('productslider')->__('Add Item');
43
+ }
44
+ }
45
+ }
app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider/Edit/Form.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Block_Adminhtml_Productslider_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider/Edit/Tab/Main.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Block_Adminhtml_Productslider_Edit_Tab_Main extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+
6
+ protected function _prepareForm()
7
+ {
8
+ $form = new Varien_Data_Form();
9
+ $form->setHtmlIdPrefix('productslider_');
10
+ $this->setForm($form);
11
+ $fieldset = $form->addFieldset('productslider_form', array('legend'=>Mage::helper('productslider')->__('Item information')));
12
+
13
+ $fieldset->addField('title', 'text', array(
14
+ 'label' => Mage::helper('productslider')->__('Title'),
15
+ 'class' => 'required-entry',
16
+ 'required' => true,
17
+ 'name' => 'title',
18
+ ));
19
+
20
+ $fieldset->addField('filename', 'file', array(
21
+ 'label' => Mage::helper('productslider')->__('File'),
22
+ 'required' => false,
23
+ 'name' => 'filename',
24
+ ));
25
+
26
+ $fieldset->addField('status', 'select', array(
27
+ 'label' => Mage::helper('productslider')->__('Status'),
28
+ 'name' => 'status',
29
+ 'values' => array(
30
+ array(
31
+ 'value' => 1,
32
+ 'label' => Mage::helper('productslider')->__('Enabled'),
33
+ ),
34
+
35
+ array(
36
+ 'value' => 2,
37
+ 'label' => Mage::helper('productslider')->__('Disabled'),
38
+ ),
39
+ ),
40
+ ));
41
+
42
+
43
+
44
+ $fieldset->addField('content', 'editor', array(
45
+ 'name' => 'content',
46
+ 'label' => Mage::helper('productslider')->__('Content'),
47
+ 'title' => Mage::helper('productslider')->__('Content'),
48
+ 'style' => 'width:500px; height:300px;',
49
+ 'config' => Mage::getSingleton('productslider/wysiwyg_config')->getConfig(),
50
+ 'required' => true,
51
+ ));
52
+
53
+ if ( Mage::getSingleton('adminhtml/session')->getProductsliderData() )
54
+ {
55
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getProductsliderData());
56
+ Mage::getSingleton('adminhtml/session')->setProductsliderData(null);
57
+ } elseif ( Mage::registry('productslider_data') ) {
58
+ $form->setValues(Mage::registry('productslider_data')->getData());
59
+ }
60
+ return parent::_prepareForm();
61
+ }
62
+ }
app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider/Edit/Tabs.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Block_Adminhtml_Productslider_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId('productslider_tabs');
10
+ $this->setDestElementId('edit_form');
11
+ $this->setTitle(Mage::helper('productslider')->__('Item Information'));
12
+ }
13
+
14
+ protected function _beforeToHtml()
15
+ {
16
+ $this->addTab('form_section', array(
17
+ 'label' => Mage::helper('productslider')->__('Item Information'),
18
+ 'title' => Mage::helper('productslider')->__('Item Information'),
19
+ 'content' => $this->getLayout()->createBlock('productslider/adminhtml_productslider_edit_tab_main')->toHtml(),
20
+ ));
21
+ return parent::_beforeToHtml();
22
+ }
23
+ }
app/code/community/Magebuzz/Productslider/Block/Adminhtml/Productslider/Grid.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Block_Adminhtml_Productslider_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('productsliderGrid');
9
+ $this->setUseAjax(true);
10
+ $this->setDefaultSort('productslider_id');
11
+ $this->setDefaultDir('ASC');
12
+ $this->setSaveParametersInSession(true);
13
+ }
14
+
15
+ protected function _prepareCollection()
16
+ {
17
+ $collection = Mage::getModel('productslider/productslider')->getCollection();
18
+ $this->setCollection($collection);
19
+ return parent::_prepareCollection();
20
+ }
21
+
22
+ protected function _prepareColumns()
23
+ {
24
+ $this->addColumn('productslider_id', array(
25
+ 'header' => Mage::helper('productslider')->__('ID'),
26
+ 'align' =>'right',
27
+ 'width' => '50px',
28
+ 'index' => 'productslider_id',
29
+ ));
30
+
31
+ $this->addColumn('title', array(
32
+ 'header' => Mage::helper('productslider')->__('Title'),
33
+ 'align' =>'left',
34
+ 'index' => 'title',
35
+ ));
36
+
37
+ /*
38
+ $this->addColumn('content', array(
39
+ 'header' => Mage::helper('productslider')->__('Item Content'),
40
+ 'width' => '150px',
41
+ 'index' => 'content',
42
+ ));
43
+ */
44
+
45
+ $this->addColumn('status', array(
46
+ 'header' => Mage::helper('productslider')->__('Status'),
47
+ 'align' => 'left',
48
+ 'width' => '80px',
49
+ 'index' => 'status',
50
+ 'type' => 'options',
51
+ 'options' => array(
52
+ 1 => 'Enabled',
53
+ 2 => 'Disabled',
54
+ ),
55
+ ));
56
+
57
+ $this->addColumn('action',
58
+ array(
59
+ 'header' => Mage::helper('productslider')->__('Action'),
60
+ 'width' => '100',
61
+ 'type' => 'action',
62
+ 'getter' => 'getId',
63
+ 'actions' => array(
64
+ array(
65
+ 'caption' => Mage::helper('productslider')->__('Edit'),
66
+ 'url' => array('base'=> '*/*/edit'),
67
+ 'field' => 'id'
68
+ )
69
+ ),
70
+ 'filter' => false,
71
+ 'sortable' => false,
72
+ 'index' => 'stores',
73
+ 'is_system' => true,
74
+ ));
75
+
76
+ $this->addExportType('*/*/exportCsv', Mage::helper('productslider')->__('CSV'));
77
+ $this->addExportType('*/*/exportXml', Mage::helper('productslider')->__('XML'));
78
+
79
+ return parent::_prepareColumns();
80
+ }
81
+
82
+ protected function _prepareMassaction()
83
+ {
84
+ $this->setMassactionIdField('productslider_id');
85
+ $this->getMassactionBlock()->setFormFieldName('productslider');
86
+
87
+ $this->getMassactionBlock()->addItem('delete', array(
88
+ 'label' => Mage::helper('productslider')->__('Delete'),
89
+ 'url' => $this->getUrl('*/*/massDelete'),
90
+ 'confirm' => Mage::helper('productslider')->__('Are you sure?')
91
+ ));
92
+
93
+ $statuses = Mage::getSingleton('productslider/status')->getOptionArray();
94
+
95
+ array_unshift($statuses, array('label'=>'', 'value'=>''));
96
+ $this->getMassactionBlock()->addItem('status', array(
97
+ 'label'=> Mage::helper('productslider')->__('Change status'),
98
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
99
+ 'additional' => array(
100
+ 'visibility' => array(
101
+ 'name' => 'status',
102
+ 'type' => 'select',
103
+ 'class' => 'required-entry',
104
+ 'label' => Mage::helper('productslider')->__('Status'),
105
+ 'values' => $statuses
106
+ )
107
+ )
108
+ ));
109
+ return $this;
110
+ }
111
+
112
+ public function getRowUrl($row)
113
+ {
114
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
115
+ }
116
+ public function getGridUrl()
117
+ {
118
+ return $this->getUrl('*/*/grid', array('_current'=> true));
119
+ }
120
+
121
+ }
app/code/community/Magebuzz/Productslider/Block/Catalog/Product/List/Bestseller.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_Block_Catalog_Product_List_Bestseller extends Mage_Catalog_Block_Product_List
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+ protected function _getProductCollection()
9
+ {
10
+ if (is_null($this->_productCollection)) {
11
+ $this->_productCollection = Mage::getResourceModel('reports/product_collection')
12
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
13
+ ->addOrderedQty()
14
+ ->addMinimalPrice()
15
+ ->addTaxPercents()
16
+ ->addStoreFilter();
17
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($this->_productCollection);
18
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($this->_productCollection);
19
+ }
20
+ return $this->_productCollection;
21
+ }
22
+ protected function _beforeToHtml()
23
+ {
24
+ $toolbar = $this->getToolbarBlock();
25
+ $collection = $this->_getProductCollection();
26
+
27
+ $toolbar->setAvailableOrders(array(
28
+ 'ordered_qty' => $this->__('Most Purchased'),
29
+ 'name' => $this->__('Name'),
30
+ 'price' => $this->__('Price')
31
+ ))
32
+ ->setDefaultOrder('ordered_qty')
33
+ ->setDefaultDirection('desc');
34
+
35
+ $toolbar->setCollection($collection);
36
+
37
+ $this->setChild('toolbar', $toolbar);
38
+ Mage::dispatchEvent('catalog_block_product_list_collection', array(
39
+ 'collection'=>$this->_getProductCollection(),
40
+ ));
41
+
42
+ $this->_getProductCollection()->load();
43
+ Mage::getModel('review/review')->appendSummary($this->_getProductCollection());
44
+ return parent::_beforeToHtml();
45
+ }
46
+ }
app/code/community/Magebuzz/Productslider/Block/Catalog/Product/List/Mostviewed.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_Block_Catalog_Product_List_Mostviewed extends Mage_Catalog_Block_Product_List
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+ protected function _getProductCollection()
9
+ {
10
+ if (is_null($this->_productCollection)) {
11
+ $this->_productCollection = Mage::getResourceModel('reports/product_collection')
12
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
13
+ ->addViewsCount()
14
+ ->addMinimalPrice()
15
+ ->addTaxPercents()
16
+ ->addStoreFilter();
17
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($this->_productCollection);
18
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($this->_productCollection);
19
+ }
20
+ return $this->_productCollection;
21
+ }
22
+ protected function _beforeToHtml()
23
+ {
24
+ $toolbar = $this->getToolbarBlock();
25
+ $collection = $this->_getProductCollection();
26
+
27
+ $toolbar
28
+ ->setAvailableOrders(array(
29
+ 'views_count' => $this->__('View Count'),
30
+ 'name' => $this->__('Name'),
31
+ 'price' => $this->__('Price')
32
+ ))
33
+ ->setDefaultOrder('views_count')
34
+ ->setDefaultDirection('desc');
35
+
36
+ $toolbar->setCollection($collection);
37
+
38
+ $this->setChild('toolbar', $toolbar);
39
+ Mage::dispatchEvent('catalog_block_product_list_collection', array(
40
+ 'collection'=>$this->_getProductCollection(),
41
+ ));
42
+
43
+ $this->_getProductCollection()->load();
44
+ Mage::getModel('review/review')->appendSummary($this->_getProductCollection());
45
+ return parent::_beforeToHtml();
46
+ }
47
+ }
app/code/community/Magebuzz/Productslider/Block/Catalog/Product/List/Random.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_Block_Catalog_Product_List_Random extends Mage_Catalog_Block_Product_List
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ parent::_prepareLayout();
7
+ if (!$this->getTemplate()) {
8
+ $this->setTemplate('productslider/productslider.phtml');
9
+ }
10
+ return $this;
11
+ }
12
+ protected function _getProductCollection()
13
+ {
14
+ $this->_productCollection = Mage::getResourceModel('catalog/product_collection')
15
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
16
+ ->addMinimalPrice()
17
+ ->addTaxPercents()
18
+ ->addStoreFilter();
19
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($this->_productCollection);
20
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($this->_productCollection);
21
+ return $this->_productCollection;
22
+ }
23
+ protected function _beforeToHtml()
24
+ {
25
+ $toolbar = $this->getToolbarBlock();
26
+ $collection = $this->_getProductCollection();
27
+
28
+ $toolbar->setAvailableOrders(array(
29
+ 'name' => $this->__('Name'),
30
+ 'price' => $this->__('Price')
31
+ ))
32
+ ->setDefaultOrder('price')
33
+ ->setDefaultDirection('desc');
34
+
35
+ $toolbar->setCollection($collection);
36
+
37
+ $this->setChild('toolbar', $toolbar);
38
+ Mage::dispatchEvent('catalog_block_product_list_collection', array(
39
+ 'collection'=>$this->_getProductCollection(),
40
+ ));
41
+
42
+ $this->_getProductCollection()->load();
43
+ Mage::getModel('review/review')->appendSummary($this->_getProductCollection());
44
+ return parent::_beforeToHtml();
45
+ }
46
+ }
app/code/community/Magebuzz/Productslider/Block/Catalog/Product/List/RecentlyAdd.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_Block_Catalog_Product_List_RecentlyAdd extends Mage_Catalog_Block_Product_List
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ parent::_prepareLayout();
7
+ if (!$this->getTemplate()) {
8
+ $this->setTemplate('productslider/productslider.phtml');
9
+ }
10
+ return $this;
11
+ }
12
+
13
+ protected function _getProductCollection()
14
+ {
15
+ $todayDate = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
16
+
17
+ if (is_null($this->_productCollection)) {
18
+ $this->_productCollection = Mage::getResourceModel('catalog/product_collection')
19
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
20
+ ->addAttributeToSelect('*') //Need this so products show up correctly in product listing
21
+ ->addAttributeToFilter('news_from_date', array('or'=> array(
22
+ 0 => array('date' => true, 'to' => $todayDate),
23
+ 1 => array('is' => new Zend_Db_Expr('null')))
24
+ ), 'left')
25
+ ->addAttributeToFilter('news_to_date', array('or'=> array(
26
+ 0 => array('date' => true, 'from' => $todayDate),
27
+ 1 => array('is' => new Zend_Db_Expr('null')))
28
+ ), 'left')
29
+ ->addAttributeToFilter(
30
+ array(
31
+ array('attribute' => 'news_from_date', 'is'=>new Zend_Db_Expr('not null')),
32
+ array('attribute' => 'news_to_date', 'is'=>new Zend_Db_Expr('not null'))
33
+ )
34
+ )
35
+ ->addAttributeToSort('news_from_date', 'desc')
36
+ ->addMinimalPrice()
37
+ ->addTaxPercents()
38
+ ->addStoreFilter();
39
+
40
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($this->_productCollection);
41
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($this->_productCollection);
42
+ }
43
+ return $this->_productCollection;
44
+ }
45
+ protected function _beforeToHtml()
46
+ {
47
+ $toolbar = $this->getToolbarBlock();
48
+ $collection = $this->_getProductCollection();
49
+
50
+ $toolbar->setAvailableOrders(array(
51
+ 'name' => $this->__('Name'),
52
+ 'price' => $this->__('Price')
53
+ ))
54
+ ->setDefaultOrder('price')
55
+ ->setDefaultDirection('desc');
56
+
57
+ $toolbar->setCollection($collection);
58
+
59
+ $this->setChild('toolbar', $toolbar);
60
+ Mage::dispatchEvent('catalog_block_product_list_collection', array(
61
+ 'collection'=>$this->_getProductCollection(),
62
+ ));
63
+
64
+ $this->_getProductCollection()->load();
65
+ Mage::getModel('review/review')->appendSummary($this->_getProductCollection());
66
+ return parent::_beforeToHtml();
67
+ }
68
+ }
app/code/community/Magebuzz/Productslider/Block/Position.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_Block_Position extends Magebuzz_Productslider_Block_Productslider
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ $is_homepage = false;
7
+ $slider_position = Mage::getStoreConfig('productslider/slider_setting/slider_position');
8
+ $current_category = Mage::registry('current_category');
9
+ $in_category = $this->inCategoryPage();
10
+ if($this->getUrl('') == $this->getUrl('*/*/*', array('_use_rewrite'=>true)))
11
+ {
12
+ $is_homepage = true;
13
+ }
14
+ parent::_prepareLayout();
15
+ if (!$this->getTemplate() && $slider_position == 'only_home' && $is_homepage == true) {
16
+ $this->setTemplate('productslider/productslider.phtml');
17
+ }
18
+ if (!$this->getTemplate() && $slider_position == 'only_category_page' && $in_category == 'catalog_category_view') {
19
+ $this->setTemplate('productslider/productslider.phtml');
20
+ }
21
+ if (!$this->getTemplate() && $slider_position == 'both_home_category') {
22
+ if($in_category == 'catalog_category_view' || $is_homepage == true){
23
+ $this->setTemplate('productslider/productslider.phtml');
24
+ }
25
+ }
26
+ return $this;
27
+ }
28
+ }
app/code/community/Magebuzz/Productslider/Block/Productslider.php ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_Block_Productslider extends Mage_Catalog_Block_Product_Abstract
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ public function getProductslider()
10
+ {
11
+ if (!$this->hasData('productslider')) {
12
+ $this->setData('productslider', Mage::registry('productslider'));
13
+ }
14
+ return $this->getData('productslider');
15
+
16
+ }
17
+ public function __construct() {
18
+ $productType = $this->getProductsType();
19
+ if(!$this->getProductCollection()){
20
+ switch ($productType) {
21
+ case 'random':
22
+ $this->setProductCollection($this->getRandomProducts());
23
+ $this->setPageTitle('Random Products');
24
+ break;
25
+ case 'bestseller':
26
+ $this->setProductCollection($this->getBestsellerProducts());
27
+ $this->setPageTitle('Bestseller Products');
28
+ break;
29
+ case 'mostviewed':
30
+ $this->setProductCollection($this->getMostviewedProducts());
31
+ $this->setPageTitle('Most Viewed Products');
32
+ break;
33
+ case 'recentlyadded':
34
+ $this->setProductCollection($this->getRecentlyAdded());
35
+ $this->setPageTitle('Recently Added');
36
+ break;
37
+ case 'special':
38
+ $this->setProductCollection($this->getSpecialProducts());
39
+ $this->setPageTitle('Special Products');
40
+ break;
41
+ default:
42
+ $this->setProductCollection($this->getRandomProducts());
43
+ $this->setPageTitle('Random Products');
44
+ break;
45
+ }
46
+ }
47
+ return $this;
48
+ }
49
+ public function getBestsellerProducts(){
50
+ $_limit = $this->getNumProduct();
51
+ $current_category = Mage::registry('current_category');
52
+ $is_category_filter = Mage::getStoreConfig('productslider/product_setting/category_filter');
53
+ $collection = Mage::getResourceModel('reports/product_collection')
54
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
55
+ ->addOrderedQty()
56
+ ->addMinimalPrice()
57
+ ->addTaxPercents()
58
+ ->addStoreFilter();
59
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
60
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
61
+ if($current_category && $is_category_filter == '1'){
62
+ $current_category_id = Mage::registry('current_category')->getId();
63
+ $currentCategory = Mage::getModel('catalog/category')->load($current_category_id);
64
+ $collection->addCategoryFilter($currentCategory);
65
+ }
66
+ $collection->setPageSize($_limit);
67
+ return $collection;
68
+ }
69
+ public function getMostviewedProducts(){
70
+ $_limit = $this->getNumProduct();
71
+ $current_category = Mage::registry('current_category');
72
+ $is_category_filter = Mage::getStoreConfig('productslider/product_setting/category_filter');
73
+ $collection = Mage::getResourceModel('reports/product_collection')
74
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
75
+ ->addViewsCount()
76
+ ->addMinimalPrice()
77
+ ->addTaxPercents()
78
+ ->addStoreFilter();
79
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
80
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
81
+ if($current_category && $is_category_filter == '1'){
82
+ $current_category_id = Mage::registry('current_category')->getId();
83
+ $currentCategory = Mage::getModel('catalog/category')->load($current_category_id);
84
+ $collection->addCategoryFilter($currentCategory);
85
+ }
86
+ $collection->setPageSize($_limit);
87
+ return $collection;
88
+ }
89
+ public function getRandomProducts() {
90
+ $_limit = $this->getNumProduct();
91
+ $current_category = Mage::registry('current_category');
92
+ $is_category_filter = Mage::getStoreConfig('productslider/product_setting/category_filter');
93
+ $collection = Mage::getResourceModel('catalog/product_collection')
94
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
95
+ ->addMinimalPrice()
96
+ ->addTaxPercents()
97
+ ->addStoreFilter();
98
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
99
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
100
+ $collection->getSelect()->order('rand()');
101
+ if($current_category && $is_category_filter == '1'){
102
+ $current_category_id = Mage::registry('current_category')->getId();
103
+ $currentCategory = Mage::getModel('catalog/category')->load($current_category_id);
104
+ $collection->addCategoryFilter($currentCategory);
105
+ }
106
+ $collection->setPageSize($_limit);
107
+ return $collection;
108
+ }
109
+ public function getRecentlyAdded() {
110
+ $_limit = $this->getNumProduct();
111
+ $current_category = Mage::registry('current_category');
112
+ $is_category_filter = Mage::getStoreConfig('productslider/product_setting/category_filter');
113
+ //var_dump($is_category_filter); die();
114
+ $todayDate = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
115
+ $collection = Mage::getResourceModel('catalog/product_collection')
116
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
117
+ ->addAttributeToSelect('*') //Need this so products show up correctly in product listing
118
+ ->addAttributeToFilter('news_from_date', array('or'=> array(
119
+ 0 => array('date' => true, 'to' => $todayDate),
120
+ 1 => array('is' => new Zend_Db_Expr('null')))
121
+ ), 'left')
122
+ ->addAttributeToFilter('news_to_date', array('or'=> array(
123
+ 0 => array('date' => true, 'from' => $todayDate),
124
+ 1 => array('is' => new Zend_Db_Expr('null')))
125
+ ), 'left')
126
+ ->addAttributeToFilter(
127
+ array(
128
+ array('attribute' => 'news_from_date', 'is'=>new Zend_Db_Expr('not null')),
129
+ array('attribute' => 'news_to_date', 'is'=>new Zend_Db_Expr('not null'))
130
+ )
131
+ )
132
+ ->addAttributeToSort('news_from_date', 'desc')
133
+ ->addMinimalPrice()
134
+ ->addTaxPercents()
135
+ ->addStoreFilter();
136
+
137
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
138
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
139
+ if($current_category && $is_category_filter == '1'){
140
+ $current_category_id = Mage::registry('current_category')->getId();
141
+ $currentCategory = Mage::getModel('catalog/category')->load($current_category_id);
142
+ $collection->addCategoryFilter($currentCategory);
143
+ }
144
+ $collection->setPageSize($_limit);
145
+ return $collection;
146
+ }
147
+ public function getSpecialProducts() {
148
+ $_limit = $this->getNumProduct();
149
+ $current_category = Mage::registry('current_category');
150
+ $is_category_filter = Mage::getStoreConfig('productslider/product_setting/category_filter');
151
+ $todayDate = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
152
+ $collection = Mage::getResourceModel('catalog/product_collection')
153
+ ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
154
+ ->addAttributeToFilter('special_from_date', array('or'=> array(
155
+ 0 => array('date' => true, 'to' => $todayDate),
156
+ 1 => array('is' => new Zend_Db_Expr('null')))
157
+ ), 'left')
158
+ ->addAttributeToFilter('special_to_date', array('or'=> array(
159
+ 0 => array('date' => true, 'from' => $todayDate),
160
+ 1 => array('is' => new Zend_Db_Expr('null')))
161
+ ), 'left')
162
+ ->addAttributeToFilter(
163
+ array(
164
+ array('attribute' => 'special_from_date', 'is'=>new Zend_Db_Expr('not null')),
165
+ array('attribute' => 'special_to_date', 'is'=>new Zend_Db_Expr('not null'))
166
+ )
167
+ )
168
+ ->addAttributeToSort('special_to_date','desc')
169
+ ->addTaxPercents()
170
+ ->addStoreFilter();
171
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
172
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
173
+ if($current_category && $is_category_filter == '1'){
174
+ $current_category_id = Mage::registry('current_category')->getId();
175
+ $currentCategory = Mage::getModel('catalog/category')->load($current_category_id);
176
+ $collection->addCategoryFilter($currentCategory);
177
+ }
178
+ $collection->setPageSize($_limit);
179
+ return $collection;
180
+ }
181
+ public function inCategoryPage($check='_')
182
+ {
183
+ return $this->getRequest()->getRequestedRouteName().$check.
184
+ $this->getRequest()->getRequestedControllerName().$check.
185
+ $this->getRequest()->getRequestedActionName();
186
+ }
187
+ public function getProductsType(){
188
+ $producttype = Mage::getStoreConfig('productslider/product_setting/type_product');
189
+ return $producttype;
190
+ }
191
+ public function getWidthSlider() {
192
+ $width_slider = (int) Mage::getStoreConfig('productslider/slider_setting/width_slider');
193
+ return $width_slider;
194
+ }
195
+ public function getHeightSlider() {
196
+ $height_slider = (int) Mage::getStoreConfig('productslider/slider_setting/height_slider');
197
+ return $height_slider;
198
+ }
199
+ public function getSliderStyle(){
200
+ return Mage::getStoreConfig('productslider/slider_setting/type_slider');
201
+ }
202
+ public function getNumProduct(){
203
+ return (int)Mage::getStoreConfig('productslider/product_setting/num_products');
204
+ }
205
+ public function showDescription(){
206
+ return (int)Mage::getStoreConfig('productslider/product_setting/show_description');
207
+ }
208
+ }
app/code/community/Magebuzz/Productslider/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/community/Magebuzz/Productslider/Model/Mysql4/Productslider.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Model_Mysql4_Productslider extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the productslider_id refers to the key field in your database table.
8
+ $this->_init('productslider/productslider', 'productslider_id');
9
+ }
10
+ }
app/code/community/Magebuzz/Productslider/Model/Mysql4/Productslider/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Model_Mysql4_Productslider_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('productslider/productslider');
9
+ }
10
+ }
app/code/community/Magebuzz/Productslider/Model/Productslider.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Model_Productslider extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('productslider/productslider');
9
+ }
10
+ }
app/code/community/Magebuzz/Productslider/Model/Session.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Model_Session extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('productslider');
9
+ }
10
+ }
app/code/community/Magebuzz/Productslider/Model/Status.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Model_Status extends Varien_Object
4
+ {
5
+ const STATUS_ENABLED = 1;
6
+ const STATUS_DISABLED = 2;
7
+
8
+ static public function getOptionArray()
9
+ {
10
+ return array(
11
+ self::STATUS_ENABLED => Mage::helper('productslider')->__('Enabled'),
12
+ self::STATUS_DISABLED => Mage::helper('productslider')->__('Disabled')
13
+ );
14
+ }
15
+ }
app/code/community/Magebuzz/Productslider/Model/System/Config/Position.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Model_System_Config_Position
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => 'only_home', 'label'=>Mage::helper('adminhtml')->__('Home')),
9
+ array('value' => 'only_category_page', 'label'=>Mage::helper('adminhtml')->__('Category Page')),
10
+ array('value' => 'both_home_category', 'label'=>Mage::helper('adminhtml')->__('Home page & Category page')),
11
+ );
12
+ }
13
+ }
app/code/community/Magebuzz/Productslider/Model/System/Config/Styles.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Model_System_Config_Styles
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => 'simple-slider', 'label'=>Mage::helper('adminhtml')->__('Simple Slider')),
9
+ array('value' => 'slider-scrollbar', 'label'=>Mage::helper('adminhtml')->__('Slider With Horizontal Scrollbar')),
10
+ array('value' => 'slider-lightbox', 'label'=>Mage::helper('adminhtml')->__('Slider With Lightbox')),
11
+ );
12
+ }
13
+ }
app/code/community/Magebuzz/Productslider/Model/System/Config/Type.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magebuzz_Productslider_Model_System_Config_Type
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => 'random', 'label'=>Mage::helper('adminhtml')->__('Random Products')),
9
+ array('value' => 'bestseller', 'label'=>Mage::helper('adminhtml')->__('Bestseller')),
10
+ array('value' => 'mostviewed', 'label'=>Mage::helper('adminhtml')->__('Most Viewed')),
11
+ array('value' => 'recentlyadded', 'label'=>Mage::helper('adminhtml')->__('Recently Added')),
12
+ array('value' => 'special', 'label'=>Mage::helper('adminhtml')->__('Special Products')),
13
+ );
14
+ }
15
+ }
app/code/community/Magebuzz/Productslider/Model/Wysiwyg/Config.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_Model_Wysiwyg_Config extends Mage_Cms_Model_Wysiwyg_Config
3
+ {
4
+ public function getConfig($data = array())
5
+ {
6
+ $config = new Varien_Object();
7
+
8
+ $config->setData(array(
9
+ 'enabled' => $this->isEnabled(),
10
+ 'hidden' => $this->isHidden(),
11
+ 'use_container' => false,
12
+ 'add_variables' => false,
13
+ 'add_widgets' => false,
14
+ 'no_display' => false,
15
+ 'translator' => Mage::helper('cms'),
16
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
17
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
18
+ 'files_browser_window_height' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height'),
19
+ 'encode_directives' => true,
20
+ 'directives_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive'),
21
+ 'popup_css' => Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css',
22
+ 'content_css' => Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css',
23
+ 'width' => '100%',
24
+ 'plugins' => array()
25
+ ));
26
+
27
+ $config->setData('directives_url_quoted', preg_quote($config->getData('directives_url')));
28
+
29
+ if (is_array($data)) {
30
+ $config->addData($data);
31
+ }
32
+ return $config;
33
+ }
34
+ }
app/code/community/Magebuzz/Productslider/controllers/BestsellerController.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_BestsellerController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+ }
app/code/community/Magebuzz/Productslider/controllers/IndexController.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+ }
app/code/community/Magebuzz/Productslider/controllers/MostviewedController.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_MostviewedController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+ }
app/code/community/Magebuzz/Productslider/controllers/RandomController.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_RandomController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+ }
app/code/community/Magebuzz/Productslider/controllers/RecentlyAddController.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magebuzz_Productslider_RecentlyAddController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+ }
app/code/community/Magebuzz/Productslider/etc/adminhtml.xml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <all>
6
+ <title>Allow Everything</title>
7
+ </all>
8
+ <admin>
9
+ <children>
10
+ <system>
11
+ <children>
12
+ <config>
13
+ <children>
14
+ <productslider translate="title">
15
+ <title>Productslider Permission Setting</title>
16
+ <sort_order>50</sort_order>
17
+ </productslider>
18
+ </children>
19
+ </config>
20
+ </children>
21
+ </system>
22
+ </children>
23
+ </admin>
24
+ </resources>
25
+ </acl>
26
+ </config>
app/code/community/Magebuzz/Productslider/etc/config.xml ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magebuzz_Productslider>
5
+ <version>0.1.0</version>
6
+ </Magebuzz_Productslider>
7
+ </modules>
8
+ <frontend>
9
+ <secure_url>
10
+ <productslider>/productslider/</productslider>
11
+ </secure_url>
12
+ <routers>
13
+ <productslider>
14
+ <use>standard</use>
15
+ <args>
16
+ <module>Magebuzz_Productslider</module>
17
+ <frontName>productslider</frontName>
18
+ </args>
19
+ </productslider>
20
+ </routers>
21
+ <layout>
22
+ <updates>
23
+ <productslider>
24
+ <file>productslider.xml</file>
25
+ </productslider>
26
+ </updates>
27
+ </layout>
28
+ </frontend>
29
+ <admin>
30
+ <routers>
31
+ <productslider>
32
+ <use>admin</use>
33
+ <args>
34
+ <module>Magebuzz_Productslider</module>
35
+ <frontName>productslider</frontName>
36
+ </args>
37
+ </productslider>
38
+ </routers>
39
+ </admin>
40
+ <adminhtml>
41
+ <layout>
42
+ <updates>
43
+ <productslider>
44
+ <file>productslider.xml</file>
45
+ </productslider>
46
+ </updates>
47
+ </layout>
48
+ </adminhtml>
49
+ <global>
50
+ <models>
51
+ <productslider>
52
+ <class>Magebuzz_Productslider_Model</class>
53
+ <resourceModel>productslider_mysql4</resourceModel>
54
+ </productslider>
55
+ <productslider_mysql4>
56
+ <class>Magebuzz_Productslider_Model_Mysql4</class>
57
+ <entities>
58
+ <productslider>
59
+ <table>productslider</table>
60
+ </productslider>
61
+ </entities>
62
+ </productslider_mysql4>
63
+ </models>
64
+ <resources>
65
+ <productslider_setup>
66
+ <setup>
67
+ <module>Magebuzz_Productslider</module>
68
+ </setup>
69
+ <connection>
70
+ <use>core_setup</use>
71
+ </connection>
72
+ </productslider_setup>
73
+ <productslider_write>
74
+ <connection>
75
+ <use>core_write</use>
76
+ </connection>
77
+ </productslider_write>
78
+ <productslider_read>
79
+ <connection>
80
+ <use>core_read</use>
81
+ </connection>
82
+ </productslider_read>
83
+ </resources>
84
+ <blocks>
85
+ <productslider>
86
+ <class>Magebuzz_Productslider_Block</class>
87
+ </productslider>
88
+ <!--Emplement Rewrite Block In Module-->
89
+ <!--<target_module>
90
+ <rewrite>
91
+ <path_to>Magebuzz_Productslider_Block_Example</path_to>
92
+ </rewrite>
93
+ </target_module>-->
94
+ </blocks>
95
+ <helpers>
96
+ <productslider>
97
+ <class>Magebuzz_Productslider_Helper</class>
98
+ </productslider>
99
+ </helpers>
100
+ <!--Emplement Events Used In Module-->
101
+ <!--<events>
102
+ <event_name>
103
+ <observers>
104
+ <productslider>
105
+ <type>singleton</type>
106
+ <class>productslider/observer</class>
107
+ <method>methodName</method>
108
+ </productslider>
109
+ </observers>
110
+ </event_name>
111
+ </events>-->
112
+ <template>
113
+ <email>
114
+ <productslider_general_email_template>
115
+ <label>Title Email</label>
116
+ <file>productslider_example.html</file>
117
+ <type>html</type>
118
+ </productslider_general_email_template>
119
+ </email>
120
+ </template>
121
+ </global>
122
+ <!--Set Default Value For Setting Options-->
123
+ <default>
124
+ <productslider>
125
+ <slider_setting>
126
+ <width_slider>685</width_slider>
127
+ <height_slider>210</height_slider>
128
+ <type_slider>simple-slider</type_slider>
129
+ <slider_position>only_home</slider_position>
130
+ </slider_setting>
131
+ <product_setting>
132
+ <type_product>random</type_product>
133
+ <category_filter>1</category_filter>
134
+ <num_products>6</num_products>
135
+ <show_description>1</show_description>
136
+ </product_setting>
137
+ </productslider>
138
+ </default>
139
+ <translate>
140
+ <modules>
141
+ <Magebuzz_Productslider>
142
+ <files>
143
+ <default>Magebuzz_Productslider.csv</default>
144
+ </files>
145
+ </Magebuzz_Productslider>
146
+ </modules>
147
+ </translate>
148
+ </config>
app/code/community/Magebuzz/Productslider/etc/system.xml ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <magebuzz translate="label">
5
+ <label>Magebuzz Add-ons</label>
6
+ <sort_order>400</sort_order>
7
+ </magebuzz>
8
+ </tabs>
9
+ <sections>
10
+ <productslider translate="label" module="productslider">
11
+ <label>Product Slider</label>
12
+ <tab>magebuzz</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>299</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <slider_setting translate="label">
20
+ <label>Slider Setting</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>1</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ <fields>
27
+ <width_slider translate="label comment">
28
+ <label>Slider Width</label>
29
+ <frontend_type>text</frontend_type>
30
+ <sort_order>1</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ </width_slider>
35
+ <height_slider translate="label comment">
36
+ <label>Slider Height</label>
37
+ <frontend_type>text</frontend_type>
38
+ <sort_order>2</sort_order>
39
+ <show_in_default>1</show_in_default>
40
+ <show_in_website>1</show_in_website>
41
+ <show_in_store>1</show_in_store>
42
+ </height_slider>
43
+ <type_slider translate="label, comment">
44
+ <label>Type of slider</label>
45
+ <comment><![CDATA[Choose the style of slider]]></comment>
46
+ <frontend_type>select</frontend_type>
47
+ <source_model>productslider/system_config_styles</source_model>
48
+ <sort_order>3</sort_order>
49
+ <show_in_default>1</show_in_default>
50
+ <show_in_website>1</show_in_website>
51
+ <show_in_store>1</show_in_store>
52
+ </type_slider>
53
+ <slider_position translate="label, comment">
54
+ <label>Slider Position</label>
55
+ <comment><![CDATA[Choose position of slider]]></comment>
56
+ <frontend_type>select</frontend_type>
57
+ <source_model>productslider/system_config_position</source_model>
58
+ <sort_order>5</sort_order>
59
+ <show_in_default>1</show_in_default>
60
+ <show_in_website>1</show_in_website>
61
+ <show_in_store>1</show_in_store>
62
+ </slider_position>
63
+ </fields>
64
+ </slider_setting>
65
+ <product_setting translate="label">
66
+ <label>Product Setting</label>
67
+ <frontend_type>text</frontend_type>
68
+ <sort_order>2</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ <fields>
73
+ <type_product translate="label comment">
74
+ <label>Product Type</label>
75
+ <frontend_type>select</frontend_type>
76
+ <source_model>productslider/system_config_type</source_model>
77
+ <sort_order>1</sort_order>
78
+ <show_in_default>1</show_in_default>
79
+ <show_in_website>1</show_in_website>
80
+ <show_in_store>1</show_in_store>
81
+ </type_product>
82
+ <category_filter translate="label comment">
83
+ <label>Category Filter</label>
84
+ <frontend_type>select</frontend_type>
85
+ <source_model>adminhtml/system_config_source_yesno</source_model>
86
+ <sort_order>2</sort_order>
87
+ <show_in_default>1</show_in_default>
88
+ <show_in_website>1</show_in_website>
89
+ <show_in_store>1</show_in_store>
90
+ </category_filter>
91
+ <num_products translate="label, comment">
92
+ <label>Number of Product Show</label>
93
+ <frontend_type>text</frontend_type>
94
+ <sort_order>3</sort_order>
95
+ <show_in_default>1</show_in_default>
96
+ <show_in_website>1</show_in_website>
97
+ <show_in_store>1</show_in_store>
98
+ </num_products>
99
+ <show_description translate="label comment">
100
+ <label>Show Product Description</label>
101
+ <frontend_type>select</frontend_type>
102
+ <source_model>adminhtml/system_config_source_yesno</source_model>
103
+ <sort_order>4</sort_order>
104
+ <show_in_default>1</show_in_default>
105
+ <show_in_website>1</show_in_website>
106
+ <show_in_store>1</show_in_store>
107
+ </show_description>
108
+ </fields>
109
+ </product_setting>
110
+ </groups>
111
+ </productslider>
112
+ </sections>
113
+ </config>
app/code/community/Magebuzz/Productslider/sql/productslider_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->endSetup();
8
+
9
+ ?>
app/design/adminhtml/default/default/layout/productslider.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <productslider_adminhtml_productslider_edit>
4
+ <update handle="editor"/>
5
+ </productslider_adminhtml_productslider_edit>
6
+ <productslider_adminhtml_productslider_index>
7
+ <update handle="editor"/>
8
+ <reference name="content">
9
+ <block type="productslider/adminhtml_productslider" name="productslider" />
10
+ </reference>
11
+ </productslider_adminhtml_productslider_index>
12
+ </layout>
app/design/frontend/default/default/layout/productslider.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="content">
5
+ <block type="productslider/position" before="-" name="home.productslider"/>
6
+ </reference>
7
+ </default>
8
+ <productslider_index_index>
9
+ <reference name="content">
10
+ <block type="productslider/productslider" name="productslider" template="productslider/productslider.phtml" />
11
+ </reference>
12
+ </productslider_index_index>
13
+ <productslider_random_index>
14
+ <remove name="right"/>
15
+ <remove name="left"/>
16
+ <reference name="root">
17
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
18
+ </reference>
19
+ <reference name="content">
20
+ <block type="productslider/catalog_product_list_recentlyadd" name="productslider.recentlyadd" template="productslider/type/slider1.phtml">
21
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
22
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
23
+ </block>
24
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
25
+ </block>
26
+ </reference>
27
+ </productslider_random_index>
28
+ </layout>
app/design/frontend/default/default/template/productslider/productslider.phtml ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $productCollection = $this->getProductCollection()?>
2
+ <?php $collectionSize = count($productCollection); ?>
3
+ <?php $sliderType = $this->getSliderStyle() ?>
4
+ <?php $sliderWidth = $this->getWidthSlider() ?>
5
+ <?php $sliderHeight = $this->getHeightSlider() ?>
6
+ <?php $isShowDescription = $this->showDescription(); ?>
7
+ <?php if($collectionSize > 0):?>
8
+ <div id="product-slider">
9
+ <div class="head">
10
+ <h1><?php echo $this->getPageTitle()?></h1>
11
+ </div>
12
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/magebuzz/productslider.css');?>" media="all" />
13
+ <?php if($sliderType == 'simple-slider'):?>
14
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('magebuzz/jquery/jquery-latest.js') ?>"></script>
15
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('magebuzz/jquery/jquery.bxSlider.js') ?>"></script>
16
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/magebuzz/productslider/simple-slider.css');?>" media="all" />
17
+ <script type="text/javascript">
18
+ var $simpleSlider = jQuery.noConflict();
19
+ $simpleSlider(document).ready(function(){
20
+ $simpleSlider('#list-items').bxSlider();
21
+ });
22
+ </script>
23
+ <div class="list-products">
24
+ <ul id="list-items">
25
+ <?php foreach ($productCollection->getItems() as $_product): ?>
26
+ <li>
27
+ <div class="product-image">
28
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(161,123); ?>" width="161" height="123" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
29
+ </div>
30
+ <div class="product-info">
31
+ <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h3>
32
+ <?php if($isShowDescription == 1):?>
33
+ <div class="desc std">
34
+ <?php $_description = nl2br($_product->getShortDescription())?>
35
+ <?php $short_desc = substr($_description, 0, 200); ?>
36
+ <?php if(substr($short_desc, 0, strrpos($short_desc, ' '))!='')
37
+ $short_desc = substr($short_desc, 0, strrpos($short_desc, ' '));
38
+ $short_desc = $short_desc.'...';
39
+ ?>
40
+ <?php echo $short_desc;?>
41
+ </div>
42
+ <?php endif; ?>
43
+ <?php echo $this->getPriceHtml($_product, true) ?>
44
+ <div class="actions">
45
+ <?php if($_product->isSaleable()): ?>
46
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
47
+ <?php else: ?>
48
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
49
+ <?php endif; ?>
50
+ </div>
51
+ </div>
52
+ </li>
53
+ <?php endforeach?>
54
+ </ul>
55
+ </div>
56
+ <?php elseif ($sliderType == 'slider-scrollbar'):?>
57
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('magebuzz/jquery/jquery-latest.js') ?>"></script>
58
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('magebuzz/jquery/jquery-ui-1.7.2.custom.min.js') ?>"></script>
59
+ <script type="text/javascript">
60
+ var $sl = jQuery.noConflict();
61
+ $sl(function() {
62
+
63
+ //vars
64
+ var conveyor = $sl(".content-conveyor", $("#sliderContent")),
65
+ item = $sl(".item", $sl("#sliderContent"));
66
+
67
+ //set length of conveyor
68
+ conveyor.css("width", item.length * parseInt(item.css("width")));
69
+
70
+ //config
71
+ var sliderOpts = {
72
+ max: (item.length * parseInt(item.css("width"))) - parseInt($sl(".viewer", $sl("#sliderContent")).css("width")),
73
+ slide: function(e, ui) {
74
+ conveyor.css("left", "-" + ui.value + "px");
75
+ }
76
+ };
77
+
78
+ //create slider
79
+ $sl("#slider").slider(sliderOpts);
80
+ });
81
+ </script>
82
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/magebuzz/productslider/jquery-ui-1.7.2.custom.css');?>" />
83
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/magebuzz/productslider/slidebar.css');?>" />
84
+ <div id="sliderContent" class="ui-corner-all">
85
+ <div class="viewer ui-corner-all">
86
+ <div class="content-conveyor ui-helper-clearfix">
87
+ <?php foreach ($productCollection->getItems() as $_product): ?>
88
+ <div class="item">
89
+ <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h3>
90
+ <div class="product-image">
91
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(161,123); ?>" width="161" height="123" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
92
+ </div>
93
+ <?php echo $this->getPriceHtml($_product, true) ?>
94
+ <div class="actions">
95
+ <?php if($_product->isSaleable()): ?>
96
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
97
+ <?php else: ?>
98
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
99
+ <?php endif; ?>
100
+ </div>
101
+ </div>
102
+ <?php endforeach ?>
103
+ </div>
104
+ </div>
105
+ <div id="slider"></div>
106
+ </div>
107
+ <?php elseif ($sliderType == 'slider-lightbox'):?>
108
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('magebuzz/jquery/jquery-latest.js') ?>"></script>
109
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('magebuzz/jquery/jquery.scrollShow.js') ?>"></script>
110
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('magebuzz/jquery/jquery.scrollTo-min.js') ?>"></script>
111
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('magebuzz/jquery/lightbox/jquery.lightbox-0.5.js') ?>"></script>
112
+ <script type="text/javascript">
113
+ //<![CDATA[
114
+ var SKIN_URL = '<?php echo $this->getSkinUrl() ?>';
115
+ //]]>
116
+ </script>
117
+ <script type="text/javascript">
118
+ var $newslider = jQuery.noConflict();
119
+ $newslider(document).ready(function(){
120
+ $newslider.easing.backout = function(x, t, b, c, d){
121
+ var s=1.70158;
122
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
123
+ };
124
+
125
+ $newslider('#sl-screen').scrollShow({
126
+ elements:'div.item',
127
+ itemSize:{
128
+ height:<?php echo $sliderHeight;?>,
129
+ width:<?php echo ceil($sliderWidth/3);?>
130
+ },
131
+ view:'#sl-view',
132
+ content:'#sl-images',
133
+ easing:'backout',
134
+ wrappers:'link,crop',
135
+ navigators:'a[id]',
136
+ navigationMode:'s',
137
+ circular:true,
138
+ start:0
139
+ });
140
+
141
+ });
142
+ $newslider(function() {
143
+ $newslider('#list-items a.img').lightBox();
144
+ });
145
+ </script>
146
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/magebuzz/productslider/slider.css')?>"/>
147
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/magebuzz/productslider/jquery.lightbox-0.5.css') ?>" media="screen" />
148
+ <div id="list-items">
149
+ <div id="slider-content" style="width:<?php echo $sliderWidth;?>px; height:<?php echo $sliderHeight;?>px;">
150
+ <ul id="sl-screen" style="width:<?php echo $sliderWidth;?>px; height:<?php echo $sliderHeight;?>px;">
151
+ <li class="nav-left"><a href="#" id="left">&nbsp;</a></li>
152
+ <li id="sl-view" style="width:<?php echo $sliderWidth;?>px; height:<?php echo $sliderHeight;?>px;">
153
+ <ul id="sl-images">
154
+ <?php foreach ($productCollection->getItems() as $_product): ?>
155
+ <li style="width:<?php echo ceil($sliderWidth/3);?>px; height:<?php echo $sliderHeight;?>px;">
156
+ <div class="item" style="width:<?php echo ceil($sliderWidth/3);?>px; height:<?php echo $sliderHeight;?>px;">
157
+ <div class="product-img" style="width:<?php echo ceil($sliderWidth/3);?>px;">
158
+ <div class="product-image">
159
+ <a class="img" href="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(500); ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(161,123); ?>" width="161" height="123" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
160
+ </div>
161
+ </div>
162
+ <div class="product-info">
163
+ <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h3>
164
+ <?php echo $this->getPriceHtml($_product, true) ?>
165
+ <div class="actions">
166
+ <?php if($_product->isSaleable()): ?>
167
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
168
+ <?php else: ?>
169
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
170
+ <?php endif; ?>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ </li>
175
+ <?php endforeach ?>
176
+ </ul>
177
+ </li>
178
+ <li class="nav-right"><a href="#" id="right">&nbsp;</a></li>
179
+ </ul>
180
+ </div>
181
+ </div>
182
+ <?php endif;?>
183
+ </div>
184
+ <?php else: ?>
185
+ <div class="note-msg">
186
+ <?php echo $this->__('There are no products matching the selection.') ?>
187
+ </div>
188
+ <?php endif; ?>
189
+
app/design/frontend/default/default/template/productslider/type/slider1.phtml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Product list template
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List
32
+ */
33
+ ?>
34
+ <?php
35
+ $_productCollection=$this->getLoadedProductCollection();
36
+ $_helper = $this->helper('catalog/output');
37
+ ?>
38
+ <?php if(!$_productCollection->count()): ?>
39
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
40
+ <?php else: ?>
41
+ <div class="category-products">
42
+ <?php echo $this->getToolbarHtml() ?>
43
+ <?php // List mode ?>
44
+ <?php if($this->getMode()!='grid'): ?>
45
+ <?php $_iterator = 0; ?>
46
+ <ol class="products-list" id="products-list">
47
+ <?php foreach ($_productCollection as $_product): ?>
48
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
49
+ <?php // Product Image ?>
50
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
51
+ <?php // Product description ?>
52
+ <div class="product-shop">
53
+ <div class="f-fix">
54
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
55
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
56
+ <?php if($_product->getRatingSummary()): ?>
57
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
58
+ <?php endif; ?>
59
+ <?php echo $this->getPriceHtml($_product, true) ?>
60
+ <?php if($_product->isSaleable()): ?>
61
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
62
+ <?php else: ?>
63
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
64
+ <?php endif; ?>
65
+ <div class="desc std">
66
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
67
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
68
+ </div>
69
+ <ul class="add-to-links">
70
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
71
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
72
+ <?php endif; ?>
73
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
74
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
75
+ <?php endif; ?>
76
+ </ul>
77
+ </div>
78
+ </div>
79
+ </li>
80
+ <?php endforeach; ?>
81
+ </ol>
82
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
83
+
84
+ <?php else: ?>
85
+
86
+ <?php // Grid Mode ?>
87
+
88
+ <?php $_collectionSize = $_productCollection->count() ?>
89
+ <?php $_columnCount = $this->getColumnCount(); ?>
90
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
91
+ <?php if ($i++%$_columnCount==0): ?>
92
+ <ul class="products-grid">
93
+ <?php endif ?>
94
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
95
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
96
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
97
+ <?php if($_product->getRatingSummary()): ?>
98
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
99
+ <?php endif; ?>
100
+ <?php echo $this->getPriceHtml($_product, true) ?>
101
+ <div class="actions">
102
+ <?php if($_product->isSaleable()): ?>
103
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
104
+ <?php else: ?>
105
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
106
+ <?php endif; ?>
107
+ <ul class="add-to-links">
108
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
109
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
110
+ <?php endif; ?>
111
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
112
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
113
+ <?php endif; ?>
114
+ </ul>
115
+ </div>
116
+ </li>
117
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
118
+ </ul>
119
+ <?php endif ?>
120
+ <?php endforeach ?>
121
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
122
+ <?php endif; ?>
123
+
124
+ <div class="toolbar-bottom">
125
+ <?php echo $this->getToolbarHtml() ?>
126
+ </div>
127
+ </div>
128
+ <?php endif; ?>
app/etc/modules/Magebuzz_Productslider.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magebuzz_Productslider>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Magebuzz_Productslider>
8
+ </modules>
9
+ </config>
app/locale/en_US/Magebuzz_Productslider.csv ADDED
File without changes
js/magebuzz/jquery/jquery-latest.js ADDED
@@ -0,0 +1,9266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery JavaScript Library v1.7.1
3
+ * http://jquery.com/
4
+ *
5
+ * Copyright 2011, John Resig
6
+ * Dual licensed under the MIT or GPL Version 2 licenses.
7
+ * http://jquery.org/license
8
+ *
9
+ * Includes Sizzle.js
10
+ * http://sizzlejs.com/
11
+ * Copyright 2011, The Dojo Foundation
12
+ * Released under the MIT, BSD, and GPL Licenses.
13
+ *
14
+ * Date: Mon Nov 21 21:11:03 2011 -0500
15
+ */
16
+ (function( window, undefined ) {
17
+
18
+ // Use the correct document accordingly with window argument (sandbox)
19
+ var document = window.document,
20
+ navigator = window.navigator,
21
+ location = window.location;
22
+ var jQuery = (function() {
23
+
24
+ // Define a local copy of jQuery
25
+ var jQuery = function( selector, context ) {
26
+ // The jQuery object is actually just the init constructor 'enhanced'
27
+ return new jQuery.fn.init( selector, context, rootjQuery );
28
+ },
29
+
30
+ // Map over jQuery in case of overwrite
31
+ _jQuery = window.jQuery,
32
+
33
+ // Map over the $ in case of overwrite
34
+ _$ = window.$,
35
+
36
+ // A central reference to the root jQuery(document)
37
+ rootjQuery,
38
+
39
+ // A simple way to check for HTML strings or ID strings
40
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
41
+ quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
42
+
43
+ // Check if a string has a non-whitespace character in it
44
+ rnotwhite = /\S/,
45
+
46
+ // Used for trimming whitespace
47
+ trimLeft = /^\s+/,
48
+ trimRight = /\s+$/,
49
+
50
+ // Match a standalone tag
51
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
52
+
53
+ // JSON RegExp
54
+ rvalidchars = /^[\],:{}\s]*$/,
55
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
56
+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
57
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
58
+
59
+ // Useragent RegExp
60
+ rwebkit = /(webkit)[ \/]([\w.]+)/,
61
+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
62
+ rmsie = /(msie) ([\w.]+)/,
63
+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
64
+
65
+ // Matches dashed string for camelizing
66
+ rdashAlpha = /-([a-z]|[0-9])/ig,
67
+ rmsPrefix = /^-ms-/,
68
+
69
+ // Used by jQuery.camelCase as callback to replace()
70
+ fcamelCase = function( all, letter ) {
71
+ return ( letter + "" ).toUpperCase();
72
+ },
73
+
74
+ // Keep a UserAgent string for use with jQuery.browser
75
+ userAgent = navigator.userAgent,
76
+
77
+ // For matching the engine and version of the browser
78
+ browserMatch,
79
+
80
+ // The deferred used on DOM ready
81
+ readyList,
82
+
83
+ // The ready event handler
84
+ DOMContentLoaded,
85
+
86
+ // Save a reference to some core methods
87
+ toString = Object.prototype.toString,
88
+ hasOwn = Object.prototype.hasOwnProperty,
89
+ push = Array.prototype.push,
90
+ slice = Array.prototype.slice,
91
+ trim = String.prototype.trim,
92
+ indexOf = Array.prototype.indexOf,
93
+
94
+ // [[Class]] -> type pairs
95
+ class2type = {};
96
+
97
+ jQuery.fn = jQuery.prototype = {
98
+ constructor: jQuery,
99
+ init: function( selector, context, rootjQuery ) {
100
+ var match, elem, ret, doc;
101
+
102
+ // Handle $(""), $(null), or $(undefined)
103
+ if ( !selector ) {
104
+ return this;
105
+ }
106
+
107
+ // Handle $(DOMElement)
108
+ if ( selector.nodeType ) {
109
+ this.context = this[0] = selector;
110
+ this.length = 1;
111
+ return this;
112
+ }
113
+
114
+ // The body element only exists once, optimize finding it
115
+ if ( selector === "body" && !context && document.body ) {
116
+ this.context = document;
117
+ this[0] = document.body;
118
+ this.selector = selector;
119
+ this.length = 1;
120
+ return this;
121
+ }
122
+
123
+ // Handle HTML strings
124
+ if ( typeof selector === "string" ) {
125
+ // Are we dealing with HTML string or an ID?
126
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
127
+ // Assume that strings that start and end with <> are HTML and skip the regex check
128
+ match = [ null, selector, null ];
129
+
130
+ } else {
131
+ match = quickExpr.exec( selector );
132
+ }
133
+
134
+ // Verify a match, and that no context was specified for #id
135
+ if ( match && (match[1] || !context) ) {
136
+
137
+ // HANDLE: $(html) -> $(array)
138
+ if ( match[1] ) {
139
+ context = context instanceof jQuery ? context[0] : context;
140
+ doc = ( context ? context.ownerDocument || context : document );
141
+
142
+ // If a single string is passed in and it's a single tag
143
+ // just do a createElement and skip the rest
144
+ ret = rsingleTag.exec( selector );
145
+
146
+ if ( ret ) {
147
+ if ( jQuery.isPlainObject( context ) ) {
148
+ selector = [ document.createElement( ret[1] ) ];
149
+ jQuery.fn.attr.call( selector, context, true );
150
+
151
+ } else {
152
+ selector = [ doc.createElement( ret[1] ) ];
153
+ }
154
+
155
+ } else {
156
+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
157
+ selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
158
+ }
159
+
160
+ return jQuery.merge( this, selector );
161
+
162
+ // HANDLE: $("#id")
163
+ } else {
164
+ elem = document.getElementById( match[2] );
165
+
166
+ // Check parentNode to catch when Blackberry 4.6 returns
167
+ // nodes that are no longer in the document #6963
168
+ if ( elem && elem.parentNode ) {
169
+ // Handle the case where IE and Opera return items
170
+ // by name instead of ID
171
+ if ( elem.id !== match[2] ) {
172
+ return rootjQuery.find( selector );
173
+ }
174
+
175
+ // Otherwise, we inject the element directly into the jQuery object
176
+ this.length = 1;
177
+ this[0] = elem;
178
+ }
179
+
180
+ this.context = document;
181
+ this.selector = selector;
182
+ return this;
183
+ }
184
+
185
+ // HANDLE: $(expr, $(...))
186
+ } else if ( !context || context.jquery ) {
187
+ return ( context || rootjQuery ).find( selector );
188
+
189
+ // HANDLE: $(expr, context)
190
+ // (which is just equivalent to: $(context).find(expr)
191
+ } else {
192
+ return this.constructor( context ).find( selector );
193
+ }
194
+
195
+ // HANDLE: $(function)
196
+ // Shortcut for document ready
197
+ } else if ( jQuery.isFunction( selector ) ) {
198
+ return rootjQuery.ready( selector );
199
+ }
200
+
201
+ if ( selector.selector !== undefined ) {
202
+ this.selector = selector.selector;
203
+ this.context = selector.context;
204
+ }
205
+
206
+ return jQuery.makeArray( selector, this );
207
+ },
208
+
209
+ // Start with an empty selector
210
+ selector: "",
211
+
212
+ // The current version of jQuery being used
213
+ jquery: "1.7.1",
214
+
215
+ // The default length of a jQuery object is 0
216
+ length: 0,
217
+
218
+ // The number of elements contained in the matched element set
219
+ size: function() {
220
+ return this.length;
221
+ },
222
+
223
+ toArray: function() {
224
+ return slice.call( this, 0 );
225
+ },
226
+
227
+ // Get the Nth element in the matched element set OR
228
+ // Get the whole matched element set as a clean array
229
+ get: function( num ) {
230
+ return num == null ?
231
+
232
+ // Return a 'clean' array
233
+ this.toArray() :
234
+
235
+ // Return just the object
236
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
237
+ },
238
+
239
+ // Take an array of elements and push it onto the stack
240
+ // (returning the new matched element set)
241
+ pushStack: function( elems, name, selector ) {
242
+ // Build a new jQuery matched element set
243
+ var ret = this.constructor();
244
+
245
+ if ( jQuery.isArray( elems ) ) {
246
+ push.apply( ret, elems );
247
+
248
+ } else {
249
+ jQuery.merge( ret, elems );
250
+ }
251
+
252
+ // Add the old object onto the stack (as a reference)
253
+ ret.prevObject = this;
254
+
255
+ ret.context = this.context;
256
+
257
+ if ( name === "find" ) {
258
+ ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
259
+ } else if ( name ) {
260
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
261
+ }
262
+
263
+ // Return the newly-formed element set
264
+ return ret;
265
+ },
266
+
267
+ // Execute a callback for every element in the matched set.
268
+ // (You can seed the arguments with an array of args, but this is
269
+ // only used internally.)
270
+ each: function( callback, args ) {
271
+ return jQuery.each( this, callback, args );
272
+ },
273
+
274
+ ready: function( fn ) {
275
+ // Attach the listeners
276
+ jQuery.bindReady();
277
+
278
+ // Add the callback
279
+ readyList.add( fn );
280
+
281
+ return this;
282
+ },
283
+
284
+ eq: function( i ) {
285
+ i = +i;
286
+ return i === -1 ?
287
+ this.slice( i ) :
288
+ this.slice( i, i + 1 );
289
+ },
290
+
291
+ first: function() {
292
+ return this.eq( 0 );
293
+ },
294
+
295
+ last: function() {
296
+ return this.eq( -1 );
297
+ },
298
+
299
+ slice: function() {
300
+ return this.pushStack( slice.apply( this, arguments ),
301
+ "slice", slice.call(arguments).join(",") );
302
+ },
303
+
304
+ map: function( callback ) {
305
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
306
+ return callback.call( elem, i, elem );
307
+ }));
308
+ },
309
+
310
+ end: function() {
311
+ return this.prevObject || this.constructor(null);
312
+ },
313
+
314
+ // For internal use only.
315
+ // Behaves like an Array's method, not like a jQuery method.
316
+ push: push,
317
+ sort: [].sort,
318
+ splice: [].splice
319
+ };
320
+
321
+ // Give the init function the jQuery prototype for later instantiation
322
+ jQuery.fn.init.prototype = jQuery.fn;
323
+
324
+ jQuery.extend = jQuery.fn.extend = function() {
325
+ var options, name, src, copy, copyIsArray, clone,
326
+ target = arguments[0] || {},
327
+ i = 1,
328
+ length = arguments.length,
329
+ deep = false;
330
+
331
+ // Handle a deep copy situation
332
+ if ( typeof target === "boolean" ) {
333
+ deep = target;
334
+ target = arguments[1] || {};
335
+ // skip the boolean and the target
336
+ i = 2;
337
+ }
338
+
339
+ // Handle case when target is a string or something (possible in deep copy)
340
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
341
+ target = {};
342
+ }
343
+
344
+ // extend jQuery itself if only one argument is passed
345
+ if ( length === i ) {
346
+ target = this;
347
+ --i;
348
+ }
349
+
350
+ for ( ; i < length; i++ ) {
351
+ // Only deal with non-null/undefined values
352
+ if ( (options = arguments[ i ]) != null ) {
353
+ // Extend the base object
354
+ for ( name in options ) {
355
+ src = target[ name ];
356
+ copy = options[ name ];
357
+
358
+ // Prevent never-ending loop
359
+ if ( target === copy ) {
360
+ continue;
361
+ }
362
+
363
+ // Recurse if we're merging plain objects or arrays
364
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
365
+ if ( copyIsArray ) {
366
+ copyIsArray = false;
367
+ clone = src && jQuery.isArray(src) ? src : [];
368
+
369
+ } else {
370
+ clone = src && jQuery.isPlainObject(src) ? src : {};
371
+ }
372
+
373
+ // Never move original objects, clone them
374
+ target[ name ] = jQuery.extend( deep, clone, copy );
375
+
376
+ // Don't bring in undefined values
377
+ } else if ( copy !== undefined ) {
378
+ target[ name ] = copy;
379
+ }
380
+ }
381
+ }
382
+ }
383
+
384
+ // Return the modified object
385
+ return target;
386
+ };
387
+
388
+ jQuery.extend({
389
+ noConflict: function( deep ) {
390
+ if ( window.$ === jQuery ) {
391
+ window.$ = _$;
392
+ }
393
+
394
+ if ( deep && window.jQuery === jQuery ) {
395
+ window.jQuery = _jQuery;
396
+ }
397
+
398
+ return jQuery;
399
+ },
400
+
401
+ // Is the DOM ready to be used? Set to true once it occurs.
402
+ isReady: false,
403
+
404
+ // A counter to track how many items to wait for before
405
+ // the ready event fires. See #6781
406
+ readyWait: 1,
407
+
408
+ // Hold (or release) the ready event
409
+ holdReady: function( hold ) {
410
+ if ( hold ) {
411
+ jQuery.readyWait++;
412
+ } else {
413
+ jQuery.ready( true );
414
+ }
415
+ },
416
+
417
+ // Handle when the DOM is ready
418
+ ready: function( wait ) {
419
+ // Either a released hold or an DOMready/load event and not yet ready
420
+ if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
421
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
422
+ if ( !document.body ) {
423
+ return setTimeout( jQuery.ready, 1 );
424
+ }
425
+
426
+ // Remember that the DOM is ready
427
+ jQuery.isReady = true;
428
+
429
+ // If a normal DOM Ready event fired, decrement, and wait if need be
430
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
431
+ return;
432
+ }
433
+
434
+ // If there are functions bound, to execute
435
+ readyList.fireWith( document, [ jQuery ] );
436
+
437
+ // Trigger any bound ready events
438
+ if ( jQuery.fn.trigger ) {
439
+ jQuery( document ).trigger( "ready" ).off( "ready" );
440
+ }
441
+ }
442
+ },
443
+
444
+ bindReady: function() {
445
+ if ( readyList ) {
446
+ return;
447
+ }
448
+
449
+ readyList = jQuery.Callbacks( "once memory" );
450
+
451
+ // Catch cases where $(document).ready() is called after the
452
+ // browser event has already occurred.
453
+ if ( document.readyState === "complete" ) {
454
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
455
+ return setTimeout( jQuery.ready, 1 );
456
+ }
457
+
458
+ // Mozilla, Opera and webkit nightlies currently support this event
459
+ if ( document.addEventListener ) {
460
+ // Use the handy event callback
461
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
462
+
463
+ // A fallback to window.onload, that will always work
464
+ window.addEventListener( "load", jQuery.ready, false );
465
+
466
+ // If IE event model is used
467
+ } else if ( document.attachEvent ) {
468
+ // ensure firing before onload,
469
+ // maybe late but safe also for iframes
470
+ document.attachEvent( "onreadystatechange", DOMContentLoaded );
471
+
472
+ // A fallback to window.onload, that will always work
473
+ window.attachEvent( "onload", jQuery.ready );
474
+
475
+ // If IE and not a frame
476
+ // continually check to see if the document is ready
477
+ var toplevel = false;
478
+
479
+ try {
480
+ toplevel = window.frameElement == null;
481
+ } catch(e) {}
482
+
483
+ if ( document.documentElement.doScroll && toplevel ) {
484
+ doScrollCheck();
485
+ }
486
+ }
487
+ },
488
+
489
+ // See test/unit/core.js for details concerning isFunction.
490
+ // Since version 1.3, DOM methods and functions like alert
491
+ // aren't supported. They return false on IE (#2968).
492
+ isFunction: function( obj ) {
493
+ return jQuery.type(obj) === "function";
494
+ },
495
+
496
+ isArray: Array.isArray || function( obj ) {
497
+ return jQuery.type(obj) === "array";
498
+ },
499
+
500
+ // A crude way of determining if an object is a window
501
+ isWindow: function( obj ) {
502
+ return obj && typeof obj === "object" && "setInterval" in obj;
503
+ },
504
+
505
+ isNumeric: function( obj ) {
506
+ return !isNaN( parseFloat(obj) ) && isFinite( obj );
507
+ },
508
+
509
+ type: function( obj ) {
510
+ return obj == null ?
511
+ String( obj ) :
512
+ class2type[ toString.call(obj) ] || "object";
513
+ },
514
+
515
+ isPlainObject: function( obj ) {
516
+ // Must be an Object.
517
+ // Because of IE, we also have to check the presence of the constructor property.
518
+ // Make sure that DOM nodes and window objects don't pass through, as well
519
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
520
+ return false;
521
+ }
522
+
523
+ try {
524
+ // Not own constructor property must be Object
525
+ if ( obj.constructor &&
526
+ !hasOwn.call(obj, "constructor") &&
527
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
528
+ return false;
529
+ }
530
+ } catch ( e ) {
531
+ // IE8,9 Will throw exceptions on certain host objects #9897
532
+ return false;
533
+ }
534
+
535
+ // Own properties are enumerated firstly, so to speed up,
536
+ // if last one is own, then all properties are own.
537
+
538
+ var key;
539
+ for ( key in obj ) {}
540
+
541
+ return key === undefined || hasOwn.call( obj, key );
542
+ },
543
+
544
+ isEmptyObject: function( obj ) {
545
+ for ( var name in obj ) {
546
+ return false;
547
+ }
548
+ return true;
549
+ },
550
+
551
+ error: function( msg ) {
552
+ throw new Error( msg );
553
+ },
554
+
555
+ parseJSON: function( data ) {
556
+ if ( typeof data !== "string" || !data ) {
557
+ return null;
558
+ }
559
+
560
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
561
+ data = jQuery.trim( data );
562
+
563
+ // Attempt to parse using the native JSON parser first
564
+ if ( window.JSON && window.JSON.parse ) {
565
+ return window.JSON.parse( data );
566
+ }
567
+
568
+ // Make sure the incoming data is actual JSON
569
+ // Logic borrowed from http://json.org/json2.js
570
+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
571
+ .replace( rvalidtokens, "]" )
572
+ .replace( rvalidbraces, "")) ) {
573
+
574
+ return ( new Function( "return " + data ) )();
575
+
576
+ }
577
+ jQuery.error( "Invalid JSON: " + data );
578
+ },
579
+
580
+ // Cross-browser xml parsing
581
+ parseXML: function( data ) {
582
+ var xml, tmp;
583
+ try {
584
+ if ( window.DOMParser ) { // Standard
585
+ tmp = new DOMParser();
586
+ xml = tmp.parseFromString( data , "text/xml" );
587
+ } else { // IE
588
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
589
+ xml.async = "false";
590
+ xml.loadXML( data );
591
+ }
592
+ } catch( e ) {
593
+ xml = undefined;
594
+ }
595
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
596
+ jQuery.error( "Invalid XML: " + data );
597
+ }
598
+ return xml;
599
+ },
600
+
601
+ noop: function() {},
602
+
603
+ // Evaluates a script in a global context
604
+ // Workarounds based on findings by Jim Driscoll
605
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
606
+ globalEval: function( data ) {
607
+ if ( data && rnotwhite.test( data ) ) {
608
+ // We use execScript on Internet Explorer
609
+ // We use an anonymous function so that context is window
610
+ // rather than jQuery in Firefox
611
+ ( window.execScript || function( data ) {
612
+ window[ "eval" ].call( window, data );
613
+ } )( data );
614
+ }
615
+ },
616
+
617
+ // Convert dashed to camelCase; used by the css and data modules
618
+ // Microsoft forgot to hump their vendor prefix (#9572)
619
+ camelCase: function( string ) {
620
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
621
+ },
622
+
623
+ nodeName: function( elem, name ) {
624
+ return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
625
+ },
626
+
627
+ // args is for internal usage only
628
+ each: function( object, callback, args ) {
629
+ var name, i = 0,
630
+ length = object.length,
631
+ isObj = length === undefined || jQuery.isFunction( object );
632
+
633
+ if ( args ) {
634
+ if ( isObj ) {
635
+ for ( name in object ) {
636
+ if ( callback.apply( object[ name ], args ) === false ) {
637
+ break;
638
+ }
639
+ }
640
+ } else {
641
+ for ( ; i < length; ) {
642
+ if ( callback.apply( object[ i++ ], args ) === false ) {
643
+ break;
644
+ }
645
+ }
646
+ }
647
+
648
+ // A special, fast, case for the most common use of each
649
+ } else {
650
+ if ( isObj ) {
651
+ for ( name in object ) {
652
+ if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
653
+ break;
654
+ }
655
+ }
656
+ } else {
657
+ for ( ; i < length; ) {
658
+ if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
659
+ break;
660
+ }
661
+ }
662
+ }
663
+ }
664
+
665
+ return object;
666
+ },
667
+
668
+ // Use native String.trim function wherever possible
669
+ trim: trim ?
670
+ function( text ) {
671
+ return text == null ?
672
+ "" :
673
+ trim.call( text );
674
+ } :
675
+
676
+ // Otherwise use our own trimming functionality
677
+ function( text ) {
678
+ return text == null ?
679
+ "" :
680
+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
681
+ },
682
+
683
+ // results is for internal usage only
684
+ makeArray: function( array, results ) {
685
+ var ret = results || [];
686
+
687
+ if ( array != null ) {
688
+ // The window, strings (and functions) also have 'length'
689
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
690
+ var type = jQuery.type( array );
691
+
692
+ if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
693
+ push.call( ret, array );
694
+ } else {
695
+ jQuery.merge( ret, array );
696
+ }
697
+ }
698
+
699
+ return ret;
700
+ },
701
+
702
+ inArray: function( elem, array, i ) {
703
+ var len;
704
+
705
+ if ( array ) {
706
+ if ( indexOf ) {
707
+ return indexOf.call( array, elem, i );
708
+ }
709
+
710
+ len = array.length;
711
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
712
+
713
+ for ( ; i < len; i++ ) {
714
+ // Skip accessing in sparse arrays
715
+ if ( i in array && array[ i ] === elem ) {
716
+ return i;
717
+ }
718
+ }
719
+ }
720
+
721
+ return -1;
722
+ },
723
+
724
+ merge: function( first, second ) {
725
+ var i = first.length,
726
+ j = 0;
727
+
728
+ if ( typeof second.length === "number" ) {
729
+ for ( var l = second.length; j < l; j++ ) {
730
+ first[ i++ ] = second[ j ];
731
+ }
732
+
733
+ } else {
734
+ while ( second[j] !== undefined ) {
735
+ first[ i++ ] = second[ j++ ];
736
+ }
737
+ }
738
+
739
+ first.length = i;
740
+
741
+ return first;
742
+ },
743
+
744
+ grep: function( elems, callback, inv ) {
745
+ var ret = [], retVal;
746
+ inv = !!inv;
747
+
748
+ // Go through the array, only saving the items
749
+ // that pass the validator function
750
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
751
+ retVal = !!callback( elems[ i ], i );
752
+ if ( inv !== retVal ) {
753
+ ret.push( elems[ i ] );
754
+ }
755
+ }
756
+
757
+ return ret;
758
+ },
759
+
760
+ // arg is for internal usage only
761
+ map: function( elems, callback, arg ) {
762
+ var value, key, ret = [],
763
+ i = 0,
764
+ length = elems.length,
765
+ // jquery objects are treated as arrays
766
+ isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
767
+
768
+ // Go through the array, translating each of the items to their
769
+ if ( isArray ) {
770
+ for ( ; i < length; i++ ) {
771
+ value = callback( elems[ i ], i, arg );
772
+
773
+ if ( value != null ) {
774
+ ret[ ret.length ] = value;
775
+ }
776
+ }
777
+
778
+ // Go through every key on the object,
779
+ } else {
780
+ for ( key in elems ) {
781
+ value = callback( elems[ key ], key, arg );
782
+
783
+ if ( value != null ) {
784
+ ret[ ret.length ] = value;
785
+ }
786
+ }
787
+ }
788
+
789
+ // Flatten any nested arrays
790
+ return ret.concat.apply( [], ret );
791
+ },
792
+
793
+ // A global GUID counter for objects
794
+ guid: 1,
795
+
796
+ // Bind a function to a context, optionally partially applying any
797
+ // arguments.
798
+ proxy: function( fn, context ) {
799
+ if ( typeof context === "string" ) {
800
+ var tmp = fn[ context ];
801
+ context = fn;
802
+ fn = tmp;
803
+ }
804
+
805
+ // Quick check to determine if target is callable, in the spec
806
+ // this throws a TypeError, but we will just return undefined.
807
+ if ( !jQuery.isFunction( fn ) ) {
808
+ return undefined;
809
+ }
810
+
811
+ // Simulated bind
812
+ var args = slice.call( arguments, 2 ),
813
+ proxy = function() {
814
+ return fn.apply( context, args.concat( slice.call( arguments ) ) );
815
+ };
816
+
817
+ // Set the guid of unique handler to the same of original handler, so it can be removed
818
+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
819
+
820
+ return proxy;
821
+ },
822
+
823
+ // Mutifunctional method to get and set values to a collection
824
+ // The value/s can optionally be executed if it's a function
825
+ access: function( elems, key, value, exec, fn, pass ) {
826
+ var length = elems.length;
827
+
828
+ // Setting many attributes
829
+ if ( typeof key === "object" ) {
830
+ for ( var k in key ) {
831
+ jQuery.access( elems, k, key[k], exec, fn, value );
832
+ }
833
+ return elems;
834
+ }
835
+
836
+ // Setting one attribute
837
+ if ( value !== undefined ) {
838
+ // Optionally, function values get executed if exec is true
839
+ exec = !pass && exec && jQuery.isFunction(value);
840
+
841
+ for ( var i = 0; i < length; i++ ) {
842
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
843
+ }
844
+
845
+ return elems;
846
+ }
847
+
848
+ // Getting an attribute
849
+ return length ? fn( elems[0], key ) : undefined;
850
+ },
851
+
852
+ now: function() {
853
+ return ( new Date() ).getTime();
854
+ },
855
+
856
+ // Use of jQuery.browser is frowned upon.
857
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
858
+ uaMatch: function( ua ) {
859
+ ua = ua.toLowerCase();
860
+
861
+ var match = rwebkit.exec( ua ) ||
862
+ ropera.exec( ua ) ||
863
+ rmsie.exec( ua ) ||
864
+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
865
+ [];
866
+
867
+ return { browser: match[1] || "", version: match[2] || "0" };
868
+ },
869
+
870
+ sub: function() {
871
+ function jQuerySub( selector, context ) {
872
+ return new jQuerySub.fn.init( selector, context );
873
+ }
874
+ jQuery.extend( true, jQuerySub, this );
875
+ jQuerySub.superclass = this;
876
+ jQuerySub.fn = jQuerySub.prototype = this();
877
+ jQuerySub.fn.constructor = jQuerySub;
878
+ jQuerySub.sub = this.sub;
879
+ jQuerySub.fn.init = function init( selector, context ) {
880
+ if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
881
+ context = jQuerySub( context );
882
+ }
883
+
884
+ return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
885
+ };
886
+ jQuerySub.fn.init.prototype = jQuerySub.fn;
887
+ var rootjQuerySub = jQuerySub(document);
888
+ return jQuerySub;
889
+ },
890
+
891
+ browser: {}
892
+ });
893
+
894
+ // Populate the class2type map
895
+ jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
896
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
897
+ });
898
+
899
+ browserMatch = jQuery.uaMatch( userAgent );
900
+ if ( browserMatch.browser ) {
901
+ jQuery.browser[ browserMatch.browser ] = true;
902
+ jQuery.browser.version = browserMatch.version;
903
+ }
904
+
905
+ // Deprecated, use jQuery.browser.webkit instead
906
+ if ( jQuery.browser.webkit ) {
907
+ jQuery.browser.safari = true;
908
+ }
909
+
910
+ // IE doesn't match non-breaking spaces with \s
911
+ if ( rnotwhite.test( "\xA0" ) ) {
912
+ trimLeft = /^[\s\xA0]+/;
913
+ trimRight = /[\s\xA0]+$/;
914
+ }
915
+
916
+ // All jQuery objects should point back to these
917
+ rootjQuery = jQuery(document);
918
+
919
+ // Cleanup functions for the document ready method
920
+ if ( document.addEventListener ) {
921
+ DOMContentLoaded = function() {
922
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
923
+ jQuery.ready();
924
+ };
925
+
926
+ } else if ( document.attachEvent ) {
927
+ DOMContentLoaded = function() {
928
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
929
+ if ( document.readyState === "complete" ) {
930
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
931
+ jQuery.ready();
932
+ }
933
+ };
934
+ }
935
+
936
+ // The DOM ready check for Internet Explorer
937
+ function doScrollCheck() {
938
+ if ( jQuery.isReady ) {
939
+ return;
940
+ }
941
+
942
+ try {
943
+ // If IE is used, use the trick by Diego Perini
944
+ // http://javascript.nwbox.com/IEContentLoaded/
945
+ document.documentElement.doScroll("left");
946
+ } catch(e) {
947
+ setTimeout( doScrollCheck, 1 );
948
+ return;
949
+ }
950
+
951
+ // and execute any waiting functions
952
+ jQuery.ready();
953
+ }
954
+
955
+ return jQuery;
956
+
957
+ })();
958
+
959
+
960
+ // String to Object flags format cache
961
+ var flagsCache = {};
962
+
963
+ // Convert String-formatted flags into Object-formatted ones and store in cache
964
+ function createFlags( flags ) {
965
+ var object = flagsCache[ flags ] = {},
966
+ i, length;
967
+ flags = flags.split( /\s+/ );
968
+ for ( i = 0, length = flags.length; i < length; i++ ) {
969
+ object[ flags[i] ] = true;
970
+ }
971
+ return object;
972
+ }
973
+
974
+ /*
975
+ * Create a callback list using the following parameters:
976
+ *
977
+ * flags: an optional list of space-separated flags that will change how
978
+ * the callback list behaves
979
+ *
980
+ * By default a callback list will act like an event callback list and can be
981
+ * "fired" multiple times.
982
+ *
983
+ * Possible flags:
984
+ *
985
+ * once: will ensure the callback list can only be fired once (like a Deferred)
986
+ *
987
+ * memory: will keep track of previous values and will call any callback added
988
+ * after the list has been fired right away with the latest "memorized"
989
+ * values (like a Deferred)
990
+ *
991
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
992
+ *
993
+ * stopOnFalse: interrupt callings when a callback returns false
994
+ *
995
+ */
996
+ jQuery.Callbacks = function( flags ) {
997
+
998
+ // Convert flags from String-formatted to Object-formatted
999
+ // (we check in cache first)
1000
+ flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
1001
+
1002
+ var // Actual callback list
1003
+ list = [],
1004
+ // Stack of fire calls for repeatable lists
1005
+ stack = [],
1006
+ // Last fire value (for non-forgettable lists)
1007
+ memory,
1008
+ // Flag to know if list is currently firing
1009
+ firing,
1010
+ // First callback to fire (used internally by add and fireWith)
1011
+ firingStart,
1012
+ // End of the loop when firing
1013
+ firingLength,
1014
+ // Index of currently firing callback (modified by remove if needed)
1015
+ firingIndex,
1016
+ // Add one or several callbacks to the list
1017
+ add = function( args ) {
1018
+ var i,
1019
+ length,
1020
+ elem,
1021
+ type,
1022
+ actual;
1023
+ for ( i = 0, length = args.length; i < length; i++ ) {
1024
+ elem = args[ i ];
1025
+ type = jQuery.type( elem );
1026
+ if ( type === "array" ) {
1027
+ // Inspect recursively
1028
+ add( elem );
1029
+ } else if ( type === "function" ) {
1030
+ // Add if not in unique mode and callback is not in
1031
+ if ( !flags.unique || !self.has( elem ) ) {
1032
+ list.push( elem );
1033
+ }
1034
+ }
1035
+ }
1036
+ },
1037
+ // Fire callbacks
1038
+ fire = function( context, args ) {
1039
+ args = args || [];
1040
+ memory = !flags.memory || [ context, args ];
1041
+ firing = true;
1042
+ firingIndex = firingStart || 0;
1043
+ firingStart = 0;
1044
+ firingLength = list.length;
1045
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
1046
+ if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
1047
+ memory = true; // Mark as halted
1048
+ break;
1049
+ }
1050
+ }
1051
+ firing = false;
1052
+ if ( list ) {
1053
+ if ( !flags.once ) {
1054
+ if ( stack && stack.length ) {
1055
+ memory = stack.shift();
1056
+ self.fireWith( memory[ 0 ], memory[ 1 ] );
1057
+ }
1058
+ } else if ( memory === true ) {
1059
+ self.disable();
1060
+ } else {
1061
+ list = [];
1062
+ }
1063
+ }
1064
+ },
1065
+ // Actual Callbacks object
1066
+ self = {
1067
+ // Add a callback or a collection of callbacks to the list
1068
+ add: function() {
1069
+ if ( list ) {
1070
+ var length = list.length;
1071
+ add( arguments );
1072
+ // Do we need to add the callbacks to the
1073
+ // current firing batch?
1074
+ if ( firing ) {
1075
+ firingLength = list.length;
1076
+ // With memory, if we're not firing then
1077
+ // we should call right away, unless previous
1078
+ // firing was halted (stopOnFalse)
1079
+ } else if ( memory && memory !== true ) {
1080
+ firingStart = length;
1081
+ fire( memory[ 0 ], memory[ 1 ] );
1082
+ }
1083
+ }
1084
+ return this;
1085
+ },
1086
+ // Remove a callback from the list
1087
+ remove: function() {
1088
+ if ( list ) {
1089
+ var args = arguments,
1090
+ argIndex = 0,
1091
+ argLength = args.length;
1092
+ for ( ; argIndex < argLength ; argIndex++ ) {
1093
+ for ( var i = 0; i < list.length; i++ ) {
1094
+ if ( args[ argIndex ] === list[ i ] ) {
1095
+ // Handle firingIndex and firingLength
1096
+ if ( firing ) {
1097
+ if ( i <= firingLength ) {
1098
+ firingLength--;
1099
+ if ( i <= firingIndex ) {
1100
+ firingIndex--;
1101
+ }
1102
+ }
1103
+ }
1104
+ // Remove the element
1105
+ list.splice( i--, 1 );
1106
+ // If we have some unicity property then
1107
+ // we only need to do this once
1108
+ if ( flags.unique ) {
1109
+ break;
1110
+ }
1111
+ }
1112
+ }
1113
+ }
1114
+ }
1115
+ return this;
1116
+ },
1117
+ // Control if a given callback is in the list
1118
+ has: function( fn ) {
1119
+ if ( list ) {
1120
+ var i = 0,
1121
+ length = list.length;
1122
+ for ( ; i < length; i++ ) {
1123
+ if ( fn === list[ i ] ) {
1124
+ return true;
1125
+ }
1126
+ }
1127
+ }
1128
+ return false;
1129
+ },
1130
+ // Remove all callbacks from the list
1131
+ empty: function() {
1132
+ list = [];
1133
+ return this;
1134
+ },
1135
+ // Have the list do nothing anymore
1136
+ disable: function() {
1137
+ list = stack = memory = undefined;
1138
+ return this;
1139
+ },
1140
+ // Is it disabled?
1141
+ disabled: function() {
1142
+ return !list;
1143
+ },
1144
+ // Lock the list in its current state
1145
+ lock: function() {
1146
+ stack = undefined;
1147
+ if ( !memory || memory === true ) {
1148
+ self.disable();
1149
+ }
1150
+ return this;
1151
+ },
1152
+ // Is it locked?
1153
+ locked: function() {
1154
+ return !stack;
1155
+ },
1156
+ // Call all callbacks with the given context and arguments
1157
+ fireWith: function( context, args ) {
1158
+ if ( stack ) {
1159
+ if ( firing ) {
1160
+ if ( !flags.once ) {
1161
+ stack.push( [ context, args ] );
1162
+ }
1163
+ } else if ( !( flags.once && memory ) ) {
1164
+ fire( context, args );
1165
+ }
1166
+ }
1167
+ return this;
1168
+ },
1169
+ // Call all the callbacks with the given arguments
1170
+ fire: function() {
1171
+ self.fireWith( this, arguments );
1172
+ return this;
1173
+ },
1174
+ // To know if the callbacks have already been called at least once
1175
+ fired: function() {
1176
+ return !!memory;
1177
+ }
1178
+ };
1179
+
1180
+ return self;
1181
+ };
1182
+
1183
+
1184
+
1185
+
1186
+ var // Static reference to slice
1187
+ sliceDeferred = [].slice;
1188
+
1189
+ jQuery.extend({
1190
+
1191
+ Deferred: function( func ) {
1192
+ var doneList = jQuery.Callbacks( "once memory" ),
1193
+ failList = jQuery.Callbacks( "once memory" ),
1194
+ progressList = jQuery.Callbacks( "memory" ),
1195
+ state = "pending",
1196
+ lists = {
1197
+ resolve: doneList,
1198
+ reject: failList,
1199
+ notify: progressList
1200
+ },
1201
+ promise = {
1202
+ done: doneList.add,
1203
+ fail: failList.add,
1204
+ progress: progressList.add,
1205
+
1206
+ state: function() {
1207
+ return state;
1208
+ },
1209
+
1210
+ // Deprecated
1211
+ isResolved: doneList.fired,
1212
+ isRejected: failList.fired,
1213
+
1214
+ then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
1215
+ deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
1216
+ return this;
1217
+ },
1218
+ always: function() {
1219
+ deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
1220
+ return this;
1221
+ },
1222
+ pipe: function( fnDone, fnFail, fnProgress ) {
1223
+ return jQuery.Deferred(function( newDefer ) {
1224
+ jQuery.each( {
1225
+ done: [ fnDone, "resolve" ],
1226
+ fail: [ fnFail, "reject" ],
1227
+ progress: [ fnProgress, "notify" ]
1228
+ }, function( handler, data ) {
1229
+ var fn = data[ 0 ],
1230
+ action = data[ 1 ],
1231
+ returned;
1232
+ if ( jQuery.isFunction( fn ) ) {
1233
+ deferred[ handler ](function() {
1234
+ returned = fn.apply( this, arguments );
1235
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
1236
+ returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
1237
+ } else {
1238
+ newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
1239
+ }
1240
+ });
1241
+ } else {
1242
+ deferred[ handler ]( newDefer[ action ] );
1243
+ }
1244
+ });
1245
+ }).promise();
1246
+ },
1247
+ // Get a promise for this deferred
1248
+ // If obj is provided, the promise aspect is added to the object
1249
+ promise: function( obj ) {
1250
+ if ( obj == null ) {
1251
+ obj = promise;
1252
+ } else {
1253
+ for ( var key in promise ) {
1254
+ obj[ key ] = promise[ key ];
1255
+ }
1256
+ }
1257
+ return obj;
1258
+ }
1259
+ },
1260
+ deferred = promise.promise({}),
1261
+ key;
1262
+
1263
+ for ( key in lists ) {
1264
+ deferred[ key ] = lists[ key ].fire;
1265
+ deferred[ key + "With" ] = lists[ key ].fireWith;
1266
+ }
1267
+
1268
+ // Handle state
1269
+ deferred.done( function() {
1270
+ state = "resolved";
1271
+ }, failList.disable, progressList.lock ).fail( function() {
1272
+ state = "rejected";
1273
+ }, doneList.disable, progressList.lock );
1274
+
1275
+ // Call given func if any
1276
+ if ( func ) {
1277
+ func.call( deferred, deferred );
1278
+ }
1279
+
1280
+ // All done!
1281
+ return deferred;
1282
+ },
1283
+
1284
+ // Deferred helper
1285
+ when: function( firstParam ) {
1286
+ var args = sliceDeferred.call( arguments, 0 ),
1287
+ i = 0,
1288
+ length = args.length,
1289
+ pValues = new Array( length ),
1290
+ count = length,
1291
+ pCount = length,
1292
+ deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
1293
+ firstParam :
1294
+ jQuery.Deferred(),
1295
+ promise = deferred.promise();
1296
+ function resolveFunc( i ) {
1297
+ return function( value ) {
1298
+ args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
1299
+ if ( !( --count ) ) {
1300
+ deferred.resolveWith( deferred, args );
1301
+ }
1302
+ };
1303
+ }
1304
+ function progressFunc( i ) {
1305
+ return function( value ) {
1306
+ pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
1307
+ deferred.notifyWith( promise, pValues );
1308
+ };
1309
+ }
1310
+ if ( length > 1 ) {
1311
+ for ( ; i < length; i++ ) {
1312
+ if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
1313
+ args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
1314
+ } else {
1315
+ --count;
1316
+ }
1317
+ }
1318
+ if ( !count ) {
1319
+ deferred.resolveWith( deferred, args );
1320
+ }
1321
+ } else if ( deferred !== firstParam ) {
1322
+ deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
1323
+ }
1324
+ return promise;
1325
+ }
1326
+ });
1327
+
1328
+
1329
+
1330
+
1331
+ jQuery.support = (function() {
1332
+
1333
+ var support,
1334
+ all,
1335
+ a,
1336
+ select,
1337
+ opt,
1338
+ input,
1339
+ marginDiv,
1340
+ fragment,
1341
+ tds,
1342
+ events,
1343
+ eventName,
1344
+ i,
1345
+ isSupported,
1346
+ div = document.createElement( "div" ),
1347
+ documentElement = document.documentElement;
1348
+
1349
+ // Preliminary tests
1350
+ div.setAttribute("className", "t");
1351
+ div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
1352
+
1353
+ all = div.getElementsByTagName( "*" );
1354
+ a = div.getElementsByTagName( "a" )[ 0 ];
1355
+
1356
+ // Can't get basic test support
1357
+ if ( !all || !all.length || !a ) {
1358
+ return {};
1359
+ }
1360
+
1361
+ // First batch of supports tests
1362
+ select = document.createElement( "select" );
1363
+ opt = select.appendChild( document.createElement("option") );
1364
+ input = div.getElementsByTagName( "input" )[ 0 ];
1365
+
1366
+ support = {
1367
+ // IE strips leading whitespace when .innerHTML is used
1368
+ leadingWhitespace: ( div.firstChild.nodeType === 3 ),
1369
+
1370
+ // Make sure that tbody elements aren't automatically inserted
1371
+ // IE will insert them into empty tables
1372
+ tbody: !div.getElementsByTagName("tbody").length,
1373
+
1374
+ // Make sure that link elements get serialized correctly by innerHTML
1375
+ // This requires a wrapper element in IE
1376
+ htmlSerialize: !!div.getElementsByTagName("link").length,
1377
+
1378
+ // Get the style information from getAttribute
1379
+ // (IE uses .cssText instead)
1380
+ style: /top/.test( a.getAttribute("style") ),
1381
+
1382
+ // Make sure that URLs aren't manipulated
1383
+ // (IE normalizes it by default)
1384
+ hrefNormalized: ( a.getAttribute("href") === "/a" ),
1385
+
1386
+ // Make sure that element opacity exists
1387
+ // (IE uses filter instead)
1388
+ // Use a regex to work around a WebKit issue. See #5145
1389
+ opacity: /^0.55/.test( a.style.opacity ),
1390
+
1391
+ // Verify style float existence
1392
+ // (IE uses styleFloat instead of cssFloat)
1393
+ cssFloat: !!a.style.cssFloat,
1394
+
1395
+ // Make sure that if no value is specified for a checkbox
1396
+ // that it defaults to "on".
1397
+ // (WebKit defaults to "" instead)
1398
+ checkOn: ( input.value === "on" ),
1399
+
1400
+ // Make sure that a selected-by-default option has a working selected property.
1401
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
1402
+ optSelected: opt.selected,
1403
+
1404
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
1405
+ getSetAttribute: div.className !== "t",
1406
+
1407
+ // Tests for enctype support on a form(#6743)
1408
+ enctype: !!document.createElement("form").enctype,
1409
+
1410
+ // Makes sure cloning an html5 element does not cause problems
1411
+ // Where outerHTML is undefined, this still works
1412
+ html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
1413
+
1414
+ // Will be defined later
1415
+ submitBubbles: true,
1416
+ changeBubbles: true,
1417
+ focusinBubbles: false,
1418
+ deleteExpando: true,
1419
+ noCloneEvent: true,
1420
+ inlineBlockNeedsLayout: false,
1421
+ shrinkWrapBlocks: false,
1422
+ reliableMarginRight: true
1423
+ };
1424
+
1425
+ // Make sure checked status is properly cloned
1426
+ input.checked = true;
1427
+ support.noCloneChecked = input.cloneNode( true ).checked;
1428
+
1429
+ // Make sure that the options inside disabled selects aren't marked as disabled
1430
+ // (WebKit marks them as disabled)
1431
+ select.disabled = true;
1432
+ support.optDisabled = !opt.disabled;
1433
+
1434
+ // Test to see if it's possible to delete an expando from an element
1435
+ // Fails in Internet Explorer
1436
+ try {
1437
+ delete div.test;
1438
+ } catch( e ) {
1439
+ support.deleteExpando = false;
1440
+ }
1441
+
1442
+ if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
1443
+ div.attachEvent( "onclick", function() {
1444
+ // Cloning a node shouldn't copy over any
1445
+ // bound event handlers (IE does this)
1446
+ support.noCloneEvent = false;
1447
+ });
1448
+ div.cloneNode( true ).fireEvent( "onclick" );
1449
+ }
1450
+
1451
+ // Check if a radio maintains its value
1452
+ // after being appended to the DOM
1453
+ input = document.createElement("input");
1454
+ input.value = "t";
1455
+ input.setAttribute("type", "radio");
1456
+ support.radioValue = input.value === "t";
1457
+
1458
+ input.setAttribute("checked", "checked");
1459
+ div.appendChild( input );
1460
+ fragment = document.createDocumentFragment();
1461
+ fragment.appendChild( div.lastChild );
1462
+
1463
+ // WebKit doesn't clone checked state correctly in fragments
1464
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
1465
+
1466
+ // Check if a disconnected checkbox will retain its checked
1467
+ // value of true after appended to the DOM (IE6/7)
1468
+ support.appendChecked = input.checked;
1469
+
1470
+ fragment.removeChild( input );
1471
+ fragment.appendChild( div );
1472
+
1473
+ div.innerHTML = "";
1474
+
1475
+ // Check if div with explicit width and no margin-right incorrectly
1476
+ // gets computed margin-right based on width of container. For more
1477
+ // info see bug #3333
1478
+ // Fails in WebKit before Feb 2011 nightlies
1479
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
1480
+ if ( window.getComputedStyle ) {
1481
+ marginDiv = document.createElement( "div" );
1482
+ marginDiv.style.width = "0";
1483
+ marginDiv.style.marginRight = "0";
1484
+ div.style.width = "2px";
1485
+ div.appendChild( marginDiv );
1486
+ support.reliableMarginRight =
1487
+ ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
1488
+ }
1489
+
1490
+ // Technique from Juriy Zaytsev
1491
+ // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
1492
+ // We only care about the case where non-standard event systems
1493
+ // are used, namely in IE. Short-circuiting here helps us to
1494
+ // avoid an eval call (in setAttribute) which can cause CSP
1495
+ // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
1496
+ if ( div.attachEvent ) {
1497
+ for( i in {
1498
+ submit: 1,
1499
+ change: 1,
1500
+ focusin: 1
1501
+ }) {
1502
+ eventName = "on" + i;
1503
+ isSupported = ( eventName in div );
1504
+ if ( !isSupported ) {
1505
+ div.setAttribute( eventName, "return;" );
1506
+ isSupported = ( typeof div[ eventName ] === "function" );
1507
+ }
1508
+ support[ i + "Bubbles" ] = isSupported;
1509
+ }
1510
+ }
1511
+
1512
+ fragment.removeChild( div );
1513
+
1514
+ // Null elements to avoid leaks in IE
1515
+ fragment = select = opt = marginDiv = div = input = null;
1516
+
1517
+ // Run tests that need a body at doc ready
1518
+ jQuery(function() {
1519
+ var container, outer, inner, table, td, offsetSupport,
1520
+ conMarginTop, ptlm, vb, style, html,
1521
+ body = document.getElementsByTagName("body")[0];
1522
+
1523
+ if ( !body ) {
1524
+ // Return for frameset docs that don't have a body
1525
+ return;
1526
+ }
1527
+
1528
+ conMarginTop = 1;
1529
+ ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";
1530
+ vb = "visibility:hidden;border:0;";
1531
+ style = "style='" + ptlm + "border:5px solid #000;padding:0;'";
1532
+ html = "<div " + style + "><div></div></div>" +
1533
+ "<table " + style + " cellpadding='0' cellspacing='0'>" +
1534
+ "<tr><td></td></tr></table>";
1535
+
1536
+ container = document.createElement("div");
1537
+ container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
1538
+ body.insertBefore( container, body.firstChild );
1539
+
1540
+ // Construct the test element
1541
+ div = document.createElement("div");
1542
+ container.appendChild( div );
1543
+
1544
+ // Check if table cells still have offsetWidth/Height when they are set
1545
+ // to display:none and there are still other visible table cells in a
1546
+ // table row; if so, offsetWidth/Height are not reliable for use when
1547
+ // determining if an element has been hidden directly using
1548
+ // display:none (it is still safe to use offsets if a parent element is
1549
+ // hidden; don safety goggles and see bug #4512 for more information).
1550
+ // (only IE 8 fails this test)
1551
+ div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
1552
+ tds = div.getElementsByTagName( "td" );
1553
+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
1554
+
1555
+ tds[ 0 ].style.display = "";
1556
+ tds[ 1 ].style.display = "none";
1557
+
1558
+ // Check if empty table cells still have offsetWidth/Height
1559
+ // (IE <= 8 fail this test)
1560
+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
1561
+
1562
+ // Figure out if the W3C box model works as expected
1563
+ div.innerHTML = "";
1564
+ div.style.width = div.style.paddingLeft = "1px";
1565
+ jQuery.boxModel = support.boxModel = div.offsetWidth === 2;
1566
+
1567
+ if ( typeof div.style.zoom !== "undefined" ) {
1568
+ // Check if natively block-level elements act like inline-block
1569
+ // elements when setting their display to 'inline' and giving
1570
+ // them layout
1571
+ // (IE < 8 does this)
1572
+ div.style.display = "inline";
1573
+ div.style.zoom = 1;
1574
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
1575
+
1576
+ // Check if elements with layout shrink-wrap their children
1577
+ // (IE 6 does this)
1578
+ div.style.display = "";
1579
+ div.innerHTML = "<div style='width:4px;'></div>";
1580
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
1581
+ }
1582
+
1583
+ div.style.cssText = ptlm + vb;
1584
+ div.innerHTML = html;
1585
+
1586
+ outer = div.firstChild;
1587
+ inner = outer.firstChild;
1588
+ td = outer.nextSibling.firstChild.firstChild;
1589
+
1590
+ offsetSupport = {
1591
+ doesNotAddBorder: ( inner.offsetTop !== 5 ),
1592
+ doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
1593
+ };
1594
+
1595
+ inner.style.position = "fixed";
1596
+ inner.style.top = "20px";
1597
+
1598
+ // safari subtracts parent border width here which is 5px
1599
+ offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
1600
+ inner.style.position = inner.style.top = "";
1601
+
1602
+ outer.style.overflow = "hidden";
1603
+ outer.style.position = "relative";
1604
+
1605
+ offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
1606
+ offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
1607
+
1608
+ body.removeChild( container );
1609
+ div = container = null;
1610
+
1611
+ jQuery.extend( support, offsetSupport );
1612
+ });
1613
+
1614
+ return support;
1615
+ })();
1616
+
1617
+
1618
+
1619
+
1620
+ var rbrace = /^(?:\{.*\}|\[.*\])$/,
1621
+ rmultiDash = /([A-Z])/g;
1622
+
1623
+ jQuery.extend({
1624
+ cache: {},
1625
+
1626
+ // Please use with caution
1627
+ uuid: 0,
1628
+
1629
+ // Unique for each copy of jQuery on the page
1630
+ // Non-digits removed to match rinlinejQuery
1631
+ expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
1632
+
1633
+ // The following elements throw uncatchable exceptions if you
1634
+ // attempt to add expando properties to them.
1635
+ noData: {
1636
+ "embed": true,
1637
+ // Ban all objects except for Flash (which handle expandos)
1638
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
1639
+ "applet": true
1640
+ },
1641
+
1642
+ hasData: function( elem ) {
1643
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
1644
+ return !!elem && !isEmptyDataObject( elem );
1645
+ },
1646
+
1647
+ data: function( elem, name, data, pvt /* Internal Use Only */ ) {
1648
+ if ( !jQuery.acceptData( elem ) ) {
1649
+ return;
1650
+ }
1651
+
1652
+ var privateCache, thisCache, ret,
1653
+ internalKey = jQuery.expando,
1654
+ getByName = typeof name === "string",
1655
+
1656
+ // We have to handle DOM nodes and JS objects differently because IE6-7
1657
+ // can't GC object references properly across the DOM-JS boundary
1658
+ isNode = elem.nodeType,
1659
+
1660
+ // Only DOM nodes need the global jQuery cache; JS object data is
1661
+ // attached directly to the object so GC can occur automatically
1662
+ cache = isNode ? jQuery.cache : elem,
1663
+
1664
+ // Only defining an ID for JS objects if its cache already exists allows
1665
+ // the code to shortcut on the same path as a DOM node with no cache
1666
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
1667
+ isEvents = name === "events";
1668
+
1669
+ // Avoid doing any more work than we need to when trying to get data on an
1670
+ // object that has no data at all
1671
+ if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
1672
+ return;
1673
+ }
1674
+
1675
+ if ( !id ) {
1676
+ // Only DOM nodes need a new unique ID for each element since their data
1677
+ // ends up in the global cache
1678
+ if ( isNode ) {
1679
+ elem[ internalKey ] = id = ++jQuery.uuid;
1680
+ } else {
1681
+ id = internalKey;
1682
+ }
1683
+ }
1684
+
1685
+ if ( !cache[ id ] ) {
1686
+ cache[ id ] = {};
1687
+
1688
+ // Avoids exposing jQuery metadata on plain JS objects when the object
1689
+ // is serialized using JSON.stringify
1690
+ if ( !isNode ) {
1691
+ cache[ id ].toJSON = jQuery.noop;
1692
+ }
1693
+ }
1694
+
1695
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
1696
+ // shallow copied over onto the existing cache
1697
+ if ( typeof name === "object" || typeof name === "function" ) {
1698
+ if ( pvt ) {
1699
+ cache[ id ] = jQuery.extend( cache[ id ], name );
1700
+ } else {
1701
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
1702
+ }
1703
+ }
1704
+
1705
+ privateCache = thisCache = cache[ id ];
1706
+
1707
+ // jQuery data() is stored in a separate object inside the object's internal data
1708
+ // cache in order to avoid key collisions between internal data and user-defined
1709
+ // data.
1710
+ if ( !pvt ) {
1711
+ if ( !thisCache.data ) {
1712
+ thisCache.data = {};
1713
+ }
1714
+
1715
+ thisCache = thisCache.data;
1716
+ }
1717
+
1718
+ if ( data !== undefined ) {
1719
+ thisCache[ jQuery.camelCase( name ) ] = data;
1720
+ }
1721
+
1722
+ // Users should not attempt to inspect the internal events object using jQuery.data,
1723
+ // it is undocumented and subject to change. But does anyone listen? No.
1724
+ if ( isEvents && !thisCache[ name ] ) {
1725
+ return privateCache.events;
1726
+ }
1727
+
1728
+ // Check for both converted-to-camel and non-converted data property names
1729
+ // If a data property was specified
1730
+ if ( getByName ) {
1731
+
1732
+ // First Try to find as-is property data
1733
+ ret = thisCache[ name ];
1734
+
1735
+ // Test for null|undefined property data
1736
+ if ( ret == null ) {
1737
+
1738
+ // Try to find the camelCased property
1739
+ ret = thisCache[ jQuery.camelCase( name ) ];
1740
+ }
1741
+ } else {
1742
+ ret = thisCache;
1743
+ }
1744
+
1745
+ return ret;
1746
+ },
1747
+
1748
+ removeData: function( elem, name, pvt /* Internal Use Only */ ) {
1749
+ if ( !jQuery.acceptData( elem ) ) {
1750
+ return;
1751
+ }
1752
+
1753
+ var thisCache, i, l,
1754
+
1755
+ // Reference to internal data cache key
1756
+ internalKey = jQuery.expando,
1757
+
1758
+ isNode = elem.nodeType,
1759
+
1760
+ // See jQuery.data for more information
1761
+ cache = isNode ? jQuery.cache : elem,
1762
+
1763
+ // See jQuery.data for more information
1764
+ id = isNode ? elem[ internalKey ] : internalKey;
1765
+
1766
+ // If there is already no cache entry for this object, there is no
1767
+ // purpose in continuing
1768
+ if ( !cache[ id ] ) {
1769
+ return;
1770
+ }
1771
+
1772
+ if ( name ) {
1773
+
1774
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
1775
+
1776
+ if ( thisCache ) {
1777
+
1778
+ // Support array or space separated string names for data keys
1779
+ if ( !jQuery.isArray( name ) ) {
1780
+
1781
+ // try the string as a key before any manipulation
1782
+ if ( name in thisCache ) {
1783
+ name = [ name ];
1784
+ } else {
1785
+
1786
+ // split the camel cased version by spaces unless a key with the spaces exists
1787
+ name = jQuery.camelCase( name );
1788
+ if ( name in thisCache ) {
1789
+ name = [ name ];
1790
+ } else {
1791
+ name = name.split( " " );
1792
+ }
1793
+ }
1794
+ }
1795
+
1796
+ for ( i = 0, l = name.length; i < l; i++ ) {
1797
+ delete thisCache[ name[i] ];
1798
+ }
1799
+
1800
+ // If there is no data left in the cache, we want to continue
1801
+ // and let the cache object itself get destroyed
1802
+ if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
1803
+ return;
1804
+ }
1805
+ }
1806
+ }
1807
+
1808
+ // See jQuery.data for more information
1809
+ if ( !pvt ) {
1810
+ delete cache[ id ].data;
1811
+
1812
+ // Don't destroy the parent cache unless the internal data object
1813
+ // had been the only thing left in it
1814
+ if ( !isEmptyDataObject(cache[ id ]) ) {
1815
+ return;
1816
+ }
1817
+ }
1818
+
1819
+ // Browsers that fail expando deletion also refuse to delete expandos on
1820
+ // the window, but it will allow it on all other JS objects; other browsers
1821
+ // don't care
1822
+ // Ensure that `cache` is not a window object #10080
1823
+ if ( jQuery.support.deleteExpando || !cache.setInterval ) {
1824
+ delete cache[ id ];
1825
+ } else {
1826
+ cache[ id ] = null;
1827
+ }
1828
+
1829
+ // We destroyed the cache and need to eliminate the expando on the node to avoid
1830
+ // false lookups in the cache for entries that no longer exist
1831
+ if ( isNode ) {
1832
+ // IE does not allow us to delete expando properties from nodes,
1833
+ // nor does it have a removeAttribute function on Document nodes;
1834
+ // we must handle all of these cases
1835
+ if ( jQuery.support.deleteExpando ) {
1836
+ delete elem[ internalKey ];
1837
+ } else if ( elem.removeAttribute ) {
1838
+ elem.removeAttribute( internalKey );
1839
+ } else {
1840
+ elem[ internalKey ] = null;
1841
+ }
1842
+ }
1843
+ },
1844
+
1845
+ // For internal use only.
1846
+ _data: function( elem, name, data ) {
1847
+ return jQuery.data( elem, name, data, true );
1848
+ },
1849
+
1850
+ // A method for determining if a DOM node can handle the data expando
1851
+ acceptData: function( elem ) {
1852
+ if ( elem.nodeName ) {
1853
+ var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
1854
+
1855
+ if ( match ) {
1856
+ return !(match === true || elem.getAttribute("classid") !== match);
1857
+ }
1858
+ }
1859
+
1860
+ return true;
1861
+ }
1862
+ });
1863
+
1864
+ jQuery.fn.extend({
1865
+ data: function( key, value ) {
1866
+ var parts, attr, name,
1867
+ data = null;
1868
+
1869
+ if ( typeof key === "undefined" ) {
1870
+ if ( this.length ) {
1871
+ data = jQuery.data( this[0] );
1872
+
1873
+ if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) {
1874
+ attr = this[0].attributes;
1875
+ for ( var i = 0, l = attr.length; i < l; i++ ) {
1876
+ name = attr[i].name;
1877
+
1878
+ if ( name.indexOf( "data-" ) === 0 ) {
1879
+ name = jQuery.camelCase( name.substring(5) );
1880
+
1881
+ dataAttr( this[0], name, data[ name ] );
1882
+ }
1883
+ }
1884
+ jQuery._data( this[0], "parsedAttrs", true );
1885
+ }
1886
+ }
1887
+
1888
+ return data;
1889
+
1890
+ } else if ( typeof key === "object" ) {
1891
+ return this.each(function() {
1892
+ jQuery.data( this, key );
1893
+ });
1894
+ }
1895
+
1896
+ parts = key.split(".");
1897
+ parts[1] = parts[1] ? "." + parts[1] : "";
1898
+
1899
+ if ( value === undefined ) {
1900
+ data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
1901
+
1902
+ // Try to fetch any internally stored data first
1903
+ if ( data === undefined && this.length ) {
1904
+ data = jQuery.data( this[0], key );
1905
+ data = dataAttr( this[0], key, data );
1906
+ }
1907
+
1908
+ return data === undefined && parts[1] ?
1909
+ this.data( parts[0] ) :
1910
+ data;
1911
+
1912
+ } else {
1913
+ return this.each(function() {
1914
+ var self = jQuery( this ),
1915
+ args = [ parts[0], value ];
1916
+
1917
+ self.triggerHandler( "setData" + parts[1] + "!", args );
1918
+ jQuery.data( this, key, value );
1919
+ self.triggerHandler( "changeData" + parts[1] + "!", args );
1920
+ });
1921
+ }
1922
+ },
1923
+
1924
+ removeData: function( key ) {
1925
+ return this.each(function() {
1926
+ jQuery.removeData( this, key );
1927
+ });
1928
+ }
1929
+ });
1930
+
1931
+ function dataAttr( elem, key, data ) {
1932
+ // If nothing was found internally, try to fetch any
1933
+ // data from the HTML5 data-* attribute
1934
+ if ( data === undefined && elem.nodeType === 1 ) {
1935
+
1936
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
1937
+
1938
+ data = elem.getAttribute( name );
1939
+
1940
+ if ( typeof data === "string" ) {
1941
+ try {
1942
+ data = data === "true" ? true :
1943
+ data === "false" ? false :
1944
+ data === "null" ? null :
1945
+ jQuery.isNumeric( data ) ? parseFloat( data ) :
1946
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
1947
+ data;
1948
+ } catch( e ) {}
1949
+
1950
+ // Make sure we set the data so it isn't changed later
1951
+ jQuery.data( elem, key, data );
1952
+
1953
+ } else {
1954
+ data = undefined;
1955
+ }
1956
+ }
1957
+
1958
+ return data;
1959
+ }
1960
+
1961
+ // checks a cache object for emptiness
1962
+ function isEmptyDataObject( obj ) {
1963
+ for ( var name in obj ) {
1964
+
1965
+ // if the public data object is empty, the private is still empty
1966
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
1967
+ continue;
1968
+ }
1969
+ if ( name !== "toJSON" ) {
1970
+ return false;
1971
+ }
1972
+ }
1973
+
1974
+ return true;
1975
+ }
1976
+
1977
+
1978
+
1979
+
1980
+ function handleQueueMarkDefer( elem, type, src ) {
1981
+ var deferDataKey = type + "defer",
1982
+ queueDataKey = type + "queue",
1983
+ markDataKey = type + "mark",
1984
+ defer = jQuery._data( elem, deferDataKey );
1985
+ if ( defer &&
1986
+ ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
1987
+ ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
1988
+ // Give room for hard-coded callbacks to fire first
1989
+ // and eventually mark/queue something else on the element
1990
+ setTimeout( function() {
1991
+ if ( !jQuery._data( elem, queueDataKey ) &&
1992
+ !jQuery._data( elem, markDataKey ) ) {
1993
+ jQuery.removeData( elem, deferDataKey, true );
1994
+ defer.fire();
1995
+ }
1996
+ }, 0 );
1997
+ }
1998
+ }
1999
+
2000
+ jQuery.extend({
2001
+
2002
+ _mark: function( elem, type ) {
2003
+ if ( elem ) {
2004
+ type = ( type || "fx" ) + "mark";
2005
+ jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
2006
+ }
2007
+ },
2008
+
2009
+ _unmark: function( force, elem, type ) {
2010
+ if ( force !== true ) {
2011
+ type = elem;
2012
+ elem = force;
2013
+ force = false;
2014
+ }
2015
+ if ( elem ) {
2016
+ type = type || "fx";
2017
+ var key = type + "mark",
2018
+ count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
2019
+ if ( count ) {
2020
+ jQuery._data( elem, key, count );
2021
+ } else {
2022
+ jQuery.removeData( elem, key, true );
2023
+ handleQueueMarkDefer( elem, type, "mark" );
2024
+ }
2025
+ }
2026
+ },
2027
+
2028
+ queue: function( elem, type, data ) {
2029
+ var q;
2030
+ if ( elem ) {
2031
+ type = ( type || "fx" ) + "queue";
2032
+ q = jQuery._data( elem, type );
2033
+
2034
+ // Speed up dequeue by getting out quickly if this is just a lookup
2035
+ if ( data ) {
2036
+ if ( !q || jQuery.isArray(data) ) {
2037
+ q = jQuery._data( elem, type, jQuery.makeArray(data) );
2038
+ } else {
2039
+ q.push( data );
2040
+ }
2041
+ }
2042
+ return q || [];
2043
+ }
2044
+ },
2045
+
2046
+ dequeue: function( elem, type ) {
2047
+ type = type || "fx";
2048
+
2049
+ var queue = jQuery.queue( elem, type ),
2050
+ fn = queue.shift(),
2051
+ hooks = {};
2052
+
2053
+ // If the fx queue is dequeued, always remove the progress sentinel
2054
+ if ( fn === "inprogress" ) {
2055
+ fn = queue.shift();
2056
+ }
2057
+
2058
+ if ( fn ) {
2059
+ // Add a progress sentinel to prevent the fx queue from being
2060
+ // automatically dequeued
2061
+ if ( type === "fx" ) {
2062
+ queue.unshift( "inprogress" );
2063
+ }
2064
+
2065
+ jQuery._data( elem, type + ".run", hooks );
2066
+ fn.call( elem, function() {
2067
+ jQuery.dequeue( elem, type );
2068
+ }, hooks );
2069
+ }
2070
+
2071
+ if ( !queue.length ) {
2072
+ jQuery.removeData( elem, type + "queue " + type + ".run", true );
2073
+ handleQueueMarkDefer( elem, type, "queue" );
2074
+ }
2075
+ }
2076
+ });
2077
+
2078
+ jQuery.fn.extend({
2079
+ queue: function( type, data ) {
2080
+ if ( typeof type !== "string" ) {
2081
+ data = type;
2082
+ type = "fx";
2083
+ }
2084
+
2085
+ if ( data === undefined ) {
2086
+ return jQuery.queue( this[0], type );
2087
+ }
2088
+ return this.each(function() {
2089
+ var queue = jQuery.queue( this, type, data );
2090
+
2091
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
2092
+ jQuery.dequeue( this, type );
2093
+ }
2094
+ });
2095
+ },
2096
+ dequeue: function( type ) {
2097
+ return this.each(function() {
2098
+ jQuery.dequeue( this, type );
2099
+ });
2100
+ },
2101
+ // Based off of the plugin by Clint Helfers, with permission.
2102
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
2103
+ delay: function( time, type ) {
2104
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
2105
+ type = type || "fx";
2106
+
2107
+ return this.queue( type, function( next, hooks ) {
2108
+ var timeout = setTimeout( next, time );
2109
+ hooks.stop = function() {
2110
+ clearTimeout( timeout );
2111
+ };
2112
+ });
2113
+ },
2114
+ clearQueue: function( type ) {
2115
+ return this.queue( type || "fx", [] );
2116
+ },
2117
+ // Get a promise resolved when queues of a certain type
2118
+ // are emptied (fx is the type by default)
2119
+ promise: function( type, object ) {
2120
+ if ( typeof type !== "string" ) {
2121
+ object = type;
2122
+ type = undefined;
2123
+ }
2124
+ type = type || "fx";
2125
+ var defer = jQuery.Deferred(),
2126
+ elements = this,
2127
+ i = elements.length,
2128
+ count = 1,
2129
+ deferDataKey = type + "defer",
2130
+ queueDataKey = type + "queue",
2131
+ markDataKey = type + "mark",
2132
+ tmp;
2133
+ function resolve() {
2134
+ if ( !( --count ) ) {
2135
+ defer.resolveWith( elements, [ elements ] );
2136
+ }
2137
+ }
2138
+ while( i-- ) {
2139
+ if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
2140
+ ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
2141
+ jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
2142
+ jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
2143
+ count++;
2144
+ tmp.add( resolve );
2145
+ }
2146
+ }
2147
+ resolve();
2148
+ return defer.promise();
2149
+ }
2150
+ });
2151
+
2152
+
2153
+
2154
+
2155
+ var rclass = /[\n\t\r]/g,
2156
+ rspace = /\s+/,
2157
+ rreturn = /\r/g,
2158
+ rtype = /^(?:button|input)$/i,
2159
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
2160
+ rclickable = /^a(?:rea)?$/i,
2161
+ rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
2162
+ getSetAttribute = jQuery.support.getSetAttribute,
2163
+ nodeHook, boolHook, fixSpecified;
2164
+
2165
+ jQuery.fn.extend({
2166
+ attr: function( name, value ) {
2167
+ return jQuery.access( this, name, value, true, jQuery.attr );
2168
+ },
2169
+
2170
+ removeAttr: function( name ) {
2171
+ return this.each(function() {
2172
+ jQuery.removeAttr( this, name );
2173
+ });
2174
+ },
2175
+
2176
+ prop: function( name, value ) {
2177
+ return jQuery.access( this, name, value, true, jQuery.prop );
2178
+ },
2179
+
2180
+ removeProp: function( name ) {
2181
+ name = jQuery.propFix[ name ] || name;
2182
+ return this.each(function() {
2183
+ // try/catch handles cases where IE balks (such as removing a property on window)
2184
+ try {
2185
+ this[ name ] = undefined;
2186
+ delete this[ name ];
2187
+ } catch( e ) {}
2188
+ });
2189
+ },
2190
+
2191
+ addClass: function( value ) {
2192
+ var classNames, i, l, elem,
2193
+ setClass, c, cl;
2194
+
2195
+ if ( jQuery.isFunction( value ) ) {
2196
+ return this.each(function( j ) {
2197
+ jQuery( this ).addClass( value.call(this, j, this.className) );
2198
+ });
2199
+ }
2200
+
2201
+ if ( value && typeof value === "string" ) {
2202
+ classNames = value.split( rspace );
2203
+
2204
+ for ( i = 0, l = this.length; i < l; i++ ) {
2205
+ elem = this[ i ];
2206
+
2207
+ if ( elem.nodeType === 1 ) {
2208
+ if ( !elem.className && classNames.length === 1 ) {
2209
+ elem.className = value;
2210
+
2211
+ } else {
2212
+ setClass = " " + elem.className + " ";
2213
+
2214
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
2215
+ if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
2216
+ setClass += classNames[ c ] + " ";
2217
+ }
2218
+ }
2219
+ elem.className = jQuery.trim( setClass );
2220
+ }
2221
+ }
2222
+ }
2223
+ }
2224
+
2225
+ return this;
2226
+ },
2227
+
2228
+ removeClass: function( value ) {
2229
+ var classNames, i, l, elem, className, c, cl;
2230
+
2231
+ if ( jQuery.isFunction( value ) ) {
2232
+ return this.each(function( j ) {
2233
+ jQuery( this ).removeClass( value.call(this, j, this.className) );
2234
+ });
2235
+ }
2236
+
2237
+ if ( (value && typeof value === "string") || value === undefined ) {
2238
+ classNames = ( value || "" ).split( rspace );
2239
+
2240
+ for ( i = 0, l = this.length; i < l; i++ ) {
2241
+ elem = this[ i ];
2242
+
2243
+ if ( elem.nodeType === 1 && elem.className ) {
2244
+ if ( value ) {
2245
+ className = (" " + elem.className + " ").replace( rclass, " " );
2246
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
2247
+ className = className.replace(" " + classNames[ c ] + " ", " ");
2248
+ }
2249
+ elem.className = jQuery.trim( className );
2250
+
2251
+ } else {
2252
+ elem.className = "";
2253
+ }
2254
+ }
2255
+ }
2256
+ }
2257
+
2258
+ return this;
2259
+ },
2260
+
2261
+ toggleClass: function( value, stateVal ) {
2262
+ var type = typeof value,
2263
+ isBool = typeof stateVal === "boolean";
2264
+
2265
+ if ( jQuery.isFunction( value ) ) {
2266
+ return this.each(function( i ) {
2267
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
2268
+ });
2269
+ }
2270
+
2271
+ return this.each(function() {
2272
+ if ( type === "string" ) {
2273
+ // toggle individual class names
2274
+ var className,
2275
+ i = 0,
2276
+ self = jQuery( this ),
2277
+ state = stateVal,
2278
+ classNames = value.split( rspace );
2279
+
2280
+ while ( (className = classNames[ i++ ]) ) {
2281
+ // check each className given, space seperated list
2282
+ state = isBool ? state : !self.hasClass( className );
2283
+ self[ state ? "addClass" : "removeClass" ]( className );
2284
+ }
2285
+
2286
+ } else if ( type === "undefined" || type === "boolean" ) {
2287
+ if ( this.className ) {
2288
+ // store className if set
2289
+ jQuery._data( this, "__className__", this.className );
2290
+ }
2291
+
2292
+ // toggle whole className
2293
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
2294
+ }
2295
+ });
2296
+ },
2297
+
2298
+ hasClass: function( selector ) {
2299
+ var className = " " + selector + " ",
2300
+ i = 0,
2301
+ l = this.length;
2302
+ for ( ; i < l; i++ ) {
2303
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
2304
+ return true;
2305
+ }
2306
+ }
2307
+
2308
+ return false;
2309
+ },
2310
+
2311
+ val: function( value ) {
2312
+ var hooks, ret, isFunction,
2313
+ elem = this[0];
2314
+
2315
+ if ( !arguments.length ) {
2316
+ if ( elem ) {
2317
+ hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
2318
+
2319
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
2320
+ return ret;
2321
+ }
2322
+
2323
+ ret = elem.value;
2324
+
2325
+ return typeof ret === "string" ?
2326
+ // handle most common string cases
2327
+ ret.replace(rreturn, "") :
2328
+ // handle cases where value is null/undef or number
2329
+ ret == null ? "" : ret;
2330
+ }
2331
+
2332
+ return;
2333
+ }
2334
+
2335
+ isFunction = jQuery.isFunction( value );
2336
+
2337
+ return this.each(function( i ) {
2338
+ var self = jQuery(this), val;
2339
+
2340
+ if ( this.nodeType !== 1 ) {
2341
+ return;
2342
+ }
2343
+
2344
+ if ( isFunction ) {
2345
+ val = value.call( this, i, self.val() );
2346
+ } else {
2347
+ val = value;
2348
+ }
2349
+
2350
+ // Treat null/undefined as ""; convert numbers to string
2351
+ if ( val == null ) {
2352
+ val = "";
2353
+ } else if ( typeof val === "number" ) {
2354
+ val += "";
2355
+ } else if ( jQuery.isArray( val ) ) {
2356
+ val = jQuery.map(val, function ( value ) {
2357
+ return value == null ? "" : value + "";
2358
+ });
2359
+ }
2360
+
2361
+ hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
2362
+
2363
+ // If set returns undefined, fall back to normal setting
2364
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
2365
+ this.value = val;
2366
+ }
2367
+ });
2368
+ }
2369
+ });
2370
+
2371
+ jQuery.extend({
2372
+ valHooks: {
2373
+ option: {
2374
+ get: function( elem ) {
2375
+ // attributes.value is undefined in Blackberry 4.7 but
2376
+ // uses .value. See #6932
2377
+ var val = elem.attributes.value;
2378
+ return !val || val.specified ? elem.value : elem.text;
2379
+ }
2380
+ },
2381
+ select: {
2382
+ get: function( elem ) {
2383
+ var value, i, max, option,
2384
+ index = elem.selectedIndex,
2385
+ values = [],
2386
+ options = elem.options,
2387
+ one = elem.type === "select-one";
2388
+
2389
+ // Nothing was selected
2390
+ if ( index < 0 ) {
2391
+ return null;
2392
+ }
2393
+
2394
+ // Loop through all the selected options
2395
+ i = one ? index : 0;
2396
+ max = one ? index + 1 : options.length;
2397
+ for ( ; i < max; i++ ) {
2398
+ option = options[ i ];
2399
+
2400
+ // Don't return options that are disabled or in a disabled optgroup
2401
+ if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
2402
+ (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
2403
+
2404
+ // Get the specific value for the option
2405
+ value = jQuery( option ).val();
2406
+
2407
+ // We don't need an array for one selects
2408
+ if ( one ) {
2409
+ return value;
2410
+ }
2411
+
2412
+ // Multi-Selects return an array
2413
+ values.push( value );
2414
+ }
2415
+ }
2416
+
2417
+ // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
2418
+ if ( one && !values.length && options.length ) {
2419
+ return jQuery( options[ index ] ).val();
2420
+ }
2421
+
2422
+ return values;
2423
+ },
2424
+
2425
+ set: function( elem, value ) {
2426
+ var values = jQuery.makeArray( value );
2427
+
2428
+ jQuery(elem).find("option").each(function() {
2429
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
2430
+ });
2431
+
2432
+ if ( !values.length ) {
2433
+ elem.selectedIndex = -1;
2434
+ }
2435
+ return values;
2436
+ }
2437
+ }
2438
+ },
2439
+
2440
+ attrFn: {
2441
+ val: true,
2442
+ css: true,
2443
+ html: true,
2444
+ text: true,
2445
+ data: true,
2446
+ width: true,
2447
+ height: true,
2448
+ offset: true
2449
+ },
2450
+
2451
+ attr: function( elem, name, value, pass ) {
2452
+ var ret, hooks, notxml,
2453
+ nType = elem.nodeType;
2454
+
2455
+ // don't get/set attributes on text, comment and attribute nodes
2456
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
2457
+ return;
2458
+ }
2459
+
2460
+ if ( pass && name in jQuery.attrFn ) {
2461
+ return jQuery( elem )[ name ]( value );
2462
+ }
2463
+
2464
+ // Fallback to prop when attributes are not supported
2465
+ if ( typeof elem.getAttribute === "undefined" ) {
2466
+ return jQuery.prop( elem, name, value );
2467
+ }
2468
+
2469
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
2470
+
2471
+ // All attributes are lowercase
2472
+ // Grab necessary hook if one is defined
2473
+ if ( notxml ) {
2474
+ name = name.toLowerCase();
2475
+ hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
2476
+ }
2477
+
2478
+ if ( value !== undefined ) {
2479
+
2480
+ if ( value === null ) {
2481
+ jQuery.removeAttr( elem, name );
2482
+ return;
2483
+
2484
+ } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
2485
+ return ret;
2486
+
2487
+ } else {
2488
+ elem.setAttribute( name, "" + value );
2489
+ return value;
2490
+ }
2491
+
2492
+ } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
2493
+ return ret;
2494
+
2495
+ } else {
2496
+
2497
+ ret = elem.getAttribute( name );
2498
+
2499
+ // Non-existent attributes return null, we normalize to undefined
2500
+ return ret === null ?
2501
+ undefined :
2502
+ ret;
2503
+ }
2504
+ },
2505
+
2506
+ removeAttr: function( elem, value ) {
2507
+ var propName, attrNames, name, l,
2508
+ i = 0;
2509
+
2510
+ if ( value && elem.nodeType === 1 ) {
2511
+ attrNames = value.toLowerCase().split( rspace );
2512
+ l = attrNames.length;
2513
+
2514
+ for ( ; i < l; i++ ) {
2515
+ name = attrNames[ i ];
2516
+
2517
+ if ( name ) {
2518
+ propName = jQuery.propFix[ name ] || name;
2519
+
2520
+ // See #9699 for explanation of this approach (setting first, then removal)
2521
+ jQuery.attr( elem, name, "" );
2522
+ elem.removeAttribute( getSetAttribute ? name : propName );
2523
+
2524
+ // Set corresponding property to false for boolean attributes
2525
+ if ( rboolean.test( name ) && propName in elem ) {
2526
+ elem[ propName ] = false;
2527
+ }
2528
+ }
2529
+ }
2530
+ }
2531
+ },
2532
+
2533
+ attrHooks: {
2534
+ type: {
2535
+ set: function( elem, value ) {
2536
+ // We can't allow the type property to be changed (since it causes problems in IE)
2537
+ if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
2538
+ jQuery.error( "type property can't be changed" );
2539
+ } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
2540
+ // Setting the type on a radio button after the value resets the value in IE6-9
2541
+ // Reset value to it's default in case type is set after value
2542
+ // This is for element creation
2543
+ var val = elem.value;
2544
+ elem.setAttribute( "type", value );
2545
+ if ( val ) {
2546
+ elem.value = val;
2547
+ }
2548
+ return value;
2549
+ }
2550
+ }
2551
+ },
2552
+ // Use the value property for back compat
2553
+ // Use the nodeHook for button elements in IE6/7 (#1954)
2554
+ value: {
2555
+ get: function( elem, name ) {
2556
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
2557
+ return nodeHook.get( elem, name );
2558
+ }
2559
+ return name in elem ?
2560
+ elem.value :
2561
+ null;
2562
+ },
2563
+ set: function( elem, value, name ) {
2564
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
2565
+ return nodeHook.set( elem, value, name );
2566
+ }
2567
+ // Does not return so that setAttribute is also used
2568
+ elem.value = value;
2569
+ }
2570
+ }
2571
+ },
2572
+
2573
+ propFix: {
2574
+ tabindex: "tabIndex",
2575
+ readonly: "readOnly",
2576
+ "for": "htmlFor",
2577
+ "class": "className",
2578
+ maxlength: "maxLength",
2579
+ cellspacing: "cellSpacing",
2580
+ cellpadding: "cellPadding",
2581
+ rowspan: "rowSpan",
2582
+ colspan: "colSpan",
2583
+ usemap: "useMap",
2584
+ frameborder: "frameBorder",
2585
+ contenteditable: "contentEditable"
2586
+ },
2587
+
2588
+ prop: function( elem, name, value ) {
2589
+ var ret, hooks, notxml,
2590
+ nType = elem.nodeType;
2591
+
2592
+ // don't get/set properties on text, comment and attribute nodes
2593
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
2594
+ return;
2595
+ }
2596
+
2597
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
2598
+
2599
+ if ( notxml ) {
2600
+ // Fix name and attach hooks
2601
+ name = jQuery.propFix[ name ] || name;
2602
+ hooks = jQuery.propHooks[ name ];
2603
+ }
2604
+
2605
+ if ( value !== undefined ) {
2606
+ if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
2607
+ return ret;
2608
+
2609
+ } else {
2610
+ return ( elem[ name ] = value );
2611
+ }
2612
+
2613
+ } else {
2614
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
2615
+ return ret;
2616
+
2617
+ } else {
2618
+ return elem[ name ];
2619
+ }
2620
+ }
2621
+ },
2622
+
2623
+ propHooks: {
2624
+ tabIndex: {
2625
+ get: function( elem ) {
2626
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
2627
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
2628
+ var attributeNode = elem.getAttributeNode("tabindex");
2629
+
2630
+ return attributeNode && attributeNode.specified ?
2631
+ parseInt( attributeNode.value, 10 ) :
2632
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
2633
+ 0 :
2634
+ undefined;
2635
+ }
2636
+ }
2637
+ }
2638
+ });
2639
+
2640
+ // Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
2641
+ jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
2642
+
2643
+ // Hook for boolean attributes
2644
+ boolHook = {
2645
+ get: function( elem, name ) {
2646
+ // Align boolean attributes with corresponding properties
2647
+ // Fall back to attribute presence where some booleans are not supported
2648
+ var attrNode,
2649
+ property = jQuery.prop( elem, name );
2650
+ return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
2651
+ name.toLowerCase() :
2652
+ undefined;
2653
+ },
2654
+ set: function( elem, value, name ) {
2655
+ var propName;
2656
+ if ( value === false ) {
2657
+ // Remove boolean attributes when set to false
2658
+ jQuery.removeAttr( elem, name );
2659
+ } else {
2660
+ // value is true since we know at this point it's type boolean and not false
2661
+ // Set boolean attributes to the same name and set the DOM property
2662
+ propName = jQuery.propFix[ name ] || name;
2663
+ if ( propName in elem ) {
2664
+ // Only set the IDL specifically if it already exists on the element
2665
+ elem[ propName ] = true;
2666
+ }
2667
+
2668
+ elem.setAttribute( name, name.toLowerCase() );
2669
+ }
2670
+ return name;
2671
+ }
2672
+ };
2673
+
2674
+ // IE6/7 do not support getting/setting some attributes with get/setAttribute
2675
+ if ( !getSetAttribute ) {
2676
+
2677
+ fixSpecified = {
2678
+ name: true,
2679
+ id: true
2680
+ };
2681
+
2682
+ // Use this for any attribute in IE6/7
2683
+ // This fixes almost every IE6/7 issue
2684
+ nodeHook = jQuery.valHooks.button = {
2685
+ get: function( elem, name ) {
2686
+ var ret;
2687
+ ret = elem.getAttributeNode( name );
2688
+ return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
2689
+ ret.nodeValue :
2690
+ undefined;
2691
+ },
2692
+ set: function( elem, value, name ) {
2693
+ // Set the existing or create a new attribute node
2694
+ var ret = elem.getAttributeNode( name );
2695
+ if ( !ret ) {
2696
+ ret = document.createAttribute( name );
2697
+ elem.setAttributeNode( ret );
2698
+ }
2699
+ return ( ret.nodeValue = value + "" );
2700
+ }
2701
+ };
2702
+
2703
+ // Apply the nodeHook to tabindex
2704
+ jQuery.attrHooks.tabindex.set = nodeHook.set;
2705
+
2706
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
2707
+ // This is for removals
2708
+ jQuery.each([ "width", "height" ], function( i, name ) {
2709
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
2710
+ set: function( elem, value ) {
2711
+ if ( value === "" ) {
2712
+ elem.setAttribute( name, "auto" );
2713
+ return value;
2714
+ }
2715
+ }
2716
+ });
2717
+ });
2718
+
2719
+ // Set contenteditable to false on removals(#10429)
2720
+ // Setting to empty string throws an error as an invalid value
2721
+ jQuery.attrHooks.contenteditable = {
2722
+ get: nodeHook.get,
2723
+ set: function( elem, value, name ) {
2724
+ if ( value === "" ) {
2725
+ value = "false";
2726
+ }
2727
+ nodeHook.set( elem, value, name );
2728
+ }
2729
+ };
2730
+ }
2731
+
2732
+
2733
+ // Some attributes require a special call on IE
2734
+ if ( !jQuery.support.hrefNormalized ) {
2735
+ jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
2736
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
2737
+ get: function( elem ) {
2738
+ var ret = elem.getAttribute( name, 2 );
2739
+ return ret === null ? undefined : ret;
2740
+ }
2741
+ });
2742
+ });
2743
+ }
2744
+
2745
+ if ( !jQuery.support.style ) {
2746
+ jQuery.attrHooks.style = {
2747
+ get: function( elem ) {
2748
+ // Return undefined in the case of empty string
2749
+ // Normalize to lowercase since IE uppercases css property names
2750
+ return elem.style.cssText.toLowerCase() || undefined;
2751
+ },
2752
+ set: function( elem, value ) {
2753
+ return ( elem.style.cssText = "" + value );
2754
+ }
2755
+ };
2756
+ }
2757
+
2758
+ // Safari mis-reports the default selected property of an option
2759
+ // Accessing the parent's selectedIndex property fixes it
2760
+ if ( !jQuery.support.optSelected ) {
2761
+ jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
2762
+ get: function( elem ) {
2763
+ var parent = elem.parentNode;
2764
+
2765
+ if ( parent ) {
2766
+ parent.selectedIndex;
2767
+
2768
+ // Make sure that it also works with optgroups, see #5701
2769
+ if ( parent.parentNode ) {
2770
+ parent.parentNode.selectedIndex;
2771
+ }
2772
+ }
2773
+ return null;
2774
+ }
2775
+ });
2776
+ }
2777
+
2778
+ // IE6/7 call enctype encoding
2779
+ if ( !jQuery.support.enctype ) {
2780
+ jQuery.propFix.enctype = "encoding";
2781
+ }
2782
+
2783
+ // Radios and checkboxes getter/setter
2784
+ if ( !jQuery.support.checkOn ) {
2785
+ jQuery.each([ "radio", "checkbox" ], function() {
2786
+ jQuery.valHooks[ this ] = {
2787
+ get: function( elem ) {
2788
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
2789
+ return elem.getAttribute("value") === null ? "on" : elem.value;
2790
+ }
2791
+ };
2792
+ });
2793
+ }
2794
+ jQuery.each([ "radio", "checkbox" ], function() {
2795
+ jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
2796
+ set: function( elem, value ) {
2797
+ if ( jQuery.isArray( value ) ) {
2798
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
2799
+ }
2800
+ }
2801
+ });
2802
+ });
2803
+
2804
+
2805
+
2806
+
2807
+ var rformElems = /^(?:textarea|input|select)$/i,
2808
+ rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
2809
+ rhoverHack = /\bhover(\.\S+)?\b/,
2810
+ rkeyEvent = /^key/,
2811
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
2812
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
2813
+ rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
2814
+ quickParse = function( selector ) {
2815
+ var quick = rquickIs.exec( selector );
2816
+ if ( quick ) {
2817
+ // 0 1 2 3
2818
+ // [ _, tag, id, class ]
2819
+ quick[1] = ( quick[1] || "" ).toLowerCase();
2820
+ quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
2821
+ }
2822
+ return quick;
2823
+ },
2824
+ quickIs = function( elem, m ) {
2825
+ var attrs = elem.attributes || {};
2826
+ return (
2827
+ (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
2828
+ (!m[2] || (attrs.id || {}).value === m[2]) &&
2829
+ (!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
2830
+ );
2831
+ },
2832
+ hoverHack = function( events ) {
2833
+ return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
2834
+ };
2835
+
2836
+ /*
2837
+ * Helper functions for managing events -- not part of the public interface.
2838
+ * Props to Dean Edwards' addEvent library for many of the ideas.
2839
+ */
2840
+ jQuery.event = {
2841
+
2842
+ add: function( elem, types, handler, data, selector ) {
2843
+
2844
+ var elemData, eventHandle, events,
2845
+ t, tns, type, namespaces, handleObj,
2846
+ handleObjIn, quick, handlers, special;
2847
+
2848
+ // Don't attach events to noData or text/comment nodes (allow plain objects tho)
2849
+ if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
2850
+ return;
2851
+ }
2852
+
2853
+ // Caller can pass in an object of custom data in lieu of the handler
2854
+ if ( handler.handler ) {
2855
+ handleObjIn = handler;
2856
+ handler = handleObjIn.handler;
2857
+ }
2858
+
2859
+ // Make sure that the handler has a unique ID, used to find/remove it later
2860
+ if ( !handler.guid ) {
2861
+ handler.guid = jQuery.guid++;
2862
+ }
2863
+
2864
+ // Init the element's event structure and main handler, if this is the first
2865
+ events = elemData.events;
2866
+ if ( !events ) {
2867
+ elemData.events = events = {};
2868
+ }
2869
+ eventHandle = elemData.handle;
2870
+ if ( !eventHandle ) {
2871
+ elemData.handle = eventHandle = function( e ) {
2872
+ // Discard the second event of a jQuery.event.trigger() and
2873
+ // when an event is called after a page has unloaded
2874
+ return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
2875
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
2876
+ undefined;
2877
+ };
2878
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
2879
+ eventHandle.elem = elem;
2880
+ }
2881
+
2882
+ // Handle multiple events separated by a space
2883
+ // jQuery(...).bind("mouseover mouseout", fn);
2884
+ types = jQuery.trim( hoverHack(types) ).split( " " );
2885
+ for ( t = 0; t < types.length; t++ ) {
2886
+
2887
+ tns = rtypenamespace.exec( types[t] ) || [];
2888
+ type = tns[1];
2889
+ namespaces = ( tns[2] || "" ).split( "." ).sort();
2890
+
2891
+ // If event changes its type, use the special event handlers for the changed type
2892
+ special = jQuery.event.special[ type ] || {};
2893
+
2894
+ // If selector defined, determine special event api type, otherwise given type
2895
+ type = ( selector ? special.delegateType : special.bindType ) || type;
2896
+
2897
+ // Update special based on newly reset type
2898
+ special = jQuery.event.special[ type ] || {};
2899
+
2900
+ // handleObj is passed to all event handlers
2901
+ handleObj = jQuery.extend({
2902
+ type: type,
2903
+ origType: tns[1],
2904
+ data: data,
2905
+ handler: handler,
2906
+ guid: handler.guid,
2907
+ selector: selector,
2908
+ quick: quickParse( selector ),
2909
+ namespace: namespaces.join(".")
2910
+ }, handleObjIn );
2911
+
2912
+ // Init the event handler queue if we're the first
2913
+ handlers = events[ type ];
2914
+ if ( !handlers ) {
2915
+ handlers = events[ type ] = [];
2916
+ handlers.delegateCount = 0;
2917
+
2918
+ // Only use addEventListener/attachEvent if the special events handler returns false
2919
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
2920
+ // Bind the global event handler to the element
2921
+ if ( elem.addEventListener ) {
2922
+ elem.addEventListener( type, eventHandle, false );
2923
+
2924
+ } else if ( elem.attachEvent ) {
2925
+ elem.attachEvent( "on" + type, eventHandle );
2926
+ }
2927
+ }
2928
+ }
2929
+
2930
+ if ( special.add ) {
2931
+ special.add.call( elem, handleObj );
2932
+
2933
+ if ( !handleObj.handler.guid ) {
2934
+ handleObj.handler.guid = handler.guid;
2935
+ }
2936
+ }
2937
+
2938
+ // Add to the element's handler list, delegates in front
2939
+ if ( selector ) {
2940
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
2941
+ } else {
2942
+ handlers.push( handleObj );
2943
+ }
2944
+
2945
+ // Keep track of which events have ever been used, for event optimization
2946
+ jQuery.event.global[ type ] = true;
2947
+ }
2948
+
2949
+ // Nullify elem to prevent memory leaks in IE
2950
+ elem = null;
2951
+ },
2952
+
2953
+ global: {},
2954
+
2955
+ // Detach an event or set of events from an element
2956
+ remove: function( elem, types, handler, selector, mappedTypes ) {
2957
+
2958
+ var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
2959
+ t, tns, type, origType, namespaces, origCount,
2960
+ j, events, special, handle, eventType, handleObj;
2961
+
2962
+ if ( !elemData || !(events = elemData.events) ) {
2963
+ return;
2964
+ }
2965
+
2966
+ // Once for each type.namespace in types; type may be omitted
2967
+ types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
2968
+ for ( t = 0; t < types.length; t++ ) {
2969
+ tns = rtypenamespace.exec( types[t] ) || [];
2970
+ type = origType = tns[1];
2971
+ namespaces = tns[2];
2972
+
2973
+ // Unbind all events (on this namespace, if provided) for the element
2974
+ if ( !type ) {
2975
+ for ( type in events ) {
2976
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
2977
+ }
2978
+ continue;
2979
+ }
2980
+
2981
+ special = jQuery.event.special[ type ] || {};
2982
+ type = ( selector? special.delegateType : special.bindType ) || type;
2983
+ eventType = events[ type ] || [];
2984
+ origCount = eventType.length;
2985
+ namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
2986
+
2987
+ // Remove matching events
2988
+ for ( j = 0; j < eventType.length; j++ ) {
2989
+ handleObj = eventType[ j ];
2990
+
2991
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
2992
+ ( !handler || handler.guid === handleObj.guid ) &&
2993
+ ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
2994
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
2995
+ eventType.splice( j--, 1 );
2996
+
2997
+ if ( handleObj.selector ) {
2998
+ eventType.delegateCount--;
2999
+ }
3000
+ if ( special.remove ) {
3001
+ special.remove.call( elem, handleObj );
3002
+ }
3003
+ }
3004
+ }
3005
+
3006
+ // Remove generic event handler if we removed something and no more handlers exist
3007
+ // (avoids potential for endless recursion during removal of special event handlers)
3008
+ if ( eventType.length === 0 && origCount !== eventType.length ) {
3009
+ if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
3010
+ jQuery.removeEvent( elem, type, elemData.handle );
3011
+ }
3012
+
3013
+ delete events[ type ];
3014
+ }
3015
+ }
3016
+
3017
+ // Remove the expando if it's no longer used
3018
+ if ( jQuery.isEmptyObject( events ) ) {
3019
+ handle = elemData.handle;
3020
+ if ( handle ) {
3021
+ handle.elem = null;
3022
+ }
3023
+
3024
+ // removeData also checks for emptiness and clears the expando if empty
3025
+ // so use it instead of delete
3026
+ jQuery.removeData( elem, [ "events", "handle" ], true );
3027
+ }
3028
+ },
3029
+
3030
+ // Events that are safe to short-circuit if no handlers are attached.
3031
+ // Native DOM events should not be added, they may have inline handlers.
3032
+ customEvent: {
3033
+ "getData": true,
3034
+ "setData": true,
3035
+ "changeData": true
3036
+ },
3037
+
3038
+ trigger: function( event, data, elem, onlyHandlers ) {
3039
+ // Don't do events on text and comment nodes
3040
+ if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
3041
+ return;
3042
+ }
3043
+
3044
+ // Event object or event type
3045
+ var type = event.type || event,
3046
+ namespaces = [],
3047
+ cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
3048
+
3049
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
3050
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
3051
+ return;
3052
+ }
3053
+
3054
+ if ( type.indexOf( "!" ) >= 0 ) {
3055
+ // Exclusive events trigger only for the exact event (no namespaces)
3056
+ type = type.slice(0, -1);
3057
+ exclusive = true;
3058
+ }
3059
+
3060
+ if ( type.indexOf( "." ) >= 0 ) {
3061
+ // Namespaced trigger; create a regexp to match event type in handle()
3062
+ namespaces = type.split(".");
3063
+ type = namespaces.shift();
3064
+ namespaces.sort();
3065
+ }
3066
+
3067
+ if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
3068
+ // No jQuery handlers for this event type, and it can't have inline handlers
3069
+ return;
3070
+ }
3071
+
3072
+ // Caller can pass in an Event, Object, or just an event type string
3073
+ event = typeof event === "object" ?
3074
+ // jQuery.Event object
3075
+ event[ jQuery.expando ] ? event :
3076
+ // Object literal
3077
+ new jQuery.Event( type, event ) :
3078
+ // Just the event type (string)
3079
+ new jQuery.Event( type );
3080
+
3081
+ event.type = type;
3082
+ event.isTrigger = true;
3083
+ event.exclusive = exclusive;
3084
+ event.namespace = namespaces.join( "." );
3085
+ event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
3086
+ ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
3087
+
3088
+ // Handle a global trigger
3089
+ if ( !elem ) {
3090
+
3091
+ // TODO: Stop taunting the data cache; remove global events and always attach to document
3092
+ cache = jQuery.cache;
3093
+ for ( i in cache ) {
3094
+ if ( cache[ i ].events && cache[ i ].events[ type ] ) {
3095
+ jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
3096
+ }
3097
+ }
3098
+ return;
3099
+ }
3100
+
3101
+ // Clean up the event in case it is being reused
3102
+ event.result = undefined;
3103
+ if ( !event.target ) {
3104
+ event.target = elem;
3105
+ }
3106
+
3107
+ // Clone any incoming data and prepend the event, creating the handler arg list
3108
+ data = data != null ? jQuery.makeArray( data ) : [];
3109
+ data.unshift( event );
3110
+
3111
+ // Allow special events to draw outside the lines
3112
+ special = jQuery.event.special[ type ] || {};
3113
+ if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
3114
+ return;
3115
+ }
3116
+
3117
+ // Determine event propagation path in advance, per W3C events spec (#9951)
3118
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
3119
+ eventPath = [[ elem, special.bindType || type ]];
3120
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
3121
+
3122
+ bubbleType = special.delegateType || type;
3123
+ cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
3124
+ old = null;
3125
+ for ( ; cur; cur = cur.parentNode ) {
3126
+ eventPath.push([ cur, bubbleType ]);
3127
+ old = cur;
3128
+ }
3129
+
3130
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
3131
+ if ( old && old === elem.ownerDocument ) {
3132
+ eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
3133
+ }
3134
+ }
3135
+
3136
+ // Fire handlers on the event path
3137
+ for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
3138
+
3139
+ cur = eventPath[i][0];
3140
+ event.type = eventPath[i][1];
3141
+
3142
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
3143
+ if ( handle ) {
3144
+ handle.apply( cur, data );
3145
+ }
3146
+ // Note that this is a bare JS function and not a jQuery handler
3147
+ handle = ontype && cur[ ontype ];
3148
+ if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
3149
+ event.preventDefault();
3150
+ }
3151
+ }
3152
+ event.type = type;
3153
+
3154
+ // If nobody prevented the default action, do it now
3155
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
3156
+
3157
+ if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
3158
+ !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
3159
+
3160
+ // Call a native DOM method on the target with the same name name as the event.
3161
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
3162
+ // Don't do default actions on window, that's where global variables be (#6170)
3163
+ // IE<9 dies on focus/blur to hidden element (#1486)
3164
+ if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
3165
+
3166
+ // Don't re-trigger an onFOO event when we call its FOO() method
3167
+ old = elem[ ontype ];
3168
+
3169
+ if ( old ) {
3170
+ elem[ ontype ] = null;
3171
+ }
3172
+
3173
+ // Prevent re-triggering of the same event, since we already bubbled it above
3174
+ jQuery.event.triggered = type;
3175
+ elem[ type ]();
3176
+ jQuery.event.triggered = undefined;
3177
+
3178
+ if ( old ) {
3179
+ elem[ ontype ] = old;
3180
+ }
3181
+ }
3182
+ }
3183
+ }
3184
+
3185
+ return event.result;
3186
+ },
3187
+
3188
+ dispatch: function( event ) {
3189
+
3190
+ // Make a writable jQuery.Event from the native event object
3191
+ event = jQuery.event.fix( event || window.event );
3192
+
3193
+ var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
3194
+ delegateCount = handlers.delegateCount,
3195
+ args = [].slice.call( arguments, 0 ),
3196
+ run_all = !event.exclusive && !event.namespace,
3197
+ handlerQueue = [],
3198
+ i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
3199
+
3200
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
3201
+ args[0] = event;
3202
+ event.delegateTarget = this;
3203
+
3204
+ // Determine handlers that should run if there are delegated events
3205
+ // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861)
3206
+ if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) {
3207
+
3208
+ // Pregenerate a single jQuery object for reuse with .is()
3209
+ jqcur = jQuery(this);
3210
+ jqcur.context = this.ownerDocument || this;
3211
+
3212
+ for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
3213
+ selMatch = {};
3214
+ matches = [];
3215
+ jqcur[0] = cur;
3216
+ for ( i = 0; i < delegateCount; i++ ) {
3217
+ handleObj = handlers[ i ];
3218
+ sel = handleObj.selector;
3219
+
3220
+ if ( selMatch[ sel ] === undefined ) {
3221
+ selMatch[ sel ] = (
3222
+ handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
3223
+ );
3224
+ }
3225
+ if ( selMatch[ sel ] ) {
3226
+ matches.push( handleObj );
3227
+ }
3228
+ }
3229
+ if ( matches.length ) {
3230
+ handlerQueue.push({ elem: cur, matches: matches });
3231
+ }
3232
+ }
3233
+ }
3234
+
3235
+ // Add the remaining (directly-bound) handlers
3236
+ if ( handlers.length > delegateCount ) {
3237
+ handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
3238
+ }
3239
+
3240
+ // Run delegates first; they may want to stop propagation beneath us
3241
+ for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
3242
+ matched = handlerQueue[ i ];
3243
+ event.currentTarget = matched.elem;
3244
+
3245
+ for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
3246
+ handleObj = matched.matches[ j ];
3247
+
3248
+ // Triggered event must either 1) be non-exclusive and have no namespace, or
3249
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
3250
+ if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
3251
+
3252
+ event.data = handleObj.data;
3253
+ event.handleObj = handleObj;
3254
+
3255
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
3256
+ .apply( matched.elem, args );
3257
+
3258
+ if ( ret !== undefined ) {
3259
+ event.result = ret;
3260
+ if ( ret === false ) {
3261
+ event.preventDefault();
3262
+ event.stopPropagation();
3263
+ }
3264
+ }
3265
+ }
3266
+ }
3267
+ }
3268
+
3269
+ return event.result;
3270
+ },
3271
+
3272
+ // Includes some event props shared by KeyEvent and MouseEvent
3273
+ // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
3274
+ props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
3275
+
3276
+ fixHooks: {},
3277
+
3278
+ keyHooks: {
3279
+ props: "char charCode key keyCode".split(" "),
3280
+ filter: function( event, original ) {
3281
+
3282
+ // Add which for key events
3283
+ if ( event.which == null ) {
3284
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
3285
+ }
3286
+
3287
+ return event;
3288
+ }
3289
+ },
3290
+
3291
+ mouseHooks: {
3292
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
3293
+ filter: function( event, original ) {
3294
+ var eventDoc, doc, body,
3295
+ button = original.button,
3296
+ fromElement = original.fromElement;
3297
+
3298
+ // Calculate pageX/Y if missing and clientX/Y available
3299
+ if ( event.pageX == null && original.clientX != null ) {
3300
+ eventDoc = event.target.ownerDocument || document;
3301
+ doc = eventDoc.documentElement;
3302
+ body = eventDoc.body;
3303
+
3304
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
3305
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
3306
+ }
3307
+
3308
+ // Add relatedTarget, if necessary
3309
+ if ( !event.relatedTarget && fromElement ) {
3310
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
3311
+ }
3312
+
3313
+ // Add which for click: 1 === left; 2 === middle; 3 === right
3314
+ // Note: button is not normalized, so don't use it
3315
+ if ( !event.which && button !== undefined ) {
3316
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
3317
+ }
3318
+
3319
+ return event;
3320
+ }
3321
+ },
3322
+
3323
+ fix: function( event ) {
3324
+ if ( event[ jQuery.expando ] ) {
3325
+ return event;
3326
+ }
3327
+
3328
+ // Create a writable copy of the event object and normalize some properties
3329
+ var i, prop,
3330
+ originalEvent = event,
3331
+ fixHook = jQuery.event.fixHooks[ event.type ] || {},
3332
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
3333
+
3334
+ event = jQuery.Event( originalEvent );
3335
+
3336
+ for ( i = copy.length; i; ) {
3337
+ prop = copy[ --i ];
3338
+ event[ prop ] = originalEvent[ prop ];
3339
+ }
3340
+
3341
+ // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
3342
+ if ( !event.target ) {
3343
+ event.target = originalEvent.srcElement || document;
3344
+ }
3345
+
3346
+ // Target should not be a text node (#504, Safari)
3347
+ if ( event.target.nodeType === 3 ) {
3348
+ event.target = event.target.parentNode;
3349
+ }
3350
+
3351
+ // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
3352
+ if ( event.metaKey === undefined ) {
3353
+ event.metaKey = event.ctrlKey;
3354
+ }
3355
+
3356
+ return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
3357
+ },
3358
+
3359
+ special: {
3360
+ ready: {
3361
+ // Make sure the ready event is setup
3362
+ setup: jQuery.bindReady
3363
+ },
3364
+
3365
+ load: {
3366
+ // Prevent triggered image.load events from bubbling to window.load
3367
+ noBubble: true
3368
+ },
3369
+
3370
+ focus: {
3371
+ delegateType: "focusin"
3372
+ },
3373
+ blur: {
3374
+ delegateType: "focusout"
3375
+ },
3376
+
3377
+ beforeunload: {
3378
+ setup: function( data, namespaces, eventHandle ) {
3379
+ // We only want to do this special case on windows
3380
+ if ( jQuery.isWindow( this ) ) {
3381
+ this.onbeforeunload = eventHandle;
3382
+ }
3383
+ },
3384
+
3385
+ teardown: function( namespaces, eventHandle ) {
3386
+ if ( this.onbeforeunload === eventHandle ) {
3387
+ this.onbeforeunload = null;
3388
+ }
3389
+ }
3390
+ }
3391
+ },
3392
+
3393
+ simulate: function( type, elem, event, bubble ) {
3394
+ // Piggyback on a donor event to simulate a different one.
3395
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
3396
+ // simulated event prevents default then we do the same on the donor.
3397
+ var e = jQuery.extend(
3398
+ new jQuery.Event(),
3399
+ event,
3400
+ { type: type,
3401
+ isSimulated: true,
3402
+ originalEvent: {}
3403
+ }
3404
+ );
3405
+ if ( bubble ) {
3406
+ jQuery.event.trigger( e, null, elem );
3407
+ } else {
3408
+ jQuery.event.dispatch.call( elem, e );
3409
+ }
3410
+ if ( e.isDefaultPrevented() ) {
3411
+ event.preventDefault();
3412
+ }
3413
+ }
3414
+ };
3415
+
3416
+ // Some plugins are using, but it's undocumented/deprecated and will be removed.
3417
+ // The 1.7 special event interface should provide all the hooks needed now.
3418
+ jQuery.event.handle = jQuery.event.dispatch;
3419
+
3420
+ jQuery.removeEvent = document.removeEventListener ?
3421
+ function( elem, type, handle ) {
3422
+ if ( elem.removeEventListener ) {
3423
+ elem.removeEventListener( type, handle, false );
3424
+ }
3425
+ } :
3426
+ function( elem, type, handle ) {
3427
+ if ( elem.detachEvent ) {
3428
+ elem.detachEvent( "on" + type, handle );
3429
+ }
3430
+ };
3431
+
3432
+ jQuery.Event = function( src, props ) {
3433
+ // Allow instantiation without the 'new' keyword
3434
+ if ( !(this instanceof jQuery.Event) ) {
3435
+ return new jQuery.Event( src, props );
3436
+ }
3437
+
3438
+ // Event object
3439
+ if ( src && src.type ) {
3440
+ this.originalEvent = src;
3441
+ this.type = src.type;
3442
+
3443
+ // Events bubbling up the document may have been marked as prevented
3444
+ // by a handler lower down the tree; reflect the correct value.
3445
+ this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
3446
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
3447
+
3448
+ // Event type
3449
+ } else {
3450
+ this.type = src;
3451
+ }
3452
+
3453
+ // Put explicitly provided properties onto the event object
3454
+ if ( props ) {
3455
+ jQuery.extend( this, props );
3456
+ }
3457
+
3458
+ // Create a timestamp if incoming event doesn't have one
3459
+ this.timeStamp = src && src.timeStamp || jQuery.now();
3460
+
3461
+ // Mark it as fixed
3462
+ this[ jQuery.expando ] = true;
3463
+ };
3464
+
3465
+ function returnFalse() {
3466
+ return false;
3467
+ }
3468
+ function returnTrue() {
3469
+ return true;
3470
+ }
3471
+
3472
+ // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
3473
+ // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
3474
+ jQuery.Event.prototype = {
3475
+ preventDefault: function() {
3476
+ this.isDefaultPrevented = returnTrue;
3477
+
3478
+ var e = this.originalEvent;
3479
+ if ( !e ) {
3480
+ return;
3481
+ }
3482
+
3483
+ // if preventDefault exists run it on the original event
3484
+ if ( e.preventDefault ) {
3485
+ e.preventDefault();
3486
+
3487
+ // otherwise set the returnValue property of the original event to false (IE)
3488
+ } else {
3489
+ e.returnValue = false;
3490
+ }
3491
+ },
3492
+ stopPropagation: function() {
3493
+ this.isPropagationStopped = returnTrue;
3494
+
3495
+ var e = this.originalEvent;
3496
+ if ( !e ) {
3497
+ return;
3498
+ }
3499
+ // if stopPropagation exists run it on the original event
3500
+ if ( e.stopPropagation ) {
3501
+ e.stopPropagation();
3502
+ }
3503
+ // otherwise set the cancelBubble property of the original event to true (IE)
3504
+ e.cancelBubble = true;
3505
+ },
3506
+ stopImmediatePropagation: function() {
3507
+ this.isImmediatePropagationStopped = returnTrue;
3508
+ this.stopPropagation();
3509
+ },
3510
+ isDefaultPrevented: returnFalse,
3511
+ isPropagationStopped: returnFalse,
3512
+ isImmediatePropagationStopped: returnFalse
3513
+ };
3514
+
3515
+ // Create mouseenter/leave events using mouseover/out and event-time checks
3516
+ jQuery.each({
3517
+ mouseenter: "mouseover",
3518
+ mouseleave: "mouseout"
3519
+ }, function( orig, fix ) {
3520
+ jQuery.event.special[ orig ] = {
3521
+ delegateType: fix,
3522
+ bindType: fix,
3523
+
3524
+ handle: function( event ) {
3525
+ var target = this,
3526
+ related = event.relatedTarget,
3527
+ handleObj = event.handleObj,
3528
+ selector = handleObj.selector,
3529
+ ret;
3530
+
3531
+ // For mousenter/leave call the handler if related is outside the target.
3532
+ // NB: No relatedTarget if the mouse left/entered the browser window
3533
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
3534
+ event.type = handleObj.origType;
3535
+ ret = handleObj.handler.apply( this, arguments );
3536
+ event.type = fix;
3537
+ }
3538
+ return ret;
3539
+ }
3540
+ };
3541
+ });
3542
+
3543
+ // IE submit delegation
3544
+ if ( !jQuery.support.submitBubbles ) {
3545
+
3546
+ jQuery.event.special.submit = {
3547
+ setup: function() {
3548
+ // Only need this for delegated form submit events
3549
+ if ( jQuery.nodeName( this, "form" ) ) {
3550
+ return false;
3551
+ }
3552
+
3553
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
3554
+ jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
3555
+ // Node name check avoids a VML-related crash in IE (#9807)
3556
+ var elem = e.target,
3557
+ form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
3558
+ if ( form && !form._submit_attached ) {
3559
+ jQuery.event.add( form, "submit._submit", function( event ) {
3560
+ // If form was submitted by the user, bubble the event up the tree
3561
+ if ( this.parentNode && !event.isTrigger ) {
3562
+ jQuery.event.simulate( "submit", this.parentNode, event, true );
3563
+ }
3564
+ });
3565
+ form._submit_attached = true;
3566
+ }
3567
+ });
3568
+ // return undefined since we don't need an event listener
3569
+ },
3570
+
3571
+ teardown: function() {
3572
+ // Only need this for delegated form submit events
3573
+ if ( jQuery.nodeName( this, "form" ) ) {
3574
+ return false;
3575
+ }
3576
+
3577
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
3578
+ jQuery.event.remove( this, "._submit" );
3579
+ }
3580
+ };
3581
+ }
3582
+
3583
+ // IE change delegation and checkbox/radio fix
3584
+ if ( !jQuery.support.changeBubbles ) {
3585
+
3586
+ jQuery.event.special.change = {
3587
+
3588
+ setup: function() {
3589
+
3590
+ if ( rformElems.test( this.nodeName ) ) {
3591
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
3592
+ // after a propertychange. Eat the blur-change in special.change.handle.
3593
+ // This still fires onchange a second time for check/radio after blur.
3594
+ if ( this.type === "checkbox" || this.type === "radio" ) {
3595
+ jQuery.event.add( this, "propertychange._change", function( event ) {
3596
+ if ( event.originalEvent.propertyName === "checked" ) {
3597
+ this._just_changed = true;
3598
+ }
3599
+ });
3600
+ jQuery.event.add( this, "click._change", function( event ) {
3601
+ if ( this._just_changed && !event.isTrigger ) {
3602
+ this._just_changed = false;
3603
+ jQuery.event.simulate( "change", this, event, true );
3604
+ }
3605
+ });
3606
+ }
3607
+ return false;
3608
+ }
3609
+ // Delegated event; lazy-add a change handler on descendant inputs
3610
+ jQuery.event.add( this, "beforeactivate._change", function( e ) {
3611
+ var elem = e.target;
3612
+
3613
+ if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
3614
+ jQuery.event.add( elem, "change._change", function( event ) {
3615
+ if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
3616
+ jQuery.event.simulate( "change", this.parentNode, event, true );
3617
+ }
3618
+ });
3619
+ elem._change_attached = true;
3620
+ }
3621
+ });
3622
+ },
3623
+
3624
+ handle: function( event ) {
3625
+ var elem = event.target;
3626
+
3627
+ // Swallow native change events from checkbox/radio, we already triggered them above
3628
+ if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
3629
+ return event.handleObj.handler.apply( this, arguments );
3630
+ }
3631
+ },
3632
+
3633
+ teardown: function() {
3634
+ jQuery.event.remove( this, "._change" );
3635
+
3636
+ return rformElems.test( this.nodeName );
3637
+ }
3638
+ };
3639
+ }
3640
+
3641
+ // Create "bubbling" focus and blur events
3642
+ if ( !jQuery.support.focusinBubbles ) {
3643
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
3644
+
3645
+ // Attach a single capturing handler while someone wants focusin/focusout
3646
+ var attaches = 0,
3647
+ handler = function( event ) {
3648
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
3649
+ };
3650
+
3651
+ jQuery.event.special[ fix ] = {
3652
+ setup: function() {
3653
+ if ( attaches++ === 0 ) {
3654
+ document.addEventListener( orig, handler, true );
3655
+ }
3656
+ },
3657
+ teardown: function() {
3658
+ if ( --attaches === 0 ) {
3659
+ document.removeEventListener( orig, handler, true );
3660
+ }
3661
+ }
3662
+ };
3663
+ });
3664
+ }
3665
+
3666
+ jQuery.fn.extend({
3667
+
3668
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
3669
+ var origFn, type;
3670
+
3671
+ // Types can be a map of types/handlers
3672
+ if ( typeof types === "object" ) {
3673
+ // ( types-Object, selector, data )
3674
+ if ( typeof selector !== "string" ) {
3675
+ // ( types-Object, data )
3676
+ data = selector;
3677
+ selector = undefined;
3678
+ }
3679
+ for ( type in types ) {
3680
+ this.on( type, selector, data, types[ type ], one );
3681
+ }
3682
+ return this;
3683
+ }
3684
+
3685
+ if ( data == null && fn == null ) {
3686
+ // ( types, fn )
3687
+ fn = selector;
3688
+ data = selector = undefined;
3689
+ } else if ( fn == null ) {
3690
+ if ( typeof selector === "string" ) {
3691
+ // ( types, selector, fn )
3692
+ fn = data;
3693
+ data = undefined;
3694
+ } else {
3695
+ // ( types, data, fn )
3696
+ fn = data;
3697
+ data = selector;
3698
+ selector = undefined;
3699
+ }
3700
+ }
3701
+ if ( fn === false ) {
3702
+ fn = returnFalse;
3703
+ } else if ( !fn ) {
3704
+ return this;
3705
+ }
3706
+
3707
+ if ( one === 1 ) {
3708
+ origFn = fn;
3709
+ fn = function( event ) {
3710
+ // Can use an empty set, since event contains the info
3711
+ jQuery().off( event );
3712
+ return origFn.apply( this, arguments );
3713
+ };
3714
+ // Use same guid so caller can remove using origFn
3715
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
3716
+ }
3717
+ return this.each( function() {
3718
+ jQuery.event.add( this, types, fn, data, selector );
3719
+ });
3720
+ },
3721
+ one: function( types, selector, data, fn ) {
3722
+ return this.on.call( this, types, selector, data, fn, 1 );
3723
+ },
3724
+ off: function( types, selector, fn ) {
3725
+ if ( types && types.preventDefault && types.handleObj ) {
3726
+ // ( event ) dispatched jQuery.Event
3727
+ var handleObj = types.handleObj;
3728
+ jQuery( types.delegateTarget ).off(
3729
+ handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
3730
+ handleObj.selector,
3731
+ handleObj.handler
3732
+ );
3733
+ return this;
3734
+ }
3735
+ if ( typeof types === "object" ) {
3736
+ // ( types-object [, selector] )
3737
+ for ( var type in types ) {
3738
+ this.off( type, selector, types[ type ] );
3739
+ }
3740
+ return this;
3741
+ }
3742
+ if ( selector === false || typeof selector === "function" ) {
3743
+ // ( types [, fn] )
3744
+ fn = selector;
3745
+ selector = undefined;
3746
+ }
3747
+ if ( fn === false ) {
3748
+ fn = returnFalse;
3749
+ }
3750
+ return this.each(function() {
3751
+ jQuery.event.remove( this, types, fn, selector );
3752
+ });
3753
+ },
3754
+
3755
+ bind: function( types, data, fn ) {
3756
+ return this.on( types, null, data, fn );
3757
+ },
3758
+ unbind: function( types, fn ) {
3759
+ return this.off( types, null, fn );
3760
+ },
3761
+
3762
+ live: function( types, data, fn ) {
3763
+ jQuery( this.context ).on( types, this.selector, data, fn );
3764
+ return this;
3765
+ },
3766
+ die: function( types, fn ) {
3767
+ jQuery( this.context ).off( types, this.selector || "**", fn );
3768
+ return this;
3769
+ },
3770
+
3771
+ delegate: function( selector, types, data, fn ) {
3772
+ return this.on( types, selector, data, fn );
3773
+ },
3774
+ undelegate: function( selector, types, fn ) {
3775
+ // ( namespace ) or ( selector, types [, fn] )
3776
+ return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
3777
+ },
3778
+
3779
+ trigger: function( type, data ) {
3780
+ return this.each(function() {
3781
+ jQuery.event.trigger( type, data, this );
3782
+ });
3783
+ },
3784
+ triggerHandler: function( type, data ) {
3785
+ if ( this[0] ) {
3786
+ return jQuery.event.trigger( type, data, this[0], true );
3787
+ }
3788
+ },
3789
+
3790
+ toggle: function( fn ) {
3791
+ // Save reference to arguments for access in closure
3792
+ var args = arguments,
3793
+ guid = fn.guid || jQuery.guid++,
3794
+ i = 0,
3795
+ toggler = function( event ) {
3796
+ // Figure out which function to execute
3797
+ var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
3798
+ jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
3799
+
3800
+ // Make sure that clicks stop
3801
+ event.preventDefault();
3802
+
3803
+ // and execute the function
3804
+ return args[ lastToggle ].apply( this, arguments ) || false;
3805
+ };
3806
+
3807
+ // link all the functions, so any of them can unbind this click handler
3808
+ toggler.guid = guid;
3809
+ while ( i < args.length ) {
3810
+ args[ i++ ].guid = guid;
3811
+ }
3812
+
3813
+ return this.click( toggler );
3814
+ },
3815
+
3816
+ hover: function( fnOver, fnOut ) {
3817
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
3818
+ }
3819
+ });
3820
+
3821
+ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
3822
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
3823
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
3824
+
3825
+ // Handle event binding
3826
+ jQuery.fn[ name ] = function( data, fn ) {
3827
+ if ( fn == null ) {
3828
+ fn = data;
3829
+ data = null;
3830
+ }
3831
+
3832
+ return arguments.length > 0 ?
3833
+ this.on( name, null, data, fn ) :
3834
+ this.trigger( name );
3835
+ };
3836
+
3837
+ if ( jQuery.attrFn ) {
3838
+ jQuery.attrFn[ name ] = true;
3839
+ }
3840
+
3841
+ if ( rkeyEvent.test( name ) ) {
3842
+ jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
3843
+ }
3844
+
3845
+ if ( rmouseEvent.test( name ) ) {
3846
+ jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
3847
+ }
3848
+ });
3849
+
3850
+
3851
+
3852
+ /*!
3853
+ * Sizzle CSS Selector Engine
3854
+ * Copyright 2011, The Dojo Foundation
3855
+ * Released under the MIT, BSD, and GPL Licenses.
3856
+ * More information: http://sizzlejs.com/
3857
+ */
3858
+ (function(){
3859
+
3860
+ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
3861
+ expando = "sizcache" + (Math.random() + '').replace('.', ''),
3862
+ done = 0,
3863
+ toString = Object.prototype.toString,
3864
+ hasDuplicate = false,
3865
+ baseHasDuplicate = true,
3866
+ rBackslash = /\\/g,
3867
+ rReturn = /\r\n/g,
3868
+ rNonWord = /\W/;
3869
+
3870
+ // Here we check if the JavaScript engine is using some sort of
3871
+ // optimization where it does not always call our comparision
3872
+ // function. If that is the case, discard the hasDuplicate value.
3873
+ // Thus far that includes Google Chrome.
3874
+ [0, 0].sort(function() {
3875
+ baseHasDuplicate = false;
3876
+ return 0;
3877
+ });
3878
+
3879
+ var Sizzle = function( selector, context, results, seed ) {
3880
+ results = results || [];
3881
+ context = context || document;
3882
+
3883
+ var origContext = context;
3884
+
3885
+ if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
3886
+ return [];
3887
+ }
3888
+
3889
+ if ( !selector || typeof selector !== "string" ) {
3890
+ return results;
3891
+ }
3892
+
3893
+ var m, set, checkSet, extra, ret, cur, pop, i,
3894
+ prune = true,
3895
+ contextXML = Sizzle.isXML( context ),
3896
+ parts = [],
3897
+ soFar = selector;
3898
+
3899
+ // Reset the position of the chunker regexp (start from head)
3900
+ do {
3901
+ chunker.exec( "" );
3902
+ m = chunker.exec( soFar );
3903
+
3904
+ if ( m ) {
3905
+ soFar = m[3];
3906
+
3907
+ parts.push( m[1] );
3908
+
3909
+ if ( m[2] ) {
3910
+ extra = m[3];
3911
+ break;
3912
+ }
3913
+ }
3914
+ } while ( m );
3915
+
3916
+ if ( parts.length > 1 && origPOS.exec( selector ) ) {
3917
+
3918
+ if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
3919
+ set = posProcess( parts[0] + parts[1], context, seed );
3920
+
3921
+ } else {
3922
+ set = Expr.relative[ parts[0] ] ?
3923
+ [ context ] :
3924
+ Sizzle( parts.shift(), context );
3925
+
3926
+ while ( parts.length ) {
3927
+ selector = parts.shift();
3928
+
3929
+ if ( Expr.relative[ selector ] ) {
3930
+ selector += parts.shift();
3931
+ }
3932
+
3933
+ set = posProcess( selector, set, seed );
3934
+ }
3935
+ }
3936
+
3937
+ } else {
3938
+ // Take a shortcut and set the context if the root selector is an ID
3939
+ // (but not if it'll be faster if the inner selector is an ID)
3940
+ if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
3941
+ Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
3942
+
3943
+ ret = Sizzle.find( parts.shift(), context, contextXML );
3944
+ context = ret.expr ?
3945
+ Sizzle.filter( ret.expr, ret.set )[0] :
3946
+ ret.set[0];
3947
+ }
3948
+
3949
+ if ( context ) {
3950
+ ret = seed ?
3951
+ { expr: parts.pop(), set: makeArray(seed) } :
3952
+ Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
3953
+
3954
+ set = ret.expr ?
3955
+ Sizzle.filter( ret.expr, ret.set ) :
3956
+ ret.set;
3957
+
3958
+ if ( parts.length > 0 ) {
3959
+ checkSet = makeArray( set );
3960
+
3961
+ } else {
3962
+ prune = false;
3963
+ }
3964
+
3965
+ while ( parts.length ) {
3966
+ cur = parts.pop();
3967
+ pop = cur;
3968
+
3969
+ if ( !Expr.relative[ cur ] ) {
3970
+ cur = "";
3971
+ } else {
3972
+ pop = parts.pop();
3973
+ }
3974
+
3975
+ if ( pop == null ) {
3976
+ pop = context;
3977
+ }
3978
+
3979
+ Expr.relative[ cur ]( checkSet, pop, contextXML );
3980
+ }
3981
+
3982
+ } else {
3983
+ checkSet = parts = [];
3984
+ }
3985
+ }
3986
+
3987
+ if ( !checkSet ) {
3988
+ checkSet = set;
3989
+ }
3990
+
3991
+ if ( !checkSet ) {
3992
+ Sizzle.error( cur || selector );
3993
+ }
3994
+
3995
+ if ( toString.call(checkSet) === "[object Array]" ) {
3996
+ if ( !prune ) {
3997
+ results.push.apply( results, checkSet );
3998
+
3999
+ } else if ( context && context.nodeType === 1 ) {
4000
+ for ( i = 0; checkSet[i] != null; i++ ) {
4001
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
4002
+ results.push( set[i] );
4003
+ }
4004
+ }
4005
+
4006
+ } else {
4007
+ for ( i = 0; checkSet[i] != null; i++ ) {
4008
+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
4009
+ results.push( set[i] );
4010
+ }
4011
+ }
4012
+ }
4013
+
4014
+ } else {
4015
+ makeArray( checkSet, results );
4016
+ }
4017
+
4018
+ if ( extra ) {
4019
+ Sizzle( extra, origContext, results, seed );
4020
+ Sizzle.uniqueSort( results );
4021
+ }
4022
+
4023
+ return results;
4024
+ };
4025
+
4026
+ Sizzle.uniqueSort = function( results ) {
4027
+ if ( sortOrder ) {
4028
+ hasDuplicate = baseHasDuplicate;
4029
+ results.sort( sortOrder );
4030
+
4031
+ if ( hasDuplicate ) {
4032
+ for ( var i = 1; i < results.length; i++ ) {
4033
+ if ( results[i] === results[ i - 1 ] ) {
4034
+ results.splice( i--, 1 );
4035
+ }
4036
+ }
4037
+ }
4038
+ }
4039
+
4040
+ return results;
4041
+ };
4042
+
4043
+ Sizzle.matches = function( expr, set ) {
4044
+ return Sizzle( expr, null, null, set );
4045
+ };
4046
+
4047
+ Sizzle.matchesSelector = function( node, expr ) {
4048
+ return Sizzle( expr, null, null, [node] ).length > 0;
4049
+ };
4050
+
4051
+ Sizzle.find = function( expr, context, isXML ) {
4052
+ var set, i, len, match, type, left;
4053
+
4054
+ if ( !expr ) {
4055
+ return [];
4056
+ }
4057
+
4058
+ for ( i = 0, len = Expr.order.length; i < len; i++ ) {
4059
+ type = Expr.order[i];
4060
+
4061
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
4062
+ left = match[1];
4063
+ match.splice( 1, 1 );
4064
+
4065
+ if ( left.substr( left.length - 1 ) !== "\\" ) {
4066
+ match[1] = (match[1] || "").replace( rBackslash, "" );
4067
+ set = Expr.find[ type ]( match, context, isXML );
4068
+
4069
+ if ( set != null ) {
4070
+ expr = expr.replace( Expr.match[ type ], "" );
4071
+ break;
4072
+ }
4073
+ }
4074
+ }
4075
+ }
4076
+
4077
+ if ( !set ) {
4078
+ set = typeof context.getElementsByTagName !== "undefined" ?
4079
+ context.getElementsByTagName( "*" ) :
4080
+ [];
4081
+ }
4082
+
4083
+ return { set: set, expr: expr };
4084
+ };
4085
+
4086
+ Sizzle.filter = function( expr, set, inplace, not ) {
4087
+ var match, anyFound,
4088
+ type, found, item, filter, left,
4089
+ i, pass,
4090
+ old = expr,
4091
+ result = [],
4092
+ curLoop = set,
4093
+ isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
4094
+
4095
+ while ( expr && set.length ) {
4096
+ for ( type in Expr.filter ) {
4097
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
4098
+ filter = Expr.filter[ type ];
4099
+ left = match[1];
4100
+
4101
+ anyFound = false;
4102
+
4103
+ match.splice(1,1);
4104
+
4105
+ if ( left.substr( left.length - 1 ) === "\\" ) {
4106
+ continue;
4107
+ }
4108
+
4109
+ if ( curLoop === result ) {
4110
+ result = [];
4111
+ }
4112
+
4113
+ if ( Expr.preFilter[ type ] ) {
4114
+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
4115
+
4116
+ if ( !match ) {
4117
+ anyFound = found = true;
4118
+
4119
+ } else if ( match === true ) {
4120
+ continue;
4121
+ }
4122
+ }
4123
+
4124
+ if ( match ) {
4125
+ for ( i = 0; (item = curLoop[i]) != null; i++ ) {
4126
+ if ( item ) {
4127
+ found = filter( item, match, i, curLoop );
4128
+ pass = not ^ found;
4129
+
4130
+ if ( inplace && found != null ) {
4131
+ if ( pass ) {
4132
+ anyFound = true;
4133
+
4134
+ } else {
4135
+ curLoop[i] = false;
4136
+ }
4137
+
4138
+ } else if ( pass ) {
4139
+ result.push( item );
4140
+ anyFound = true;
4141
+ }
4142
+ }
4143
+ }
4144
+ }
4145
+
4146
+ if ( found !== undefined ) {
4147
+ if ( !inplace ) {
4148
+ curLoop = result;
4149
+ }
4150
+
4151
+ expr = expr.replace( Expr.match[ type ], "" );
4152
+
4153
+ if ( !anyFound ) {
4154
+ return [];
4155
+ }
4156
+
4157
+ break;
4158
+ }
4159
+ }
4160
+ }
4161
+
4162
+ // Improper expression
4163
+ if ( expr === old ) {
4164
+ if ( anyFound == null ) {
4165
+ Sizzle.error( expr );
4166
+
4167
+ } else {
4168
+ break;
4169
+ }
4170
+ }
4171
+
4172
+ old = expr;
4173
+ }
4174
+
4175
+ return curLoop;
4176
+ };
4177
+
4178
+ Sizzle.error = function( msg ) {
4179
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
4180
+ };
4181
+
4182
+ /**
4183
+ * Utility function for retreiving the text value of an array of DOM nodes
4184
+ * @param {Array|Element} elem
4185
+ */
4186
+ var getText = Sizzle.getText = function( elem ) {
4187
+ var i, node,
4188
+ nodeType = elem.nodeType,
4189
+ ret = "";
4190
+
4191
+ if ( nodeType ) {
4192
+ if ( nodeType === 1 || nodeType === 9 ) {
4193
+ // Use textContent || innerText for elements
4194
+ if ( typeof elem.textContent === 'string' ) {
4195
+ return elem.textContent;
4196
+ } else if ( typeof elem.innerText === 'string' ) {
4197
+ // Replace IE's carriage returns
4198
+ return elem.innerText.replace( rReturn, '' );
4199
+ } else {
4200
+ // Traverse it's children
4201
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
4202
+ ret += getText( elem );
4203
+ }
4204
+ }
4205
+ } else if ( nodeType === 3 || nodeType === 4 ) {
4206
+ return elem.nodeValue;
4207
+ }
4208
+ } else {
4209
+
4210
+ // If no nodeType, this is expected to be an array
4211
+ for ( i = 0; (node = elem[i]); i++ ) {
4212
+ // Do not traverse comment nodes
4213
+ if ( node.nodeType !== 8 ) {
4214
+ ret += getText( node );
4215
+ }
4216
+ }
4217
+ }
4218
+ return ret;
4219
+ };
4220
+
4221
+ var Expr = Sizzle.selectors = {
4222
+ order: [ "ID", "NAME", "TAG" ],
4223
+
4224
+ match: {
4225
+ ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
4226
+ CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
4227
+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
4228
+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
4229
+ TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
4230
+ CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
4231
+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
4232
+ PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
4233
+ },
4234
+
4235
+ leftMatch: {},
4236
+
4237
+ attrMap: {
4238
+ "class": "className",
4239
+ "for": "htmlFor"
4240
+ },
4241
+
4242
+ attrHandle: {
4243
+ href: function( elem ) {
4244
+ return elem.getAttribute( "href" );
4245
+ },
4246
+ type: function( elem ) {
4247
+ return elem.getAttribute( "type" );
4248
+ }
4249
+ },
4250
+
4251
+ relative: {
4252
+ "+": function(checkSet, part){
4253
+ var isPartStr = typeof part === "string",
4254
+ isTag = isPartStr && !rNonWord.test( part ),
4255
+ isPartStrNotTag = isPartStr && !isTag;
4256
+
4257
+ if ( isTag ) {
4258
+ part = part.toLowerCase();
4259
+ }
4260
+
4261
+ for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
4262
+ if ( (elem = checkSet[i]) ) {
4263
+ while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
4264
+
4265
+ checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
4266
+ elem || false :
4267
+ elem === part;
4268
+ }
4269
+ }
4270
+
4271
+ if ( isPartStrNotTag ) {
4272
+ Sizzle.filter( part, checkSet, true );
4273
+ }
4274
+ },
4275
+
4276
+ ">": function( checkSet, part ) {
4277
+ var elem,
4278
+ isPartStr = typeof part === "string",
4279
+ i = 0,
4280
+ l = checkSet.length;
4281
+
4282
+ if ( isPartStr && !rNonWord.test( part ) ) {
4283
+ part = part.toLowerCase();
4284
+
4285
+ for ( ; i < l; i++ ) {
4286
+ elem = checkSet[i];
4287
+
4288
+ if ( elem ) {
4289
+ var parent = elem.parentNode;
4290
+ checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
4291
+ }
4292
+ }
4293
+
4294
+ } else {
4295
+ for ( ; i < l; i++ ) {
4296
+ elem = checkSet[i];
4297
+
4298
+ if ( elem ) {
4299
+ checkSet[i] = isPartStr ?
4300
+ elem.parentNode :
4301
+ elem.parentNode === part;
4302
+ }
4303
+ }
4304
+
4305
+ if ( isPartStr ) {
4306
+ Sizzle.filter( part, checkSet, true );
4307
+ }
4308
+ }
4309
+ },
4310
+
4311
+ "": function(checkSet, part, isXML){
4312
+ var nodeCheck,
4313
+ doneName = done++,
4314
+ checkFn = dirCheck;
4315
+
4316
+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
4317
+ part = part.toLowerCase();
4318
+ nodeCheck = part;
4319
+ checkFn = dirNodeCheck;
4320
+ }
4321
+
4322
+ checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
4323
+ },
4324
+
4325
+ "~": function( checkSet, part, isXML ) {
4326
+ var nodeCheck,
4327
+ doneName = done++,
4328
+ checkFn = dirCheck;
4329
+
4330
+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
4331
+ part = part.toLowerCase();
4332
+ nodeCheck = part;
4333
+ checkFn = dirNodeCheck;
4334
+ }
4335
+
4336
+ checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
4337
+ }
4338
+ },
4339
+
4340
+ find: {
4341
+ ID: function( match, context, isXML ) {
4342
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
4343
+ var m = context.getElementById(match[1]);
4344
+ // Check parentNode to catch when Blackberry 4.6 returns
4345
+ // nodes that are no longer in the document #6963
4346
+ return m && m.parentNode ? [m] : [];
4347
+ }
4348
+ },
4349
+
4350
+ NAME: function( match, context ) {
4351
+ if ( typeof context.getElementsByName !== "undefined" ) {
4352
+ var ret = [],
4353
+ results = context.getElementsByName( match[1] );
4354
+
4355
+ for ( var i = 0, l = results.length; i < l; i++ ) {
4356
+ if ( results[i].getAttribute("name") === match[1] ) {
4357
+ ret.push( results[i] );
4358
+ }
4359
+ }
4360
+
4361
+ return ret.length === 0 ? null : ret;
4362
+ }
4363
+ },
4364
+
4365
+ TAG: function( match, context ) {
4366
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
4367
+ return context.getElementsByTagName( match[1] );
4368
+ }
4369
+ }
4370
+ },
4371
+ preFilter: {
4372
+ CLASS: function( match, curLoop, inplace, result, not, isXML ) {
4373
+ match = " " + match[1].replace( rBackslash, "" ) + " ";
4374
+
4375
+ if ( isXML ) {
4376
+ return match;
4377
+ }
4378
+
4379
+ for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
4380
+ if ( elem ) {
4381
+ if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
4382
+ if ( !inplace ) {
4383
+ result.push( elem );
4384
+ }
4385
+
4386
+ } else if ( inplace ) {
4387
+ curLoop[i] = false;
4388
+ }
4389
+ }
4390
+ }
4391
+
4392
+ return false;
4393
+ },
4394
+
4395
+ ID: function( match ) {
4396
+ return match[1].replace( rBackslash, "" );
4397
+ },
4398
+
4399
+ TAG: function( match, curLoop ) {
4400
+ return match[1].replace( rBackslash, "" ).toLowerCase();
4401
+ },
4402
+
4403
+ CHILD: function( match ) {
4404
+ if ( match[1] === "nth" ) {
4405
+ if ( !match[2] ) {
4406
+ Sizzle.error( match[0] );
4407
+ }
4408
+
4409
+ match[2] = match[2].replace(/^\+|\s*/g, '');
4410
+
4411
+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
4412
+ var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
4413
+ match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
4414
+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
4415
+
4416
+ // calculate the numbers (first)n+(last) including if they are negative
4417
+ match[2] = (test[1] + (test[2] || 1)) - 0;
4418
+ match[3] = test[3] - 0;
4419
+ }
4420
+ else if ( match[2] ) {
4421
+ Sizzle.error( match[0] );
4422
+ }
4423
+
4424
+ // TODO: Move to normal caching system
4425
+ match[0] = done++;
4426
+
4427
+ return match;
4428
+ },
4429
+
4430
+ ATTR: function( match, curLoop, inplace, result, not, isXML ) {
4431
+ var name = match[1] = match[1].replace( rBackslash, "" );
4432
+
4433
+ if ( !isXML && Expr.attrMap[name] ) {
4434
+ match[1] = Expr.attrMap[name];
4435
+ }
4436
+
4437
+ // Handle if an un-quoted value was used
4438
+ match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
4439
+
4440
+ if ( match[2] === "~=" ) {
4441
+ match[4] = " " + match[4] + " ";
4442
+ }
4443
+
4444
+ return match;
4445
+ },
4446
+
4447
+ PSEUDO: function( match, curLoop, inplace, result, not ) {
4448
+ if ( match[1] === "not" ) {
4449
+ // If we're dealing with a complex expression, or a simple one
4450
+ if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
4451
+ match[3] = Sizzle(match[3], null, null, curLoop);
4452
+
4453
+ } else {
4454
+ var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
4455
+
4456
+ if ( !inplace ) {
4457
+ result.push.apply( result, ret );
4458
+ }
4459
+
4460
+ return false;
4461
+ }
4462
+
4463
+ } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
4464
+ return true;
4465
+ }
4466
+
4467
+ return match;
4468
+ },
4469
+
4470
+ POS: function( match ) {
4471
+ match.unshift( true );
4472
+
4473
+ return match;
4474
+ }
4475
+ },
4476
+
4477
+ filters: {
4478
+ enabled: function( elem ) {
4479
+ return elem.disabled === false && elem.type !== "hidden";
4480
+ },
4481
+
4482
+ disabled: function( elem ) {
4483
+ return elem.disabled === true;
4484
+ },
4485
+
4486
+ checked: function( elem ) {
4487
+ return elem.checked === true;
4488
+ },
4489
+
4490
+ selected: function( elem ) {
4491
+ // Accessing this property makes selected-by-default
4492
+ // options in Safari work properly
4493
+ if ( elem.parentNode ) {
4494
+ elem.parentNode.selectedIndex;
4495
+ }
4496
+
4497
+ return elem.selected === true;
4498
+ },
4499
+
4500
+ parent: function( elem ) {
4501
+ return !!elem.firstChild;
4502
+ },
4503
+
4504
+ empty: function( elem ) {
4505
+ return !elem.firstChild;
4506
+ },
4507
+
4508
+ has: function( elem, i, match ) {
4509
+ return !!Sizzle( match[3], elem ).length;
4510
+ },
4511
+
4512
+ header: function( elem ) {
4513
+ return (/h\d/i).test( elem.nodeName );
4514
+ },
4515
+
4516
+ text: function( elem ) {
4517
+ var attr = elem.getAttribute( "type" ), type = elem.type;
4518
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
4519
+ // use getAttribute instead to test this case
4520
+ return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
4521
+ },
4522
+
4523
+ radio: function( elem ) {
4524
+ return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
4525
+ },
4526
+
4527
+ checkbox: function( elem ) {
4528
+ return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
4529
+ },
4530
+
4531
+ file: function( elem ) {
4532
+ return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
4533
+ },
4534
+
4535
+ password: function( elem ) {
4536
+ return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
4537
+ },
4538
+
4539
+ submit: function( elem ) {
4540
+ var name = elem.nodeName.toLowerCase();
4541
+ return (name === "input" || name === "button") && "submit" === elem.type;
4542
+ },
4543
+
4544
+ image: function( elem ) {
4545
+ return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
4546
+ },
4547
+
4548
+ reset: function( elem ) {
4549
+ var name = elem.nodeName.toLowerCase();
4550
+ return (name === "input" || name === "button") && "reset" === elem.type;
4551
+ },
4552
+
4553
+ button: function( elem ) {
4554
+ var name = elem.nodeName.toLowerCase();
4555
+ return name === "input" && "button" === elem.type || name === "button";
4556
+ },
4557
+
4558
+ input: function( elem ) {
4559
+ return (/input|select|textarea|button/i).test( elem.nodeName );
4560
+ },
4561
+
4562
+ focus: function( elem ) {
4563
+ return elem === elem.ownerDocument.activeElement;
4564
+ }
4565
+ },
4566
+ setFilters: {
4567
+ first: function( elem, i ) {
4568
+ return i === 0;
4569
+ },
4570
+
4571
+ last: function( elem, i, match, array ) {
4572
+ return i === array.length - 1;
4573
+ },
4574
+
4575
+ even: function( elem, i ) {
4576
+ return i % 2 === 0;
4577
+ },
4578
+
4579
+ odd: function( elem, i ) {
4580
+ return i % 2 === 1;
4581
+ },
4582
+
4583
+ lt: function( elem, i, match ) {
4584
+ return i < match[3] - 0;
4585
+ },
4586
+
4587
+ gt: function( elem, i, match ) {
4588
+ return i > match[3] - 0;
4589
+ },
4590
+
4591
+ nth: function( elem, i, match ) {
4592
+ return match[3] - 0 === i;
4593
+ },
4594
+
4595
+ eq: function( elem, i, match ) {
4596
+ return match[3] - 0 === i;
4597
+ }
4598
+ },
4599
+ filter: {
4600
+ PSEUDO: function( elem, match, i, array ) {
4601
+ var name = match[1],
4602
+ filter = Expr.filters[ name ];
4603
+
4604
+ if ( filter ) {
4605
+ return filter( elem, i, match, array );
4606
+
4607
+ } else if ( name === "contains" ) {
4608
+ return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
4609
+
4610
+ } else if ( name === "not" ) {
4611
+ var not = match[3];
4612
+
4613
+ for ( var j = 0, l = not.length; j < l; j++ ) {
4614
+ if ( not[j] === elem ) {
4615
+ return false;
4616
+ }
4617
+ }
4618
+
4619
+ return true;
4620
+
4621
+ } else {
4622
+ Sizzle.error( name );
4623
+ }
4624
+ },
4625
+
4626
+ CHILD: function( elem, match ) {
4627
+ var first, last,
4628
+ doneName, parent, cache,
4629
+ count, diff,
4630
+ type = match[1],
4631
+ node = elem;
4632
+
4633
+ switch ( type ) {
4634
+ case "only":
4635
+ case "first":
4636
+ while ( (node = node.previousSibling) ) {
4637
+ if ( node.nodeType === 1 ) {
4638
+ return false;
4639
+ }
4640
+ }
4641
+
4642
+ if ( type === "first" ) {
4643
+ return true;
4644
+ }
4645
+
4646
+ node = elem;
4647
+
4648
+ case "last":
4649
+ while ( (node = node.nextSibling) ) {
4650
+ if ( node.nodeType === 1 ) {
4651
+ return false;
4652
+ }
4653
+ }
4654
+
4655
+ return true;
4656
+
4657
+ case "nth":
4658
+ first = match[2];
4659
+ last = match[3];
4660
+
4661
+ if ( first === 1 && last === 0 ) {
4662
+ return true;
4663
+ }
4664
+
4665
+ doneName = match[0];
4666
+ parent = elem.parentNode;
4667
+
4668
+ if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
4669
+ count = 0;
4670
+
4671
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
4672
+ if ( node.nodeType === 1 ) {
4673
+ node.nodeIndex = ++count;
4674
+ }
4675
+ }
4676
+
4677
+ parent[ expando ] = doneName;
4678
+ }
4679
+
4680
+ diff = elem.nodeIndex - last;
4681
+
4682
+ if ( first === 0 ) {
4683
+ return diff === 0;
4684
+
4685
+ } else {
4686
+ return ( diff % first === 0 && diff / first >= 0 );
4687
+ }
4688
+ }
4689
+ },
4690
+
4691
+ ID: function( elem, match ) {
4692
+ return elem.nodeType === 1 && elem.getAttribute("id") === match;
4693
+ },
4694
+
4695
+ TAG: function( elem, match ) {
4696
+ return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
4697
+ },
4698
+
4699
+ CLASS: function( elem, match ) {
4700
+ return (" " + (elem.className || elem.getAttribute("class")) + " ")
4701
+ .indexOf( match ) > -1;
4702
+ },
4703
+
4704
+ ATTR: function( elem, match ) {
4705
+ var name = match[1],
4706
+ result = Sizzle.attr ?
4707
+ Sizzle.attr( elem, name ) :
4708
+ Expr.attrHandle[ name ] ?
4709
+ Expr.attrHandle[ name ]( elem ) :
4710
+ elem[ name ] != null ?
4711
+ elem[ name ] :
4712
+ elem.getAttribute( name ),
4713
+ value = result + "",
4714
+ type = match[2],
4715
+ check = match[4];
4716
+
4717
+ return result == null ?
4718
+ type === "!=" :
4719
+ !type && Sizzle.attr ?
4720
+ result != null :
4721
+ type === "=" ?
4722
+ value === check :
4723
+ type === "*=" ?
4724
+ value.indexOf(check) >= 0 :
4725
+ type === "~=" ?
4726
+ (" " + value + " ").indexOf(check) >= 0 :
4727
+ !check ?
4728
+ value && result !== false :
4729
+ type === "!=" ?
4730
+ value !== check :
4731
+ type === "^=" ?
4732
+ value.indexOf(check) === 0 :
4733
+ type === "$=" ?
4734
+ value.substr(value.length - check.length) === check :
4735
+ type === "|=" ?
4736
+ value === check || value.substr(0, check.length + 1) === check + "-" :
4737
+ false;
4738
+ },
4739
+
4740
+ POS: function( elem, match, i, array ) {
4741
+ var name = match[2],
4742
+ filter = Expr.setFilters[ name ];
4743
+
4744
+ if ( filter ) {
4745
+ return filter( elem, i, match, array );
4746
+ }
4747
+ }
4748
+ }
4749
+ };
4750
+
4751
+ var origPOS = Expr.match.POS,
4752
+ fescape = function(all, num){
4753
+ return "\\" + (num - 0 + 1);
4754
+ };
4755
+
4756
+ for ( var type in Expr.match ) {
4757
+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
4758
+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
4759
+ }
4760
+
4761
+ var makeArray = function( array, results ) {
4762
+ array = Array.prototype.slice.call( array, 0 );
4763
+
4764
+ if ( results ) {
4765
+ results.push.apply( results, array );
4766
+ return results;
4767
+ }
4768
+
4769
+ return array;
4770
+ };
4771
+
4772
+ // Perform a simple check to determine if the browser is capable of
4773
+ // converting a NodeList to an array using builtin methods.
4774
+ // Also verifies that the returned array holds DOM nodes
4775
+ // (which is not the case in the Blackberry browser)
4776
+ try {
4777
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
4778
+
4779
+ // Provide a fallback method if it does not work
4780
+ } catch( e ) {
4781
+ makeArray = function( array, results ) {
4782
+ var i = 0,
4783
+ ret = results || [];
4784
+
4785
+ if ( toString.call(array) === "[object Array]" ) {
4786
+ Array.prototype.push.apply( ret, array );
4787
+
4788
+ } else {
4789
+ if ( typeof array.length === "number" ) {
4790
+ for ( var l = array.length; i < l; i++ ) {
4791
+ ret.push( array[i] );
4792
+ }
4793
+
4794
+ } else {
4795
+ for ( ; array[i]; i++ ) {
4796
+ ret.push( array[i] );
4797
+ }
4798
+ }
4799
+ }
4800
+
4801
+ return ret;
4802
+ };
4803
+ }
4804
+
4805
+ var sortOrder, siblingCheck;
4806
+
4807
+ if ( document.documentElement.compareDocumentPosition ) {
4808
+ sortOrder = function( a, b ) {
4809
+ if ( a === b ) {
4810
+ hasDuplicate = true;
4811
+ return 0;
4812
+ }
4813
+
4814
+ if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
4815
+ return a.compareDocumentPosition ? -1 : 1;
4816
+ }
4817
+
4818
+ return a.compareDocumentPosition(b) & 4 ? -1 : 1;
4819
+ };
4820
+
4821
+ } else {
4822
+ sortOrder = function( a, b ) {
4823
+ // The nodes are identical, we can exit early
4824
+ if ( a === b ) {
4825
+ hasDuplicate = true;
4826
+ return 0;
4827
+
4828
+ // Fallback to using sourceIndex (in IE) if it's available on both nodes
4829
+ } else if ( a.sourceIndex && b.sourceIndex ) {
4830
+ return a.sourceIndex - b.sourceIndex;
4831
+ }
4832
+
4833
+ var al, bl,
4834
+ ap = [],
4835
+ bp = [],
4836
+ aup = a.parentNode,
4837
+ bup = b.parentNode,
4838
+ cur = aup;
4839
+
4840
+ // If the nodes are siblings (or identical) we can do a quick check
4841
+ if ( aup === bup ) {
4842
+ return siblingCheck( a, b );
4843
+
4844
+ // If no parents were found then the nodes are disconnected
4845
+ } else if ( !aup ) {
4846
+ return -1;
4847
+
4848
+ } else if ( !bup ) {
4849
+ return 1;
4850
+ }
4851
+
4852
+ // Otherwise they're somewhere else in the tree so we need
4853
+ // to build up a full list of the parentNodes for comparison
4854
+ while ( cur ) {
4855
+ ap.unshift( cur );
4856
+ cur = cur.parentNode;
4857
+ }
4858
+
4859
+ cur = bup;
4860
+
4861
+ while ( cur ) {
4862
+ bp.unshift( cur );
4863
+ cur = cur.parentNode;
4864
+ }
4865
+
4866
+ al = ap.length;
4867
+ bl = bp.length;
4868
+
4869
+ // Start walking down the tree looking for a discrepancy
4870
+ for ( var i = 0; i < al && i < bl; i++ ) {
4871
+ if ( ap[i] !== bp[i] ) {
4872
+ return siblingCheck( ap[i], bp[i] );
4873
+ }
4874
+ }
4875
+
4876
+ // We ended someplace up the tree so do a sibling check
4877
+ return i === al ?
4878
+ siblingCheck( a, bp[i], -1 ) :
4879
+ siblingCheck( ap[i], b, 1 );
4880
+ };
4881
+
4882
+ siblingCheck = function( a, b, ret ) {
4883
+ if ( a === b ) {
4884
+ return ret;
4885
+ }
4886
+
4887
+ var cur = a.nextSibling;
4888
+
4889
+ while ( cur ) {
4890
+ if ( cur === b ) {
4891
+ return -1;
4892
+ }
4893
+
4894
+ cur = cur.nextSibling;
4895
+ }
4896
+
4897
+ return 1;
4898
+ };
4899
+ }
4900
+
4901
+ // Check to see if the browser returns elements by name when
4902
+ // querying by getElementById (and provide a workaround)
4903
+ (function(){
4904
+ // We're going to inject a fake input element with a specified name
4905
+ var form = document.createElement("div"),
4906
+ id = "script" + (new Date()).getTime(),
4907
+ root = document.documentElement;
4908
+
4909
+ form.innerHTML = "<a name='" + id + "'/>";
4910
+
4911
+ // Inject it into the root element, check its status, and remove it quickly
4912
+ root.insertBefore( form, root.firstChild );
4913
+
4914
+ // The workaround has to do additional checks after a getElementById
4915
+ // Which slows things down for other browsers (hence the branching)
4916
+ if ( document.getElementById( id ) ) {
4917
+ Expr.find.ID = function( match, context, isXML ) {
4918
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
4919
+ var m = context.getElementById(match[1]);
4920
+
4921
+ return m ?
4922
+ m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
4923
+ [m] :
4924
+ undefined :
4925
+ [];
4926
+ }
4927
+ };
4928
+
4929
+ Expr.filter.ID = function( elem, match ) {
4930
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
4931
+
4932
+ return elem.nodeType === 1 && node && node.nodeValue === match;
4933
+ };
4934
+ }
4935
+
4936
+ root.removeChild( form );
4937
+
4938
+ // release memory in IE
4939
+ root = form = null;
4940
+ })();
4941
+
4942
+ (function(){
4943
+ // Check to see if the browser returns only elements
4944
+ // when doing getElementsByTagName("*")
4945
+
4946
+ // Create a fake element
4947
+ var div = document.createElement("div");
4948
+ div.appendChild( document.createComment("") );
4949
+
4950
+ // Make sure no comments are found
4951
+ if ( div.getElementsByTagName("*").length > 0 ) {
4952
+ Expr.find.TAG = function( match, context ) {
4953
+ var results = context.getElementsByTagName( match[1] );
4954
+
4955
+ // Filter out possible comments
4956
+ if ( match[1] === "*" ) {
4957
+ var tmp = [];
4958
+
4959
+ for ( var i = 0; results[i]; i++ ) {
4960
+ if ( results[i].nodeType === 1 ) {
4961
+ tmp.push( results[i] );
4962
+ }
4963
+ }
4964
+
4965
+ results = tmp;
4966
+ }
4967
+
4968
+ return results;
4969
+ };
4970
+ }
4971
+
4972
+ // Check to see if an attribute returns normalized href attributes
4973
+ div.innerHTML = "<a href='#'></a>";
4974
+
4975
+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
4976
+ div.firstChild.getAttribute("href") !== "#" ) {
4977
+
4978
+ Expr.attrHandle.href = function( elem ) {
4979
+ return elem.getAttribute( "href", 2 );
4980
+ };
4981
+ }
4982
+
4983
+ // release memory in IE
4984
+ div = null;
4985
+ })();
4986
+
4987
+ if ( document.querySelectorAll ) {
4988
+ (function(){
4989
+ var oldSizzle = Sizzle,
4990
+ div = document.createElement("div"),
4991
+ id = "__sizzle__";
4992
+
4993
+ div.innerHTML = "<p class='TEST'></p>";
4994
+
4995
+ // Safari can't handle uppercase or unicode characters when
4996
+ // in quirks mode.
4997
+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
4998
+ return;
4999
+ }
5000
+
5001
+ Sizzle = function( query, context, extra, seed ) {
5002
+ context = context || document;
5003
+
5004
+ // Only use querySelectorAll on non-XML documents
5005
+ // (ID selectors don't work in non-HTML documents)
5006
+ if ( !seed && !Sizzle.isXML(context) ) {
5007
+ // See if we find a selector to speed up
5008
+ var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
5009
+
5010
+ if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
5011
+ // Speed-up: Sizzle("TAG")
5012
+ if ( match[1] ) {
5013
+ return makeArray( context.getElementsByTagName( query ), extra );
5014
+
5015
+ // Speed-up: Sizzle(".CLASS")
5016
+ } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
5017
+ return makeArray( context.getElementsByClassName( match[2] ), extra );
5018
+ }
5019
+ }
5020
+
5021
+ if ( context.nodeType === 9 ) {
5022
+ // Speed-up: Sizzle("body")
5023
+ // The body element only exists once, optimize finding it
5024
+ if ( query === "body" && context.body ) {
5025
+ return makeArray( [ context.body ], extra );
5026
+
5027
+ // Speed-up: Sizzle("#ID")
5028
+ } else if ( match && match[3] ) {
5029
+ var elem = context.getElementById( match[3] );
5030
+
5031
+ // Check parentNode to catch when Blackberry 4.6 returns
5032
+ // nodes that are no longer in the document #6963
5033
+ if ( elem && elem.parentNode ) {
5034
+ // Handle the case where IE and Opera return items
5035
+ // by name instead of ID
5036
+ if ( elem.id === match[3] ) {
5037
+ return makeArray( [ elem ], extra );
5038
+ }
5039
+
5040
+ } else {
5041
+ return makeArray( [], extra );
5042
+ }
5043
+ }
5044
+
5045
+ try {
5046
+ return makeArray( context.querySelectorAll(query), extra );
5047
+ } catch(qsaError) {}
5048
+
5049
+ // qSA works strangely on Element-rooted queries
5050
+ // We can work around this by specifying an extra ID on the root
5051
+ // and working up from there (Thanks to Andrew Dupont for the technique)
5052
+ // IE 8 doesn't work on object elements
5053
+ } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
5054
+ var oldContext = context,
5055
+ old = context.getAttribute( "id" ),
5056
+ nid = old || id,
5057
+ hasParent = context.parentNode,
5058
+ relativeHierarchySelector = /^\s*[+~]/.test( query );
5059
+
5060
+ if ( !old ) {
5061
+ context.setAttribute( "id", nid );
5062
+ } else {
5063
+ nid = nid.replace( /'/g, "\\$&" );
5064
+ }
5065
+ if ( relativeHierarchySelector && hasParent ) {
5066
+ context = context.parentNode;
5067
+ }
5068
+
5069
+ try {
5070
+ if ( !relativeHierarchySelector || hasParent ) {
5071
+ return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
5072
+ }
5073
+
5074
+ } catch(pseudoError) {
5075
+ } finally {
5076
+ if ( !old ) {
5077
+ oldContext.removeAttribute( "id" );
5078
+ }
5079
+ }
5080
+ }
5081
+ }
5082
+
5083
+ return oldSizzle(query, context, extra, seed);
5084
+ };
5085
+
5086
+ for ( var prop in oldSizzle ) {
5087
+ Sizzle[ prop ] = oldSizzle[ prop ];
5088
+ }
5089
+
5090
+ // release memory in IE
5091
+ div = null;
5092
+ })();
5093
+ }
5094
+
5095
+ (function(){
5096
+ var html = document.documentElement,
5097
+ matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
5098
+
5099
+ if ( matches ) {
5100
+ // Check to see if it's possible to do matchesSelector
5101
+ // on a disconnected node (IE 9 fails this)
5102
+ var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
5103
+ pseudoWorks = false;
5104
+
5105
+ try {
5106
+ // This should fail with an exception
5107
+ // Gecko does not error, returns false instead
5108
+ matches.call( document.documentElement, "[test!='']:sizzle" );
5109
+
5110
+ } catch( pseudoError ) {
5111
+ pseudoWorks = true;
5112
+ }
5113
+
5114
+ Sizzle.matchesSelector = function( node, expr ) {
5115
+ // Make sure that attribute selectors are quoted
5116
+ expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
5117
+
5118
+ if ( !Sizzle.isXML( node ) ) {
5119
+ try {
5120
+ if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
5121
+ var ret = matches.call( node, expr );
5122
+
5123
+ // IE 9's matchesSelector returns false on disconnected nodes
5124
+ if ( ret || !disconnectedMatch ||
5125
+ // As well, disconnected nodes are said to be in a document
5126
+ // fragment in IE 9, so check for that
5127
+ node.document && node.document.nodeType !== 11 ) {
5128
+ return ret;
5129
+ }
5130
+ }
5131
+ } catch(e) {}
5132
+ }
5133
+
5134
+ return Sizzle(expr, null, null, [node]).length > 0;
5135
+ };
5136
+ }
5137
+ })();
5138
+
5139
+ (function(){
5140
+ var div = document.createElement("div");
5141
+
5142
+ div.innerHTML = "<div class='test e'></div><div class='test'></div>";
5143
+
5144
+ // Opera can't find a second classname (in 9.6)
5145
+ // Also, make sure that getElementsByClassName actually exists
5146
+ if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
5147
+ return;
5148
+ }
5149
+
5150
+ // Safari caches class attributes, doesn't catch changes (in 3.2)
5151
+ div.lastChild.className = "e";
5152
+
5153
+ if ( div.getElementsByClassName("e").length === 1 ) {
5154
+ return;
5155
+ }
5156
+
5157
+ Expr.order.splice(1, 0, "CLASS");
5158
+ Expr.find.CLASS = function( match, context, isXML ) {
5159
+ if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
5160
+ return context.getElementsByClassName(match[1]);
5161
+ }
5162
+ };
5163
+
5164
+ // release memory in IE
5165
+ div = null;
5166
+ })();
5167
+
5168
+ function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
5169
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5170
+ var elem = checkSet[i];
5171
+
5172
+ if ( elem ) {
5173
+ var match = false;
5174
+
5175
+ elem = elem[dir];
5176
+
5177
+ while ( elem ) {
5178
+ if ( elem[ expando ] === doneName ) {
5179
+ match = checkSet[elem.sizset];
5180
+ break;
5181
+ }
5182
+
5183
+ if ( elem.nodeType === 1 && !isXML ){
5184
+ elem[ expando ] = doneName;
5185
+ elem.sizset = i;
5186
+ }
5187
+
5188
+ if ( elem.nodeName.toLowerCase() === cur ) {
5189
+ match = elem;
5190
+ break;
5191
+ }
5192
+
5193
+ elem = elem[dir];
5194
+ }
5195
+
5196
+ checkSet[i] = match;
5197
+ }
5198
+ }
5199
+ }
5200
+
5201
+ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
5202
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5203
+ var elem = checkSet[i];
5204
+
5205
+ if ( elem ) {
5206
+ var match = false;
5207
+
5208
+ elem = elem[dir];
5209
+
5210
+ while ( elem ) {
5211
+ if ( elem[ expando ] === doneName ) {
5212
+ match = checkSet[elem.sizset];
5213
+ break;
5214
+ }
5215
+
5216
+ if ( elem.nodeType === 1 ) {
5217
+ if ( !isXML ) {
5218
+ elem[ expando ] = doneName;
5219
+ elem.sizset = i;
5220
+ }
5221
+
5222
+ if ( typeof cur !== "string" ) {
5223
+ if ( elem === cur ) {
5224
+ match = true;
5225
+ break;
5226
+ }
5227
+
5228
+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
5229
+ match = elem;
5230
+ break;
5231
+ }
5232
+ }
5233
+
5234
+ elem = elem[dir];
5235
+ }
5236
+
5237
+ checkSet[i] = match;
5238
+ }
5239
+ }
5240
+ }
5241
+
5242
+ if ( document.documentElement.contains ) {
5243
+ Sizzle.contains = function( a, b ) {
5244
+ return a !== b && (a.contains ? a.contains(b) : true);
5245
+ };
5246
+
5247
+ } else if ( document.documentElement.compareDocumentPosition ) {
5248
+ Sizzle.contains = function( a, b ) {
5249
+ return !!(a.compareDocumentPosition(b) & 16);
5250
+ };
5251
+
5252
+ } else {
5253
+ Sizzle.contains = function() {
5254
+ return false;
5255
+ };
5256
+ }
5257
+
5258
+ Sizzle.isXML = function( elem ) {
5259
+ // documentElement is verified for cases where it doesn't yet exist
5260
+ // (such as loading iframes in IE - #4833)
5261
+ var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
5262
+
5263
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
5264
+ };
5265
+
5266
+ var posProcess = function( selector, context, seed ) {
5267
+ var match,
5268
+ tmpSet = [],
5269
+ later = "",
5270
+ root = context.nodeType ? [context] : context;
5271
+
5272
+ // Position selectors must be done after the filter
5273
+ // And so must :not(positional) so we move all PSEUDOs to the end
5274
+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
5275
+ later += match[0];
5276
+ selector = selector.replace( Expr.match.PSEUDO, "" );
5277
+ }
5278
+
5279
+ selector = Expr.relative[selector] ? selector + "*" : selector;
5280
+
5281
+ for ( var i = 0, l = root.length; i < l; i++ ) {
5282
+ Sizzle( selector, root[i], tmpSet, seed );
5283
+ }
5284
+
5285
+ return Sizzle.filter( later, tmpSet );
5286
+ };
5287
+
5288
+ // EXPOSE
5289
+ // Override sizzle attribute retrieval
5290
+ Sizzle.attr = jQuery.attr;
5291
+ Sizzle.selectors.attrMap = {};
5292
+ jQuery.find = Sizzle;
5293
+ jQuery.expr = Sizzle.selectors;
5294
+ jQuery.expr[":"] = jQuery.expr.filters;
5295
+ jQuery.unique = Sizzle.uniqueSort;
5296
+ jQuery.text = Sizzle.getText;
5297
+ jQuery.isXMLDoc = Sizzle.isXML;
5298
+ jQuery.contains = Sizzle.contains;
5299
+
5300
+
5301
+ })();
5302
+
5303
+
5304
+ var runtil = /Until$/,
5305
+ rparentsprev = /^(?:parents|prevUntil|prevAll)/,
5306
+ // Note: This RegExp should be improved, or likely pulled from Sizzle
5307
+ rmultiselector = /,/,
5308
+ isSimple = /^.[^:#\[\.,]*$/,
5309
+ slice = Array.prototype.slice,
5310
+ POS = jQuery.expr.match.POS,
5311
+ // methods guaranteed to produce a unique set when starting from a unique set
5312
+ guaranteedUnique = {
5313
+ children: true,
5314
+ contents: true,
5315
+ next: true,
5316
+ prev: true
5317
+ };
5318
+
5319
+ jQuery.fn.extend({
5320
+ find: function( selector ) {
5321
+ var self = this,
5322
+ i, l;
5323
+
5324
+ if ( typeof selector !== "string" ) {
5325
+ return jQuery( selector ).filter(function() {
5326
+ for ( i = 0, l = self.length; i < l; i++ ) {
5327
+ if ( jQuery.contains( self[ i ], this ) ) {
5328
+ return true;
5329
+ }
5330
+ }
5331
+ });
5332
+ }
5333
+
5334
+ var ret = this.pushStack( "", "find", selector ),
5335
+ length, n, r;
5336
+
5337
+ for ( i = 0, l = this.length; i < l; i++ ) {
5338
+ length = ret.length;
5339
+ jQuery.find( selector, this[i], ret );
5340
+
5341
+ if ( i > 0 ) {
5342
+ // Make sure that the results are unique
5343
+ for ( n = length; n < ret.length; n++ ) {
5344
+ for ( r = 0; r < length; r++ ) {
5345
+ if ( ret[r] === ret[n] ) {
5346
+ ret.splice(n--, 1);
5347
+ break;
5348
+ }
5349
+ }
5350
+ }
5351
+ }
5352
+ }
5353
+
5354
+ return ret;
5355
+ },
5356
+
5357
+ has: function( target ) {
5358
+ var targets = jQuery( target );
5359
+ return this.filter(function() {
5360
+ for ( var i = 0, l = targets.length; i < l; i++ ) {
5361
+ if ( jQuery.contains( this, targets[i] ) ) {
5362
+ return true;
5363
+ }
5364
+ }
5365
+ });
5366
+ },
5367
+
5368
+ not: function( selector ) {
5369
+ return this.pushStack( winnow(this, selector, false), "not", selector);
5370
+ },
5371
+
5372
+ filter: function( selector ) {
5373
+ return this.pushStack( winnow(this, selector, true), "filter", selector );
5374
+ },
5375
+
5376
+ is: function( selector ) {
5377
+ return !!selector && (
5378
+ typeof selector === "string" ?
5379
+ // If this is a positional selector, check membership in the returned set
5380
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
5381
+ POS.test( selector ) ?
5382
+ jQuery( selector, this.context ).index( this[0] ) >= 0 :
5383
+ jQuery.filter( selector, this ).length > 0 :
5384
+ this.filter( selector ).length > 0 );
5385
+ },
5386
+
5387
+ closest: function( selectors, context ) {
5388
+ var ret = [], i, l, cur = this[0];
5389
+
5390
+ // Array (deprecated as of jQuery 1.7)
5391
+ if ( jQuery.isArray( selectors ) ) {
5392
+ var level = 1;
5393
+
5394
+ while ( cur && cur.ownerDocument && cur !== context ) {
5395
+ for ( i = 0; i < selectors.length; i++ ) {
5396
+
5397
+ if ( jQuery( cur ).is( selectors[ i ] ) ) {
5398
+ ret.push({ selector: selectors[ i ], elem: cur, level: level });
5399
+ }
5400
+ }
5401
+
5402
+ cur = cur.parentNode;
5403
+ level++;
5404
+ }
5405
+
5406
+ return ret;
5407
+ }
5408
+
5409
+ // String
5410
+ var pos = POS.test( selectors ) || typeof selectors !== "string" ?
5411
+ jQuery( selectors, context || this.context ) :
5412
+ 0;
5413
+
5414
+ for ( i = 0, l = this.length; i < l; i++ ) {
5415
+ cur = this[i];
5416
+
5417
+ while ( cur ) {
5418
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
5419
+ ret.push( cur );
5420
+ break;
5421
+
5422
+ } else {
5423
+ cur = cur.parentNode;
5424
+ if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
5425
+ break;
5426
+ }
5427
+ }
5428
+ }
5429
+ }
5430
+
5431
+ ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
5432
+
5433
+ return this.pushStack( ret, "closest", selectors );
5434
+ },
5435
+
5436
+ // Determine the position of an element within
5437
+ // the matched set of elements
5438
+ index: function( elem ) {
5439
+
5440
+ // No argument, return index in parent
5441
+ if ( !elem ) {
5442
+ return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
5443
+ }
5444
+
5445
+ // index in selector
5446
+ if ( typeof elem === "string" ) {
5447
+ return jQuery.inArray( this[0], jQuery( elem ) );
5448
+ }
5449
+
5450
+ // Locate the position of the desired element
5451
+ return jQuery.inArray(
5452
+ // If it receives a jQuery object, the first element is used
5453
+ elem.jquery ? elem[0] : elem, this );
5454
+ },
5455
+
5456
+ add: function( selector, context ) {
5457
+ var set = typeof selector === "string" ?
5458
+ jQuery( selector, context ) :
5459
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
5460
+ all = jQuery.merge( this.get(), set );
5461
+
5462
+ return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
5463
+ all :
5464
+ jQuery.unique( all ) );
5465
+ },
5466
+
5467
+ andSelf: function() {
5468
+ return this.add( this.prevObject );
5469
+ }
5470
+ });
5471
+
5472
+ // A painfully simple check to see if an element is disconnected
5473
+ // from a document (should be improved, where feasible).
5474
+ function isDisconnected( node ) {
5475
+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
5476
+ }
5477
+
5478
+ jQuery.each({
5479
+ parent: function( elem ) {
5480
+ var parent = elem.parentNode;
5481
+ return parent && parent.nodeType !== 11 ? parent : null;
5482
+ },
5483
+ parents: function( elem ) {
5484
+ return jQuery.dir( elem, "parentNode" );
5485
+ },
5486
+ parentsUntil: function( elem, i, until ) {
5487
+ return jQuery.dir( elem, "parentNode", until );
5488
+ },
5489
+ next: function( elem ) {
5490
+ return jQuery.nth( elem, 2, "nextSibling" );
5491
+ },
5492
+ prev: function( elem ) {
5493
+ return jQuery.nth( elem, 2, "previousSibling" );
5494
+ },
5495
+ nextAll: function( elem ) {
5496
+ return jQuery.dir( elem, "nextSibling" );
5497
+ },
5498
+ prevAll: function( elem ) {
5499
+ return jQuery.dir( elem, "previousSibling" );
5500
+ },
5501
+ nextUntil: function( elem, i, until ) {
5502
+ return jQuery.dir( elem, "nextSibling", until );
5503
+ },
5504
+ prevUntil: function( elem, i, until ) {
5505
+ return jQuery.dir( elem, "previousSibling", until );
5506
+ },
5507
+ siblings: function( elem ) {
5508
+ return jQuery.sibling( elem.parentNode.firstChild, elem );
5509
+ },
5510
+ children: function( elem ) {
5511
+ return jQuery.sibling( elem.firstChild );
5512
+ },
5513
+ contents: function( elem ) {
5514
+ return jQuery.nodeName( elem, "iframe" ) ?
5515
+ elem.contentDocument || elem.contentWindow.document :
5516
+ jQuery.makeArray( elem.childNodes );
5517
+ }
5518
+ }, function( name, fn ) {
5519
+ jQuery.fn[ name ] = function( until, selector ) {
5520
+ var ret = jQuery.map( this, fn, until );
5521
+
5522
+ if ( !runtil.test( name ) ) {
5523
+ selector = until;
5524
+ }
5525
+
5526
+ if ( selector && typeof selector === "string" ) {
5527
+ ret = jQuery.filter( selector, ret );
5528
+ }
5529
+
5530
+ ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
5531
+
5532
+ if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
5533
+ ret = ret.reverse();
5534
+ }
5535
+
5536
+ return this.pushStack( ret, name, slice.call( arguments ).join(",") );
5537
+ };
5538
+ });
5539
+
5540
+ jQuery.extend({
5541
+ filter: function( expr, elems, not ) {
5542
+ if ( not ) {
5543
+ expr = ":not(" + expr + ")";
5544
+ }
5545
+
5546
+ return elems.length === 1 ?
5547
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
5548
+ jQuery.find.matches(expr, elems);
5549
+ },
5550
+
5551
+ dir: function( elem, dir, until ) {
5552
+ var matched = [],
5553
+ cur = elem[ dir ];
5554
+
5555
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
5556
+ if ( cur.nodeType === 1 ) {
5557
+ matched.push( cur );
5558
+ }
5559
+ cur = cur[dir];
5560
+ }
5561
+ return matched;
5562
+ },
5563
+
5564
+ nth: function( cur, result, dir, elem ) {
5565
+ result = result || 1;
5566
+ var num = 0;
5567
+
5568
+ for ( ; cur; cur = cur[dir] ) {
5569
+ if ( cur.nodeType === 1 && ++num === result ) {
5570
+ break;
5571
+ }
5572
+ }
5573
+
5574
+ return cur;
5575
+ },
5576
+
5577
+ sibling: function( n, elem ) {
5578
+ var r = [];
5579
+
5580
+ for ( ; n; n = n.nextSibling ) {
5581
+ if ( n.nodeType === 1 && n !== elem ) {
5582
+ r.push( n );
5583
+ }
5584
+ }
5585
+
5586
+ return r;
5587
+ }
5588
+ });
5589
+
5590
+ // Implement the identical functionality for filter and not
5591
+ function winnow( elements, qualifier, keep ) {
5592
+
5593
+ // Can't pass null or undefined to indexOf in Firefox 4
5594
+ // Set to 0 to skip string check
5595
+ qualifier = qualifier || 0;
5596
+
5597
+ if ( jQuery.isFunction( qualifier ) ) {
5598
+ return jQuery.grep(elements, function( elem, i ) {
5599
+ var retVal = !!qualifier.call( elem, i, elem );
5600
+ return retVal === keep;
5601
+ });
5602
+
5603
+ } else if ( qualifier.nodeType ) {
5604
+ return jQuery.grep(elements, function( elem, i ) {
5605
+ return ( elem === qualifier ) === keep;
5606
+ });
5607
+
5608
+ } else if ( typeof qualifier === "string" ) {
5609
+ var filtered = jQuery.grep(elements, function( elem ) {
5610
+ return elem.nodeType === 1;
5611
+ });
5612
+
5613
+ if ( isSimple.test( qualifier ) ) {
5614
+ return jQuery.filter(qualifier, filtered, !keep);
5615
+ } else {
5616
+ qualifier = jQuery.filter( qualifier, filtered );
5617
+ }
5618
+ }
5619
+
5620
+ return jQuery.grep(elements, function( elem, i ) {
5621
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
5622
+ });
5623
+ }
5624
+
5625
+
5626
+
5627
+
5628
+ function createSafeFragment( document ) {
5629
+ var list = nodeNames.split( "|" ),
5630
+ safeFrag = document.createDocumentFragment();
5631
+
5632
+ if ( safeFrag.createElement ) {
5633
+ while ( list.length ) {
5634
+ safeFrag.createElement(
5635
+ list.pop()
5636
+ );
5637
+ }
5638
+ }
5639
+ return safeFrag;
5640
+ }
5641
+
5642
+ var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" +
5643
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
5644
+ rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
5645
+ rleadingWhitespace = /^\s+/,
5646
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
5647
+ rtagName = /<([\w:]+)/,
5648
+ rtbody = /<tbody/i,
5649
+ rhtml = /<|&#?\w+;/,
5650
+ rnoInnerhtml = /<(?:script|style)/i,
5651
+ rnocache = /<(?:script|object|embed|option|style)/i,
5652
+ rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"),
5653
+ // checked="checked" or checked
5654
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5655
+ rscriptType = /\/(java|ecma)script/i,
5656
+ rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
5657
+ wrapMap = {
5658
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
5659
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
5660
+ thead: [ 1, "<table>", "</table>" ],
5661
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
5662
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
5663
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
5664
+ area: [ 1, "<map>", "</map>" ],
5665
+ _default: [ 0, "", "" ]
5666
+ },
5667
+ safeFragment = createSafeFragment( document );
5668
+
5669
+ wrapMap.optgroup = wrapMap.option;
5670
+ wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
5671
+ wrapMap.th = wrapMap.td;
5672
+
5673
+ // IE can't serialize <link> and <script> tags normally
5674
+ if ( !jQuery.support.htmlSerialize ) {
5675
+ wrapMap._default = [ 1, "div<div>", "</div>" ];
5676
+ }
5677
+
5678
+ jQuery.fn.extend({
5679
+ text: function( text ) {
5680
+ if ( jQuery.isFunction(text) ) {
5681
+ return this.each(function(i) {
5682
+ var self = jQuery( this );
5683
+
5684
+ self.text( text.call(this, i, self.text()) );
5685
+ });
5686
+ }
5687
+
5688
+ if ( typeof text !== "object" && text !== undefined ) {
5689
+ return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
5690
+ }
5691
+
5692
+ return jQuery.text( this );
5693
+ },
5694
+
5695
+ wrapAll: function( html ) {
5696
+ if ( jQuery.isFunction( html ) ) {
5697
+ return this.each(function(i) {
5698
+ jQuery(this).wrapAll( html.call(this, i) );
5699
+ });
5700
+ }
5701
+
5702
+ if ( this[0] ) {
5703
+ // The elements to wrap the target around
5704
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
5705
+
5706
+ if ( this[0].parentNode ) {
5707
+ wrap.insertBefore( this[0] );
5708
+ }
5709
+
5710
+ wrap.map(function() {
5711
+ var elem = this;
5712
+
5713
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
5714
+ elem = elem.firstChild;
5715
+ }
5716
+
5717
+ return elem;
5718
+ }).append( this );
5719
+ }
5720
+
5721
+ return this;
5722
+ },
5723
+
5724
+ wrapInner: function( html ) {
5725
+ if ( jQuery.isFunction( html ) ) {
5726
+ return this.each(function(i) {
5727
+ jQuery(this).wrapInner( html.call(this, i) );
5728
+ });
5729
+ }
5730
+
5731
+ return this.each(function() {
5732
+ var self = jQuery( this ),
5733
+ contents = self.contents();
5734
+
5735
+ if ( contents.length ) {
5736
+ contents.wrapAll( html );
5737
+
5738
+ } else {
5739
+ self.append( html );
5740
+ }
5741
+ });
5742
+ },
5743
+
5744
+ wrap: function( html ) {
5745
+ var isFunction = jQuery.isFunction( html );
5746
+
5747
+ return this.each(function(i) {
5748
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
5749
+ });
5750
+ },
5751
+
5752
+ unwrap: function() {
5753
+ return this.parent().each(function() {
5754
+ if ( !jQuery.nodeName( this, "body" ) ) {
5755
+ jQuery( this ).replaceWith( this.childNodes );
5756
+ }
5757
+ }).end();
5758
+ },
5759
+
5760
+ append: function() {
5761
+ return this.domManip(arguments, true, function( elem ) {
5762
+ if ( this.nodeType === 1 ) {
5763
+ this.appendChild( elem );
5764
+ }
5765
+ });
5766
+ },
5767
+
5768
+ prepend: function() {
5769
+ return this.domManip(arguments, true, function( elem ) {
5770
+ if ( this.nodeType === 1 ) {
5771
+ this.insertBefore( elem, this.firstChild );
5772
+ }
5773
+ });
5774
+ },
5775
+
5776
+ before: function() {
5777
+ if ( this[0] && this[0].parentNode ) {
5778
+ return this.domManip(arguments, false, function( elem ) {
5779
+ this.parentNode.insertBefore( elem, this );
5780
+ });
5781
+ } else if ( arguments.length ) {
5782
+ var set = jQuery.clean( arguments );
5783
+ set.push.apply( set, this.toArray() );
5784
+ return this.pushStack( set, "before", arguments );
5785
+ }
5786
+ },
5787
+
5788
+ after: function() {
5789
+ if ( this[0] && this[0].parentNode ) {
5790
+ return this.domManip(arguments, false, function( elem ) {
5791
+ this.parentNode.insertBefore( elem, this.nextSibling );
5792
+ });
5793
+ } else if ( arguments.length ) {
5794
+ var set = this.pushStack( this, "after", arguments );
5795
+ set.push.apply( set, jQuery.clean(arguments) );
5796
+ return set;
5797
+ }
5798
+ },
5799
+
5800
+ // keepData is for internal use only--do not document
5801
+ remove: function( selector, keepData ) {
5802
+ for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
5803
+ if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
5804
+ if ( !keepData && elem.nodeType === 1 ) {
5805
+ jQuery.cleanData( elem.getElementsByTagName("*") );
5806
+ jQuery.cleanData( [ elem ] );
5807
+ }
5808
+
5809
+ if ( elem.parentNode ) {
5810
+ elem.parentNode.removeChild( elem );
5811
+ }
5812
+ }
5813
+ }
5814
+
5815
+ return this;
5816
+ },
5817
+
5818
+ empty: function() {
5819
+ for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
5820
+ // Remove element nodes and prevent memory leaks
5821
+ if ( elem.nodeType === 1 ) {
5822
+ jQuery.cleanData( elem.getElementsByTagName("*") );
5823
+ }
5824
+
5825
+ // Remove any remaining nodes
5826
+ while ( elem.firstChild ) {
5827
+ elem.removeChild( elem.firstChild );
5828
+ }
5829
+ }
5830
+
5831
+ return this;
5832
+ },
5833
+
5834
+ clone: function( dataAndEvents, deepDataAndEvents ) {
5835
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
5836
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
5837
+
5838
+ return this.map( function () {
5839
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
5840
+ });
5841
+ },
5842
+
5843
+ html: function( value ) {
5844
+ if ( value === undefined ) {
5845
+ return this[0] && this[0].nodeType === 1 ?
5846
+ this[0].innerHTML.replace(rinlinejQuery, "") :
5847
+ null;
5848
+
5849
+ // See if we can take a shortcut and just use innerHTML
5850
+ } else if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
5851
+ (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
5852
+ !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
5853
+
5854
+ value = value.replace(rxhtmlTag, "<$1></$2>");
5855
+
5856
+ try {
5857
+ for ( var i = 0, l = this.length; i < l; i++ ) {
5858
+ // Remove element nodes and prevent memory leaks
5859
+ if ( this[i].nodeType === 1 ) {
5860
+ jQuery.cleanData( this[i].getElementsByTagName("*") );
5861
+ this[i].innerHTML = value;
5862
+ }
5863
+ }
5864
+
5865
+ // If using innerHTML throws an exception, use the fallback method
5866
+ } catch(e) {
5867
+ this.empty().append( value );
5868
+ }
5869
+
5870
+ } else if ( jQuery.isFunction( value ) ) {
5871
+ this.each(function(i){
5872
+ var self = jQuery( this );
5873
+
5874
+ self.html( value.call(this, i, self.html()) );
5875
+ });
5876
+
5877
+ } else {
5878
+ this.empty().append( value );
5879
+ }
5880
+
5881
+ return this;
5882
+ },
5883
+
5884
+ replaceWith: function( value ) {
5885
+ if ( this[0] && this[0].parentNode ) {
5886
+ // Make sure that the elements are removed from the DOM before they are inserted
5887
+ // this can help fix replacing a parent with child elements
5888
+ if ( jQuery.isFunction( value ) ) {
5889
+ return this.each(function(i) {
5890
+ var self = jQuery(this), old = self.html();
5891
+ self.replaceWith( value.call( this, i, old ) );
5892
+ });
5893
+ }
5894
+
5895
+ if ( typeof value !== "string" ) {
5896
+ value = jQuery( value ).detach();
5897
+ }
5898
+
5899
+ return this.each(function() {
5900
+ var next = this.nextSibling,
5901
+ parent = this.parentNode;
5902
+
5903
+ jQuery( this ).remove();
5904
+
5905
+ if ( next ) {
5906
+ jQuery(next).before( value );
5907
+ } else {
5908
+ jQuery(parent).append( value );
5909
+ }
5910
+ });
5911
+ } else {
5912
+ return this.length ?
5913
+ this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
5914
+ this;
5915
+ }
5916
+ },
5917
+
5918
+ detach: function( selector ) {
5919
+ return this.remove( selector, true );
5920
+ },
5921
+
5922
+ domManip: function( args, table, callback ) {
5923
+ var results, first, fragment, parent,
5924
+ value = args[0],
5925
+ scripts = [];
5926
+
5927
+ // We can't cloneNode fragments that contain checked, in WebKit
5928
+ if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
5929
+ return this.each(function() {
5930
+ jQuery(this).domManip( args, table, callback, true );
5931
+ });
5932
+ }
5933
+
5934
+ if ( jQuery.isFunction(value) ) {
5935
+ return this.each(function(i) {
5936
+ var self = jQuery(this);
5937
+ args[0] = value.call(this, i, table ? self.html() : undefined);
5938
+ self.domManip( args, table, callback );
5939
+ });
5940
+ }
5941
+
5942
+ if ( this[0] ) {
5943
+ parent = value && value.parentNode;
5944
+
5945
+ // If we're in a fragment, just use that instead of building a new one
5946
+ if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
5947
+ results = { fragment: parent };
5948
+
5949
+ } else {
5950
+ results = jQuery.buildFragment( args, this, scripts );
5951
+ }
5952
+
5953
+ fragment = results.fragment;
5954
+
5955
+ if ( fragment.childNodes.length === 1 ) {
5956
+ first = fragment = fragment.firstChild;
5957
+ } else {
5958
+ first = fragment.firstChild;
5959
+ }
5960
+
5961
+ if ( first ) {
5962
+ table = table && jQuery.nodeName( first, "tr" );
5963
+
5964
+ for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
5965
+ callback.call(
5966
+ table ?
5967
+ root(this[i], first) :
5968
+ this[i],
5969
+ // Make sure that we do not leak memory by inadvertently discarding
5970
+ // the original fragment (which might have attached data) instead of
5971
+ // using it; in addition, use the original fragment object for the last
5972
+ // item instead of first because it can end up being emptied incorrectly
5973
+ // in certain situations (Bug #8070).
5974
+ // Fragments from the fragment cache must always be cloned and never used
5975
+ // in place.
5976
+ results.cacheable || ( l > 1 && i < lastIndex ) ?
5977
+ jQuery.clone( fragment, true, true ) :
5978
+ fragment
5979
+ );
5980
+ }
5981
+ }
5982
+
5983
+ if ( scripts.length ) {
5984
+ jQuery.each( scripts, evalScript );
5985
+ }
5986
+ }
5987
+
5988
+ return this;
5989
+ }
5990
+ });
5991
+
5992
+ function root( elem, cur ) {
5993
+ return jQuery.nodeName(elem, "table") ?
5994
+ (elem.getElementsByTagName("tbody")[0] ||
5995
+ elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
5996
+ elem;
5997
+ }
5998
+
5999
+ function cloneCopyEvent( src, dest ) {
6000
+
6001
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
6002
+ return;
6003
+ }
6004
+
6005
+ var type, i, l,
6006
+ oldData = jQuery._data( src ),
6007
+ curData = jQuery._data( dest, oldData ),
6008
+ events = oldData.events;
6009
+
6010
+ if ( events ) {
6011
+ delete curData.handle;
6012
+ curData.events = {};
6013
+
6014
+ for ( type in events ) {
6015
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
6016
+ jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
6017
+ }
6018
+ }
6019
+ }
6020
+
6021
+ // make the cloned public data object a copy from the original
6022
+ if ( curData.data ) {
6023
+ curData.data = jQuery.extend( {}, curData.data );
6024
+ }
6025
+ }
6026
+
6027
+ function cloneFixAttributes( src, dest ) {
6028
+ var nodeName;
6029
+
6030
+ // We do not need to do anything for non-Elements
6031
+ if ( dest.nodeType !== 1 ) {
6032
+ return;
6033
+ }
6034
+
6035
+ // clearAttributes removes the attributes, which we don't want,
6036
+ // but also removes the attachEvent events, which we *do* want
6037
+ if ( dest.clearAttributes ) {
6038
+ dest.clearAttributes();
6039
+ }
6040
+
6041
+ // mergeAttributes, in contrast, only merges back on the
6042
+ // original attributes, not the events
6043
+ if ( dest.mergeAttributes ) {
6044
+ dest.mergeAttributes( src );
6045
+ }
6046
+
6047
+ nodeName = dest.nodeName.toLowerCase();
6048
+
6049
+ // IE6-8 fail to clone children inside object elements that use
6050
+ // the proprietary classid attribute value (rather than the type
6051
+ // attribute) to identify the type of content to display
6052
+ if ( nodeName === "object" ) {
6053
+ dest.outerHTML = src.outerHTML;
6054
+
6055
+ } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
6056
+ // IE6-8 fails to persist the checked state of a cloned checkbox
6057
+ // or radio button. Worse, IE6-7 fail to give the cloned element
6058
+ // a checked appearance if the defaultChecked value isn't also set
6059
+ if ( src.checked ) {
6060
+ dest.defaultChecked = dest.checked = src.checked;
6061
+ }
6062
+
6063
+ // IE6-7 get confused and end up setting the value of a cloned
6064
+ // checkbox/radio button to an empty string instead of "on"
6065
+ if ( dest.value !== src.value ) {
6066
+ dest.value = src.value;
6067
+ }
6068
+
6069
+ // IE6-8 fails to return the selected option to the default selected
6070
+ // state when cloning options
6071
+ } else if ( nodeName === "option" ) {
6072
+ dest.selected = src.defaultSelected;
6073
+
6074
+ // IE6-8 fails to set the defaultValue to the correct value when
6075
+ // cloning other types of input fields
6076
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
6077
+ dest.defaultValue = src.defaultValue;
6078
+ }
6079
+
6080
+ // Event data gets referenced instead of copied if the expando
6081
+ // gets copied too
6082
+ dest.removeAttribute( jQuery.expando );
6083
+ }
6084
+
6085
+ jQuery.buildFragment = function( args, nodes, scripts ) {
6086
+ var fragment, cacheable, cacheresults, doc,
6087
+ first = args[ 0 ];
6088
+
6089
+ // nodes may contain either an explicit document object,
6090
+ // a jQuery collection or context object.
6091
+ // If nodes[0] contains a valid object to assign to doc
6092
+ if ( nodes && nodes[0] ) {
6093
+ doc = nodes[0].ownerDocument || nodes[0];
6094
+ }
6095
+
6096
+ // Ensure that an attr object doesn't incorrectly stand in as a document object
6097
+ // Chrome and Firefox seem to allow this to occur and will throw exception
6098
+ // Fixes #8950
6099
+ if ( !doc.createDocumentFragment ) {
6100
+ doc = document;
6101
+ }
6102
+
6103
+ // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
6104
+ // Cloning options loses the selected state, so don't cache them
6105
+ // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
6106
+ // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
6107
+ // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
6108
+ if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
6109
+ first.charAt(0) === "<" && !rnocache.test( first ) &&
6110
+ (jQuery.support.checkClone || !rchecked.test( first )) &&
6111
+ (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
6112
+
6113
+ cacheable = true;
6114
+
6115
+ cacheresults = jQuery.fragments[ first ];
6116
+ if ( cacheresults && cacheresults !== 1 ) {
6117
+ fragment = cacheresults;
6118
+ }
6119
+ }
6120
+
6121
+ if ( !fragment ) {
6122
+ fragment = doc.createDocumentFragment();
6123
+ jQuery.clean( args, doc, fragment, scripts );
6124
+ }
6125
+
6126
+ if ( cacheable ) {
6127
+ jQuery.fragments[ first ] = cacheresults ? fragment : 1;
6128
+ }
6129
+
6130
+ return { fragment: fragment, cacheable: cacheable };
6131
+ };
6132
+
6133
+ jQuery.fragments = {};
6134
+
6135
+ jQuery.each({
6136
+ appendTo: "append",
6137
+ prependTo: "prepend",
6138
+ insertBefore: "before",
6139
+ insertAfter: "after",
6140
+ replaceAll: "replaceWith"
6141
+ }, function( name, original ) {
6142
+ jQuery.fn[ name ] = function( selector ) {
6143
+ var ret = [],
6144
+ insert = jQuery( selector ),
6145
+ parent = this.length === 1 && this[0].parentNode;
6146
+
6147
+ if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
6148
+ insert[ original ]( this[0] );
6149
+ return this;
6150
+
6151
+ } else {
6152
+ for ( var i = 0, l = insert.length; i < l; i++ ) {
6153
+ var elems = ( i > 0 ? this.clone(true) : this ).get();
6154
+ jQuery( insert[i] )[ original ]( elems );
6155
+ ret = ret.concat( elems );
6156
+ }
6157
+
6158
+ return this.pushStack( ret, name, insert.selector );
6159
+ }
6160
+ };
6161
+ });
6162
+
6163
+ function getAll( elem ) {
6164
+ if ( typeof elem.getElementsByTagName !== "undefined" ) {
6165
+ return elem.getElementsByTagName( "*" );
6166
+
6167
+ } else if ( typeof elem.querySelectorAll !== "undefined" ) {
6168
+ return elem.querySelectorAll( "*" );
6169
+
6170
+ } else {
6171
+ return [];
6172
+ }
6173
+ }
6174
+
6175
+ // Used in clean, fixes the defaultChecked property
6176
+ function fixDefaultChecked( elem ) {
6177
+ if ( elem.type === "checkbox" || elem.type === "radio" ) {
6178
+ elem.defaultChecked = elem.checked;
6179
+ }
6180
+ }
6181
+ // Finds all inputs and passes them to fixDefaultChecked
6182
+ function findInputs( elem ) {
6183
+ var nodeName = ( elem.nodeName || "" ).toLowerCase();
6184
+ if ( nodeName === "input" ) {
6185
+ fixDefaultChecked( elem );
6186
+ // Skip scripts, get other children
6187
+ } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
6188
+ jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
6189
+ }
6190
+ }
6191
+
6192
+ // Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
6193
+ function shimCloneNode( elem ) {
6194
+ var div = document.createElement( "div" );
6195
+ safeFragment.appendChild( div );
6196
+
6197
+ div.innerHTML = elem.outerHTML;
6198
+ return div.firstChild;
6199
+ }
6200
+
6201
+ jQuery.extend({
6202
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
6203
+ var srcElements,
6204
+ destElements,
6205
+ i,
6206
+ // IE<=8 does not properly clone detached, unknown element nodes
6207
+ clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ?
6208
+ elem.cloneNode( true ) :
6209
+ shimCloneNode( elem );
6210
+
6211
+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
6212
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
6213
+ // IE copies events bound via attachEvent when using cloneNode.
6214
+ // Calling detachEvent on the clone will also remove the events
6215
+ // from the original. In order to get around this, we use some
6216
+ // proprietary methods to clear the events. Thanks to MooTools
6217
+ // guys for this hotness.
6218
+
6219
+ cloneFixAttributes( elem, clone );
6220
+
6221
+ // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
6222
+ srcElements = getAll( elem );
6223
+ destElements = getAll( clone );
6224
+
6225
+ // Weird iteration because IE will replace the length property
6226
+ // with an element if you are cloning the body and one of the
6227
+ // elements on the page has a name or id of "length"
6228
+ for ( i = 0; srcElements[i]; ++i ) {
6229
+ // Ensure that the destination node is not null; Fixes #9587
6230
+ if ( destElements[i] ) {
6231
+ cloneFixAttributes( srcElements[i], destElements[i] );
6232
+ }
6233
+ }
6234
+ }
6235
+
6236
+ // Copy the events from the original to the clone
6237
+ if ( dataAndEvents ) {
6238
+ cloneCopyEvent( elem, clone );
6239
+
6240
+ if ( deepDataAndEvents ) {
6241
+ srcElements = getAll( elem );
6242
+ destElements = getAll( clone );
6243
+
6244
+ for ( i = 0; srcElements[i]; ++i ) {
6245
+ cloneCopyEvent( srcElements[i], destElements[i] );
6246
+ }
6247
+ }
6248
+ }
6249
+
6250
+ srcElements = destElements = null;
6251
+
6252
+ // Return the cloned set
6253
+ return clone;
6254
+ },
6255
+
6256
+ clean: function( elems, context, fragment, scripts ) {
6257
+ var checkScriptType;
6258
+
6259
+ context = context || document;
6260
+
6261
+ // !context.createElement fails in IE with an error but returns typeof 'object'
6262
+ if ( typeof context.createElement === "undefined" ) {
6263
+ context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
6264
+ }
6265
+
6266
+ var ret = [], j;
6267
+
6268
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
6269
+ if ( typeof elem === "number" ) {
6270
+ elem += "";
6271
+ }
6272
+
6273
+ if ( !elem ) {
6274
+ continue;
6275
+ }
6276
+
6277
+ // Convert html string into DOM nodes
6278
+ if ( typeof elem === "string" ) {
6279
+ if ( !rhtml.test( elem ) ) {
6280
+ elem = context.createTextNode( elem );
6281
+ } else {
6282
+ // Fix "XHTML"-style tags in all browsers
6283
+ elem = elem.replace(rxhtmlTag, "<$1></$2>");
6284
+
6285
+ // Trim whitespace, otherwise indexOf won't work as expected
6286
+ var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
6287
+ wrap = wrapMap[ tag ] || wrapMap._default,
6288
+ depth = wrap[0],
6289
+ div = context.createElement("div");
6290
+
6291
+ // Append wrapper element to unknown element safe doc fragment
6292
+ if ( context === document ) {
6293
+ // Use the fragment we've already created for this document
6294
+ safeFragment.appendChild( div );
6295
+ } else {
6296
+ // Use a fragment created with the owner document
6297
+ createSafeFragment( context ).appendChild( div );
6298
+ }
6299
+
6300
+ // Go to html and back, then peel off extra wrappers
6301
+ div.innerHTML = wrap[1] + elem + wrap[2];
6302
+
6303
+ // Move to the right depth
6304
+ while ( depth-- ) {
6305
+ div = div.lastChild;
6306
+ }
6307
+
6308
+ // Remove IE's autoinserted <tbody> from table fragments
6309
+ if ( !jQuery.support.tbody ) {
6310
+
6311
+ // String was a <table>, *may* have spurious <tbody>
6312
+ var hasBody = rtbody.test(elem),
6313
+ tbody = tag === "table" && !hasBody ?
6314
+ div.firstChild && div.firstChild.childNodes :
6315
+
6316
+ // String was a bare <thead> or <tfoot>
6317
+ wrap[1] === "<table>" && !hasBody ?
6318
+ div.childNodes :
6319
+ [];
6320
+
6321
+ for ( j = tbody.length - 1; j >= 0 ; --j ) {
6322
+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
6323
+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
6324
+ }
6325
+ }
6326
+ }
6327
+
6328
+ // IE completely kills leading whitespace when innerHTML is used
6329
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
6330
+ div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
6331
+ }
6332
+
6333
+ elem = div.childNodes;
6334
+ }
6335
+ }
6336
+
6337
+ // Resets defaultChecked for any radios and checkboxes
6338
+ // about to be appended to the DOM in IE 6/7 (#8060)
6339
+ var len;
6340
+ if ( !jQuery.support.appendChecked ) {
6341
+ if ( elem[0] && typeof (len = elem.length) === "number" ) {
6342
+ for ( j = 0; j < len; j++ ) {
6343
+ findInputs( elem[j] );
6344
+ }
6345
+ } else {
6346
+ findInputs( elem );
6347
+ }
6348
+ }
6349
+
6350
+ if ( elem.nodeType ) {
6351
+ ret.push( elem );
6352
+ } else {
6353
+ ret = jQuery.merge( ret, elem );
6354
+ }
6355
+ }
6356
+
6357
+ if ( fragment ) {
6358
+ checkScriptType = function( elem ) {
6359
+ return !elem.type || rscriptType.test( elem.type );
6360
+ };
6361
+ for ( i = 0; ret[i]; i++ ) {
6362
+ if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
6363
+ scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
6364
+
6365
+ } else {
6366
+ if ( ret[i].nodeType === 1 ) {
6367
+ var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
6368
+
6369
+ ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
6370
+ }
6371
+ fragment.appendChild( ret[i] );
6372
+ }
6373
+ }
6374
+ }
6375
+
6376
+ return ret;
6377
+ },
6378
+
6379
+ cleanData: function( elems ) {
6380
+ var data, id,
6381
+ cache = jQuery.cache,
6382
+ special = jQuery.event.special,
6383
+ deleteExpando = jQuery.support.deleteExpando;
6384
+
6385
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
6386
+ if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
6387
+ continue;
6388
+ }
6389
+
6390
+ id = elem[ jQuery.expando ];
6391
+
6392
+ if ( id ) {
6393
+ data = cache[ id ];
6394
+
6395
+ if ( data && data.events ) {
6396
+ for ( var type in data.events ) {
6397
+ if ( special[ type ] ) {
6398
+ jQuery.event.remove( elem, type );
6399
+
6400
+ // This is a shortcut to avoid jQuery.event.remove's overhead
6401
+ } else {
6402
+ jQuery.removeEvent( elem, type, data.handle );
6403
+ }
6404
+ }
6405
+
6406
+ // Null the DOM reference to avoid IE6/7/8 leak (#7054)
6407
+ if ( data.handle ) {
6408
+ data.handle.elem = null;
6409
+ }
6410
+ }
6411
+
6412
+ if ( deleteExpando ) {
6413
+ delete elem[ jQuery.expando ];
6414
+
6415
+ } else if ( elem.removeAttribute ) {
6416
+ elem.removeAttribute( jQuery.expando );
6417
+ }
6418
+
6419
+ delete cache[ id ];
6420
+ }
6421
+ }
6422
+ }
6423
+ });
6424
+
6425
+ function evalScript( i, elem ) {
6426
+ if ( elem.src ) {
6427
+ jQuery.ajax({
6428
+ url: elem.src,
6429
+ async: false,
6430
+ dataType: "script"
6431
+ });
6432
+ } else {
6433
+ jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
6434
+ }
6435
+
6436
+ if ( elem.parentNode ) {
6437
+ elem.parentNode.removeChild( elem );
6438
+ }
6439
+ }
6440
+
6441
+
6442
+
6443
+
6444
+ var ralpha = /alpha\([^)]*\)/i,
6445
+ ropacity = /opacity=([^)]*)/,
6446
+ // fixed for IE9, see #8346
6447
+ rupper = /([A-Z]|^ms)/g,
6448
+ rnumpx = /^-?\d+(?:px)?$/i,
6449
+ rnum = /^-?\d/,
6450
+ rrelNum = /^([\-+])=([\-+.\de]+)/,
6451
+
6452
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6453
+ cssWidth = [ "Left", "Right" ],
6454
+ cssHeight = [ "Top", "Bottom" ],
6455
+ curCSS,
6456
+
6457
+ getComputedStyle,
6458
+ currentStyle;
6459
+
6460
+ jQuery.fn.css = function( name, value ) {
6461
+ // Setting 'undefined' is a no-op
6462
+ if ( arguments.length === 2 && value === undefined ) {
6463
+ return this;
6464
+ }
6465
+
6466
+ return jQuery.access( this, name, value, true, function( elem, name, value ) {
6467
+ return value !== undefined ?
6468
+ jQuery.style( elem, name, value ) :
6469
+ jQuery.css( elem, name );
6470
+ });
6471
+ };
6472
+
6473
+ jQuery.extend({
6474
+ // Add in style property hooks for overriding the default
6475
+ // behavior of getting and setting a style property
6476
+ cssHooks: {
6477
+ opacity: {
6478
+ get: function( elem, computed ) {
6479
+ if ( computed ) {
6480
+ // We should always get a number back from opacity
6481
+ var ret = curCSS( elem, "opacity", "opacity" );
6482
+ return ret === "" ? "1" : ret;
6483
+
6484
+ } else {
6485
+ return elem.style.opacity;
6486
+ }
6487
+ }
6488
+ }
6489
+ },
6490
+
6491
+ // Exclude the following css properties to add px
6492
+ cssNumber: {
6493
+ "fillOpacity": true,
6494
+ "fontWeight": true,
6495
+ "lineHeight": true,
6496
+ "opacity": true,
6497
+ "orphans": true,
6498
+ "widows": true,
6499
+ "zIndex": true,
6500
+ "zoom": true
6501
+ },
6502
+
6503
+ // Add in properties whose names you wish to fix before
6504
+ // setting or getting the value
6505
+ cssProps: {
6506
+ // normalize float css property
6507
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
6508
+ },
6509
+
6510
+ // Get and set the style property on a DOM Node
6511
+ style: function( elem, name, value, extra ) {
6512
+ // Don't set styles on text and comment nodes
6513
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6514
+ return;
6515
+ }
6516
+
6517
+ // Make sure that we're working with the right name
6518
+ var ret, type, origName = jQuery.camelCase( name ),
6519
+ style = elem.style, hooks = jQuery.cssHooks[ origName ];
6520
+
6521
+ name = jQuery.cssProps[ origName ] || origName;
6522
+
6523
+ // Check if we're setting a value
6524
+ if ( value !== undefined ) {
6525
+ type = typeof value;
6526
+
6527
+ // convert relative number strings (+= or -=) to relative numbers. #7345
6528
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
6529
+ value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
6530
+ // Fixes bug #9237
6531
+ type = "number";
6532
+ }
6533
+
6534
+ // Make sure that NaN and null values aren't set. See: #7116
6535
+ if ( value == null || type === "number" && isNaN( value ) ) {
6536
+ return;
6537
+ }
6538
+
6539
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
6540
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
6541
+ value += "px";
6542
+ }
6543
+
6544
+ // If a hook was provided, use that value, otherwise just set the specified value
6545
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
6546
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
6547
+ // Fixes bug #5509
6548
+ try {
6549
+ style[ name ] = value;
6550
+ } catch(e) {}
6551
+ }
6552
+
6553
+ } else {
6554
+ // If a hook was provided get the non-computed value from there
6555
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
6556
+ return ret;
6557
+ }
6558
+
6559
+ // Otherwise just get the value from the style object
6560
+ return style[ name ];
6561
+ }
6562
+ },
6563
+
6564
+ css: function( elem, name, extra ) {
6565
+ var ret, hooks;
6566
+
6567
+ // Make sure that we're working with the right name
6568
+ name = jQuery.camelCase( name );
6569
+ hooks = jQuery.cssHooks[ name ];
6570
+ name = jQuery.cssProps[ name ] || name;
6571
+
6572
+ // cssFloat needs a special treatment
6573
+ if ( name === "cssFloat" ) {
6574
+ name = "float";
6575
+ }
6576
+
6577
+ // If a hook was provided get the computed value from there
6578
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
6579
+ return ret;
6580
+
6581
+ // Otherwise, if a way to get the computed value exists, use that
6582
+ } else if ( curCSS ) {
6583
+ return curCSS( elem, name );
6584
+ }
6585
+ },
6586
+
6587
+ // A method for quickly swapping in/out CSS properties to get correct calculations
6588
+ swap: function( elem, options, callback ) {
6589
+ var old = {};
6590
+
6591
+ // Remember the old values, and insert the new ones
6592
+ for ( var name in options ) {
6593
+ old[ name ] = elem.style[ name ];
6594
+ elem.style[ name ] = options[ name ];
6595
+ }
6596
+
6597
+ callback.call( elem );
6598
+
6599
+ // Revert the old values
6600
+ for ( name in options ) {
6601
+ elem.style[ name ] = old[ name ];
6602
+ }
6603
+ }
6604
+ });
6605
+
6606
+ // DEPRECATED, Use jQuery.css() instead
6607
+ jQuery.curCSS = jQuery.css;
6608
+
6609
+ jQuery.each(["height", "width"], function( i, name ) {
6610
+ jQuery.cssHooks[ name ] = {
6611
+ get: function( elem, computed, extra ) {
6612
+ var val;
6613
+
6614
+ if ( computed ) {
6615
+ if ( elem.offsetWidth !== 0 ) {
6616
+ return getWH( elem, name, extra );
6617
+ } else {
6618
+ jQuery.swap( elem, cssShow, function() {
6619
+ val = getWH( elem, name, extra );
6620
+ });
6621
+ }
6622
+
6623
+ return val;
6624
+ }
6625
+ },
6626
+
6627
+ set: function( elem, value ) {
6628
+ if ( rnumpx.test( value ) ) {
6629
+ // ignore negative width and height values #1599
6630
+ value = parseFloat( value );
6631
+
6632
+ if ( value >= 0 ) {
6633
+ return value + "px";
6634
+ }
6635
+
6636
+ } else {
6637
+ return value;
6638
+ }
6639
+ }
6640
+ };
6641
+ });
6642
+
6643
+ if ( !jQuery.support.opacity ) {
6644
+ jQuery.cssHooks.opacity = {
6645
+ get: function( elem, computed ) {
6646
+ // IE uses filters for opacity
6647
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
6648
+ ( parseFloat( RegExp.$1 ) / 100 ) + "" :
6649
+ computed ? "1" : "";
6650
+ },
6651
+
6652
+ set: function( elem, value ) {
6653
+ var style = elem.style,
6654
+ currentStyle = elem.currentStyle,
6655
+ opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
6656
+ filter = currentStyle && currentStyle.filter || style.filter || "";
6657
+
6658
+ // IE has trouble with opacity if it does not have layout
6659
+ // Force it by setting the zoom level
6660
+ style.zoom = 1;
6661
+
6662
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
6663
+ if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
6664
+
6665
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
6666
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
6667
+ // style.removeAttribute is IE Only, but so apparently is this code path...
6668
+ style.removeAttribute( "filter" );
6669
+
6670
+ // if there there is no filter style applied in a css rule, we are done
6671
+ if ( currentStyle && !currentStyle.filter ) {
6672
+ return;
6673
+ }
6674
+ }
6675
+
6676
+ // otherwise, set new filter values
6677
+ style.filter = ralpha.test( filter ) ?
6678
+ filter.replace( ralpha, opacity ) :
6679
+ filter + " " + opacity;
6680
+ }
6681
+ };
6682
+ }
6683
+
6684
+ jQuery(function() {
6685
+ // This hook cannot be added until DOM ready because the support test
6686
+ // for it is not run until after DOM ready
6687
+ if ( !jQuery.support.reliableMarginRight ) {
6688
+ jQuery.cssHooks.marginRight = {
6689
+ get: function( elem, computed ) {
6690
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
6691
+ // Work around by temporarily setting element display to inline-block
6692
+ var ret;
6693
+ jQuery.swap( elem, { "display": "inline-block" }, function() {
6694
+ if ( computed ) {
6695
+ ret = curCSS( elem, "margin-right", "marginRight" );
6696
+ } else {
6697
+ ret = elem.style.marginRight;
6698
+ }
6699
+ });
6700
+ return ret;
6701
+ }
6702
+ };
6703
+ }
6704
+ });
6705
+
6706
+ if ( document.defaultView && document.defaultView.getComputedStyle ) {
6707
+ getComputedStyle = function( elem, name ) {
6708
+ var ret, defaultView, computedStyle;
6709
+
6710
+ name = name.replace( rupper, "-$1" ).toLowerCase();
6711
+
6712
+ if ( (defaultView = elem.ownerDocument.defaultView) &&
6713
+ (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
6714
+ ret = computedStyle.getPropertyValue( name );
6715
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
6716
+ ret = jQuery.style( elem, name );
6717
+ }
6718
+ }
6719
+
6720
+ return ret;
6721
+ };
6722
+ }
6723
+
6724
+ if ( document.documentElement.currentStyle ) {
6725
+ currentStyle = function( elem, name ) {
6726
+ var left, rsLeft, uncomputed,
6727
+ ret = elem.currentStyle && elem.currentStyle[ name ],
6728
+ style = elem.style;
6729
+
6730
+ // Avoid setting ret to empty string here
6731
+ // so we don't default to auto
6732
+ if ( ret === null && style && (uncomputed = style[ name ]) ) {
6733
+ ret = uncomputed;
6734
+ }
6735
+
6736
+ // From the awesome hack by Dean Edwards
6737
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
6738
+
6739
+ // If we're not dealing with a regular pixel number
6740
+ // but a number that has a weird ending, we need to convert it to pixels
6741
+ if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
6742
+
6743
+ // Remember the original values
6744
+ left = style.left;
6745
+ rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
6746
+
6747
+ // Put in the new values to get a computed value out
6748
+ if ( rsLeft ) {
6749
+ elem.runtimeStyle.left = elem.currentStyle.left;
6750
+ }
6751
+ style.left = name === "fontSize" ? "1em" : ( ret || 0 );
6752
+ ret = style.pixelLeft + "px";
6753
+
6754
+ // Revert the changed values
6755
+ style.left = left;
6756
+ if ( rsLeft ) {
6757
+ elem.runtimeStyle.left = rsLeft;
6758
+ }
6759
+ }
6760
+
6761
+ return ret === "" ? "auto" : ret;
6762
+ };
6763
+ }
6764
+
6765
+ curCSS = getComputedStyle || currentStyle;
6766
+
6767
+ function getWH( elem, name, extra ) {
6768
+
6769
+ // Start with offset property
6770
+ var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
6771
+ which = name === "width" ? cssWidth : cssHeight,
6772
+ i = 0,
6773
+ len = which.length;
6774
+
6775
+ if ( val > 0 ) {
6776
+ if ( extra !== "border" ) {
6777
+ for ( ; i < len; i++ ) {
6778
+ if ( !extra ) {
6779
+ val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
6780
+ }
6781
+ if ( extra === "margin" ) {
6782
+ val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
6783
+ } else {
6784
+ val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
6785
+ }
6786
+ }
6787
+ }
6788
+
6789
+ return val + "px";
6790
+ }
6791
+
6792
+ // Fall back to computed then uncomputed css if necessary
6793
+ val = curCSS( elem, name, name );
6794
+ if ( val < 0 || val == null ) {
6795
+ val = elem.style[ name ] || 0;
6796
+ }
6797
+ // Normalize "", auto, and prepare for extra
6798
+ val = parseFloat( val ) || 0;
6799
+
6800
+ // Add padding, border, margin
6801
+ if ( extra ) {
6802
+ for ( ; i < len; i++ ) {
6803
+ val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
6804
+ if ( extra !== "padding" ) {
6805
+ val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
6806
+ }
6807
+ if ( extra === "margin" ) {
6808
+ val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
6809
+ }
6810
+ }
6811
+ }
6812
+
6813
+ return val + "px";
6814
+ }
6815
+
6816
+ if ( jQuery.expr && jQuery.expr.filters ) {
6817
+ jQuery.expr.filters.hidden = function( elem ) {
6818
+ var width = elem.offsetWidth,
6819
+ height = elem.offsetHeight;
6820
+
6821
+ return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
6822
+ };
6823
+
6824
+ jQuery.expr.filters.visible = function( elem ) {
6825
+ return !jQuery.expr.filters.hidden( elem );
6826
+ };
6827
+ }
6828
+
6829
+
6830
+
6831
+
6832
+ var r20 = /%20/g,
6833
+ rbracket = /\[\]$/,
6834
+ rCRLF = /\r?\n/g,
6835
+ rhash = /#.*$/,
6836
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
6837
+ rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
6838
+ // #7653, #8125, #8152: local protocol detection
6839
+ rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
6840
+ rnoContent = /^(?:GET|HEAD)$/,
6841
+ rprotocol = /^\/\//,
6842
+ rquery = /\?/,
6843
+ rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
6844
+ rselectTextarea = /^(?:select|textarea)/i,
6845
+ rspacesAjax = /\s+/,
6846
+ rts = /([?&])_=[^&]*/,
6847
+ rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
6848
+
6849
+ // Keep a copy of the old load method
6850
+ _load = jQuery.fn.load,
6851
+
6852
+ /* Prefilters
6853
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
6854
+ * 2) These are called:
6855
+ * - BEFORE asking for a transport
6856
+ * - AFTER param serialization (s.data is a string if s.processData is true)
6857
+ * 3) key is the dataType
6858
+ * 4) the catchall symbol "*" can be used
6859
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
6860
+ */
6861
+ prefilters = {},
6862
+
6863
+ /* Transports bindings
6864
+ * 1) key is the dataType
6865
+ * 2) the catchall symbol "*" can be used
6866
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
6867
+ */
6868
+ transports = {},
6869
+
6870
+ // Document location
6871
+ ajaxLocation,
6872
+
6873
+ // Document location segments
6874
+ ajaxLocParts,
6875
+
6876
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
6877
+ allTypes = ["*/"] + ["*"];
6878
+
6879
+ // #8138, IE may throw an exception when accessing
6880
+ // a field from window.location if document.domain has been set
6881
+ try {
6882
+ ajaxLocation = location.href;
6883
+ } catch( e ) {
6884
+ // Use the href attribute of an A element
6885
+ // since IE will modify it given document.location
6886
+ ajaxLocation = document.createElement( "a" );
6887
+ ajaxLocation.href = "";
6888
+ ajaxLocation = ajaxLocation.href;
6889
+ }
6890
+
6891
+ // Segment location into parts
6892
+ ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
6893
+
6894
+ // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
6895
+ function addToPrefiltersOrTransports( structure ) {
6896
+
6897
+ // dataTypeExpression is optional and defaults to "*"
6898
+ return function( dataTypeExpression, func ) {
6899
+
6900
+ if ( typeof dataTypeExpression !== "string" ) {
6901
+ func = dataTypeExpression;
6902
+ dataTypeExpression = "*";
6903
+ }
6904
+
6905
+ if ( jQuery.isFunction( func ) ) {
6906
+ var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
6907
+ i = 0,
6908
+ length = dataTypes.length,
6909
+ dataType,
6910
+ list,
6911
+ placeBefore;
6912
+
6913
+ // For each dataType in the dataTypeExpression
6914
+ for ( ; i < length; i++ ) {
6915
+ dataType = dataTypes[ i ];
6916
+ // We control if we're asked to add before
6917
+ // any existing element
6918
+ placeBefore = /^\+/.test( dataType );
6919
+ if ( placeBefore ) {
6920
+ dataType = dataType.substr( 1 ) || "*";
6921
+ }
6922
+ list = structure[ dataType ] = structure[ dataType ] || [];
6923
+ // then we add to the structure accordingly
6924
+ list[ placeBefore ? "unshift" : "push" ]( func );
6925
+ }
6926
+ }
6927
+ };
6928
+ }
6929
+
6930
+ // Base inspection function for prefilters and transports
6931
+ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
6932
+ dataType /* internal */, inspected /* internal */ ) {
6933
+
6934
+ dataType = dataType || options.dataTypes[ 0 ];
6935
+ inspected = inspected || {};
6936
+
6937
+ inspected[ dataType ] = true;
6938
+
6939
+ var list = structure[ dataType ],
6940
+ i = 0,
6941
+ length = list ? list.length : 0,
6942
+ executeOnly = ( structure === prefilters ),
6943
+ selection;
6944
+
6945
+ for ( ; i < length && ( executeOnly || !selection ); i++ ) {
6946
+ selection = list[ i ]( options, originalOptions, jqXHR );
6947
+ // If we got redirected to another dataType
6948
+ // we try there if executing only and not done already
6949
+ if ( typeof selection === "string" ) {
6950
+ if ( !executeOnly || inspected[ selection ] ) {
6951
+ selection = undefined;
6952
+ } else {
6953
+ options.dataTypes.unshift( selection );
6954
+ selection = inspectPrefiltersOrTransports(
6955
+ structure, options, originalOptions, jqXHR, selection, inspected );
6956
+ }
6957
+ }
6958
+ }
6959
+ // If we're only executing or nothing was selected
6960
+ // we try the catchall dataType if not done already
6961
+ if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
6962
+ selection = inspectPrefiltersOrTransports(
6963
+ structure, options, originalOptions, jqXHR, "*", inspected );
6964
+ }
6965
+ // unnecessary when only executing (prefilters)
6966
+ // but it'll be ignored by the caller in that case
6967
+ return selection;
6968
+ }
6969
+
6970
+ // A special extend for ajax options
6971
+ // that takes "flat" options (not to be deep extended)
6972
+ // Fixes #9887
6973
+ function ajaxExtend( target, src ) {
6974
+ var key, deep,
6975
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
6976
+ for ( key in src ) {
6977
+ if ( src[ key ] !== undefined ) {
6978
+ ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
6979
+ }
6980
+ }
6981
+ if ( deep ) {
6982
+ jQuery.extend( true, target, deep );
6983
+ }
6984
+ }
6985
+
6986
+ jQuery.fn.extend({
6987
+ load: function( url, params, callback ) {
6988
+ if ( typeof url !== "string" && _load ) {
6989
+ return _load.apply( this, arguments );
6990
+
6991
+ // Don't do a request if no elements are being requested
6992
+ } else if ( !this.length ) {
6993
+ return this;
6994
+ }
6995
+
6996
+ var off = url.indexOf( " " );
6997
+ if ( off >= 0 ) {
6998
+ var selector = url.slice( off, url.length );
6999
+ url = url.slice( 0, off );
7000
+ }
7001
+
7002
+ // Default to a GET request
7003
+ var type = "GET";
7004
+
7005
+ // If the second parameter was provided
7006
+ if ( params ) {
7007
+ // If it's a function
7008
+ if ( jQuery.isFunction( params ) ) {
7009
+ // We assume that it's the callback
7010
+ callback = params;
7011
+ params = undefined;
7012
+
7013
+ // Otherwise, build a param string
7014
+ } else if ( typeof params === "object" ) {
7015
+ params = jQuery.param( params, jQuery.ajaxSettings.traditional );
7016
+ type = "POST";
7017
+ }
7018
+ }
7019
+
7020
+ var self = this;
7021
+
7022
+ // Request the remote document
7023
+ jQuery.ajax({
7024
+ url: url,
7025
+ type: type,
7026
+ dataType: "html",
7027
+ data: params,
7028
+ // Complete callback (responseText is used internally)
7029
+ complete: function( jqXHR, status, responseText ) {
7030
+ // Store the response as specified by the jqXHR object
7031
+ responseText = jqXHR.responseText;
7032
+ // If successful, inject the HTML into all the matched elements
7033
+ if ( jqXHR.isResolved() ) {
7034
+ // #4825: Get the actual response in case
7035
+ // a dataFilter is present in ajaxSettings
7036
+ jqXHR.done(function( r ) {
7037
+ responseText = r;
7038
+ });
7039
+ // See if a selector was specified
7040
+ self.html( selector ?
7041
+ // Create a dummy div to hold the results
7042
+ jQuery("<div>")
7043
+ // inject the contents of the document in, removing the scripts
7044
+ // to avoid any 'Permission Denied' errors in IE
7045
+ .append(responseText.replace(rscript, ""))
7046
+
7047
+ // Locate the specified elements
7048
+ .find(selector) :
7049
+
7050
+ // If not, just inject the full result
7051
+ responseText );
7052
+ }
7053
+
7054
+ if ( callback ) {
7055
+ self.each( callback, [ responseText, status, jqXHR ] );
7056
+ }
7057
+ }
7058
+ });
7059
+
7060
+ return this;
7061
+ },
7062
+
7063
+ serialize: function() {
7064
+ return jQuery.param( this.serializeArray() );
7065
+ },
7066
+
7067
+ serializeArray: function() {
7068
+ return this.map(function(){
7069
+ return this.elements ? jQuery.makeArray( this.elements ) : this;
7070
+ })
7071
+ .filter(function(){
7072
+ return this.name && !this.disabled &&
7073
+ ( this.checked || rselectTextarea.test( this.nodeName ) ||
7074
+ rinput.test( this.type ) );
7075
+ })
7076
+ .map(function( i, elem ){
7077
+ var val = jQuery( this ).val();
7078
+
7079
+ return val == null ?
7080
+ null :
7081
+ jQuery.isArray( val ) ?
7082
+ jQuery.map( val, function( val, i ){
7083
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
7084
+ }) :
7085
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
7086
+ }).get();
7087
+ }
7088
+ });
7089
+
7090
+ // Attach a bunch of functions for handling common AJAX events
7091
+ jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
7092
+ jQuery.fn[ o ] = function( f ){
7093
+ return this.on( o, f );
7094
+ };
7095
+ });
7096
+
7097
+ jQuery.each( [ "get", "post" ], function( i, method ) {
7098
+ jQuery[ method ] = function( url, data, callback, type ) {
7099
+ // shift arguments if data argument was omitted
7100
+ if ( jQuery.isFunction( data ) ) {
7101
+ type = type || callback;
7102
+ callback = data;
7103
+ data = undefined;
7104
+ }
7105
+
7106
+ return jQuery.ajax({
7107
+ type: method,
7108
+ url: url,
7109
+ data: data,
7110
+ success: callback,
7111
+ dataType: type
7112
+ });
7113
+ };
7114
+ });
7115
+
7116
+ jQuery.extend({
7117
+
7118
+ getScript: function( url, callback ) {
7119
+ return jQuery.get( url, undefined, callback, "script" );
7120
+ },
7121
+
7122
+ getJSON: function( url, data, callback ) {
7123
+ return jQuery.get( url, data, callback, "json" );
7124
+ },
7125
+
7126
+ // Creates a full fledged settings object into target
7127
+ // with both ajaxSettings and settings fields.
7128
+ // If target is omitted, writes into ajaxSettings.
7129
+ ajaxSetup: function( target, settings ) {
7130
+ if ( settings ) {
7131
+ // Building a settings object
7132
+ ajaxExtend( target, jQuery.ajaxSettings );
7133
+ } else {
7134
+ // Extending ajaxSettings
7135
+ settings = target;
7136
+ target = jQuery.ajaxSettings;
7137
+ }
7138
+ ajaxExtend( target, settings );
7139
+ return target;
7140
+ },
7141
+
7142
+ ajaxSettings: {
7143
+ url: ajaxLocation,
7144
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
7145
+ global: true,
7146
+ type: "GET",
7147
+ contentType: "application/x-www-form-urlencoded",
7148
+ processData: true,
7149
+ async: true,
7150
+ /*
7151
+ timeout: 0,
7152
+ data: null,
7153
+ dataType: null,
7154
+ username: null,
7155
+ password: null,
7156
+ cache: null,
7157
+ traditional: false,
7158
+ headers: {},
7159
+ */
7160
+
7161
+ accepts: {
7162
+ xml: "application/xml, text/xml",
7163
+ html: "text/html",
7164
+ text: "text/plain",
7165
+ json: "application/json, text/javascript",
7166
+ "*": allTypes
7167
+ },
7168
+
7169
+ contents: {
7170
+ xml: /xml/,
7171
+ html: /html/,
7172
+ json: /json/
7173
+ },
7174
+
7175
+ responseFields: {
7176
+ xml: "responseXML",
7177
+ text: "responseText"
7178
+ },
7179
+
7180
+ // List of data converters
7181
+ // 1) key format is "source_type destination_type" (a single space in-between)
7182
+ // 2) the catchall symbol "*" can be used for source_type
7183
+ converters: {
7184
+
7185
+ // Convert anything to text
7186
+ "* text": window.String,
7187
+
7188
+ // Text to html (true = no transformation)
7189
+ "text html": true,
7190
+
7191
+ // Evaluate text as a json expression
7192
+ "text json": jQuery.parseJSON,
7193
+
7194
+ // Parse text as xml
7195
+ "text xml": jQuery.parseXML
7196
+ },
7197
+
7198
+ // For options that shouldn't be deep extended:
7199
+ // you can add your own custom options here if
7200
+ // and when you create one that shouldn't be
7201
+ // deep extended (see ajaxExtend)
7202
+ flatOptions: {
7203
+ context: true,
7204
+ url: true
7205
+ }
7206
+ },
7207
+
7208
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
7209
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
7210
+
7211
+ // Main method
7212
+ ajax: function( url, options ) {
7213
+
7214
+ // If url is an object, simulate pre-1.5 signature
7215
+ if ( typeof url === "object" ) {
7216
+ options = url;
7217
+ url = undefined;
7218
+ }
7219
+
7220
+ // Force options to be an object
7221
+ options = options || {};
7222
+
7223
+ var // Create the final options object
7224
+ s = jQuery.ajaxSetup( {}, options ),
7225
+ // Callbacks context
7226
+ callbackContext = s.context || s,
7227
+ // Context for global events
7228
+ // It's the callbackContext if one was provided in the options
7229
+ // and if it's a DOM node or a jQuery collection
7230
+ globalEventContext = callbackContext !== s &&
7231
+ ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
7232
+ jQuery( callbackContext ) : jQuery.event,
7233
+ // Deferreds
7234
+ deferred = jQuery.Deferred(),
7235
+ completeDeferred = jQuery.Callbacks( "once memory" ),
7236
+ // Status-dependent callbacks
7237
+ statusCode = s.statusCode || {},
7238
+ // ifModified key
7239
+ ifModifiedKey,
7240
+ // Headers (they are sent all at once)
7241
+ requestHeaders = {},
7242
+ requestHeadersNames = {},
7243
+ // Response headers
7244
+ responseHeadersString,
7245
+ responseHeaders,
7246
+ // transport
7247
+ transport,
7248
+ // timeout handle
7249
+ timeoutTimer,
7250
+ // Cross-domain detection vars
7251
+ parts,
7252
+ // The jqXHR state
7253
+ state = 0,
7254
+ // To know if global events are to be dispatched
7255
+ fireGlobals,
7256
+ // Loop variable
7257
+ i,
7258
+ // Fake xhr
7259
+ jqXHR = {
7260
+
7261
+ readyState: 0,
7262
+
7263
+ // Caches the header
7264
+ setRequestHeader: function( name, value ) {
7265
+ if ( !state ) {
7266
+ var lname = name.toLowerCase();
7267
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
7268
+ requestHeaders[ name ] = value;
7269
+ }
7270
+ return this;
7271
+ },
7272
+
7273
+ // Raw string
7274
+ getAllResponseHeaders: function() {
7275
+ return state === 2 ? responseHeadersString : null;
7276
+ },
7277
+
7278
+ // Builds headers hashtable if needed
7279
+ getResponseHeader: function( key ) {
7280
+ var match;
7281
+ if ( state === 2 ) {
7282
+ if ( !responseHeaders ) {
7283
+ responseHeaders = {};
7284
+ while( ( match = rheaders.exec( responseHeadersString ) ) ) {
7285
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
7286
+ }
7287
+ }
7288
+ match = responseHeaders[ key.toLowerCase() ];
7289
+ }
7290
+ return match === undefined ? null : match;
7291
+ },
7292
+
7293
+ // Overrides response content-type header
7294
+ overrideMimeType: function( type ) {
7295
+ if ( !state ) {
7296
+ s.mimeType = type;
7297
+ }
7298
+ return this;
7299
+ },
7300
+
7301
+ // Cancel the request
7302
+ abort: function( statusText ) {
7303
+ statusText = statusText || "abort";
7304
+ if ( transport ) {
7305
+ transport.abort( statusText );
7306
+ }
7307
+ done( 0, statusText );
7308
+ return this;
7309
+ }
7310
+ };
7311
+
7312
+ // Callback for when everything is done
7313
+ // It is defined here because jslint complains if it is declared
7314
+ // at the end of the function (which would be more logical and readable)
7315
+ function done( status, nativeStatusText, responses, headers ) {
7316
+
7317
+ // Called once
7318
+ if ( state === 2 ) {
7319
+ return;
7320
+ }
7321
+
7322
+ // State is "done" now
7323
+ state = 2;
7324
+
7325
+ // Clear timeout if it exists
7326
+ if ( timeoutTimer ) {
7327
+ clearTimeout( timeoutTimer );
7328
+ }
7329
+
7330
+ // Dereference transport for early garbage collection
7331
+ // (no matter how long the jqXHR object will be used)
7332
+ transport = undefined;
7333
+
7334
+ // Cache response headers
7335
+ responseHeadersString = headers || "";
7336
+
7337
+ // Set readyState
7338
+ jqXHR.readyState = status > 0 ? 4 : 0;
7339
+
7340
+ var isSuccess,
7341
+ success,
7342
+ error,
7343
+ statusText = nativeStatusText,
7344
+ response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
7345
+ lastModified,
7346
+ etag;
7347
+
7348
+ // If successful, handle type chaining
7349
+ if ( status >= 200 && status < 300 || status === 304 ) {
7350
+
7351
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
7352
+ if ( s.ifModified ) {
7353
+
7354
+ if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
7355
+ jQuery.lastModified[ ifModifiedKey ] = lastModified;
7356
+ }
7357
+ if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
7358
+ jQuery.etag[ ifModifiedKey ] = etag;
7359
+ }
7360
+ }
7361
+
7362
+ // If not modified
7363
+ if ( status === 304 ) {
7364
+
7365
+ statusText = "notmodified";
7366
+ isSuccess = true;
7367
+
7368
+ // If we have data
7369
+ } else {
7370
+
7371
+ try {
7372
+ success = ajaxConvert( s, response );
7373
+ statusText = "success";
7374
+ isSuccess = true;
7375
+ } catch(e) {
7376
+ // We have a parsererror
7377
+ statusText = "parsererror";
7378
+ error = e;
7379
+ }
7380
+ }
7381
+ } else {
7382
+ // We extract error from statusText
7383
+ // then normalize statusText and status for non-aborts
7384
+ error = statusText;
7385
+ if ( !statusText || status ) {
7386
+ statusText = "error";
7387
+ if ( status < 0 ) {
7388
+ status = 0;
7389
+ }
7390
+ }
7391
+ }
7392
+
7393
+ // Set data for the fake xhr object
7394
+ jqXHR.status = status;
7395
+ jqXHR.statusText = "" + ( nativeStatusText || statusText );
7396
+
7397
+ // Success/Error
7398
+ if ( isSuccess ) {
7399
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
7400
+ } else {
7401
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
7402
+ }
7403
+
7404
+ // Status-dependent callbacks
7405
+ jqXHR.statusCode( statusCode );
7406
+ statusCode = undefined;
7407
+
7408
+ if ( fireGlobals ) {
7409
+ globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
7410
+ [ jqXHR, s, isSuccess ? success : error ] );
7411
+ }
7412
+
7413
+ // Complete
7414
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
7415
+
7416
+ if ( fireGlobals ) {
7417
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
7418
+ // Handle the global AJAX counter
7419
+ if ( !( --jQuery.active ) ) {
7420
+ jQuery.event.trigger( "ajaxStop" );
7421
+ }
7422
+ }
7423
+ }
7424
+
7425
+ // Attach deferreds
7426
+ deferred.promise( jqXHR );
7427
+ jqXHR.success = jqXHR.done;
7428
+ jqXHR.error = jqXHR.fail;
7429
+ jqXHR.complete = completeDeferred.add;
7430
+
7431
+ // Status-dependent callbacks
7432
+ jqXHR.statusCode = function( map ) {
7433
+ if ( map ) {
7434
+ var tmp;
7435
+ if ( state < 2 ) {
7436
+ for ( tmp in map ) {
7437
+ statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
7438
+ }
7439
+ } else {
7440
+ tmp = map[ jqXHR.status ];
7441
+ jqXHR.then( tmp, tmp );
7442
+ }
7443
+ }
7444
+ return this;
7445
+ };
7446
+
7447
+ // Remove hash character (#7531: and string promotion)
7448
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
7449
+ // We also use the url parameter if available
7450
+ s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
7451
+
7452
+ // Extract dataTypes list
7453
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
7454
+
7455
+ // Determine if a cross-domain request is in order
7456
+ if ( s.crossDomain == null ) {
7457
+ parts = rurl.exec( s.url.toLowerCase() );
7458
+ s.crossDomain = !!( parts &&
7459
+ ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
7460
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
7461
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
7462
+ );
7463
+ }
7464
+
7465
+ // Convert data if not already a string
7466
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
7467
+ s.data = jQuery.param( s.data, s.traditional );
7468
+ }
7469
+
7470
+ // Apply prefilters
7471
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
7472
+
7473
+ // If request was aborted inside a prefiler, stop there
7474
+ if ( state === 2 ) {
7475
+ return false;
7476
+ }
7477
+
7478
+ // We can fire global events as of now if asked to
7479
+ fireGlobals = s.global;
7480
+
7481
+ // Uppercase the type
7482
+ s.type = s.type.toUpperCase();
7483
+
7484
+ // Determine if request has content
7485
+ s.hasContent = !rnoContent.test( s.type );
7486
+
7487
+ // Watch for a new set of requests
7488
+ if ( fireGlobals && jQuery.active++ === 0 ) {
7489
+ jQuery.event.trigger( "ajaxStart" );
7490
+ }
7491
+
7492
+ // More options handling for requests with no content
7493
+ if ( !s.hasContent ) {
7494
+
7495
+ // If data is available, append data to url
7496
+ if ( s.data ) {
7497
+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
7498
+ // #9682: remove data so that it's not used in an eventual retry
7499
+ delete s.data;
7500
+ }
7501
+
7502
+ // Get ifModifiedKey before adding the anti-cache parameter
7503
+ ifModifiedKey = s.url;
7504
+
7505
+ // Add anti-cache in url if needed
7506
+ if ( s.cache === false ) {
7507
+
7508
+ var ts = jQuery.now(),
7509
+ // try replacing _= if it is there
7510
+ ret = s.url.replace( rts, "$1_=" + ts );
7511
+
7512
+ // if nothing was replaced, add timestamp to the end
7513
+ s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
7514
+ }
7515
+ }
7516
+
7517
+ // Set the correct header, if data is being sent
7518
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
7519
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
7520
+ }
7521
+
7522
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
7523
+ if ( s.ifModified ) {
7524
+ ifModifiedKey = ifModifiedKey || s.url;
7525
+ if ( jQuery.lastModified[ ifModifiedKey ] ) {
7526
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
7527
+ }
7528
+ if ( jQuery.etag[ ifModifiedKey ] ) {
7529
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
7530
+ }
7531
+ }
7532
+
7533
+ // Set the Accepts header for the server, depending on the dataType
7534
+ jqXHR.setRequestHeader(
7535
+ "Accept",
7536
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
7537
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
7538
+ s.accepts[ "*" ]
7539
+ );
7540
+
7541
+ // Check for headers option
7542
+ for ( i in s.headers ) {
7543
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
7544
+ }
7545
+
7546
+ // Allow custom headers/mimetypes and early abort
7547
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
7548
+ // Abort if not done already
7549
+ jqXHR.abort();
7550
+ return false;
7551
+
7552
+ }
7553
+
7554
+ // Install callbacks on deferreds
7555
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
7556
+ jqXHR[ i ]( s[ i ] );
7557
+ }
7558
+
7559
+ // Get transport
7560
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
7561
+
7562
+ // If no transport, we auto-abort
7563
+ if ( !transport ) {
7564
+ done( -1, "No Transport" );
7565
+ } else {
7566
+ jqXHR.readyState = 1;
7567
+ // Send global event
7568
+ if ( fireGlobals ) {
7569
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
7570
+ }
7571
+ // Timeout
7572
+ if ( s.async && s.timeout > 0 ) {
7573
+ timeoutTimer = setTimeout( function(){
7574
+ jqXHR.abort( "timeout" );
7575
+ }, s.timeout );
7576
+ }
7577
+
7578
+ try {
7579
+ state = 1;
7580
+ transport.send( requestHeaders, done );
7581
+ } catch (e) {
7582
+ // Propagate exception as error if not done
7583
+ if ( state < 2 ) {
7584
+ done( -1, e );
7585
+ // Simply rethrow otherwise
7586
+ } else {
7587
+ throw e;
7588
+ }
7589
+ }
7590
+ }
7591
+
7592
+ return jqXHR;
7593
+ },
7594
+
7595
+ // Serialize an array of form elements or a set of
7596
+ // key/values into a query string
7597
+ param: function( a, traditional ) {
7598
+ var s = [],
7599
+ add = function( key, value ) {
7600
+ // If value is a function, invoke it and return its value
7601
+ value = jQuery.isFunction( value ) ? value() : value;
7602
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
7603
+ };
7604
+
7605
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
7606
+ if ( traditional === undefined ) {
7607
+ traditional = jQuery.ajaxSettings.traditional;
7608
+ }
7609
+
7610
+ // If an array was passed in, assume that it is an array of form elements.
7611
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
7612
+ // Serialize the form elements
7613
+ jQuery.each( a, function() {
7614
+ add( this.name, this.value );
7615
+ });
7616
+
7617
+ } else {
7618
+ // If traditional, encode the "old" way (the way 1.3.2 or older
7619
+ // did it), otherwise encode params recursively.
7620
+ for ( var prefix in a ) {
7621
+ buildParams( prefix, a[ prefix ], traditional, add );
7622
+ }
7623
+ }
7624
+
7625
+ // Return the resulting serialization
7626
+ return s.join( "&" ).replace( r20, "+" );
7627
+ }
7628
+ });
7629
+
7630
+ function buildParams( prefix, obj, traditional, add ) {
7631
+ if ( jQuery.isArray( obj ) ) {
7632
+ // Serialize array item.
7633
+ jQuery.each( obj, function( i, v ) {
7634
+ if ( traditional || rbracket.test( prefix ) ) {
7635
+ // Treat each array item as a scalar.
7636
+ add( prefix, v );
7637
+
7638
+ } else {
7639
+ // If array item is non-scalar (array or object), encode its
7640
+ // numeric index to resolve deserialization ambiguity issues.
7641
+ // Note that rack (as of 1.0.0) can't currently deserialize
7642
+ // nested arrays properly, and attempting to do so may cause
7643
+ // a server error. Possible fixes are to modify rack's
7644
+ // deserialization algorithm or to provide an option or flag
7645
+ // to force array serialization to be shallow.
7646
+ buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
7647
+ }
7648
+ });
7649
+
7650
+ } else if ( !traditional && obj != null && typeof obj === "object" ) {
7651
+ // Serialize object item.
7652
+ for ( var name in obj ) {
7653
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
7654
+ }
7655
+
7656
+ } else {
7657
+ // Serialize scalar item.
7658
+ add( prefix, obj );
7659
+ }
7660
+ }
7661
+
7662
+ // This is still on the jQuery object... for now
7663
+ // Want to move this to jQuery.ajax some day
7664
+ jQuery.extend({
7665
+
7666
+ // Counter for holding the number of active queries
7667
+ active: 0,
7668
+
7669
+ // Last-Modified header cache for next request
7670
+ lastModified: {},
7671
+ etag: {}
7672
+
7673
+ });
7674
+
7675
+ /* Handles responses to an ajax request:
7676
+ * - sets all responseXXX fields accordingly
7677
+ * - finds the right dataType (mediates between content-type and expected dataType)
7678
+ * - returns the corresponding response
7679
+ */
7680
+ function ajaxHandleResponses( s, jqXHR, responses ) {
7681
+
7682
+ var contents = s.contents,
7683
+ dataTypes = s.dataTypes,
7684
+ responseFields = s.responseFields,
7685
+ ct,
7686
+ type,
7687
+ finalDataType,
7688
+ firstDataType;
7689
+
7690
+ // Fill responseXXX fields
7691
+ for ( type in responseFields ) {
7692
+ if ( type in responses ) {
7693
+ jqXHR[ responseFields[type] ] = responses[ type ];
7694
+ }
7695
+ }
7696
+
7697
+ // Remove auto dataType and get content-type in the process
7698
+ while( dataTypes[ 0 ] === "*" ) {
7699
+ dataTypes.shift();
7700
+ if ( ct === undefined ) {
7701
+ ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
7702
+ }
7703
+ }
7704
+
7705
+ // Check if we're dealing with a known content-type
7706
+ if ( ct ) {
7707
+ for ( type in contents ) {
7708
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
7709
+ dataTypes.unshift( type );
7710
+ break;
7711
+ }
7712
+ }
7713
+ }
7714
+
7715
+ // Check to see if we have a response for the expected dataType
7716
+ if ( dataTypes[ 0 ] in responses ) {
7717
+ finalDataType = dataTypes[ 0 ];
7718
+ } else {
7719
+ // Try convertible dataTypes
7720
+ for ( type in responses ) {
7721
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
7722
+ finalDataType = type;
7723
+ break;
7724
+ }
7725
+ if ( !firstDataType ) {
7726
+ firstDataType = type;
7727
+ }
7728
+ }
7729
+ // Or just use first one
7730
+ finalDataType = finalDataType || firstDataType;
7731
+ }
7732
+
7733
+ // If we found a dataType
7734
+ // We add the dataType to the list if needed
7735
+ // and return the corresponding response
7736
+ if ( finalDataType ) {
7737
+ if ( finalDataType !== dataTypes[ 0 ] ) {
7738
+ dataTypes.unshift( finalDataType );
7739
+ }
7740
+ return responses[ finalDataType ];
7741
+ }
7742
+ }
7743
+
7744
+ // Chain conversions given the request and the original response
7745
+ function ajaxConvert( s, response ) {
7746
+
7747
+ // Apply the dataFilter if provided
7748
+ if ( s.dataFilter ) {
7749
+ response = s.dataFilter( response, s.dataType );
7750
+ }
7751
+
7752
+ var dataTypes = s.dataTypes,
7753
+ converters = {},
7754
+ i,
7755
+ key,
7756
+ length = dataTypes.length,
7757
+ tmp,
7758
+ // Current and previous dataTypes
7759
+ current = dataTypes[ 0 ],
7760
+ prev,
7761
+ // Conversion expression
7762
+ conversion,
7763
+ // Conversion function
7764
+ conv,
7765
+ // Conversion functions (transitive conversion)
7766
+ conv1,
7767
+ conv2;
7768
+
7769
+ // For each dataType in the chain
7770
+ for ( i = 1; i < length; i++ ) {
7771
+
7772
+ // Create converters map
7773
+ // with lowercased keys
7774
+ if ( i === 1 ) {
7775
+ for ( key in s.converters ) {
7776
+ if ( typeof key === "string" ) {
7777
+ converters[ key.toLowerCase() ] = s.converters[ key ];
7778
+ }
7779
+ }
7780
+ }
7781
+
7782
+ // Get the dataTypes
7783
+ prev = current;
7784
+ current = dataTypes[ i ];
7785
+
7786
+ // If current is auto dataType, update it to prev
7787
+ if ( current === "*" ) {
7788
+ current = prev;
7789
+ // If no auto and dataTypes are actually different
7790
+ } else if ( prev !== "*" && prev !== current ) {
7791
+
7792
+ // Get the converter
7793
+ conversion = prev + " " + current;
7794
+ conv = converters[ conversion ] || converters[ "* " + current ];
7795
+
7796
+ // If there is no direct converter, search transitively
7797
+ if ( !conv ) {
7798
+ conv2 = undefined;
7799
+ for ( conv1 in converters ) {
7800
+ tmp = conv1.split( " " );
7801
+ if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
7802
+ conv2 = converters[ tmp[1] + " " + current ];
7803
+ if ( conv2 ) {
7804
+ conv1 = converters[ conv1 ];
7805
+ if ( conv1 === true ) {
7806
+ conv = conv2;
7807
+ } else if ( conv2 === true ) {
7808
+ conv = conv1;
7809
+ }
7810
+ break;
7811
+ }
7812
+ }
7813
+ }
7814
+ }
7815
+ // If we found no converter, dispatch an error
7816
+ if ( !( conv || conv2 ) ) {
7817
+ jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
7818
+ }
7819
+ // If found converter is not an equivalence
7820
+ if ( conv !== true ) {
7821
+ // Convert with 1 or 2 converters accordingly
7822
+ response = conv ? conv( response ) : conv2( conv1(response) );
7823
+ }
7824
+ }
7825
+ }
7826
+ return response;
7827
+ }
7828
+
7829
+
7830
+
7831
+
7832
+ var jsc = jQuery.now(),
7833
+ jsre = /(\=)\?(&|$)|\?\?/i;
7834
+
7835
+ // Default jsonp settings
7836
+ jQuery.ajaxSetup({
7837
+ jsonp: "callback",
7838
+ jsonpCallback: function() {
7839
+ return jQuery.expando + "_" + ( jsc++ );
7840
+ }
7841
+ });
7842
+
7843
+ // Detect, normalize options and install callbacks for jsonp requests
7844
+ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
7845
+
7846
+ var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
7847
+ ( typeof s.data === "string" );
7848
+
7849
+ if ( s.dataTypes[ 0 ] === "jsonp" ||
7850
+ s.jsonp !== false && ( jsre.test( s.url ) ||
7851
+ inspectData && jsre.test( s.data ) ) ) {
7852
+
7853
+ var responseContainer,
7854
+ jsonpCallback = s.jsonpCallback =
7855
+ jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
7856
+ previous = window[ jsonpCallback ],
7857
+ url = s.url,
7858
+ data = s.data,
7859
+ replace = "$1" + jsonpCallback + "$2";
7860
+
7861
+ if ( s.jsonp !== false ) {
7862
+ url = url.replace( jsre, replace );
7863
+ if ( s.url === url ) {
7864
+ if ( inspectData ) {
7865
+ data = data.replace( jsre, replace );
7866
+ }
7867
+ if ( s.data === data ) {
7868
+ // Add callback manually
7869
+ url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
7870
+ }
7871
+ }
7872
+ }
7873
+
7874
+ s.url = url;
7875
+ s.data = data;
7876
+
7877
+ // Install callback
7878
+ window[ jsonpCallback ] = function( response ) {
7879
+ responseContainer = [ response ];
7880
+ };
7881
+
7882
+ // Clean-up function
7883
+ jqXHR.always(function() {
7884
+ // Set callback back to previous value
7885
+ window[ jsonpCallback ] = previous;
7886
+ // Call if it was a function and we have a response
7887
+ if ( responseContainer && jQuery.isFunction( previous ) ) {
7888
+ window[ jsonpCallback ]( responseContainer[ 0 ] );
7889
+ }
7890
+ });
7891
+
7892
+ // Use data converter to retrieve json after script execution
7893
+ s.converters["script json"] = function() {
7894
+ if ( !responseContainer ) {
7895
+ jQuery.error( jsonpCallback + " was not called" );
7896
+ }
7897
+ return responseContainer[ 0 ];
7898
+ };
7899
+
7900
+ // force json dataType
7901
+ s.dataTypes[ 0 ] = "json";
7902
+
7903
+ // Delegate to script
7904
+ return "script";
7905
+ }
7906
+ });
7907
+
7908
+
7909
+
7910
+
7911
+ // Install script dataType
7912
+ jQuery.ajaxSetup({
7913
+ accepts: {
7914
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
7915
+ },
7916
+ contents: {
7917
+ script: /javascript|ecmascript/
7918
+ },
7919
+ converters: {
7920
+ "text script": function( text ) {
7921
+ jQuery.globalEval( text );
7922
+ return text;
7923
+ }
7924
+ }
7925
+ });
7926
+
7927
+ // Handle cache's special case and global
7928
+ jQuery.ajaxPrefilter( "script", function( s ) {
7929
+ if ( s.cache === undefined ) {
7930
+ s.cache = false;
7931
+ }
7932
+ if ( s.crossDomain ) {
7933
+ s.type = "GET";
7934
+ s.global = false;
7935
+ }
7936
+ });
7937
+
7938
+ // Bind script tag hack transport
7939
+ jQuery.ajaxTransport( "script", function(s) {
7940
+
7941
+ // This transport only deals with cross domain requests
7942
+ if ( s.crossDomain ) {
7943
+
7944
+ var script,
7945
+ head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
7946
+
7947
+ return {
7948
+
7949
+ send: function( _, callback ) {
7950
+
7951
+ script = document.createElement( "script" );
7952
+
7953
+ script.async = "async";
7954
+
7955
+ if ( s.scriptCharset ) {
7956
+ script.charset = s.scriptCharset;
7957
+ }
7958
+
7959
+ script.src = s.url;
7960
+
7961
+ // Attach handlers for all browsers
7962
+ script.onload = script.onreadystatechange = function( _, isAbort ) {
7963
+
7964
+ if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
7965
+
7966
+ // Handle memory leak in IE
7967
+ script.onload = script.onreadystatechange = null;
7968
+
7969
+ // Remove the script
7970
+ if ( head && script.parentNode ) {
7971
+ head.removeChild( script );
7972
+ }
7973
+
7974
+ // Dereference the script
7975
+ script = undefined;
7976
+
7977
+ // Callback if not abort
7978
+ if ( !isAbort ) {
7979
+ callback( 200, "success" );
7980
+ }
7981
+ }
7982
+ };
7983
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
7984
+ // This arises when a base node is used (#2709 and #4378).
7985
+ head.insertBefore( script, head.firstChild );
7986
+ },
7987
+
7988
+ abort: function() {
7989
+ if ( script ) {
7990
+ script.onload( 0, 1 );
7991
+ }
7992
+ }
7993
+ };
7994
+ }
7995
+ });
7996
+
7997
+
7998
+
7999
+
8000
+ var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
8001
+ xhrOnUnloadAbort = window.ActiveXObject ? function() {
8002
+ // Abort all pending requests
8003
+ for ( var key in xhrCallbacks ) {
8004
+ xhrCallbacks[ key ]( 0, 1 );
8005
+ }
8006
+ } : false,
8007
+ xhrId = 0,
8008
+ xhrCallbacks;
8009
+
8010
+ // Functions to create xhrs
8011
+ function createStandardXHR() {
8012
+ try {
8013
+ return new window.XMLHttpRequest();
8014
+ } catch( e ) {}
8015
+ }
8016
+
8017
+ function createActiveXHR() {
8018
+ try {
8019
+ return new window.ActiveXObject( "Microsoft.XMLHTTP" );
8020
+ } catch( e ) {}
8021
+ }
8022
+
8023
+ // Create the request object
8024
+ // (This is still attached to ajaxSettings for backward compatibility)
8025
+ jQuery.ajaxSettings.xhr = window.ActiveXObject ?
8026
+ /* Microsoft failed to properly
8027
+ * implement the XMLHttpRequest in IE7 (can't request local files),
8028
+ * so we use the ActiveXObject when it is available
8029
+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
8030
+ * we need a fallback.
8031
+ */
8032
+ function() {
8033
+ return !this.isLocal && createStandardXHR() || createActiveXHR();
8034
+ } :
8035
+ // For all other browsers, use the standard XMLHttpRequest object
8036
+ createStandardXHR;
8037
+
8038
+ // Determine support properties
8039
+ (function( xhr ) {
8040
+ jQuery.extend( jQuery.support, {
8041
+ ajax: !!xhr,
8042
+ cors: !!xhr && ( "withCredentials" in xhr )
8043
+ });
8044
+ })( jQuery.ajaxSettings.xhr() );
8045
+
8046
+ // Create transport if the browser can provide an xhr
8047
+ if ( jQuery.support.ajax ) {
8048
+
8049
+ jQuery.ajaxTransport(function( s ) {
8050
+ // Cross domain only allowed if supported through XMLHttpRequest
8051
+ if ( !s.crossDomain || jQuery.support.cors ) {
8052
+
8053
+ var callback;
8054
+
8055
+ return {
8056
+ send: function( headers, complete ) {
8057
+
8058
+ // Get a new xhr
8059
+ var xhr = s.xhr(),
8060
+ handle,
8061
+ i;
8062
+
8063
+ // Open the socket
8064
+ // Passing null username, generates a login popup on Opera (#2865)
8065
+ if ( s.username ) {
8066
+ xhr.open( s.type, s.url, s.async, s.username, s.password );
8067
+ } else {
8068
+ xhr.open( s.type, s.url, s.async );
8069
+ }
8070
+
8071
+ // Apply custom fields if provided
8072
+ if ( s.xhrFields ) {
8073
+ for ( i in s.xhrFields ) {
8074
+ xhr[ i ] = s.xhrFields[ i ];
8075
+ }
8076
+ }
8077
+
8078
+ // Override mime type if needed
8079
+ if ( s.mimeType && xhr.overrideMimeType ) {
8080
+ xhr.overrideMimeType( s.mimeType );
8081
+ }
8082
+
8083
+ // X-Requested-With header
8084
+ // For cross-domain requests, seeing as conditions for a preflight are
8085
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
8086
+ // (it can always be set on a per-request basis or even using ajaxSetup)
8087
+ // For same-domain requests, won't change header if already provided.
8088
+ if ( !s.crossDomain && !headers["X-Requested-With"] ) {
8089
+ headers[ "X-Requested-With" ] = "XMLHttpRequest";
8090
+ }
8091
+
8092
+ // Need an extra try/catch for cross domain requests in Firefox 3
8093
+ try {
8094
+ for ( i in headers ) {
8095
+ xhr.setRequestHeader( i, headers[ i ] );
8096
+ }
8097
+ } catch( _ ) {}
8098
+
8099
+ // Do send the request
8100
+ // This may raise an exception which is actually
8101
+ // handled in jQuery.ajax (so no try/catch here)
8102
+ xhr.send( ( s.hasContent && s.data ) || null );
8103
+
8104
+ // Listener
8105
+ callback = function( _, isAbort ) {
8106
+
8107
+ var status,
8108
+ statusText,
8109
+ responseHeaders,
8110
+ responses,
8111
+ xml;
8112
+
8113
+ // Firefox throws exceptions when accessing properties
8114
+ // of an xhr when a network error occured
8115
+ // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
8116
+ try {
8117
+
8118
+ // Was never called and is aborted or complete
8119
+ if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
8120
+
8121
+ // Only called once
8122
+ callback = undefined;
8123
+
8124
+ // Do not keep as active anymore
8125
+ if ( handle ) {
8126
+ xhr.onreadystatechange = jQuery.noop;
8127
+ if ( xhrOnUnloadAbort ) {
8128
+ delete xhrCallbacks[ handle ];
8129
+ }
8130
+ }
8131
+
8132
+ // If it's an abort
8133
+ if ( isAbort ) {
8134
+ // Abort it manually if needed
8135
+ if ( xhr.readyState !== 4 ) {
8136
+ xhr.abort();
8137
+ }
8138
+ } else {
8139
+ status = xhr.status;
8140
+ responseHeaders = xhr.getAllResponseHeaders();
8141
+ responses = {};
8142
+ xml = xhr.responseXML;
8143
+
8144
+ // Construct response list
8145
+ if ( xml && xml.documentElement /* #4958 */ ) {
8146
+ responses.xml = xml;
8147
+ }
8148
+ responses.text = xhr.responseText;
8149
+
8150
+ // Firefox throws an exception when accessing
8151
+ // statusText for faulty cross-domain requests
8152
+ try {
8153
+ statusText = xhr.statusText;
8154
+ } catch( e ) {
8155
+ // We normalize with Webkit giving an empty statusText
8156
+ statusText = "";
8157
+ }
8158
+
8159
+ // Filter status for non standard behaviors
8160
+
8161
+ // If the request is local and we have data: assume a success
8162
+ // (success with no data won't get notified, that's the best we
8163
+ // can do given current implementations)
8164
+ if ( !status && s.isLocal && !s.crossDomain ) {
8165
+ status = responses.text ? 200 : 404;
8166
+ // IE - #1450: sometimes returns 1223 when it should be 204
8167
+ } else if ( status === 1223 ) {
8168
+ status = 204;
8169
+ }
8170
+ }
8171
+ }
8172
+ } catch( firefoxAccessException ) {
8173
+ if ( !isAbort ) {
8174
+ complete( -1, firefoxAccessException );
8175
+ }
8176
+ }
8177
+
8178
+ // Call complete if needed
8179
+ if ( responses ) {
8180
+ complete( status, statusText, responses, responseHeaders );
8181
+ }
8182
+ };
8183
+
8184
+ // if we're in sync mode or it's in cache
8185
+ // and has been retrieved directly (IE6 & IE7)
8186
+ // we need to manually fire the callback
8187
+ if ( !s.async || xhr.readyState === 4 ) {
8188
+ callback();
8189
+ } else {
8190
+ handle = ++xhrId;
8191
+ if ( xhrOnUnloadAbort ) {
8192
+ // Create the active xhrs callbacks list if needed
8193
+ // and attach the unload handler
8194
+ if ( !xhrCallbacks ) {
8195
+ xhrCallbacks = {};
8196
+ jQuery( window ).unload( xhrOnUnloadAbort );
8197
+ }
8198
+ // Add to list of active xhrs callbacks
8199
+ xhrCallbacks[ handle ] = callback;
8200
+ }
8201
+ xhr.onreadystatechange = callback;
8202
+ }
8203
+ },
8204
+
8205
+ abort: function() {
8206
+ if ( callback ) {
8207
+ callback(0,1);
8208
+ }
8209
+ }
8210
+ };
8211
+ }
8212
+ });
8213
+ }
8214
+
8215
+
8216
+
8217
+
8218
+ var elemdisplay = {},
8219
+ iframe, iframeDoc,
8220
+ rfxtypes = /^(?:toggle|show|hide)$/,
8221
+ rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
8222
+ timerId,
8223
+ fxAttrs = [
8224
+ // height animations
8225
+ [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
8226
+ // width animations
8227
+ [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
8228
+ // opacity animations
8229
+ [ "opacity" ]
8230
+ ],
8231
+ fxNow;
8232
+
8233
+ jQuery.fn.extend({
8234
+ show: function( speed, easing, callback ) {
8235
+ var elem, display;
8236
+
8237
+ if ( speed || speed === 0 ) {
8238
+ return this.animate( genFx("show", 3), speed, easing, callback );
8239
+
8240
+ } else {
8241
+ for ( var i = 0, j = this.length; i < j; i++ ) {
8242
+ elem = this[ i ];
8243
+
8244
+ if ( elem.style ) {
8245
+ display = elem.style.display;
8246
+
8247
+ // Reset the inline display of this element to learn if it is
8248
+ // being hidden by cascaded rules or not
8249
+ if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
8250
+ display = elem.style.display = "";
8251
+ }
8252
+
8253
+ // Set elements which have been overridden with display: none
8254
+ // in a stylesheet to whatever the default browser style is
8255
+ // for such an element
8256
+ if ( display === "" && jQuery.css(elem, "display") === "none" ) {
8257
+ jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
8258
+ }
8259
+ }
8260
+ }
8261
+
8262
+ // Set the display of most of the elements in a second loop
8263
+ // to avoid the constant reflow
8264
+ for ( i = 0; i < j; i++ ) {
8265
+ elem = this[ i ];
8266
+
8267
+ if ( elem.style ) {
8268
+ display = elem.style.display;
8269
+
8270
+ if ( display === "" || display === "none" ) {
8271
+ elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
8272
+ }
8273
+ }
8274
+ }
8275
+
8276
+ return this;
8277
+ }
8278
+ },
8279
+
8280
+ hide: function( speed, easing, callback ) {
8281
+ if ( speed || speed === 0 ) {
8282
+ return this.animate( genFx("hide", 3), speed, easing, callback);
8283
+
8284
+ } else {
8285
+ var elem, display,
8286
+ i = 0,
8287
+ j = this.length;
8288
+
8289
+ for ( ; i < j; i++ ) {
8290
+ elem = this[i];
8291
+ if ( elem.style ) {
8292
+ display = jQuery.css( elem, "display" );
8293
+
8294
+ if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
8295
+ jQuery._data( elem, "olddisplay", display );
8296
+ }
8297
+ }
8298
+ }
8299
+
8300
+ // Set the display of the elements in a second loop
8301
+ // to avoid the constant reflow
8302
+ for ( i = 0; i < j; i++ ) {
8303
+ if ( this[i].style ) {
8304
+ this[i].style.display = "none";
8305
+ }
8306
+ }
8307
+
8308
+ return this;
8309
+ }
8310
+ },
8311
+
8312
+ // Save the old toggle function
8313
+ _toggle: jQuery.fn.toggle,
8314
+
8315
+ toggle: function( fn, fn2, callback ) {
8316
+ var bool = typeof fn === "boolean";
8317
+
8318
+ if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
8319
+ this._toggle.apply( this, arguments );
8320
+
8321
+ } else if ( fn == null || bool ) {
8322
+ this.each(function() {
8323
+ var state = bool ? fn : jQuery(this).is(":hidden");
8324
+ jQuery(this)[ state ? "show" : "hide" ]();
8325
+ });
8326
+
8327
+ } else {
8328
+ this.animate(genFx("toggle", 3), fn, fn2, callback);
8329
+ }
8330
+
8331
+ return this;
8332
+ },
8333
+
8334
+ fadeTo: function( speed, to, easing, callback ) {
8335
+ return this.filter(":hidden").css("opacity", 0).show().end()
8336
+ .animate({opacity: to}, speed, easing, callback);
8337
+ },
8338
+
8339
+ animate: function( prop, speed, easing, callback ) {
8340
+ var optall = jQuery.speed( speed, easing, callback );
8341
+
8342
+ if ( jQuery.isEmptyObject( prop ) ) {
8343
+ return this.each( optall.complete, [ false ] );
8344
+ }
8345
+
8346
+ // Do not change referenced properties as per-property easing will be lost
8347
+ prop = jQuery.extend( {}, prop );
8348
+
8349
+ function doAnimation() {
8350
+ // XXX 'this' does not always have a nodeName when running the
8351
+ // test suite
8352
+
8353
+ if ( optall.queue === false ) {
8354
+ jQuery._mark( this );
8355
+ }
8356
+
8357
+ var opt = jQuery.extend( {}, optall ),
8358
+ isElement = this.nodeType === 1,
8359
+ hidden = isElement && jQuery(this).is(":hidden"),
8360
+ name, val, p, e,
8361
+ parts, start, end, unit,
8362
+ method;
8363
+
8364
+ // will store per property easing and be used to determine when an animation is complete
8365
+ opt.animatedProperties = {};
8366
+
8367
+ for ( p in prop ) {
8368
+
8369
+ // property name normalization
8370
+ name = jQuery.camelCase( p );
8371
+ if ( p !== name ) {
8372
+ prop[ name ] = prop[ p ];
8373
+ delete prop[ p ];
8374
+ }
8375
+
8376
+ val = prop[ name ];
8377
+
8378
+ // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
8379
+ if ( jQuery.isArray( val ) ) {
8380
+ opt.animatedProperties[ name ] = val[ 1 ];
8381
+ val = prop[ name ] = val[ 0 ];
8382
+ } else {
8383
+ opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
8384
+ }
8385
+
8386
+ if ( val === "hide" && hidden || val === "show" && !hidden ) {
8387
+ return opt.complete.call( this );
8388
+ }
8389
+
8390
+ if ( isElement && ( name === "height" || name === "width" ) ) {
8391
+ // Make sure that nothing sneaks out
8392
+ // Record all 3 overflow attributes because IE does not
8393
+ // change the overflow attribute when overflowX and
8394
+ // overflowY are set to the same value
8395
+ opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
8396
+
8397
+ // Set display property to inline-block for height/width
8398
+ // animations on inline elements that are having width/height animated
8399
+ if ( jQuery.css( this, "display" ) === "inline" &&
8400
+ jQuery.css( this, "float" ) === "none" ) {
8401
+
8402
+ // inline-level elements accept inline-block;
8403
+ // block-level elements need to be inline with layout
8404
+ if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
8405
+ this.style.display = "inline-block";
8406
+
8407
+ } else {
8408
+ this.style.zoom = 1;
8409
+ }
8410
+ }
8411
+ }
8412
+ }
8413
+
8414
+ if ( opt.overflow != null ) {
8415
+ this.style.overflow = "hidden";
8416
+ }
8417
+
8418
+ for ( p in prop ) {
8419
+ e = new jQuery.fx( this, opt, p );
8420
+ val = prop[ p ];
8421
+
8422
+ if ( rfxtypes.test( val ) ) {
8423
+
8424
+ // Tracks whether to show or hide based on private
8425
+ // data attached to the element
8426
+ method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
8427
+ if ( method ) {
8428
+ jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
8429
+ e[ method ]();
8430
+ } else {
8431
+ e[ val ]();
8432
+ }
8433
+
8434
+ } else {
8435
+ parts = rfxnum.exec( val );
8436
+ start = e.cur();
8437
+
8438
+ if ( parts ) {
8439
+ end = parseFloat( parts[2] );
8440
+ unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
8441
+
8442
+ // We need to compute starting value
8443
+ if ( unit !== "px" ) {
8444
+ jQuery.style( this, p, (end || 1) + unit);
8445
+ start = ( (end || 1) / e.cur() ) * start;
8446
+ jQuery.style( this, p, start + unit);
8447
+ }
8448
+
8449
+ // If a +=/-= token was provided, we're doing a relative animation
8450
+ if ( parts[1] ) {
8451
+ end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
8452
+ }
8453
+
8454
+ e.custom( start, end, unit );
8455
+
8456
+ } else {
8457
+ e.custom( start, val, "" );
8458
+ }
8459
+ }
8460
+ }
8461
+
8462
+ // For JS strict compliance
8463
+ return true;
8464
+ }
8465
+
8466
+ return optall.queue === false ?
8467
+ this.each( doAnimation ) :
8468
+ this.queue( optall.queue, doAnimation );
8469
+ },
8470
+
8471
+ stop: function( type, clearQueue, gotoEnd ) {
8472
+ if ( typeof type !== "string" ) {
8473
+ gotoEnd = clearQueue;
8474
+ clearQueue = type;
8475
+ type = undefined;
8476
+ }
8477
+ if ( clearQueue && type !== false ) {
8478
+ this.queue( type || "fx", [] );
8479
+ }
8480
+
8481
+ return this.each(function() {
8482
+ var index,
8483
+ hadTimers = false,
8484
+ timers = jQuery.timers,
8485
+ data = jQuery._data( this );
8486
+
8487
+ // clear marker counters if we know they won't be
8488
+ if ( !gotoEnd ) {
8489
+ jQuery._unmark( true, this );
8490
+ }
8491
+
8492
+ function stopQueue( elem, data, index ) {
8493
+ var hooks = data[ index ];
8494
+ jQuery.removeData( elem, index, true );
8495
+ hooks.stop( gotoEnd );
8496
+ }
8497
+
8498
+ if ( type == null ) {
8499
+ for ( index in data ) {
8500
+ if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
8501
+ stopQueue( this, data, index );
8502
+ }
8503
+ }
8504
+ } else if ( data[ index = type + ".run" ] && data[ index ].stop ){
8505
+ stopQueue( this, data, index );
8506
+ }
8507
+
8508
+ for ( index = timers.length; index--; ) {
8509
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
8510
+ if ( gotoEnd ) {
8511
+
8512
+ // force the next step to be the last
8513
+ timers[ index ]( true );
8514
+ } else {
8515
+ timers[ index ].saveState();
8516
+ }
8517
+ hadTimers = true;
8518
+ timers.splice( index, 1 );
8519
+ }
8520
+ }
8521
+
8522
+ // start the next in the queue if the last step wasn't forced
8523
+ // timers currently will call their complete callbacks, which will dequeue
8524
+ // but only if they were gotoEnd
8525
+ if ( !( gotoEnd && hadTimers ) ) {
8526
+ jQuery.dequeue( this, type );
8527
+ }
8528
+ });
8529
+ }
8530
+
8531
+ });
8532
+
8533
+ // Animations created synchronously will run synchronously
8534
+ function createFxNow() {
8535
+ setTimeout( clearFxNow, 0 );
8536
+ return ( fxNow = jQuery.now() );
8537
+ }
8538
+
8539
+ function clearFxNow() {
8540
+ fxNow = undefined;
8541
+ }
8542
+
8543
+ // Generate parameters to create a standard animation
8544
+ function genFx( type, num ) {
8545
+ var obj = {};
8546
+
8547
+ jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
8548
+ obj[ this ] = type;
8549
+ });
8550
+
8551
+ return obj;
8552
+ }
8553
+
8554
+ // Generate shortcuts for custom animations
8555
+ jQuery.each({
8556
+ slideDown: genFx( "show", 1 ),
8557
+ slideUp: genFx( "hide", 1 ),
8558
+ slideToggle: genFx( "toggle", 1 ),
8559
+ fadeIn: { opacity: "show" },
8560
+ fadeOut: { opacity: "hide" },
8561
+ fadeToggle: { opacity: "toggle" }
8562
+ }, function( name, props ) {
8563
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
8564
+ return this.animate( props, speed, easing, callback );
8565
+ };
8566
+ });
8567
+
8568
+ jQuery.extend({
8569
+ speed: function( speed, easing, fn ) {
8570
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
8571
+ complete: fn || !fn && easing ||
8572
+ jQuery.isFunction( speed ) && speed,
8573
+ duration: speed,
8574
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
8575
+ };
8576
+
8577
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
8578
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
8579
+
8580
+ // normalize opt.queue - true/undefined/null -> "fx"
8581
+ if ( opt.queue == null || opt.queue === true ) {
8582
+ opt.queue = "fx";
8583
+ }
8584
+
8585
+ // Queueing
8586
+ opt.old = opt.complete;
8587
+
8588
+ opt.complete = function( noUnmark ) {
8589
+ if ( jQuery.isFunction( opt.old ) ) {
8590
+ opt.old.call( this );
8591
+ }
8592
+
8593
+ if ( opt.queue ) {
8594
+ jQuery.dequeue( this, opt.queue );
8595
+ } else if ( noUnmark !== false ) {
8596
+ jQuery._unmark( this );
8597
+ }
8598
+ };
8599
+
8600
+ return opt;
8601
+ },
8602
+
8603
+ easing: {
8604
+ linear: function( p, n, firstNum, diff ) {
8605
+ return firstNum + diff * p;
8606
+ },
8607
+ swing: function( p, n, firstNum, diff ) {
8608
+ return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum;
8609
+ }
8610
+ },
8611
+
8612
+ timers: [],
8613
+
8614
+ fx: function( elem, options, prop ) {
8615
+ this.options = options;
8616
+ this.elem = elem;
8617
+ this.prop = prop;
8618
+
8619
+ options.orig = options.orig || {};
8620
+ }
8621
+
8622
+ });
8623
+
8624
+ jQuery.fx.prototype = {
8625
+ // Simple function for setting a style value
8626
+ update: function() {
8627
+ if ( this.options.step ) {
8628
+ this.options.step.call( this.elem, this.now, this );
8629
+ }
8630
+
8631
+ ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
8632
+ },
8633
+
8634
+ // Get the current size
8635
+ cur: function() {
8636
+ if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
8637
+ return this.elem[ this.prop ];
8638
+ }
8639
+
8640
+ var parsed,
8641
+ r = jQuery.css( this.elem, this.prop );
8642
+ // Empty strings, null, undefined and "auto" are converted to 0,
8643
+ // complex values such as "rotate(1rad)" are returned as is,
8644
+ // simple values such as "10px" are parsed to Float.
8645
+ return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
8646
+ },
8647
+
8648
+ // Start an animation from one number to another
8649
+ custom: function( from, to, unit ) {
8650
+ var self = this,
8651
+ fx = jQuery.fx;
8652
+
8653
+ this.startTime = fxNow || createFxNow();
8654
+ this.end = to;
8655
+ this.now = this.start = from;
8656
+ this.pos = this.state = 0;
8657
+ this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
8658
+
8659
+ function t( gotoEnd ) {
8660
+ return self.step( gotoEnd );
8661
+ }
8662
+
8663
+ t.queue = this.options.queue;
8664
+ t.elem = this.elem;
8665
+ t.saveState = function() {
8666
+ if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
8667
+ jQuery._data( self.elem, "fxshow" + self.prop, self.start );
8668
+ }
8669
+ };
8670
+
8671
+ if ( t() && jQuery.timers.push(t) && !timerId ) {
8672
+ timerId = setInterval( fx.tick, fx.interval );
8673
+ }
8674
+ },
8675
+
8676
+ // Simple 'show' function
8677
+ show: function() {
8678
+ var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
8679
+
8680
+ // Remember where we started, so that we can go back to it later
8681
+ this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
8682
+ this.options.show = true;
8683
+
8684
+ // Begin the animation
8685
+ // Make sure that we start at a small width/height to avoid any flash of content
8686
+ if ( dataShow !== undefined ) {
8687
+ // This show is picking up where a previous hide or show left off
8688
+ this.custom( this.cur(), dataShow );
8689
+ } else {
8690
+ this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
8691
+ }
8692
+
8693
+ // Start by showing the element
8694
+ jQuery( this.elem ).show();
8695
+ },
8696
+
8697
+ // Simple 'hide' function
8698
+ hide: function() {
8699
+ // Remember where we started, so that we can go back to it later
8700
+ this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
8701
+ this.options.hide = true;
8702
+
8703
+ // Begin the animation
8704
+ this.custom( this.cur(), 0 );
8705
+ },
8706
+
8707
+ // Each step of an animation
8708
+ step: function( gotoEnd ) {
8709
+ var p, n, complete,
8710
+ t = fxNow || createFxNow(),
8711
+ done = true,
8712
+ elem = this.elem,
8713
+ options = this.options;
8714
+
8715
+ if ( gotoEnd || t >= options.duration + this.startTime ) {
8716
+ this.now = this.end;
8717
+ this.pos = this.state = 1;
8718
+ this.update();
8719
+
8720
+ options.animatedProperties[ this.prop ] = true;
8721
+
8722
+ for ( p in options.animatedProperties ) {
8723
+ if ( options.animatedProperties[ p ] !== true ) {
8724
+ done = false;
8725
+ }
8726
+ }
8727
+
8728
+ if ( done ) {
8729
+ // Reset the overflow
8730
+ if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
8731
+
8732
+ jQuery.each( [ "", "X", "Y" ], function( index, value ) {
8733
+ elem.style[ "overflow" + value ] = options.overflow[ index ];
8734
+ });
8735
+ }
8736
+
8737
+ // Hide the element if the "hide" operation was done
8738
+ if ( options.hide ) {
8739
+ jQuery( elem ).hide();
8740
+ }
8741
+
8742
+ // Reset the properties, if the item has been hidden or shown
8743
+ if ( options.hide || options.show ) {
8744
+ for ( p in options.animatedProperties ) {
8745
+ jQuery.style( elem, p, options.orig[ p ] );
8746
+ jQuery.removeData( elem, "fxshow" + p, true );
8747
+ // Toggle data is no longer needed
8748
+ jQuery.removeData( elem, "toggle" + p, true );
8749
+ }
8750
+ }
8751
+
8752
+ // Execute the complete function
8753
+ // in the event that the complete function throws an exception
8754
+ // we must ensure it won't be called twice. #5684
8755
+
8756
+ complete = options.complete;
8757
+ if ( complete ) {
8758
+
8759
+ options.complete = false;
8760
+ complete.call( elem );
8761
+ }
8762
+ }
8763
+
8764
+ return false;
8765
+
8766
+ } else {
8767
+ // classical easing cannot be used with an Infinity duration
8768
+ if ( options.duration == Infinity ) {
8769
+ this.now = t;
8770
+ } else {
8771
+ n = t - this.startTime;
8772
+ this.state = n / options.duration;
8773
+
8774
+ // Perform the easing function, defaults to swing
8775
+ this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
8776
+ this.now = this.start + ( (this.end - this.start) * this.pos );
8777
+ }
8778
+ // Perform the next step of the animation
8779
+ this.update();
8780
+ }
8781
+
8782
+ return true;
8783
+ }
8784
+ };
8785
+
8786
+ jQuery.extend( jQuery.fx, {
8787
+ tick: function() {
8788
+ var timer,
8789
+ timers = jQuery.timers,
8790
+ i = 0;
8791
+
8792
+ for ( ; i < timers.length; i++ ) {
8793
+ timer = timers[ i ];
8794
+ // Checks the timer has not already been removed
8795
+ if ( !timer() && timers[ i ] === timer ) {
8796
+ timers.splice( i--, 1 );
8797
+ }
8798
+ }
8799
+
8800
+ if ( !timers.length ) {
8801
+ jQuery.fx.stop();
8802
+ }
8803
+ },
8804
+
8805
+ interval: 13,
8806
+
8807
+ stop: function() {
8808
+ clearInterval( timerId );
8809
+ timerId = null;
8810
+ },
8811
+
8812
+ speeds: {
8813
+ slow: 600,
8814
+ fast: 200,
8815
+ // Default speed
8816
+ _default: 400
8817
+ },
8818
+
8819
+ step: {
8820
+ opacity: function( fx ) {
8821
+ jQuery.style( fx.elem, "opacity", fx.now );
8822
+ },
8823
+
8824
+ _default: function( fx ) {
8825
+ if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
8826
+ fx.elem.style[ fx.prop ] = fx.now + fx.unit;
8827
+ } else {
8828
+ fx.elem[ fx.prop ] = fx.now;
8829
+ }
8830
+ }
8831
+ }
8832
+ });
8833
+
8834
+ // Adds width/height step functions
8835
+ // Do not set anything below 0
8836
+ jQuery.each([ "width", "height" ], function( i, prop ) {
8837
+ jQuery.fx.step[ prop ] = function( fx ) {
8838
+ jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
8839
+ };
8840
+ });
8841
+
8842
+ if ( jQuery.expr && jQuery.expr.filters ) {
8843
+ jQuery.expr.filters.animated = function( elem ) {
8844
+ return jQuery.grep(jQuery.timers, function( fn ) {
8845
+ return elem === fn.elem;
8846
+ }).length;
8847
+ };
8848
+ }
8849
+
8850
+ // Try to restore the default display value of an element
8851
+ function defaultDisplay( nodeName ) {
8852
+
8853
+ if ( !elemdisplay[ nodeName ] ) {
8854
+
8855
+ var body = document.body,
8856
+ elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
8857
+ display = elem.css( "display" );
8858
+ elem.remove();
8859
+
8860
+ // If the simple way fails,
8861
+ // get element's real default display by attaching it to a temp iframe
8862
+ if ( display === "none" || display === "" ) {
8863
+ // No iframe to use yet, so create it
8864
+ if ( !iframe ) {
8865
+ iframe = document.createElement( "iframe" );
8866
+ iframe.frameBorder = iframe.width = iframe.height = 0;
8867
+ }
8868
+
8869
+ body.appendChild( iframe );
8870
+
8871
+ // Create a cacheable copy of the iframe document on first call.
8872
+ // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
8873
+ // document to it; WebKit & Firefox won't allow reusing the iframe document.
8874
+ if ( !iframeDoc || !iframe.createElement ) {
8875
+ iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
8876
+ iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
8877
+ iframeDoc.close();
8878
+ }
8879
+
8880
+ elem = iframeDoc.createElement( nodeName );
8881
+
8882
+ iframeDoc.body.appendChild( elem );
8883
+
8884
+ display = jQuery.css( elem, "display" );
8885
+ body.removeChild( iframe );
8886
+ }
8887
+
8888
+ // Store the correct default display
8889
+ elemdisplay[ nodeName ] = display;
8890
+ }
8891
+
8892
+ return elemdisplay[ nodeName ];
8893
+ }
8894
+
8895
+
8896
+
8897
+
8898
+ var rtable = /^t(?:able|d|h)$/i,
8899
+ rroot = /^(?:body|html)$/i;
8900
+
8901
+ if ( "getBoundingClientRect" in document.documentElement ) {
8902
+ jQuery.fn.offset = function( options ) {
8903
+ var elem = this[0], box;
8904
+
8905
+ if ( options ) {
8906
+ return this.each(function( i ) {
8907
+ jQuery.offset.setOffset( this, options, i );
8908
+ });
8909
+ }
8910
+
8911
+ if ( !elem || !elem.ownerDocument ) {
8912
+ return null;
8913
+ }
8914
+
8915
+ if ( elem === elem.ownerDocument.body ) {
8916
+ return jQuery.offset.bodyOffset( elem );
8917
+ }
8918
+
8919
+ try {
8920
+ box = elem.getBoundingClientRect();
8921
+ } catch(e) {}
8922
+
8923
+ var doc = elem.ownerDocument,
8924
+ docElem = doc.documentElement;
8925
+
8926
+ // Make sure we're not dealing with a disconnected DOM node
8927
+ if ( !box || !jQuery.contains( docElem, elem ) ) {
8928
+ return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
8929
+ }
8930
+
8931
+ var body = doc.body,
8932
+ win = getWindow(doc),
8933
+ clientTop = docElem.clientTop || body.clientTop || 0,
8934
+ clientLeft = docElem.clientLeft || body.clientLeft || 0,
8935
+ scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
8936
+ scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
8937
+ top = box.top + scrollTop - clientTop,
8938
+ left = box.left + scrollLeft - clientLeft;
8939
+
8940
+ return { top: top, left: left };
8941
+ };
8942
+
8943
+ } else {
8944
+ jQuery.fn.offset = function( options ) {
8945
+ var elem = this[0];
8946
+
8947
+ if ( options ) {
8948
+ return this.each(function( i ) {
8949
+ jQuery.offset.setOffset( this, options, i );
8950
+ });
8951
+ }
8952
+
8953
+ if ( !elem || !elem.ownerDocument ) {
8954
+ return null;
8955
+ }
8956
+
8957
+ if ( elem === elem.ownerDocument.body ) {
8958
+ return jQuery.offset.bodyOffset( elem );
8959
+ }
8960
+
8961
+ var computedStyle,
8962
+ offsetParent = elem.offsetParent,
8963
+ prevOffsetParent = elem,
8964
+ doc = elem.ownerDocument,
8965
+ docElem = doc.documentElement,
8966
+ body = doc.body,
8967
+ defaultView = doc.defaultView,
8968
+ prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
8969
+ top = elem.offsetTop,
8970
+ left = elem.offsetLeft;
8971
+
8972
+ while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
8973
+ if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
8974
+ break;
8975
+ }
8976
+
8977
+ computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
8978
+ top -= elem.scrollTop;
8979
+ left -= elem.scrollLeft;
8980
+
8981
+ if ( elem === offsetParent ) {
8982
+ top += elem.offsetTop;
8983
+ left += elem.offsetLeft;
8984
+
8985
+ if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
8986
+ top += parseFloat( computedStyle.borderTopWidth ) || 0;
8987
+ left += parseFloat( computedStyle.borderLeftWidth ) || 0;
8988
+ }
8989
+
8990
+ prevOffsetParent = offsetParent;
8991
+ offsetParent = elem.offsetParent;
8992
+ }
8993
+
8994
+ if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
8995
+ top += parseFloat( computedStyle.borderTopWidth ) || 0;
8996
+ left += parseFloat( computedStyle.borderLeftWidth ) || 0;
8997
+ }
8998
+
8999
+ prevComputedStyle = computedStyle;
9000
+ }
9001
+
9002
+ if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
9003
+ top += body.offsetTop;
9004
+ left += body.offsetLeft;
9005
+ }
9006
+
9007
+ if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
9008
+ top += Math.max( docElem.scrollTop, body.scrollTop );
9009
+ left += Math.max( docElem.scrollLeft, body.scrollLeft );
9010
+ }
9011
+
9012
+ return { top: top, left: left };
9013
+ };
9014
+ }
9015
+
9016
+ jQuery.offset = {
9017
+
9018
+ bodyOffset: function( body ) {
9019
+ var top = body.offsetTop,
9020
+ left = body.offsetLeft;
9021
+
9022
+ if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
9023
+ top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
9024
+ left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
9025
+ }
9026
+
9027
+ return { top: top, left: left };
9028
+ },
9029
+
9030
+ setOffset: function( elem, options, i ) {
9031
+ var position = jQuery.css( elem, "position" );
9032
+
9033
+ // set position first, in-case top/left are set even on static elem
9034
+ if ( position === "static" ) {
9035
+ elem.style.position = "relative";
9036
+ }
9037
+
9038
+ var curElem = jQuery( elem ),
9039
+ curOffset = curElem.offset(),
9040
+ curCSSTop = jQuery.css( elem, "top" ),
9041
+ curCSSLeft = jQuery.css( elem, "left" ),
9042
+ calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
9043
+ props = {}, curPosition = {}, curTop, curLeft;
9044
+
9045
+ // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
9046
+ if ( calculatePosition ) {
9047
+ curPosition = curElem.position();
9048
+ curTop = curPosition.top;
9049
+ curLeft = curPosition.left;
9050
+ } else {
9051
+ curTop = parseFloat( curCSSTop ) || 0;
9052
+ curLeft = parseFloat( curCSSLeft ) || 0;
9053
+ }
9054
+
9055
+ if ( jQuery.isFunction( options ) ) {
9056
+ options = options.call( elem, i, curOffset );
9057
+ }
9058
+
9059
+ if ( options.top != null ) {
9060
+ props.top = ( options.top - curOffset.top ) + curTop;
9061
+ }
9062
+ if ( options.left != null ) {
9063
+ props.left = ( options.left - curOffset.left ) + curLeft;
9064
+ }
9065
+
9066
+ if ( "using" in options ) {
9067
+ options.using.call( elem, props );
9068
+ } else {
9069
+ curElem.css( props );
9070
+ }
9071
+ }
9072
+ };
9073
+
9074
+
9075
+ jQuery.fn.extend({
9076
+
9077
+ position: function() {
9078
+ if ( !this[0] ) {
9079
+ return null;
9080
+ }
9081
+
9082
+ var elem = this[0],
9083
+
9084
+ // Get *real* offsetParent
9085
+ offsetParent = this.offsetParent(),
9086
+
9087
+ // Get correct offsets
9088
+ offset = this.offset(),
9089
+ parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
9090
+
9091
+ // Subtract element margins
9092
+ // note: when an element has margin: auto the offsetLeft and marginLeft
9093
+ // are the same in Safari causing offset.left to incorrectly be 0
9094
+ offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
9095
+ offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
9096
+
9097
+ // Add offsetParent borders
9098
+ parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
9099
+ parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
9100
+
9101
+ // Subtract the two offsets
9102
+ return {
9103
+ top: offset.top - parentOffset.top,
9104
+ left: offset.left - parentOffset.left
9105
+ };
9106
+ },
9107
+
9108
+ offsetParent: function() {
9109
+ return this.map(function() {
9110
+ var offsetParent = this.offsetParent || document.body;
9111
+ while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
9112
+ offsetParent = offsetParent.offsetParent;
9113
+ }
9114
+ return offsetParent;
9115
+ });
9116
+ }
9117
+ });
9118
+
9119
+
9120
+ // Create scrollLeft and scrollTop methods
9121
+ jQuery.each( ["Left", "Top"], function( i, name ) {
9122
+ var method = "scroll" + name;
9123
+
9124
+ jQuery.fn[ method ] = function( val ) {
9125
+ var elem, win;
9126
+
9127
+ if ( val === undefined ) {
9128
+ elem = this[ 0 ];
9129
+
9130
+ if ( !elem ) {
9131
+ return null;
9132
+ }
9133
+
9134
+ win = getWindow( elem );
9135
+
9136
+ // Return the scroll offset
9137
+ return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
9138
+ jQuery.support.boxModel && win.document.documentElement[ method ] ||
9139
+ win.document.body[ method ] :
9140
+ elem[ method ];
9141
+ }
9142
+
9143
+ // Set the scroll offset
9144
+ return this.each(function() {
9145
+ win = getWindow( this );
9146
+
9147
+ if ( win ) {
9148
+ win.scrollTo(
9149
+ !i ? val : jQuery( win ).scrollLeft(),
9150
+ i ? val : jQuery( win ).scrollTop()
9151
+ );
9152
+
9153
+ } else {
9154
+ this[ method ] = val;
9155
+ }
9156
+ });
9157
+ };
9158
+ });
9159
+
9160
+ function getWindow( elem ) {
9161
+ return jQuery.isWindow( elem ) ?
9162
+ elem :
9163
+ elem.nodeType === 9 ?
9164
+ elem.defaultView || elem.parentWindow :
9165
+ false;
9166
+ }
9167
+
9168
+
9169
+
9170
+
9171
+ // Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
9172
+ jQuery.each([ "Height", "Width" ], function( i, name ) {
9173
+
9174
+ var type = name.toLowerCase();
9175
+
9176
+ // innerHeight and innerWidth
9177
+ jQuery.fn[ "inner" + name ] = function() {
9178
+ var elem = this[0];
9179
+ return elem ?
9180
+ elem.style ?
9181
+ parseFloat( jQuery.css( elem, type, "padding" ) ) :
9182
+ this[ type ]() :
9183
+ null;
9184
+ };
9185
+
9186
+ // outerHeight and outerWidth
9187
+ jQuery.fn[ "outer" + name ] = function( margin ) {
9188
+ var elem = this[0];
9189
+ return elem ?
9190
+ elem.style ?
9191
+ parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
9192
+ this[ type ]() :
9193
+ null;
9194
+ };
9195
+
9196
+ jQuery.fn[ type ] = function( size ) {
9197
+ // Get window width or height
9198
+ var elem = this[0];
9199
+ if ( !elem ) {
9200
+ return size == null ? null : this;
9201
+ }
9202
+
9203
+ if ( jQuery.isFunction( size ) ) {
9204
+ return this.each(function( i ) {
9205
+ var self = jQuery( this );
9206
+ self[ type ]( size.call( this, i, self[ type ]() ) );
9207
+ });
9208
+ }
9209
+
9210
+ if ( jQuery.isWindow( elem ) ) {
9211
+ // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
9212
+ // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
9213
+ var docElemProp = elem.document.documentElement[ "client" + name ],
9214
+ body = elem.document.body;
9215
+ return elem.document.compatMode === "CSS1Compat" && docElemProp ||
9216
+ body && body[ "client" + name ] || docElemProp;
9217
+
9218
+ // Get document width or height
9219
+ } else if ( elem.nodeType === 9 ) {
9220
+ // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
9221
+ return Math.max(
9222
+ elem.documentElement["client" + name],
9223
+ elem.body["scroll" + name], elem.documentElement["scroll" + name],
9224
+ elem.body["offset" + name], elem.documentElement["offset" + name]
9225
+ );
9226
+
9227
+ // Get or set width or height on the element
9228
+ } else if ( size === undefined ) {
9229
+ var orig = jQuery.css( elem, type ),
9230
+ ret = parseFloat( orig );
9231
+
9232
+ return jQuery.isNumeric( ret ) ? ret : orig;
9233
+
9234
+ // Set the width or height on the element (default to pixels if value is unitless)
9235
+ } else {
9236
+ return this.css( type, typeof size === "string" ? size : size + "px" );
9237
+ }
9238
+ };
9239
+
9240
+ });
9241
+
9242
+
9243
+
9244
+
9245
+ // Expose jQuery to the global object
9246
+ window.jQuery = window.$ = jQuery;
9247
+
9248
+ // Expose jQuery as an AMD module, but only for AMD loaders that
9249
+ // understand the issues with loading multiple versions of jQuery
9250
+ // in a page that all might call define(). The loader will indicate
9251
+ // they have special allowances for multiple jQuery versions by
9252
+ // specifying define.amd.jQuery = true. Register as a named module,
9253
+ // since jQuery can be concatenated with other files that may use define,
9254
+ // but not use a proper concatenation script that understands anonymous
9255
+ // AMD modules. A named AMD is safest and most robust way to register.
9256
+ // Lowercase jquery is used because AMD module names are derived from
9257
+ // file names, and jQuery is normally delivered in a lowercase file name.
9258
+ // Do this after creating the global so that if an AMD module wants to call
9259
+ // noConflict to hide this version of jQuery, it will work.
9260
+ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
9261
+ define( "jquery", [], function () { return jQuery; } );
9262
+ }
9263
+
9264
+
9265
+
9266
+ })( window );
js/magebuzz/jquery/jquery-ui-1.7.2.custom.min.js ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI 1.7.2
3
+ *
4
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * http://docs.jquery.com/UI
9
+ */
10
+ jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*
11
+ * jQuery UI Draggable 1.7.2
12
+ *
13
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
14
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
15
+ * and GPL (GPL-LICENSE.txt) licenses.
16
+ *
17
+ * http://docs.jquery.com/UI/Draggables
18
+ *
19
+ * Depends:
20
+ * ui.core.js
21
+ */
22
+ (function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);;/*
23
+ * jQuery UI Droppable 1.7.2
24
+ *
25
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
26
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
27
+ * and GPL (GPL-LICENSE.txt) licenses.
28
+ *
29
+ * http://docs.jquery.com/UI/Droppables
30
+ *
31
+ * Depends:
32
+ * ui.core.js
33
+ * ui.draggable.js
34
+ */
35
+ (function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&&this._trigger("activate",c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&&this._trigger("deactivate",c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case"fit":return(g<e&&d<c&&p<n&&m<k);break;case"intersect":return(g<e+(q.helperProportions.width/2)&&d-(q.helperProportions.width/2)<c&&p<n+(q.helperProportions.height/2)&&m-(q.helperProportions.height/2)<k);break;case"pointer":var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case"touch":return((n>=p&&n<=k)||(m>=p&&m<=k)||(n<p&&m>k))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0)}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery);;/*
36
+ * jQuery UI Resizable 1.7.2
37
+ *
38
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
39
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
40
+ * and GPL (GPL-LICENSE.txt) licenses.
41
+ *
42
+ * http://docs.jquery.com/UI/Resizables
43
+ *
44
+ * Depends:
45
+ * ui.core.js
46
+ */
47
+ (function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f<k.length;f++){var h=c.trim(k[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidth<k.width),l=a(k.height)&&h.maxHeight&&(h.maxHeight<k.height),g=a(k.width)&&h.minWidth&&(h.minWidth>k.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(k,m){var l=parseInt(k,10)||0,n=parseInt(h[m],10)||0;return l+n})}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/*
48
+ * jQuery UI Selectable 1.7.2
49
+ *
50
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
51
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
52
+ * and GPL (GPL-LICENSE.txt) licenses.
53
+ *
54
+ * http://docs.jquery.com/UI/Selectables
55
+ *
56
+ * Depends:
57
+ * ui.core.js
58
+ */
59
+ (function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.right<d||j.top>g||j.bottom<h))}else{if(e.tolerance=="fit"){k=(j.left>d&&j.right<b&&j.top>h&&j.bottom<g)}}if(k){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;c._trigger("selecting",i,{selecting:j.element})}}else{if(j.selecting){if(i.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}c._trigger("unselecting",i,{unselecting:j.element})}}if(j.selected){if(!i.metaKey&&!j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;c._trigger("unselecting",i,{unselecting:j.element})}}}});return false},_mouseStop:function(d){var b=this;this.dragged=false;var c=this.options;a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=false;e.startselected=false;b._trigger("unselected",d,{unselected:e.element})});a(".ui-selecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");e.selecting=false;e.selected=true;e.startselected=true;b._trigger("selected",d,{selected:e.element})});this._trigger("stop",d);this.helper.remove();return false}}));a.extend(a.ui.selectable,{version:"1.7.2",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery);;/*
60
+ * jQuery UI Sortable 1.7.2
61
+ *
62
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
63
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
64
+ * and GPL (GPL-LICENSE.txt) licenses.
65
+ *
66
+ * http://docs.jquery.com/UI/Sortables
67
+ *
68
+ * Depends:
69
+ * ui.core.js
70
+ */
71
+ (function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);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};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return b&&((b=="down"&&c)||(b=="up"&&!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d<n;d++){var o=a(c[d]);o.data("sortable-item",k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b]}}if(!g&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[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")}}if(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{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 e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!e){f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger("remove",g,this._uiHash())})}for(var c=this.containers.length-1;c>=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}return false}if(!e){this._trigger("beforeStop",d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/*
72
+ * jQuery UI Accordion 1.7.2
73
+ *
74
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
75
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
76
+ * and GPL (GPL-LICENSE.txt) licenses.
77
+ *
78
+ * http://docs.jquery.com/UI/Accordion
79
+ *
80
+ * Depends:
81
+ * ui.core.js
82
+ */
83
+ (function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("<span/>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/*
84
+ * jQuery UI Dialog 1.7.2
85
+ *
86
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
87
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
88
+ * and GPL (GPL-LICENSE.txt) licenses.
89
+ *
90
+ * http://docs.jquery.com/UI/Dialog
91
+ *
92
+ * Depends:
93
+ * ui.core.js
94
+ * ui.draggable.js
95
+ * ui.resizable.js
96
+ */
97
+ (function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||"&nbsp;",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||"&nbsp;");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return c(window).height()+"px"}else{return e+"px"}}else{return c(document).height()+"px"}},width:function(){if(c.browser.msie&&c.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<e){return c(window).width()+"px"}else{return d+"px"}}else{return c(document).width()+"px"}},resize:function(){var d=c([]);c.each(c.ui.dialog.overlay.instances,function(){d=d.add(this)});d.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);;/*
98
+ * jQuery UI Slider 1.7.2
99
+ *
100
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
101
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
102
+ * and GPL (GPL-LICENSE.txt) licenses.
103
+ *
104
+ * http://docs.jquery.com/UI/Slider
105
+ *
106
+ * Depends:
107
+ * ui.core.js
108
+ */
109
+ (function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length<c.values.length){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d<b))){d=b}if(d!=this.values(e)){var c=this.values();c[e]=d;var h=this._trigger("slide",f,{handle:this.handles[e],value:d,values:c});var b=this.values(e?0:1);if(h!==false){this.values(e,d,(f.type=="mousedown"&&this.options.animate),true)}}}else{if(d!=this.value()){var h=this._trigger("slide",f,{handle:this.handles[e],value:d});if(h!==false){this._setData("value",d,(f.type=="mousedown"&&this.options.animate))}}}},_stop:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("stop",d,b)},_change:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("change",d,b)},value:function(b){if(arguments.length){this._setData("value",b);this._change(null,0)}return this._value()},values:function(b,e,c,d){if(arguments.length>1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/*
110
+ * jQuery UI Tabs 1.7.2
111
+ *
112
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
113
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
114
+ * and GPL (GPL-LICENSE.txt) licenses.
115
+ *
116
+ * http://docs.jquery.com/UI/Tabs
117
+ *
118
+ * Depends:
119
+ * ui.core.js
120
+ */
121
+ (function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery);;/*
122
+ * jQuery UI Datepicker 1.7.2
123
+ *
124
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
125
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
126
+ * and GPL (GPL-LICENSE.txt) licenses.
127
+ *
128
+ * http://docs.jquery.com/UI/Datepicker
129
+ *
130
+ * Depends:
131
+ * ui.core.js
132
+ */
133
+ (function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);;/*
134
+ * jQuery UI Progressbar 1.7.2
135
+ *
136
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
137
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
138
+ * and GPL (GPL-LICENSE.txt) licenses.
139
+ *
140
+ * http://docs.jquery.com/UI/Progressbar
141
+ *
142
+ * Depends:
143
+ * ui.core.js
144
+ */
145
+ (function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;/*
146
+ * jQuery UI Effects 1.7.2
147
+ *
148
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
149
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
150
+ * and GPL (GPL-LICENSE.txt) licenses.
151
+ *
152
+ * http://docs.jquery.com/UI/Effects/
153
+ */
154
+ jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"}return g},getBaseline:function(g,h){var i,f;switch(g[0]){case"top":i=0;break;case"middle":i=0.5;break;case"bottom":i=1;break;default:i=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:i}},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent()}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return -(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f},easeOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return h*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+f},easeInOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l/2)==2){return f+m}if(!k){k=l*(0.3*1.5)}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}if(i<1){return -0.5*(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f}return h*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+f},easeInBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*(h/=j)*h*((i+1)*h-i)+f},easeOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*((h=h/j-1)*h*((i+1)*h+i)+1)+f},easeInOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}if((h/=j/2)<1){return k/2*(h*h*(((i*=(1.525))+1)*h-i))+f}return k/2*((h-=2)*h*(((i*=(1.525))+1)*h+i)+2)+f},easeInBounce:function(g,h,f,j,i){return j-d.easing.easeOutBounce(g,i-h,0,j,i)+f},easeOutBounce:function(g,h,f,j,i){if((h/=i)<(1/2.75)){return j*(7.5625*h*h)+f}else{if(h<(2/2.75)){return j*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return j*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return j*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,j,i){if(h<i/2){return d.easing.easeInBounce(g,h*2,0,j,i)*0.5+f}return d.easing.easeOutBounce(g,h*2-i,0,j,i)*0.5+j*0.5+f}})})(jQuery);;/*
155
+ * jQuery UI Effects Blind 1.7.2
156
+ *
157
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
158
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
159
+ * and GPL (GPL-LICENSE.txt) licenses.
160
+ *
161
+ * http://docs.jquery.com/UI/Effects/Blind
162
+ *
163
+ * Depends:
164
+ * effects.core.js
165
+ */
166
+ (function(a){a.effects.blind=function(b){return this.queue(function(){var d=a(this),c=["position","top","left"];var h=a.effects.setMode(d,b.options.mode||"hide");var g=b.options.direction||"vertical";a.effects.save(d,c);d.show();var j=a.effects.createWrapper(d).css({overflow:"hidden"});var e=(g=="vertical")?"height":"width";var i=(g=="vertical")?j.height():j.width();if(h=="show"){j.css(e,0)}var f={};f[e]=h=="show"?i:0;j.animate(f,b.duration,b.options.easing,function(){if(h=="hide"){d.hide()}a.effects.restore(d,c);a.effects.removeWrapper(d);if(b.callback){b.callback.apply(d[0],arguments)}d.dequeue()})})}})(jQuery);;/*
167
+ * jQuery UI Effects Bounce 1.7.2
168
+ *
169
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
170
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
171
+ * and GPL (GPL-LICENSE.txt) licenses.
172
+ *
173
+ * http://docs.jquery.com/UI/Effects/Bounce
174
+ *
175
+ * Depends:
176
+ * effects.core.js
177
+ */
178
+ (function(a){a.effects.bounce=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"up";var c=b.options.distance||20;var d=b.options.times||5;var g=b.duration||250;if(/show|hide/.test(k)){l.push("opacity")}a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var c=b.options.distance||(f=="top"?e.outerHeight({margin:true})/3:e.outerWidth({margin:true})/3);if(k=="show"){e.css("opacity",0).css(f,p=="pos"?-c:c)}if(k=="hide"){c=c/(d*2)}if(k!="hide"){d--}if(k=="show"){var h={opacity:1};h[f]=(p=="pos"?"+=":"-=")+c;e.animate(h,g/2,b.options.easing);c=c/2;d--}for(var j=0;j<d;j++){var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing);c=(k=="hide")?c*2:c/2}if(k=="hide"){var h={opacity:0};h[f]=(p=="pos"?"-=":"+=")+c;e.animate(h,g/2,b.options.easing,function(){e.hide();a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}else{var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
179
+ * jQuery UI Effects Clip 1.7.2
180
+ *
181
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
182
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
183
+ * and GPL (GPL-LICENSE.txt) licenses.
184
+ *
185
+ * http://docs.jquery.com/UI/Effects/Clip
186
+ *
187
+ * Depends:
188
+ * effects.core.js
189
+ */
190
+ (function(a){a.effects.clip=function(b){return this.queue(function(){var f=a(this),j=["position","top","left","height","width"];var i=a.effects.setMode(f,b.options.mode||"hide");var k=b.options.direction||"vertical";a.effects.save(f,j);f.show();var c=a.effects.createWrapper(f).css({overflow:"hidden"});var e=f[0].tagName=="IMG"?c:f;var g={size:(k=="vertical")?"height":"width",position:(k=="vertical")?"top":"left"};var d=(k=="vertical")?e.height():e.width();if(i=="show"){e.css(g.size,0);e.css(g.position,d/2)}var h={};h[g.size]=i=="show"?d:0;h[g.position]=i=="show"?0:d/2;e.animate(h,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){f.hide()}a.effects.restore(f,j);a.effects.removeWrapper(f);if(b.callback){b.callback.apply(f[0],arguments)}f.dequeue()}})})}})(jQuery);;/*
191
+ * jQuery UI Effects Drop 1.7.2
192
+ *
193
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
194
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
195
+ * and GPL (GPL-LICENSE.txt) licenses.
196
+ *
197
+ * http://docs.jquery.com/UI/Effects/Drop
198
+ *
199
+ * Depends:
200
+ * effects.core.js
201
+ */
202
+ (function(a){a.effects.drop=function(b){return this.queue(function(){var e=a(this),d=["position","top","left","opacity"];var i=a.effects.setMode(e,b.options.mode||"hide");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e);var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true})/2:e.outerWidth({margin:true})/2);if(i=="show"){e.css("opacity",0).css(f,c=="pos"?-j:j)}var g={opacity:i=="show"?1:0};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
203
+ * jQuery UI Effects Explode 1.7.2
204
+ *
205
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
206
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
207
+ * and GPL (GPL-LICENSE.txt) licenses.
208
+ *
209
+ * http://docs.jquery.com/UI/Effects/Explode
210
+ *
211
+ * Depends:
212
+ * effects.core.js
213
+ */
214
+ (function(a){a.effects.explode=function(b){return this.queue(function(){var k=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;var e=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):b.options.mode;var h=a(this).show().css("visibility","hidden");var l=h.offset();l.top-=parseInt(h.css("marginTop"),10)||0;l.left-=parseInt(h.css("marginLeft"),10)||0;var g=h.outerWidth(true);var c=h.outerHeight(true);for(var f=0;f<k;f++){for(var d=0;d<e;d++){h.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*
215
+ * jQuery UI Effects Fold 1.7.2
216
+ *
217
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
218
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
219
+ * and GPL (GPL-LICENSE.txt) licenses.
220
+ *
221
+ * http://docs.jquery.com/UI/Effects/Fold
222
+ *
223
+ * Depends:
224
+ * effects.core.js
225
+ */
226
+ (function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),k=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var o=b.options.size||15;var n=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,k);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var i=((h=="show")!=n);var f=i?["width","height"]:["height","width"];var c=i?[d.width(),d.height()]:[d.height(),d.width()];var j=/([0-9]+)%/.exec(o);if(j){o=parseInt(j[1],10)/100*c[h=="hide"?0:1]}if(h=="show"){d.css(n?{height:0,width:o}:{height:o,width:0})}var m={},l={};m[f[0]]=h=="show"?c[0]:o;l[f[1]]=h=="show"?c[1]:0;d.animate(m,g,b.options.easing).animate(l,g,b.options.easing,function(){if(h=="hide"){e.hide()}a.effects.restore(e,k);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);;/*
227
+ * jQuery UI Effects Highlight 1.7.2
228
+ *
229
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
230
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
231
+ * and GPL (GPL-LICENSE.txt) licenses.
232
+ *
233
+ * http://docs.jquery.com/UI/Effects/Highlight
234
+ *
235
+ * Depends:
236
+ * effects.core.js
237
+ */
238
+ (function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
239
+ * jQuery UI Effects Pulsate 1.7.2
240
+ *
241
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
242
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
243
+ * and GPL (GPL-LICENSE.txt) licenses.
244
+ *
245
+ * http://docs.jquery.com/UI/Effects/Pulsate
246
+ *
247
+ * Depends:
248
+ * effects.core.js
249
+ */
250
+ (function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2}for(var c=0;c<f;c++){d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing)}if(g=="hide"){d.animate({opacity:0},e,b.options.easing,function(){d.hide();if(b.callback){b.callback.apply(this,arguments)}})}else{d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing,function(){if(b.callback){b.callback.apply(this,arguments)}})}d.queue("fx",function(){d.dequeue()});d.dequeue()})}})(jQuery);;/*
251
+ * jQuery UI Effects Scale 1.7.2
252
+ *
253
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
254
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
255
+ * and GPL (GPL-LICENSE.txt) licenses.
256
+ *
257
+ * http://docs.jquery.com/UI/Effects/Scale
258
+ *
259
+ * Depends:
260
+ * effects.core.js
261
+ */
262
+ (function(a){a.effects.puff=function(b){return this.queue(function(){var f=a(this);var c=a.extend(true,{},b.options);var h=a.effects.setMode(f,b.options.mode||"hide");var g=parseInt(b.options.percent,10)||150;c.fade=true;var e={height:f.height(),width:f.width()};var d=g/100;f.from=(h=="hide")?e:{height:e.height*d,width:e.width*d};c.from=f.from;c.percent=(h=="hide")?g:100;c.mode=h;f.effect("scale",c,b.duration,b.callback);f.dequeue()})};a.effects.scale=function(b){return this.queue(function(){var g=a(this);var d=a.extend(true,{},b.options);var j=a.effects.setMode(g,b.options.mode||"effect");var h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:(j=="hide"?0:100));var i=b.options.direction||"both";var c=b.options.origin;if(j!="effect"){d.origin=c||["middle","center"];d.restore=true}var f={height:g.height(),width:g.width()};g.from=b.options.from||(j=="show"?{height:0,width:0}:f);var e={y:i!="horizontal"?(h/100):1,x:i!="vertical"?(h/100):1};g.to={height:f.height*e.y,width:f.width*e.x};if(b.options.fade){if(j=="show"){g.from.opacity=0;g.to.opacity=1}if(j=="hide"){g.from.opacity=1;g.to.opacity=0}}d.from=g.from;d.to=g.to;d.mode=j;g.effect("size",d,b.duration,b.callback);g.dequeue()})};a.effects.size=function(b){return this.queue(function(){var c=a(this),n=["position","top","left","width","height","overflow","opacity"];var m=["position","top","left","overflow","opacity"];var j=["width","height","overflow"];var p=["fontSize"];var k=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var g=a.effects.setMode(c,b.options.mode||"effect");var i=b.options.restore||false;var e=b.options.scale||"both";var o=b.options.origin;var d={height:c.height(),width:c.width()};c.from=b.options.from||d;c.to=b.options.to||d;if(o){var h=a.effects.getBaseline(o,d);c.from.top=(d.height-c.from.height)*h.y;c.from.left=(d.width-c.from.width)*h.x;c.to.top=(d.height-c.to.height)*h.y;c.to.left=(d.width-c.to.width)*h.x}var l={from:{y:c.from.height/d.height,x:c.from.width/d.width},to:{y:c.to.height/d.height,x:c.to.width/d.width}};if(e=="box"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(k);c.from=a.effects.setTransition(c,k,l.from.y,c.from);c.to=a.effects.setTransition(c,k,l.to.y,c.to)}if(l.from.x!=l.to.x){n=n.concat(f);c.from=a.effects.setTransition(c,f,l.from.x,c.from);c.to=a.effects.setTransition(c,f,l.to.x,c.to)}}if(e=="content"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(p);c.from=a.effects.setTransition(c,p,l.from.y,c.from);c.to=a.effects.setTransition(c,p,l.to.y,c.to)}}a.effects.save(c,i?n:m);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if(e=="content"||e=="both"){k=k.concat(["marginTop","marginBottom"]).concat(p);f=f.concat(["marginLeft","marginRight"]);j=n.concat(k).concat(f);c.find("*[width]").each(function(){child=a(this);if(i){a.effects.save(child,j)}var q={height:child.height(),width:child.width()};child.from={height:q.height*l.from.y,width:q.width*l.from.x};child.to={height:q.height*l.to.y,width:q.width*l.to.x};if(l.from.y!=l.to.y){child.from=a.effects.setTransition(child,k,l.from.y,child.from);child.to=a.effects.setTransition(child,k,l.to.y,child.to)}if(l.from.x!=l.to.x){child.from=a.effects.setTransition(child,f,l.from.x,child.from);child.to=a.effects.setTransition(child,f,l.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){if(i){a.effects.restore(child,j)}})})}c.animate(c.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(g=="hide"){c.hide()}a.effects.restore(c,i?n:m);a.effects.removeWrapper(c);if(b.callback){b.callback.apply(this,arguments)}c.dequeue()}})})}})(jQuery);;/*
263
+ * jQuery UI Effects Shake 1.7.2
264
+ *
265
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
266
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
267
+ * and GPL (GPL-LICENSE.txt) licenses.
268
+ *
269
+ * http://docs.jquery.com/UI/Effects/Shake
270
+ *
271
+ * Depends:
272
+ * effects.core.js
273
+ */
274
+ (function(a){a.effects.shake=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"left";var c=b.options.distance||20;var d=b.options.times||3;var g=b.duration||b.options.duration||140;a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var h={},o={},m={};h[f]=(p=="pos"?"-=":"+=")+c;o[f]=(p=="pos"?"+=":"-=")+c*2;m[f]=(p=="pos"?"-=":"+=")+c*2;e.animate(h,g,b.options.easing);for(var j=1;j<d;j++){e.animate(o,g,b.options.easing).animate(m,g,b.options.easing)}e.animate(o,g,b.options.easing).animate(h,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}});e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
275
+ * jQuery UI Effects Slide 1.7.2
276
+ *
277
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
278
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
279
+ * and GPL (GPL-LICENSE.txt) licenses.
280
+ *
281
+ * http://docs.jquery.com/UI/Effects/Slide
282
+ *
283
+ * Depends:
284
+ * effects.core.js
285
+ */
286
+ (function(a){a.effects.slide=function(b){return this.queue(function(){var e=a(this),d=["position","top","left"];var i=a.effects.setMode(e,b.options.mode||"show");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e).css({overflow:"hidden"});var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true}):e.outerWidth({margin:true}));if(i=="show"){e.css(f,c=="pos"?-j:j)}var g={};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
287
+ * jQuery UI Effects Transfer 1.7.2
288
+ *
289
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
290
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
291
+ * and GPL (GPL-LICENSE.txt) licenses.
292
+ *
293
+ * http://docs.jquery.com/UI/Effects/Transfer
294
+ *
295
+ * Depends:
296
+ * effects.core.js
297
+ */
298
+ (function(a){a.effects.transfer=function(b){return this.queue(function(){var f=a(this),h=a(b.options.to),e=h.offset(),g={top:e.top,left:e.left,height:h.innerHeight(),width:h.innerWidth()},d=f.offset(),c=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);;
js/magebuzz/jquery/jquery.bxSlider.js ADDED
@@ -0,0 +1,1260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery bxSlider v3.0
3
+ * http://bxslider.com
4
+ *
5
+ * Copyright 2011, Steven Wanderski
6
+ * http://bxcreative.com
7
+ *
8
+ * Free to use and abuse under the MIT license.
9
+ * http://www.opensource.org/licenses/mit-license.php
10
+ *
11
+ */
12
+
13
+
14
+ (function($){
15
+
16
+ $.fn.bxSlider = function(options){
17
+
18
+ var defaults = {
19
+ mode: 'horizontal', // 'horizontal', 'vertical', 'fade'
20
+ infiniteLoop: true, // true, false - display first slide after last
21
+ hideControlOnEnd: false, // true, false - if true, will hide 'next' control on last slide and 'prev' control on first
22
+ controls: true, // true, false - previous and next controls
23
+ speed: 500, // integer - in ms, duration of time slide transitions will occupy
24
+ easing: 'swing', // used with jquery.easing.1.3.js - see http://gsgd.co.uk/sandbox/jquery/easing/ for available options
25
+ pager: false, // true / false - display a pager
26
+ pagerSelector: null, // jQuery selector - element to contain the pager. ex: '#item'
27
+ pagerType: 'full', // 'full', 'short' - if 'full' pager displays 1,2,3... if 'short' pager displays 1 / 4
28
+ pagerLocation: 'bottom', // 'bottom', 'top' - location of pager
29
+ pagerShortSeparator: '/', // string - ex: 'of' pager would display 1 of 4
30
+ pagerActiveClass: 'pager-active', // string - classname attached to the active pager link
31
+ nextText: 'next', // string - text displayed for 'next' control
32
+ nextImage: '', // string - filepath of image used for 'next' control. ex: 'images/next.jpg'
33
+ nextSelector: null, // jQuery selector - element to contain the next control. ex: '#next'
34
+ prevText: 'prev', // string - text displayed for 'previous' control
35
+ prevImage: '', // string - filepath of image used for 'previous' control. ex: 'images/prev.jpg'
36
+ prevSelector: null, // jQuery selector - element to contain the previous control. ex: '#next'
37
+ captions: false, // true, false - display image captions (reads the image 'title' tag)
38
+ captionsSelector: null, // jQuery selector - element to contain the captions. ex: '#captions'
39
+ auto: false, // true, false - make slideshow change automatically
40
+ autoDirection: 'next', // 'next', 'prev' - direction in which auto show will traverse
41
+ autoControls: false, // true, false - show 'start' and 'stop' controls for auto show
42
+ autoControlsSelector: null, // jQuery selector - element to contain the auto controls. ex: '#auto-controls'
43
+ autoStart: true, // true, false - if false show will wait for 'start' control to activate
44
+ autoHover: false, // true, false - if true show will pause on mouseover
45
+ autoDelay: 0, // integer - in ms, the amount of time before starting the auto show
46
+ pause: 3000, // integer - in ms, the duration between each slide transition
47
+ startText: 'start', // string - text displayed for 'start' control
48
+ startImage: '', // string - filepath of image used for 'start' control. ex: 'images/start.jpg'
49
+ stopText: 'stop', // string - text displayed for 'stop' control
50
+ stopImage: '', // string - filepath of image used for 'stop' control. ex: 'images/stop.jpg'
51
+ ticker: false, // true, false - continuous motion ticker mode (think news ticker)
52
+ // note: autoControls, autoControlsSelector, and autoHover apply to ticker!
53
+ tickerSpeed: 5000, // float - use value between 1 and 5000 to determine ticker speed - the smaller the value the faster the ticker speed
54
+ tickerDirection: 'next', // 'next', 'prev' - direction in which ticker show will traverse
55
+ tickerHover: false, // true, false - if true ticker will pause on mouseover
56
+ wrapperClass: 'bx-wrapper', // string - classname attached to the slider wraper
57
+ startingSlide: 0, // integer - show will start on specified slide. note: slides are zero based!
58
+ displaySlideQty: 1, // integer - number of slides to display at once
59
+ moveSlideQty: 1, // integer - number of slides to move at once
60
+ randomStart: false, // true, false - if true show will start on a random slide
61
+ onBeforeSlide: function(){}, // function(currentSlideNumber, totalSlideQty, currentSlideHtmlObject) - advanced use only! see the tutorial here: http://bxslider.com/custom-pager
62
+ onAfterSlide: function(){}, // function(currentSlideNumber, totalSlideQty, currentSlideHtmlObject) - advanced use only! see the tutorial here: http://bxslider.com/custom-pager
63
+ onLastSlide: function(){}, // function(currentSlideNumber, totalSlideQty, currentSlideHtmlObject) - advanced use only! see the tutorial here: http://bxslider.com/custom-pager
64
+ onFirstSlide: function(){}, // function(currentSlideNumber, totalSlideQty, currentSlideHtmlObject) - advanced use only! see the tutorial here: http://bxslider.com/custom-pager
65
+ onNextSlide: function(){}, // function(currentSlideNumber, totalSlideQty, currentSlideHtmlObject) - advanced use only! see the tutorial here: http://bxslider.com/custom-pager
66
+ onPrevSlide: function(){}, // function(currentSlideNumber, totalSlideQty, currentSlideHtmlObject) - advanced use only! see the tutorial here: http://bxslider.com/custom-pager
67
+ buildPager: null // function(slideIndex, slideHtmlObject){ return string; } - advanced use only! see the tutorial here: http://bxslider.com/custom-pager
68
+ }
69
+
70
+ var options = $.extend(defaults, options);
71
+
72
+ // cache the base element
73
+ var base = this;
74
+ // initialize (and localize) all variables
75
+ var $parent = '';
76
+ var $origElement = '';
77
+ var $children = '';
78
+ var $outerWrapper = '';
79
+ var $firstChild = '';
80
+ var childrenWidth = '';
81
+ var childrenOuterWidth = '';
82
+ var wrapperWidth = '';
83
+ var wrapperHeight = '';
84
+ var $pager = '';
85
+ var interval = '';
86
+ var $autoControls = '';
87
+ var $stopHtml = '';
88
+ var $startContent = '';
89
+ var $stopContent = '';
90
+ var autoPlaying = true;
91
+ var loaded = false;
92
+ var childrenMaxWidth = 0;
93
+ var childrenMaxHeight = 0;
94
+ var currentSlide = 0;
95
+ var origLeft = 0;
96
+ var origTop = 0;
97
+ var origShowWidth = 0;
98
+ var origShowHeight = 0;
99
+ var tickerLeft = 0;
100
+ var tickerTop = 0;
101
+ var isWorking = false;
102
+
103
+ var firstSlide = 0;
104
+ var lastSlide = $children.length - 1;
105
+
106
+
107
+ // PUBLIC FUNCTIONS
108
+
109
+ /**
110
+ * Go to specified slide
111
+ */
112
+ this.goToSlide = function(number, stopAuto){
113
+ if(!isWorking){
114
+ isWorking = true;
115
+ // set current slide to argument
116
+ currentSlide = number;
117
+ options.onBeforeSlide(currentSlide, $children.length, $children.eq(currentSlide));
118
+ // check if stopAuto argument is supplied
119
+ if(typeof(stopAuto) == 'undefined'){
120
+ var stopAuto = true;
121
+ }
122
+ if(stopAuto){
123
+ // if show is auto playing, stop it
124
+ if(options.auto){
125
+ base.stopShow(true);
126
+ }
127
+ }
128
+ slide = number;
129
+ // check for first slide callback
130
+ if(slide == firstSlide){
131
+ options.onFirstSlide(currentSlide, $children.length, $children.eq(currentSlide));
132
+ }
133
+ // check for last slide callback
134
+ if(slide == lastSlide){
135
+ options.onLastSlide(currentSlide, $children.length, $children.eq(currentSlide));
136
+ }
137
+ // horizontal
138
+ if(options.mode == 'horizontal'){
139
+ $parent.animate({'left': '-'+getSlidePosition(slide, 'left')+'px'}, options.speed, options.easing, function(){
140
+ isWorking = false;
141
+ // perform the callback function
142
+ options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
143
+ });
144
+ // vertical
145
+ }else if(options.mode == 'vertical'){
146
+ $parent.animate({'top': '-'+getSlidePosition(slide, 'top')+'px'}, options.speed, options.easing, function(){
147
+ isWorking = false;
148
+ // perform the callback function
149
+ options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
150
+ });
151
+ // fade
152
+ }else if(options.mode == 'fade'){
153
+ setChildrenFade();
154
+ }
155
+ // check to remove controls on last/first slide
156
+ checkEndControls();
157
+ // accomodate multi slides
158
+ if(options.moveSlideQty > 1){
159
+ number = Math.floor(number / options.moveSlideQty);
160
+ }
161
+ // make the current slide active
162
+ makeSlideActive(number);
163
+ // display the caption
164
+ showCaptions();
165
+ }
166
+ }
167
+
168
+ /**
169
+ * Go to next slide
170
+ */
171
+ this.goToNextSlide = function(stopAuto){
172
+ // check if stopAuto argument is supplied
173
+ if(typeof(stopAuto) == 'undefined'){
174
+ var stopAuto = true;
175
+ }
176
+ if(stopAuto){
177
+ // if show is auto playing, stop it
178
+ if(options.auto){
179
+ base.stopShow(true);
180
+ }
181
+ }
182
+ // makes slideshow finite
183
+ if(!options.infiniteLoop){
184
+ if(!isWorking){
185
+ var slideLoop = false;
186
+ // make current slide the old value plus moveSlideQty
187
+ currentSlide = (currentSlide + (options.moveSlideQty));
188
+ // if current slide has looped on itself
189
+ if(currentSlide <= lastSlide){
190
+ checkEndControls();
191
+ // next slide callback
192
+ options.onNextSlide(currentSlide, $children.length, $children.eq(currentSlide));
193
+ // move to appropriate slide
194
+ base.goToSlide(currentSlide);
195
+ }else{
196
+ currentSlide -= options.moveSlideQty;
197
+ }
198
+ } // end if(!isWorking)
199
+ }else{
200
+ if(!isWorking){
201
+ isWorking = true;
202
+ var slideLoop = false;
203
+ // make current slide the old value plus moveSlideQty
204
+ currentSlide = (currentSlide + options.moveSlideQty);
205
+ // if current slide has looped on itself
206
+ if(currentSlide > lastSlide){
207
+ currentSlide = currentSlide % $children.length;
208
+ slideLoop = true;
209
+ }
210
+ // next slide callback
211
+ options.onNextSlide(currentSlide, $children.length, $children.eq(currentSlide));
212
+ // slide before callback
213
+ options.onBeforeSlide(currentSlide, $children.length, $children.eq(currentSlide));
214
+ if(options.mode == 'horizontal'){
215
+ // get the new 'left' property for $parent
216
+ var parentLeft = (options.moveSlideQty * childrenOuterWidth);
217
+ // animate to the new 'left'
218
+ $parent.animate({'left': '-='+parentLeft+'px'}, options.speed, options.easing, function(){
219
+ isWorking = false;
220
+ // if its time to loop, reset the $parent
221
+ if(slideLoop){
222
+ $parent.css('left', '-'+getSlidePosition(currentSlide, 'left')+'px');
223
+ }
224
+ // perform the callback function
225
+ options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
226
+ });
227
+ }else if(options.mode == 'vertical'){
228
+ // get the new 'left' property for $parent
229
+ var parentTop = (options.moveSlideQty * childrenMaxHeight);
230
+ // animate to the new 'left'
231
+ $parent.animate({'top': '-='+parentTop+'px'}, options.speed, options.easing, function(){
232
+ isWorking = false;
233
+ // if its time to loop, reset the $parent
234
+ if(slideLoop){
235
+ $parent.css('top', '-'+getSlidePosition(currentSlide, 'top')+'px');
236
+ }
237
+ // perform the callback function
238
+ options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
239
+ });
240
+ }else if(options.mode == 'fade'){
241
+ setChildrenFade();
242
+ }
243
+ // make the current slide active
244
+ if(options.moveSlideQty > 1){
245
+ makeSlideActive(Math.ceil(currentSlide / options.moveSlideQty));
246
+ }else{
247
+ makeSlideActive(currentSlide);
248
+ }
249
+ // display the caption
250
+ showCaptions();
251
+ } // end if(!isWorking)
252
+
253
+ }
254
+ } // end function
255
+
256
+ /**
257
+ * Go to previous slide
258
+ */
259
+ this.goToPreviousSlide = function(stopAuto){
260
+ // check if stopAuto argument is supplied
261
+ if(typeof(stopAuto) == 'undefined'){
262
+ var stopAuto = true;
263
+ }
264
+ if(stopAuto){
265
+ // if show is auto playing, stop it
266
+ if(options.auto){
267
+ base.stopShow(true);
268
+ }
269
+ }
270
+ // makes slideshow finite
271
+ if(!options.infiniteLoop){
272
+ if(!isWorking){
273
+ var slideLoop = false;
274
+ // make current slide the old value plus moveSlideQty
275
+ currentSlide = currentSlide - options.moveSlideQty;
276
+ // if current slide has looped on itself
277
+ if(currentSlide < 0){
278
+ currentSlide = 0;
279
+ // if specified, hide the control on the last slide
280
+ if(options.hideControlOnEnd){
281
+ $('.bx-prev', $outerWrapper).hide();
282
+ }
283
+ }
284
+ checkEndControls();
285
+ // next slide callback
286
+ options.onPrevSlide(currentSlide, $children.length, $children.eq(currentSlide));
287
+ // move to appropriate slide
288
+ base.goToSlide(currentSlide);
289
+ }
290
+ }else{
291
+ if(!isWorking){
292
+ isWorking = true;
293
+ var slideLoop = false;
294
+ // make current slide the old value plus moveSlideQty
295
+ currentSlide = (currentSlide - (options.moveSlideQty));
296
+ // if current slide has looped on itself
297
+ if(currentSlide < 0){
298
+ negativeOffset = (currentSlide % $children.length);
299
+ if(negativeOffset == 0){
300
+ currentSlide = 0;
301
+ }else{
302
+ currentSlide = ($children.length) + negativeOffset;
303
+ }
304
+ slideLoop = true;
305
+ }
306
+ // next slide callback
307
+ options.onPrevSlide(currentSlide, $children.length, $children.eq(currentSlide));
308
+ // slide before callback
309
+ options.onBeforeSlide(currentSlide, $children.length, $children.eq(currentSlide));
310
+ if(options.mode == 'horizontal'){
311
+ // get the new 'left' property for $parent
312
+ var parentLeft = (options.moveSlideQty * childrenOuterWidth);
313
+ // animate to the new 'left'
314
+ $parent.animate({'left': '+='+parentLeft+'px'}, options.speed, options.easing, function(){
315
+ isWorking = false;
316
+ // if its time to loop, reset the $parent
317
+ if(slideLoop){
318
+ $parent.css('left', '-'+getSlidePosition(currentSlide, 'left')+'px');
319
+ }
320
+ // perform the callback function
321
+ options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
322
+ });
323
+ }else if(options.mode == 'vertical'){
324
+ // get the new 'left' property for $parent
325
+ var parentTop = (options.moveSlideQty * childrenMaxHeight);
326
+ // animate to the new 'left'
327
+ $parent.animate({'top': '+='+parentTop+'px'}, options.speed, options.easing, function(){
328
+ isWorking = false;
329
+ // if its time to loop, reset the $parent
330
+ if(slideLoop){
331
+ $parent.css('top', '-'+getSlidePosition(currentSlide, 'top')+'px');
332
+ }
333
+ // perform the callback function
334
+ options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
335
+ });
336
+ }else if(options.mode == 'fade'){
337
+ setChildrenFade();
338
+ }
339
+ // make the current slide active
340
+ if(options.moveSlideQty > 1){
341
+ makeSlideActive(Math.ceil(currentSlide / options.moveSlideQty));
342
+ }else{
343
+ makeSlideActive(currentSlide);
344
+ }
345
+ // display the caption
346
+ showCaptions();
347
+ } // end if(!isWorking)
348
+ }
349
+ } // end function
350
+
351
+ /**
352
+ * Go to first slide
353
+ */
354
+ this.goToFirstSlide = function(stopAuto){
355
+ // check if stopAuto argument is supplied
356
+ if(typeof(stopAuto) == 'undefined'){
357
+ var stopAuto = true;
358
+ }
359
+ base.goToSlide(firstSlide, stopAuto);
360
+ }
361
+
362
+ /**
363
+ * Go to last slide
364
+ */
365
+ this.goToLastSlide = function(){
366
+ // check if stopAuto argument is supplied
367
+ if(typeof(stopAuto) == 'undefined'){
368
+ var stopAuto = true;
369
+ }
370
+ base.goToSlide(lastSlide, stopAuto);
371
+ }
372
+
373
+ /**
374
+ * Get the current slide
375
+ */
376
+ this.getCurrentSlide = function(){
377
+ return currentSlide;
378
+ }
379
+
380
+ /**
381
+ * Get the total slide count
382
+ */
383
+ this.getSlideCount = function(){
384
+ return $children.length;
385
+ }
386
+
387
+ /**
388
+ * Stop the slideshow
389
+ */
390
+ this.stopShow = function(changeText){
391
+ clearInterval(interval);
392
+ // check if changeText argument is supplied
393
+ if(typeof(changeText) == 'undefined'){
394
+ var changeText = true;
395
+ }
396
+ if(changeText && options.autoControls){
397
+ $autoControls.html($startContent).removeClass('stop').addClass('start');
398
+ autoPlaying = false;
399
+ }
400
+ }
401
+
402
+ /**
403
+ * Start the slideshow
404
+ */
405
+ this.startShow = function(changeText){
406
+ // check if changeText argument is supplied
407
+ if(typeof(changeText) == 'undefined'){
408
+ var changeText = true;
409
+ }
410
+ setAutoInterval();
411
+ if(changeText && options.autoControls){
412
+ $autoControls.html($stopContent).removeClass('start').addClass('stop');
413
+ autoPlaying = true;
414
+ }
415
+ }
416
+
417
+ /**
418
+ * Stops the ticker
419
+ */
420
+ this.stopTicker = function(changeText){
421
+ $parent.stop();
422
+ // check if changeText argument is supplied
423
+ if(typeof(changeText) == 'undefined'){
424
+ var changeText = true;
425
+ }
426
+ if(changeText && options.ticker){
427
+ $autoControls.html($startContent).removeClass('stop').addClass('start');
428
+ autoPlaying = false;
429
+ }
430
+ }
431
+
432
+ /**
433
+ * Starts the ticker
434
+ */
435
+ this.startTicker = function(changeText){
436
+ if(options.mode == 'horizontal'){
437
+ if(options.tickerDirection == 'next'){
438
+ // get the 'left' property where the ticker stopped
439
+ var stoppedLeft = parseInt($parent.css('left'));
440
+ // calculate the remaining distance the show must travel until the loop
441
+ var remainingDistance = (origShowWidth + stoppedLeft) + $children.eq(0).width();
442
+ }else if(options.tickerDirection == 'prev'){
443
+ // get the 'left' property where the ticker stopped
444
+ var stoppedLeft = -parseInt($parent.css('left'));
445
+ // calculate the remaining distance the show must travel until the loop
446
+ var remainingDistance = (stoppedLeft) - $children.eq(0).width();
447
+ }
448
+ // calculate the speed ratio to seamlessly finish the loop
449
+ var finishingSpeed = (remainingDistance * options.tickerSpeed) / origShowWidth;
450
+ // call the show
451
+ moveTheShow(tickerLeft, remainingDistance, finishingSpeed);
452
+ }else if(options.mode == 'vertical'){
453
+ if(options.tickerDirection == 'next'){
454
+ // get the 'top' property where the ticker stopped
455
+ var stoppedTop = parseInt($parent.css('top'));
456
+ // calculate the remaining distance the show must travel until the loop
457
+ var remainingDistance = (origShowHeight + stoppedTop) + $children.eq(0).height();
458
+ }else if(options.tickerDirection == 'prev'){
459
+ // get the 'left' property where the ticker stopped
460
+ var stoppedTop = -parseInt($parent.css('top'));
461
+ // calculate the remaining distance the show must travel until the loop
462
+ var remainingDistance = (stoppedTop) - $children.eq(0).height();
463
+ }
464
+ // calculate the speed ratio to seamlessly finish the loop
465
+ var finishingSpeed = (remainingDistance * options.tickerSpeed) / origShowHeight;
466
+ // call the show
467
+ moveTheShow(tickerTop, remainingDistance, finishingSpeed);
468
+ // check if changeText argument is supplied
469
+ if(typeof(changeText) == 'undefined'){
470
+ var changeText = true;
471
+ }
472
+ if(changeText && options.ticker){
473
+ $autoControls.html($stopContent).removeClass('start').addClass('stop');
474
+ autoPlaying = true;
475
+ }
476
+ }
477
+ }
478
+
479
+ /**
480
+ * Initialize a new slideshow
481
+ */
482
+ this.initShow = function(){
483
+
484
+ // reinitialize all variables
485
+ // base = this;
486
+ $parent = $(this);
487
+ $origElement = $parent.clone();
488
+ $children = $parent.children();
489
+ $outerWrapper = '';
490
+ $firstChild = $parent.children(':first');
491
+ childrenWidth = $firstChild.width();
492
+ childrenMaxWidth = 0;
493
+ childrenOuterWidth = $firstChild.outerWidth();
494
+ childrenMaxHeight = 0;
495
+ wrapperWidth = getWrapperWidth();
496
+ wrapperHeight = getWrapperHeight();
497
+ isWorking = false;
498
+ $pager = '';
499
+ currentSlide = 0;
500
+ origLeft = 0;
501
+ origTop = 0;
502
+ interval = '';
503
+ $autoControls = '';
504
+ $stopHtml = '';
505
+ $startContent = '';
506
+ $stopContent = '';
507
+ autoPlaying = true;
508
+ loaded = false;
509
+ origShowWidth = 0;
510
+ origShowHeight = 0;
511
+ tickerLeft = 0;
512
+ tickerTop = 0;
513
+
514
+ firstSlide = 0;
515
+ lastSlide = $children.length - 1;
516
+
517
+ // get the largest child's height and width
518
+ $children.each(function(index) {
519
+ if($(this).outerHeight() > childrenMaxHeight){
520
+ childrenMaxHeight = $(this).outerHeight();
521
+ }
522
+ if($(this).outerWidth() > childrenMaxWidth){
523
+ childrenMaxWidth = $(this).outerWidth();
524
+ }
525
+ });
526
+
527
+ // get random slide number
528
+ if(options.randomStart){
529
+ var randomNumber = Math.floor(Math.random() * $children.length);
530
+ currentSlide = randomNumber;
531
+ origLeft = childrenOuterWidth * (options.moveSlideQty + randomNumber);
532
+ origTop = childrenMaxHeight * (options.moveSlideQty + randomNumber);
533
+ // start show at specific slide
534
+ }else{
535
+ currentSlide = options.startingSlide;
536
+ origLeft = childrenOuterWidth * (options.moveSlideQty + options.startingSlide);
537
+ origTop = childrenMaxHeight * (options.moveSlideQty + options.startingSlide);
538
+ }
539
+
540
+ // set initial css
541
+ initCss();
542
+
543
+ // check to show pager
544
+ if(options.pager && !options.ticker){
545
+ if(options.pagerType == 'full'){
546
+ showPager('full');
547
+ }else if(options.pagerType == 'short'){
548
+ showPager('short');
549
+ }
550
+ }
551
+
552
+ // check to show controls
553
+ if(options.controls && !options.ticker){
554
+ setControlsVars();
555
+ }
556
+
557
+ // check if auto
558
+ if(options.auto || options.ticker){
559
+ // check if auto controls are displayed
560
+ if(options.autoControls){
561
+ setAutoControlsVars();
562
+ }
563
+ // check if show should auto start
564
+ if(options.autoStart){
565
+ // check if autostart should delay
566
+ setTimeout(function(){
567
+ base.startShow(true);
568
+ }, options.autoDelay);
569
+ }else{
570
+ base.stopShow(true);
571
+ }
572
+ // check if show should pause on hover
573
+ if(options.autoHover && !options.ticker){
574
+ setAutoHover();
575
+ }
576
+ }
577
+ // make the starting slide active
578
+ if(options.moveSlideQty > 1){
579
+ makeSlideActive(Math.ceil(currentSlide / options.moveSlideQty));
580
+ }else{
581
+ makeSlideActive(currentSlide);
582
+ }
583
+ // check for finite show and if controls should be hidden
584
+ checkEndControls();
585
+ // show captions
586
+ if(options.captions){
587
+ showCaptions();
588
+ }
589
+ // perform the callback function
590
+ options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
591
+ }
592
+
593
+ /**
594
+ * Destroy the current slideshow
595
+ */
596
+ this.destroyShow = function(){
597
+ // stop the auto show
598
+ clearInterval(interval);
599
+ // remove any controls / pagers that have been appended
600
+ $('.bx-next, .bx-prev, .bx-pager, .bx-auto', $outerWrapper).remove();
601
+ // unwrap all bx-wrappers
602
+ $parent.unwrap().unwrap().removeAttr('style');
603
+ // remove any styles that were appended
604
+ $parent.children().removeAttr('style').not('.item').remove();
605
+ // remove any childrent that were appended
606
+ $children.removeClass('item');
607
+
608
+ }
609
+
610
+ /**
611
+ * Reload the current slideshow
612
+ */
613
+ this.reloadShow = function(){
614
+ base.destroyShow();
615
+ base.initShow();
616
+ }
617
+
618
+ // PRIVATE FUNCTIONS
619
+
620
+ /**
621
+ * Creates all neccessary styling for the slideshow
622
+ */
623
+ function initCss(){
624
+ // layout the children
625
+ setChildrenLayout(options.startingSlide);
626
+ // CSS for horizontal mode
627
+ if(options.mode == 'horizontal'){
628
+ // wrap the <ul> in div that acts as a window and make the <ul> uber wide
629
+ $parent
630
+ .wrap('<div class="'+options.wrapperClass+'" style="width:'+wrapperWidth+'px; position:relative;"></div>')
631
+ .wrap('<div class="bx-window" style="position:relative; overflow:hidden; width:'+wrapperWidth+'px;"></div>')
632
+ .css({
633
+ width: '999999px',
634
+ position: 'relative',
635
+ left: '-'+(origLeft)+'px'
636
+ });
637
+ $parent.children().css({
638
+ width: childrenWidth,
639
+ 'float': 'left',
640
+ listStyle: 'none'
641
+ });
642
+ $outerWrapper = $parent.parent().parent();
643
+ $children.addClass('item');
644
+ // CSS for vertical mode
645
+ }else if(options.mode == 'vertical'){
646
+ // wrap the <ul> in div that acts as a window and make the <ul> uber tall
647
+ $parent
648
+ .wrap('<div class="'+options.wrapperClass+'" style="width:'+childrenMaxWidth+'px; position:relative;"></div>')
649
+ .wrap('<div class="bx-window" style="width:'+childrenMaxWidth+'px; height:'+wrapperHeight+'px; position:relative; overflow:hidden;"></div>')
650
+ .css({
651
+ height: '999999px',
652
+ position: 'relative',
653
+ top: '-'+(origTop)+'px'
654
+ });
655
+ $parent.children().css({
656
+ listStyle: 'none',
657
+ height: childrenMaxHeight
658
+ });
659
+ $outerWrapper = $parent.parent().parent();
660
+ $children.addClass('item');
661
+ // CSS for fade mode
662
+ }else if(options.mode == 'fade'){
663
+ // wrap the <ul> in div that acts as a window
664
+ $parent
665
+ .wrap('<div class="'+options.wrapperClass+'" style="width:'+childrenMaxWidth+'px; position:relative;"></div>')
666
+ .wrap('<div class="bx-window" style="height:'+childrenMaxHeight+'px; width:'+childrenMaxWidth+'px; position:relative; overflow:hidden;"></div>');
667
+ $parent.children().css({
668
+ listStyle: 'none',
669
+ position: 'absolute',
670
+ top: 0,
671
+ left: 0,
672
+ zIndex: 98
673
+ });
674
+ $outerWrapper = $parent.parent().parent();
675
+ $children.not(':eq('+currentSlide+')').fadeTo(0, 0);
676
+ $children.eq(currentSlide).css('zIndex', 99);
677
+ }
678
+ // if captions = true setup a div placeholder
679
+ if(options.captions && options.captionsSelector == null){
680
+ $outerWrapper.append('<div class="bx-captions"></div>');
681
+ }
682
+ }
683
+
684
+ /**
685
+ * Depending on mode, lays out children in the proper setup
686
+ */
687
+ function setChildrenLayout(){
688
+ // lays out children for horizontal or vertical modes
689
+ if(options.mode == 'horizontal' || options.mode == 'vertical'){
690
+
691
+ // get the children behind
692
+ var $prependedChildren = getArraySample($children, 0, options.moveSlideQty, 'backward');
693
+
694
+ // add each prepended child to the back of the original element
695
+ $.each($prependedChildren, function(index) {
696
+ $parent.prepend($(this));
697
+ });
698
+
699
+ // total number of slides to be hidden after the window
700
+ var totalNumberAfterWindow = ($children.length + options.moveSlideQty) - 1;
701
+ // number of original slides hidden after the window
702
+ var pagerExcess = $children.length - options.displaySlideQty;
703
+ // number of slides to append to the original hidden slides
704
+ var numberToAppend = totalNumberAfterWindow - pagerExcess;
705
+ // get the sample of extra slides to append
706
+ var $appendedChildren = getArraySample($children, 0, numberToAppend, 'forward');
707
+
708
+ if(options.infiniteLoop){
709
+ // add each appended child to the front of the original element
710
+ $.each($appendedChildren, function(index) {
711
+ $parent.append($(this));
712
+ });
713
+ }
714
+ }
715
+ }
716
+
717
+ /**
718
+ * Sets all variables associated with the controls
719
+ */
720
+ function setControlsVars(){
721
+ // check if text or images should be used for controls
722
+ // check "next"
723
+ if(options.nextImage != ''){
724
+ nextContent = options.nextImage;
725
+ nextType = 'image';
726
+ }else{
727
+ nextContent = options.nextText;
728
+ nextType = 'text';
729
+ }
730
+ // check "prev"
731
+ if(options.prevImage != ''){
732
+ prevContent = options.prevImage;
733
+ prevType = 'image';
734
+ }else{
735
+ prevContent = options.prevText;
736
+ prevType = 'text';
737
+ }
738
+ // show the controls
739
+ showControls(nextType, nextContent, prevType, prevContent);
740
+ }
741
+
742
+ /**
743
+ * Puts slideshow into auto mode
744
+ *
745
+ * @param int pause number of ms the slideshow will wait between slides
746
+ * @param string direction 'forward', 'backward' sets the direction of the slideshow (forward/backward)
747
+ * @param bool controls determines if start/stop controls will be displayed
748
+ */
749
+ function setAutoInterval(){
750
+ if(options.auto){
751
+ // finite loop
752
+ if(!options.infiniteLoop){
753
+ if(options.autoDirection == 'next'){
754
+ interval = setInterval(function(){
755
+ currentSlide += options.moveSlideQty;
756
+ // if currentSlide has exceeded total number
757
+ if(currentSlide > lastSlide){
758
+ currentSlide = currentSlide % $children.length;
759
+ }
760
+ base.goToSlide(currentSlide, false);
761
+ }, options.pause);
762
+ }else if(options.autoDirection == 'prev'){
763
+ interval = setInterval(function(){
764
+ currentSlide -= options.moveSlideQty;
765
+ // if currentSlide is smaller than zero
766
+ if(currentSlide < 0){
767
+ negativeOffset = (currentSlide % $children.length);
768
+ if(negativeOffset == 0){
769
+ currentSlide = 0;
770
+ }else{
771
+ currentSlide = ($children.length) + negativeOffset;
772
+ }
773
+ }
774
+ base.goToSlide(currentSlide, false);
775
+ }, options.pause);
776
+ }
777
+ // infinite loop
778
+ }else{
779
+ if(options.autoDirection == 'next'){
780
+ interval = setInterval(function(){
781
+ base.goToNextSlide(false);
782
+ }, options.pause);
783
+ }else if(options.autoDirection == 'prev'){
784
+ interval = setInterval(function(){
785
+ base.goToPreviousSlide(false);
786
+ }, options.pause);
787
+ }
788
+ }
789
+
790
+ }else if(options.ticker){
791
+
792
+ options.tickerSpeed *= 10;
793
+
794
+ // get the total width of the original show
795
+ $('.item', $outerWrapper).each(function(index) {
796
+ origShowWidth += $(this).width();
797
+ origShowHeight += $(this).height();
798
+ });
799
+
800
+ // if prev start the show from the last slide
801
+ if(options.tickerDirection == 'prev' && options.mode == 'horizontal'){
802
+ $parent.css('left', '-'+(origShowWidth+origLeft)+'px');
803
+ }else if(options.tickerDirection == 'prev' && options.mode == 'vertical'){
804
+ $parent.css('top', '-'+(origShowHeight+origTop)+'px');
805
+ }
806
+
807
+ if(options.mode == 'horizontal'){
808
+ // get the starting left position
809
+ tickerLeft = parseInt($parent.css('left'));
810
+ // start the ticker
811
+ moveTheShow(tickerLeft, origShowWidth, options.tickerSpeed);
812
+ }else if(options.mode == 'vertical'){
813
+ // get the starting top position
814
+ tickerTop = parseInt($parent.css('top'));
815
+ // start the ticker
816
+ moveTheShow(tickerTop, origShowHeight, options.tickerSpeed);
817
+ }
818
+
819
+ // check it tickerHover applies
820
+ if(options.tickerHover){
821
+ setTickerHover();
822
+ }
823
+ }
824
+ }
825
+
826
+ function moveTheShow(leftCss, distance, speed){
827
+ // if horizontal
828
+ if(options.mode == 'horizontal'){
829
+ // if next
830
+ if(options.tickerDirection == 'next'){
831
+ $parent.animate({'left': '-='+distance+'px'}, speed, 'linear', function(){
832
+ $parent.css('left', leftCss);
833
+ moveTheShow(leftCss, origShowWidth, options.tickerSpeed);
834
+ });
835
+ // if prev
836
+ }else if(options.tickerDirection == 'prev'){
837
+ $parent.animate({'left': '+='+distance+'px'}, speed, 'linear', function(){
838
+ $parent.css('left', leftCss);
839
+ moveTheShow(leftCss, origShowWidth, options.tickerSpeed);
840
+ });
841
+ }
842
+ // if vertical
843
+ }else if(options.mode == 'vertical'){
844
+ // if next
845
+ if(options.tickerDirection == 'next'){
846
+ $parent.animate({'top': '-='+distance+'px'}, speed, 'linear', function(){
847
+ $parent.css('top', leftCss);
848
+ moveTheShow(leftCss, origShowHeight, options.tickerSpeed);
849
+ });
850
+ // if prev
851
+ }else if(options.tickerDirection == 'prev'){
852
+ $parent.animate({'top': '+='+distance+'px'}, speed, 'linear', function(){
853
+ $parent.css('top', leftCss);
854
+ moveTheShow(leftCss, origShowHeight, options.tickerSpeed);
855
+ });
856
+ }
857
+ }
858
+ }
859
+
860
+ /**
861
+ * Sets all variables associated with the controls
862
+ */
863
+ function setAutoControlsVars(){
864
+ // check if text or images should be used for controls
865
+ // check "start"
866
+ if(options.startImage != ''){
867
+ startContent = options.startImage;
868
+ startType = 'image';
869
+ }else{
870
+ startContent = options.startText;
871
+ startType = 'text';
872
+ }
873
+ // check "stop"
874
+ if(options.stopImage != ''){
875
+ stopContent = options.stopImage;
876
+ stopType = 'image';
877
+ }else{
878
+ stopContent = options.stopText;
879
+ stopType = 'text';
880
+ }
881
+ // show the controls
882
+ showAutoControls(startType, startContent, stopType, stopContent);
883
+ }
884
+
885
+ /**
886
+ * Handles hover events for auto shows
887
+ */
888
+ function setAutoHover(){
889
+ // hover over the slider window
890
+ $outerWrapper.find('.bx-window').hover(function() {
891
+ if(autoPlaying){
892
+ base.stopShow(false);
893
+ }
894
+ }, function() {
895
+ if(autoPlaying){
896
+ base.startShow(false);
897
+ }
898
+ });
899
+ }
900
+
901
+ /**
902
+ * Handles hover events for ticker mode
903
+ */
904
+ function setTickerHover(){
905
+ // on hover stop the animation
906
+ $parent.hover(function() {
907
+ if(autoPlaying){
908
+ base.stopTicker(false);
909
+ }
910
+ }, function() {
911
+ if(autoPlaying){
912
+ base.startTicker(false);
913
+ }
914
+ });
915
+ }
916
+
917
+ /**
918
+ * Handles fade animation
919
+ */
920
+ function setChildrenFade(){
921
+ // fade out any other child besides the current
922
+ $children.not(':eq('+currentSlide+')').fadeTo(options.speed, 0).css('zIndex', 98);
923
+ // fade in the current slide
924
+ $children.eq(currentSlide).css('zIndex', 99).fadeTo(options.speed, 1, function(){
925
+ isWorking = false;
926
+ // ie fade fix
927
+ if(jQuery.browser.msie){
928
+ $children.eq(currentSlide).get(0).style.removeAttribute('filter');
929
+ }
930
+ // perform the callback function
931
+ options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
932
+ });
933
+ };
934
+
935
+ /**
936
+ * Makes slide active
937
+ */
938
+ function makeSlideActive(number){
939
+ if(options.pagerType == 'full' && options.pager){
940
+ // remove all active classes
941
+ $('a', $pager).removeClass(options.pagerActiveClass);
942
+ // assign active class to appropriate slide
943
+ $('a', $pager).eq(number).addClass(options.pagerActiveClass);
944
+ }else if(options.pagerType == 'short' && options.pager){
945
+ $('.bx-pager-current', $pager).html(currentSlide+1);
946
+ }
947
+ }
948
+
949
+ /**
950
+ * Displays next/prev controls
951
+ *
952
+ * @param string nextType 'image', 'text'
953
+ * @param string nextContent if type='image', specify a filepath to the image. if type='text', specify text.
954
+ * @param string prevType 'image', 'text'
955
+ * @param string prevContent if type='image', specify a filepath to the image. if type='text', specify text.
956
+ */
957
+ function showControls(nextType, nextContent, prevType, prevContent){
958
+ // create pager html elements
959
+ var $nextHtml = $('<a href="" class="bx-next"></a>');
960
+ var $prevHtml = $('<a href="" class="bx-prev"></a>');
961
+ // check if next is 'text' or 'image'
962
+ if(nextType == 'text'){
963
+ $nextHtml.html(nextContent);
964
+ }else{
965
+ $nextHtml.html('<img src="'+nextContent+'" />');
966
+ }
967
+ // check if prev is 'text' or 'image'
968
+ if(prevType == 'text'){
969
+ $prevHtml.html(prevContent);
970
+ }else{
971
+ $prevHtml.html('<img src="'+prevContent+'" />');
972
+ }
973
+ // check if user supplied a selector to populate next control
974
+ if(options.prevSelector){
975
+ $(options.prevSelector).append($prevHtml);
976
+ }else{
977
+ $outerWrapper.append($prevHtml);
978
+ }
979
+ // check if user supplied a selector to populate next control
980
+ if(options.nextSelector){
981
+ $(options.nextSelector).append($nextHtml);
982
+ }else{
983
+ $outerWrapper.append($nextHtml);
984
+ }
985
+ // click next control
986
+ $nextHtml.click(function() {
987
+ base.goToNextSlide();
988
+ return false;
989
+ });
990
+ // click prev control
991
+ $prevHtml.click(function() {
992
+ base.goToPreviousSlide();
993
+ return false;
994
+ });
995
+ }
996
+
997
+ /**
998
+ * Displays the pager
999
+ *
1000
+ * @param string type 'full', 'short'
1001
+ */
1002
+ function showPager(type){
1003
+ // sets up logic for finite multi slide shows
1004
+ var pagerQty = $children.length;
1005
+ // if we are moving more than one at a time and we have a finite loop
1006
+ if(options.moveSlideQty > 1){
1007
+ // if slides create an odd number of pages
1008
+ if($children.length % options.moveSlideQty != 0){
1009
+ // pagerQty = $children.length / options.moveSlideQty + 1;
1010
+ pagerQty = Math.ceil($children.length / options.moveSlideQty);
1011
+ // if slides create an even number of pages
1012
+ }else{
1013
+ pagerQty = $children.length / options.moveSlideQty;
1014
+ }
1015
+ }
1016
+ var pagerString = '';
1017
+ // check if custom build function was supplied
1018
+ if(options.buildPager){
1019
+ for(var i=0; i<pagerQty; i++){
1020
+ pagerString += options.buildPager(i, $children.eq(i * options.moveSlideQty));
1021
+ }
1022
+
1023
+ // if not, use default pager
1024
+ }else if(type == 'full'){
1025
+ // build the full pager
1026
+ for(var i=1; i<=pagerQty; i++){
1027
+ pagerString += '<a href="" class="pager-link pager-'+i+'">'+i+'</a>';
1028
+ }
1029
+ }else if(type == 'short') {
1030
+ // build the short pager
1031
+ pagerString = '<span class="bx-pager-current">'+(options.startingSlide+1)+'</span> '+options.pagerShortSeparator+' <span class="bx-pager-total">'+$children.length+'</span>';
1032
+ }
1033
+ // check if user supplied a pager selector
1034
+ if(options.pagerSelector){
1035
+ $(options.pagerSelector).append(pagerString);
1036
+ $pager = $(options.pagerSelector);
1037
+ }else{
1038
+ var $pagerContainer = $('<div class="bx-pager"></div>');
1039
+ $pagerContainer.append(pagerString);
1040
+ // attach the pager to the DOM
1041
+ if(options.pagerLocation == 'top'){
1042
+ $outerWrapper.prepend($pagerContainer);
1043
+ }else if(options.pagerLocation == 'bottom'){
1044
+ $outerWrapper.append($pagerContainer);
1045
+ }
1046
+ // cache the pager element
1047
+ $pager = $('.bx-item', $outerWrapper);
1048
+ }
1049
+ $pager.children().click(function() {
1050
+ // only if pager is full mode
1051
+ if(options.pagerType == 'full'){
1052
+ // get the index from the link
1053
+ var slideIndex = $pager.children().index(this);
1054
+ // accomodate moving more than one slide
1055
+ if(options.moveSlideQty > 1){
1056
+ slideIndex *= options.moveSlideQty;
1057
+ }
1058
+ base.goToSlide(slideIndex);
1059
+ }
1060
+ return false;
1061
+ });
1062
+ }
1063
+
1064
+ /**
1065
+ * Displays captions
1066
+ */
1067
+ function showCaptions(){
1068
+ // get the title from each image
1069
+ var caption = $('img', $children.eq(currentSlide)).attr('title');
1070
+ // if the caption exists
1071
+ if(caption != ''){
1072
+ // if user supplied a selector
1073
+ if(options.captionsSelector){
1074
+ $(options.captionsSelector).html(caption);
1075
+ }else{
1076
+ $('.bx-captions', $outerWrapper).html(caption);
1077
+ }
1078
+ }else{
1079
+ // if user supplied a selector
1080
+ if(options.captionsSelector){
1081
+ $(options.captionsSelector).html('&nbsp;');
1082
+ }else{
1083
+ $('.bx-captions', $outerWrapper).html('&nbsp;');
1084
+ }
1085
+ }
1086
+ }
1087
+
1088
+ /**
1089
+ * Displays start/stop controls for auto and ticker mode
1090
+ *
1091
+ * @param string type 'image', 'text'
1092
+ * @param string next [optional] if type='image', specify a filepath to the image. if type='text', specify text.
1093
+ * @param string prev [optional] if type='image', specify a filepath to the image. if type='text', specify text.
1094
+ */
1095
+ function showAutoControls(startType, startContent, stopType, stopContent){
1096
+ // create pager html elements
1097
+ $autoControls = $('<a href="" class="bx-start"></a>');
1098
+ // check if start is 'text' or 'image'
1099
+ if(startType == 'text'){
1100
+ $startContent = startContent;
1101
+ }else{
1102
+ $startContent = '<img src="'+startContent+'" />';
1103
+ }
1104
+ // check if stop is 'text' or 'image'
1105
+ if(stopType == 'text'){
1106
+ $stopContent = stopContent;
1107
+ }else{
1108
+ $stopContent = '<img src="'+stopContent+'" />';
1109
+ }
1110
+ // check if user supplied a selector to populate next control
1111
+ if(options.autoControlsSelector){
1112
+ $(options.autoControlsSelector).append($autoControls);
1113
+ }else{
1114
+ $outerWrapper.append('<div class="bx-auto"></div>');
1115
+ $('.bx-auto', $outerWrapper).html($autoControls);
1116
+ }
1117
+
1118
+ // click start control
1119
+ $autoControls.click(function() {
1120
+ if(options.ticker){
1121
+ if($(this).hasClass('stop')){
1122
+ base.stopTicker();
1123
+ }else if($(this).hasClass('start')){
1124
+ base.startTicker();
1125
+ }
1126
+ }else{
1127
+ if($(this).hasClass('stop')){
1128
+ base.stopShow(true);
1129
+ }else if($(this).hasClass('start')){
1130
+ base.startShow(true);
1131
+ }
1132
+ }
1133
+ return false;
1134
+ });
1135
+
1136
+ }
1137
+
1138
+ /**
1139
+ * Checks if show is in finite mode, and if slide is either first or last, then hides the respective control
1140
+ */
1141
+ function checkEndControls(){
1142
+ if(!options.infiniteLoop && options.hideControlOnEnd){
1143
+ // check previous
1144
+ if(currentSlide == firstSlide){
1145
+ $('.bx-prev', $outerWrapper).hide();
1146
+ }else{
1147
+ $('.bx-prev', $outerWrapper).show();
1148
+ }
1149
+ // check next
1150
+ if(currentSlide == lastSlide){
1151
+ $('.bx-next', $outerWrapper).hide();
1152
+ }else{
1153
+ $('.bx-next', $outerWrapper).show();
1154
+ }
1155
+ }
1156
+ }
1157
+
1158
+ /**
1159
+ * Returns the left offset of the slide from the parent container
1160
+ */
1161
+ function getSlidePosition(number, side){
1162
+ if(side == 'left'){
1163
+ var position = $('.item', $outerWrapper).eq(number).position().left;
1164
+ }else if(side == 'top'){
1165
+ var position = $('.item', $outerWrapper).eq(number).position().top;
1166
+ }
1167
+ return position;
1168
+ }
1169
+
1170
+ /**
1171
+ * Returns the width of the wrapper
1172
+ */
1173
+ function getWrapperWidth(){
1174
+ var wrapperWidth = $firstChild.outerWidth() * options.displaySlideQty;
1175
+ return wrapperWidth;
1176
+ }
1177
+
1178
+ /**
1179
+ * Returns the height of the wrapper
1180
+ */
1181
+ function getWrapperHeight(){
1182
+ // if displaying multiple slides, multiple wrapper width by number of slides to display
1183
+ var wrapperHeight = $firstChild.outerHeight() * options.displaySlideQty;
1184
+ return wrapperHeight;
1185
+ }
1186
+
1187
+ /**
1188
+ * Returns a sample of an arry and loops back on itself if the end of the array is reached
1189
+ *
1190
+ * @param array array original array the sample is derived from
1191
+ * @param int start array index sample will start
1192
+ * @param int length number of items in the sample
1193
+ * @param string direction 'forward', 'backward' direction the loop should travel in the array
1194
+ */
1195
+ function getArraySample(array, start, length, direction){
1196
+ // initialize empty array
1197
+ var sample = [];
1198
+ // clone the length argument
1199
+ var loopLength = length;
1200
+ // determines when the empty array should start being populated
1201
+ var startPopulatingArray = false;
1202
+ // reverse the array if direction = 'backward'
1203
+ if(direction == 'backward'){
1204
+ array = $.makeArray(array);
1205
+ array.reverse();
1206
+ }
1207
+ // loop through original array until the length argument is met
1208
+ while(loopLength > 0){
1209
+ // loop through original array
1210
+ $.each(array, function(index, val) {
1211
+ // check if length has been met
1212
+ if(loopLength > 0){
1213
+ // don't do anything unless first index has been reached
1214
+ if(!startPopulatingArray){
1215
+ // start populating empty array
1216
+ if(index == start){
1217
+ startPopulatingArray = true;
1218
+ // add element to array
1219
+ sample.push($(this).clone());
1220
+ // decrease the length clone variable
1221
+ loopLength--;
1222
+ }
1223
+ }else{
1224
+ // add element to array
1225
+ sample.push($(this).clone());
1226
+ // decrease the length clone variable
1227
+ loopLength--;
1228
+ }
1229
+ // if length has been met, break loose
1230
+ }else{
1231
+ return false;
1232
+ }
1233
+ });
1234
+ }
1235
+ return sample;
1236
+ }
1237
+
1238
+ this.each(function(){
1239
+ // make sure the element has children
1240
+ if($(this).children().length > 0){
1241
+ base.initShow();
1242
+ }
1243
+ });
1244
+
1245
+ return this;
1246
+ }
1247
+
1248
+ jQuery.fx.prototype.cur = function(){
1249
+ if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
1250
+ return this.elem[ this.prop ];
1251
+ }
1252
+
1253
+ var r = parseFloat( jQuery.css( this.elem, this.prop ) );
1254
+ // return r && r > -10000 ? r : 0;
1255
+ return r;
1256
+ }
1257
+
1258
+
1259
+ })(jQuery);
1260
+
js/magebuzz/jquery/jquery.easing.1.3.js ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3
+ *
4
+ * Uses the built in easing capabilities added In jQuery 1.1
5
+ * to offer multiple easing options
6
+ *
7
+ * TERMS OF USE - jQuery Easing
8
+ *
9
+ * Open source under the BSD License.
10
+ *
11
+ * Copyright � 2008 George McGinley Smith
12
+ * All rights reserved.
13
+ *
14
+ * Redistribution and use in source and binary forms, with or without modification,
15
+ * are permitted provided that the following conditions are met:
16
+ *
17
+ * Redistributions of source code must retain the above copyright notice, this list of
18
+ * conditions and the following disclaimer.
19
+ * Redistributions in binary form must reproduce the above copyright notice, this list
20
+ * of conditions and the following disclaimer in the documentation and/or other materials
21
+ * provided with the distribution.
22
+ *
23
+ * Neither the name of the author nor the names of contributors may be used to endorse
24
+ * or promote products derived from this software without specific prior written permission.
25
+ *
26
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
27
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
35
+ *
36
+ */
37
+
38
+ // t: current time, b: begInnIng value, c: change In value, d: duration
39
+ jQuery.easing['jswing'] = jQuery.easing['swing'];
40
+
41
+ jQuery.extend( jQuery.easing,
42
+ {
43
+ def: 'easeOutQuad',
44
+ swing: function (x, t, b, c, d) {
45
+ //alert(jQuery.easing.default);
46
+ return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
47
+ },
48
+ easeInQuad: function (x, t, b, c, d) {
49
+ return c*(t/=d)*t + b;
50
+ },
51
+ easeOutQuad: function (x, t, b, c, d) {
52
+ return -c *(t/=d)*(t-2) + b;
53
+ },
54
+ easeInOutQuad: function (x, t, b, c, d) {
55
+ if ((t/=d/2) < 1) return c/2*t*t + b;
56
+ return -c/2 * ((--t)*(t-2) - 1) + b;
57
+ },
58
+ easeInCubic: function (x, t, b, c, d) {
59
+ return c*(t/=d)*t*t + b;
60
+ },
61
+ easeOutCubic: function (x, t, b, c, d) {
62
+ return c*((t=t/d-1)*t*t + 1) + b;
63
+ },
64
+ easeInOutCubic: function (x, t, b, c, d) {
65
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
66
+ return c/2*((t-=2)*t*t + 2) + b;
67
+ },
68
+ easeInQuart: function (x, t, b, c, d) {
69
+ return c*(t/=d)*t*t*t + b;
70
+ },
71
+ easeOutQuart: function (x, t, b, c, d) {
72
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
73
+ },
74
+ easeInOutQuart: function (x, t, b, c, d) {
75
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
76
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
77
+ },
78
+ easeInQuint: function (x, t, b, c, d) {
79
+ return c*(t/=d)*t*t*t*t + b;
80
+ },
81
+ easeOutQuint: function (x, t, b, c, d) {
82
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
83
+ },
84
+ easeInOutQuint: function (x, t, b, c, d) {
85
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
86
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
87
+ },
88
+ easeInSine: function (x, t, b, c, d) {
89
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
90
+ },
91
+ easeOutSine: function (x, t, b, c, d) {
92
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
93
+ },
94
+ easeInOutSine: function (x, t, b, c, d) {
95
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
96
+ },
97
+ easeInExpo: function (x, t, b, c, d) {
98
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
99
+ },
100
+ easeOutExpo: function (x, t, b, c, d) {
101
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
102
+ },
103
+ easeInOutExpo: function (x, t, b, c, d) {
104
+ if (t==0) return b;
105
+ if (t==d) return b+c;
106
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
107
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
108
+ },
109
+ easeInCirc: function (x, t, b, c, d) {
110
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
111
+ },
112
+ easeOutCirc: function (x, t, b, c, d) {
113
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
114
+ },
115
+ easeInOutCirc: function (x, t, b, c, d) {
116
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
117
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
118
+ },
119
+ easeInElastic: function (x, t, b, c, d) {
120
+ var s=1.70158;var p=0;var a=c;
121
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
122
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
123
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
124
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
125
+ },
126
+ easeOutElastic: function (x, t, b, c, d) {
127
+ var s=1.70158;var p=0;var a=c;
128
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
129
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
130
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
131
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
132
+ },
133
+ easeInOutElastic: function (x, t, b, c, d) {
134
+ var s=1.70158;var p=0;var a=c;
135
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
136
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
137
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
138
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
139
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
140
+ },
141
+ easeInBack: function (x, t, b, c, d, s) {
142
+ if (s == undefined) s = 1.70158;
143
+ return c*(t/=d)*t*((s+1)*t - s) + b;
144
+ },
145
+ easeOutBack: function (x, t, b, c, d, s) {
146
+ if (s == undefined) s = 1.70158;
147
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
148
+ },
149
+ easeInOutBack: function (x, t, b, c, d, s) {
150
+ if (s == undefined) s = 1.70158;
151
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
152
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
153
+ },
154
+ easeInBounce: function (x, t, b, c, d) {
155
+ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
156
+ },
157
+ easeOutBounce: function (x, t, b, c, d) {
158
+ if ((t/=d) < (1/2.75)) {
159
+ return c*(7.5625*t*t) + b;
160
+ } else if (t < (2/2.75)) {
161
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
162
+ } else if (t < (2.5/2.75)) {
163
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
164
+ } else {
165
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
166
+ }
167
+ },
168
+ easeInOutBounce: function (x, t, b, c, d) {
169
+ if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
170
+ return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
171
+ }
172
+ });
173
+
174
+ /*
175
+ *
176
+ * TERMS OF USE - EASING EQUATIONS
177
+ *
178
+ * Open source under the BSD License.
179
+ *
180
+ * Copyright � 2001 Robert Penner
181
+ * All rights reserved.
182
+ *
183
+ * Redistribution and use in source and binary forms, with or without modification,
184
+ * are permitted provided that the following conditions are met:
185
+ *
186
+ * Redistributions of source code must retain the above copyright notice, this list of
187
+ * conditions and the following disclaimer.
188
+ * Redistributions in binary form must reproduce the above copyright notice, this list
189
+ * of conditions and the following disclaimer in the documentation and/or other materials
190
+ * provided with the distribution.
191
+ *
192
+ * Neither the name of the author nor the names of contributors may be used to endorse
193
+ * or promote products derived from this software without specific prior written permission.
194
+ *
195
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
196
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
197
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
198
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
199
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
200
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
201
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
202
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
203
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
204
+ *
205
+ */
js/magebuzz/jquery/jquery.pngFix.js ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * --------------------------------------------------------------------
3
+ * jQuery-Plugin "pngFix"
4
+ * Version: 1.2, 09.03.2009
5
+ * by Andreas Eberhard, andreas.eberhard@gmail.com
6
+ * http://jquery.andreaseberhard.de/
7
+ *
8
+ * Copyright (c) 2007 Andreas Eberhard
9
+ * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
10
+ *
11
+ * Changelog:
12
+ * 09.03.2009 Version 1.2
13
+ * - Update for jQuery 1.3.x, removed @ from selectors
14
+ * 11.09.2007 Version 1.1
15
+ * - removed noConflict
16
+ * - added png-support for input type=image
17
+ * - 01.08.2007 CSS background-image support extension added by Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
18
+ * 31.05.2007 initial Version 1.0
19
+ * --------------------------------------------------------------------
20
+ * @example $(function(){$(document).pngFix();});
21
+ * @desc Fixes all PNG's in the document on document.ready
22
+ *
23
+ * jQuery(function(){jQuery(document).pngFix();});
24
+ * @desc Fixes all PNG's in the document on document.ready when using noConflict
25
+ *
26
+ * @example $(function(){$('div.examples').pngFix();});
27
+ * @desc Fixes all PNG's within div with class examples
28
+ *
29
+ * @example $(function(){$('div.examples').pngFix( { blankgif:'ext.gif' } );});
30
+ * @desc Fixes all PNG's within div with class examples, provides blank gif for input with png
31
+ * --------------------------------------------------------------------
32
+ */
33
+
34
+ (function($) {
35
+
36
+ jQuery.fn.pngFix = function(settings) {
37
+
38
+ // Settings
39
+ settings = jQuery.extend({
40
+ blankgif: 'pngFix/blank.gif'
41
+ }, settings);
42
+
43
+ var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
44
+ var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);
45
+
46
+ if (jQuery.browser.msie && (ie55 || ie6)) {
47
+
48
+ //fix images with png-source
49
+ jQuery(this).find("img[src$=.png]").each(function() {
50
+
51
+ jQuery(this).attr('width',jQuery(this).width());
52
+ jQuery(this).attr('height',jQuery(this).height());
53
+
54
+ var prevStyle = '';
55
+ var strNewHTML = '';
56
+ var imgId = (jQuery(this).attr('id')) ? 'id="' + jQuery(this).attr('id') + '" ' : '';
57
+ var imgClass = (jQuery(this).attr('class')) ? 'class="' + jQuery(this).attr('class') + '" ' : '';
58
+ var imgTitle = (jQuery(this).attr('title')) ? 'title="' + jQuery(this).attr('title') + '" ' : '';
59
+ var imgAlt = (jQuery(this).attr('alt')) ? 'alt="' + jQuery(this).attr('alt') + '" ' : '';
60
+ var imgAlign = (jQuery(this).attr('align')) ? 'float:' + jQuery(this).attr('align') + ';' : '';
61
+ var imgHand = (jQuery(this).parent().attr('href')) ? 'cursor:hand;' : '';
62
+ if (this.style.border) {
63
+ prevStyle += 'border:'+this.style.border+';';
64
+ this.style.border = '';
65
+ }
66
+ if (this.style.padding) {
67
+ prevStyle += 'padding:'+this.style.padding+';';
68
+ this.style.padding = '';
69
+ }
70
+ if (this.style.margin) {
71
+ prevStyle += 'margin:'+this.style.margin+';';
72
+ this.style.margin = '';
73
+ }
74
+ var imgStyle = (this.style.cssText);
75
+
76
+ strNewHTML += '<span '+imgId+imgClass+imgTitle+imgAlt;
77
+ strNewHTML += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand;
78
+ strNewHTML += 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;';
79
+ strNewHTML += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + jQuery(this).attr('src') + '\', sizingMethod=\'scale\');';
80
+ strNewHTML += imgStyle+'"></span>';
81
+ if (prevStyle != ''){
82
+ strNewHTML = '<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;'+'">' + strNewHTML + '</span>';
83
+ }
84
+
85
+ jQuery(this).hide();
86
+ jQuery(this).after(strNewHTML);
87
+
88
+ });
89
+
90
+ // fix css background pngs
91
+ jQuery(this).find("*").each(function(){
92
+ var bgIMG = jQuery(this).css('background-image');
93
+ if(bgIMG.indexOf(".png")!=-1){
94
+ var iebg = bgIMG.split('url("')[1].split('")')[0];
95
+ jQuery(this).css('background-image', 'none');
96
+ jQuery(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='scale')";
97
+ }
98
+ });
99
+
100
+ //fix input with png-source
101
+ jQuery(this).find("input[src$=.png]").each(function() {
102
+ var bgIMG = jQuery(this).attr('src');
103
+ jQuery(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + bgIMG + '\', sizingMethod=\'scale\');';
104
+ jQuery(this).attr('src', settings.blankgif)
105
+ });
106
+
107
+ }
108
+
109
+ return jQuery;
110
+
111
+ };
112
+
113
+ })(jQuery);
js/magebuzz/jquery/jquery.scrollShow.js ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery.ScrollShow - Scrolling Slideshow.
3
+ * Copyright (c) 2007 Ariel Flesler - aflesler(at)gmail(dot)com
4
+ * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).
5
+ * Date: 10/30/2007
6
+ * @author Ariel Flesler
7
+ * @version 0.7
8
+ *
9
+ * @id jQuery.fn.scrollShow
10
+ * @param {Object} settings Hash of settings (detailed below).
11
+ * @return {jQuery} Returns the same jQuery object, for chaining.
12
+ **/
13
+ (function( $ ){
14
+
15
+ var defaults = {
16
+ elements:'div.item',//elements selector (relative to view)
17
+ itemSize:{
18
+ height:180,
19
+ width:390
20
+ },
21
+ view:null,//container of the elements, the one to fix the width.
22
+ navigators:null,//selector to the elements to navigate the slideshow.
23
+ navigationMode:'r',//sequential, random, localscroll
24
+ speed:600,//speed of transition, 1 for no-animation
25
+ wrappers:'simple',//simple,resize,crop,link
26
+ circular:false,//should the slideshow rewind/advance on the extremes ?.
27
+ easing:'linear',//easing equation
28
+ axis:'x',//axis to displace the slideshow
29
+ margin:true,//take margin in account?
30
+ start:null, //force the scroll to start at some position element.
31
+ setWidth:false//whether to calculate and set, the overall width of the slideshow.
32
+ };
33
+
34
+ function wrap( $els, type, size ){//wrap the photos with several different wrappers.
35
+ switch( type ){
36
+ case 'crop': $els = $els.wrap('<div class="jq-ss-crop">').parent().css('overflow','hidden');
37
+ case 'resize': return $els.css( size );
38
+ case 'simple': return $els.wrap('<div class="jq-ss-simple">').parent();
39
+ case 'link':
40
+ /* if( $els.is('img') )
41
+ return $els.wrap('<a target="_blank" class="jq-ss-link">').parent().each(function(){
42
+ this.href = this.firstChild.src;
43
+ }); */
44
+ default: return $els;
45
+ }
46
+ };
47
+
48
+ $.fn.scrollShow = function( settings ){
49
+ settings = $.extend( {}, defaults, settings );
50
+
51
+ return this.each(function(){
52
+ var
53
+ widget = this,
54
+ $view = settings.view ? $(settings.view, this) : this,
55
+ $elements = $(settings.elements, $view),
56
+ limit = $elements.length,
57
+ active = 0;
58
+
59
+ $.each( settings.wrappers.split(/\s*,\s*/), function( i, wrapper ){
60
+ $elements = wrap( $elements, wrapper, settings.itemSize );
61
+ });
62
+ $elements.css( settings.itemSize );//ensure the outer elements have fixed size.
63
+
64
+ if( !settings.navigators ){//this shouldn't get to happen
65
+ settings.navigators = '';
66
+ settings.navigationMode = 'r';
67
+ }
68
+
69
+ if( settings.navigators.constructor != Array )
70
+ settings.navigators = [settings.navigators];
71
+
72
+ $.each( settings.navigationMode.split(''), function( i, type ){
73
+ switch( type.charAt(0) ){
74
+ case 's'://sequential navigation
75
+ $(settings.navigators[i],widget)
76
+ .eq(0).bind('click', { dir: -1 }, sequential ).end()
77
+ .eq(1).bind('click', { dir: +1 }, sequential );
78
+ break;
79
+ case 'r'://random navigation
80
+ var $nav = $(settings.navigators[i] || $elements, widget),
81
+ ratio = $elements.length / $nav.length;
82
+ if( ratio === Infinity ) return;//no navigator found
83
+ $nav.each(function( pos ){
84
+ $(this).bind( 'click', { pos: Math.floor(ratio*pos) }, random );
85
+ });
86
+ break;
87
+ }
88
+ });
89
+
90
+ (function( $e, w ){
91
+ var imgw = ($e.width() + attrs('margin') + attrs('padding') + attr('border'));
92
+
93
+ do w -= imgw;
94
+ while( w > 0 && limit-- );//find the last element we can scroll To.
95
+
96
+ if( !settings.setWidth ) return;
97
+
98
+ do{
99
+ $e = $e.parent();
100
+ if( $e[0] == $view[0] )
101
+ return;
102
+ }while( $e.length > 1 );
103
+ $e.width( imgw * $elements.length );//if there's a container for the elements, calculate it's width.
104
+
105
+ })( $elements, $view.width() );
106
+
107
+ if( settings.start != null )
108
+ random( settings.start );
109
+
110
+ function attrs( name ){
111
+ return attr(name+'Left') + attr(name+'Right');
112
+ };
113
+ function attr( name ){
114
+ return parseInt($elements.css(name)) || 0;
115
+ };
116
+
117
+ function sequential( event ){
118
+ event.data.pos = active + event.data.dir;
119
+ return random( event );
120
+ };
121
+
122
+ function random( event ){
123
+ var pos = typeof event == 'number' ? event : event.data.pos;
124
+ if( pos < 0 )
125
+ pos = active == 0 && settings.circular ? limit : 0;
126
+ else if( pos > limit )
127
+ pos = active == limit && settings.circular ? 0 : limit;
128
+
129
+ $view.stop().scrollTo( $elements[pos], settings );
130
+ active = pos;
131
+ return false;
132
+ };
133
+ });
134
+ };
135
+
136
+ })( jQuery );
js/magebuzz/jquery/jquery.scrollTo-min.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery.ScrollTo - Easy element scrolling using jQuery.
3
+ * Copyright (c) 2007 Ariel Flesler - aflesler(at)gmail(dot)com
4
+ * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).
5
+ * Date: 10/29/2007
6
+ * @author Ariel Flesler
7
+ * @version 1.2.2
8
+ * Compatible with jQuery 1.2.1, tested on Firefox 2.0.0.7, and IE 6, both on Windows.
9
+ **/
10
+ (function($){$.scrollTo=function(a,b){return $('html,body').scrollTo(a,b)};$.fn.scrollTo=function(e,f){f=$.extend({axis:'y',speed:1},f||{});if(f.axis.length!=2)f.queue=false;if(f.queue)f.speed=Math.ceil(f.speed/2);return this.each(function(){var d=$(this),t=e,k,l,u={};switch(typeof t){case'string':if(/^([+-]=)?\d+(px)?$/.test(t))break;t=$(t,this);case'object':k=$(t).offset()}$.each(f.axis.split(''),parse);animate(f.onAfter);function parse(i,a){var b=a=='x'?'Left':'Top',p=b.toLowerCase();var c='scroll'+b;u[c]=k?k[p]+(d.is('html,body')?0:d[0][c]-d.offset()[p]):t;if(f.margin&&typeof t=='object')u[c]-=parseInt($(t).css('margin'+b))||0;if(!i&&f.queue){if(d[0][c]!=u[c])animate(f.onAfterFirst);delete u[c]}};function animate(a){d.animate(u,f.speed,f.easing,a)}})}})(jQuery);
js/magebuzz/jquery/lightbox/jquery.lightbox-0.5.js ADDED
@@ -0,0 +1,472 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery lightBox plugin
3
+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
4
+ * and adapted to me for use like a plugin from jQuery.
5
+ * @name jquery-lightbox-0.5.js
6
+ * @author Leandro Vieira Pinho - http://leandrovieira.com
7
+ * @version 0.5
8
+ * @date April 11, 2008
9
+ * @category jQuery plugin
10
+ * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
11
+ * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
12
+ * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
13
+ */
14
+
15
+ // Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
16
+ (function($) {
17
+ /**
18
+ * $ is an alias to jQuery object
19
+ *
20
+ */
21
+ $.fn.lightBox = function(settings) {
22
+ // Settings to configure the jQuery lightBox plugin how you like
23
+ settings = jQuery.extend({
24
+ // Configuration related to overlay
25
+ overlayBgColor: '#000', // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
26
+ overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
27
+ // Configuration related to navigation
28
+ fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
29
+ // Configuration related to images
30
+ imageLoading: SKIN_URL + 'css/magebuzz/productslider/images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
31
+ imageBtnPrev: SKIN_URL + 'css/magebuzz/productslider/images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
32
+ imageBtnNext: SKIN_URL + 'css/magebuzz/productslider/images/lightbox-btn-next.gif', // (string) Path and the name of the next button image
33
+ imageBtnClose: SKIN_URL + 'css/magebuzz/productslider/images/lightbox-btn-close.gif', // (string) Path and the name of the close btn
34
+ imageBlank: SKIN_URL + 'css/magebuzz/productslider/images/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel)
35
+ // Configuration related to container image box
36
+ containerBorderSize: 10, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value
37
+ containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
38
+ // Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
39
+ txtImage: 'Image', // (string) Specify text "Image"
40
+ txtOf: 'of', // (string) Specify text "of"
41
+ // Configuration related to keyboard navigation
42
+ keyToClose: 'c', // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.
43
+ keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image
44
+ keyToNext: 'n', // (string) (n = next) Letter to show the next image.
45
+ // Don�t alter these variables in any way
46
+ imageArray: [],
47
+ activeImage: 0
48
+ },settings);
49
+ // Caching the jQuery object with all elements matched
50
+ var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
51
+ /**
52
+ * Initializing the plugin calling the start function
53
+ *
54
+ * @return boolean false
55
+ */
56
+ function _initialize() {
57
+ _start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked
58
+ return false; // Avoid the browser following the link
59
+ }
60
+ /**
61
+ * Start the jQuery lightBox plugin
62
+ *
63
+ * @param object objClicked The object (link) whick the user have clicked
64
+ * @param object jQueryMatchedObj The jQuery object with all elements matched
65
+ */
66
+ function _start(objClicked,jQueryMatchedObj) {
67
+ // Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
68
+ $('embed, object, select').css({ 'visibility' : 'hidden' });
69
+ // Call the function to create the markup structure; style some elements; assign events in some elements.
70
+ _set_interface();
71
+ // Unset total images in imageArray
72
+ settings.imageArray.length = 0;
73
+ // Unset image active information
74
+ settings.activeImage = 0;
75
+ // We have an image set? Or just an image? Let�s see it.
76
+ if ( jQueryMatchedObj.length == 1 ) {
77
+ settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));
78
+ } else {
79
+ // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
80
+ for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
81
+ settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));
82
+ }
83
+ }
84
+ while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
85
+ settings.activeImage++;
86
+ }
87
+ // Call the function that prepares image exibition
88
+ _set_image_to_view();
89
+ }
90
+ /**
91
+ * Create the jQuery lightBox plugin interface
92
+ *
93
+ * The HTML markup will be like that:
94
+ <div id="jquery-overlay"></div>
95
+ <div id="jquery-lightbox">
96
+ <div id="lightbox-container-image-box">
97
+ <div id="lightbox-container-image">
98
+ <img src="../fotos/XX.jpg" id="lightbox-image">
99
+ <div id="lightbox-nav">
100
+ <a href="#" id="lightbox-nav-btnPrev"></a>
101
+ <a href="#" id="lightbox-nav-btnNext"></a>
102
+ </div>
103
+ <div id="lightbox-loading">
104
+ <a href="#" id="lightbox-loading-link">
105
+ <img src="../images/lightbox-ico-loading.gif">
106
+ </a>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ <div id="lightbox-container-image-data-box">
111
+ <div id="lightbox-container-image-data">
112
+ <div id="lightbox-image-details">
113
+ <span id="lightbox-image-details-caption"></span>
114
+ <span id="lightbox-image-details-currentNumber"></span>
115
+ </div>
116
+ <div id="lightbox-secNav">
117
+ <a href="#" id="lightbox-secNav-btnClose">
118
+ <img src="../images/lightbox-btn-close.gif">
119
+ </a>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ *
125
+ */
126
+ function _set_interface() {
127
+ // Apply the HTML markup into body tag
128
+ $('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');
129
+ // Get page sizes
130
+ var arrPageSizes = ___getPageSize();
131
+ // Style overlay and show it
132
+ $('#jquery-overlay').css({
133
+ backgroundColor: settings.overlayBgColor,
134
+ opacity: settings.overlayOpacity,
135
+ width: arrPageSizes[0],
136
+ height: arrPageSizes[1]
137
+ }).fadeIn();
138
+ // Get page scroll
139
+ var arrPageScroll = ___getPageScroll();
140
+ // Calculate top and left offset for the jquery-lightbox div object and show it
141
+ $('#jquery-lightbox').css({
142
+ top: arrPageScroll[1] + (arrPageSizes[3] / 10),
143
+ left: arrPageScroll[0]
144
+ }).show();
145
+ // Assigning click events in elements to close overlay
146
+ $('#jquery-overlay,#jquery-lightbox').click(function() {
147
+ _finish();
148
+ });
149
+ // Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects
150
+ $('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
151
+ _finish();
152
+ return false;
153
+ });
154
+ // If window was resized, calculate the new overlay dimensions
155
+ $(window).resize(function() {
156
+ // Get page sizes
157
+ var arrPageSizes = ___getPageSize();
158
+ // Style overlay and show it
159
+ $('#jquery-overlay').css({
160
+ width: arrPageSizes[0],
161
+ height: arrPageSizes[1]
162
+ });
163
+ // Get page scroll
164
+ var arrPageScroll = ___getPageScroll();
165
+ // Calculate top and left offset for the jquery-lightbox div object and show it
166
+ $('#jquery-lightbox').css({
167
+ top: arrPageScroll[1] + (arrPageSizes[3] / 10),
168
+ left: arrPageScroll[0]
169
+ });
170
+ });
171
+ }
172
+ /**
173
+ * Prepares image exibition; doing a image�s preloader to calculate it�s size
174
+ *
175
+ */
176
+ function _set_image_to_view() { // show the loading
177
+ // Show the loading
178
+ $('#lightbox-loading').show();
179
+ if ( settings.fixedNavigation ) {
180
+ $('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
181
+ } else {
182
+ // Hide some elements
183
+ $('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
184
+ }
185
+ // Image preload process
186
+ var objImagePreloader = new Image();
187
+ objImagePreloader.onload = function() {
188
+ $('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);
189
+ // Perfomance an effect in the image container resizing it
190
+ _resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
191
+ // clear onLoad, IE behaves irratically with animated gifs otherwise
192
+ objImagePreloader.onload=function(){};
193
+ };
194
+ objImagePreloader.src = settings.imageArray[settings.activeImage][0];
195
+ };
196
+ /**
197
+ * Perfomance an effect in the image container resizing it
198
+ *
199
+ * @param integer intImageWidth The image�s width that will be showed
200
+ * @param integer intImageHeight The image�s height that will be showed
201
+ */
202
+ function _resize_container_image_box(intImageWidth,intImageHeight) {
203
+ // Get current width and height
204
+ var intCurrentWidth = $('#lightbox-container-image-box').width();
205
+ var intCurrentHeight = $('#lightbox-container-image-box').height();
206
+ // Get the width and height of the selected image plus the padding
207
+ var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image�s width and the left and right padding value
208
+ var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image�s height and the left and right padding value
209
+ // Diferences
210
+ var intDiffW = intCurrentWidth - intWidth;
211
+ var intDiffH = intCurrentHeight - intHeight;
212
+ // Perfomance the effect
213
+ $('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
214
+ if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) {
215
+ if ( $.browser.msie ) {
216
+ ___pause(250);
217
+ } else {
218
+ ___pause(100);
219
+ }
220
+ }
221
+ $('#lightbox-container-image-data-box').css({ width: intImageWidth });
222
+ $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
223
+ };
224
+ /**
225
+ * Show the prepared image
226
+ *
227
+ */
228
+ function _show_image() {
229
+ $('#lightbox-loading').hide();
230
+ $('#lightbox-image').fadeIn(function() {
231
+ _show_image_data();
232
+ _set_navigation();
233
+ });
234
+ _preload_neighbor_images();
235
+ };
236
+ /**
237
+ * Show the image information
238
+ *
239
+ */
240
+ function _show_image_data() {
241
+ $('#lightbox-container-image-data-box').slideDown('fast');
242
+ $('#lightbox-image-details-caption').hide();
243
+ if ( settings.imageArray[settings.activeImage][1] ) {
244
+ $('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
245
+ }
246
+ // If we have a image set, display 'Image X of X'
247
+ if ( settings.imageArray.length > 1 ) {
248
+ $('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show();
249
+ }
250
+ }
251
+ /**
252
+ * Display the button navigations
253
+ *
254
+ */
255
+ function _set_navigation() {
256
+ $('#lightbox-nav').show();
257
+
258
+ // Instead to define this configuration in CSS file, we define here. And it�s need to IE. Just.
259
+ $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
260
+
261
+ // Show the prev button, if not the first image in set
262
+ if ( settings.activeImage != 0 ) {
263
+ if ( settings.fixedNavigation ) {
264
+ $('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
265
+ .unbind()
266
+ .bind('click',function() {
267
+ settings.activeImage = settings.activeImage - 1;
268
+ _set_image_to_view();
269
+ return false;
270
+ });
271
+ } else {
272
+ // Show the images button for Next buttons
273
+ $('#lightbox-nav-btnPrev').unbind().hover(function() {
274
+ $(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
275
+ },function() {
276
+ $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
277
+ }).show().bind('click',function() {
278
+ settings.activeImage = settings.activeImage - 1;
279
+ _set_image_to_view();
280
+ return false;
281
+ });
282
+ }
283
+ }
284
+
285
+ // Show the next button, if not the last image in set
286
+ if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
287
+ if ( settings.fixedNavigation ) {
288
+ $('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
289
+ .unbind()
290
+ .bind('click',function() {
291
+ settings.activeImage = settings.activeImage + 1;
292
+ _set_image_to_view();
293
+ return false;
294
+ });
295
+ } else {
296
+ // Show the images button for Next buttons
297
+ $('#lightbox-nav-btnNext').unbind().hover(function() {
298
+ $(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
299
+ },function() {
300
+ $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
301
+ }).show().bind('click',function() {
302
+ settings.activeImage = settings.activeImage + 1;
303
+ _set_image_to_view();
304
+ return false;
305
+ });
306
+ }
307
+ }
308
+ // Enable keyboard navigation
309
+ _enable_keyboard_navigation();
310
+ }
311
+ /**
312
+ * Enable a support to keyboard navigation
313
+ *
314
+ */
315
+ function _enable_keyboard_navigation() {
316
+ $(document).keydown(function(objEvent) {
317
+ _keyboard_action(objEvent);
318
+ });
319
+ }
320
+ /**
321
+ * Disable the support to keyboard navigation
322
+ *
323
+ */
324
+ function _disable_keyboard_navigation() {
325
+ $(document).unbind();
326
+ }
327
+ /**
328
+ * Perform the keyboard actions
329
+ *
330
+ */
331
+ function _keyboard_action(objEvent) {
332
+ // To ie
333
+ if ( objEvent == null ) {
334
+ keycode = event.keyCode;
335
+ escapeKey = 27;
336
+ // To Mozilla
337
+ } else {
338
+ keycode = objEvent.keyCode;
339
+ escapeKey = objEvent.DOM_VK_ESCAPE;
340
+ }
341
+ // Get the key in lower case form
342
+ key = String.fromCharCode(keycode).toLowerCase();
343
+ // Verify the keys to close the ligthBox
344
+ if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) {
345
+ _finish();
346
+ }
347
+ // Verify the key to show the previous image
348
+ if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
349
+ // If we�re not showing the first image, call the previous
350
+ if ( settings.activeImage != 0 ) {
351
+ settings.activeImage = settings.activeImage - 1;
352
+ _set_image_to_view();
353
+ _disable_keyboard_navigation();
354
+ }
355
+ }
356
+ // Verify the key to show the next image
357
+ if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
358
+ // If we�re not showing the last image, call the next
359
+ if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
360
+ settings.activeImage = settings.activeImage + 1;
361
+ _set_image_to_view();
362
+ _disable_keyboard_navigation();
363
+ }
364
+ }
365
+ }
366
+ /**
367
+ * Preload prev and next images being showed
368
+ *
369
+ */
370
+ function _preload_neighbor_images() {
371
+ if ( (settings.imageArray.length -1) > settings.activeImage ) {
372
+ objNext = new Image();
373
+ objNext.src = settings.imageArray[settings.activeImage + 1][0];
374
+ }
375
+ if ( settings.activeImage > 0 ) {
376
+ objPrev = new Image();
377
+ objPrev.src = settings.imageArray[settings.activeImage -1][0];
378
+ }
379
+ }
380
+ /**
381
+ * Remove jQuery lightBox plugin HTML markup
382
+ *
383
+ */
384
+ function _finish() {
385
+ $('#jquery-lightbox').remove();
386
+ $('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); });
387
+ // Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
388
+ $('embed, object, select').css({ 'visibility' : 'visible' });
389
+ }
390
+ /**
391
+ / THIRD FUNCTION
392
+ * getPageSize() by quirksmode.com
393
+ *
394
+ * @return Array Return an array with page width, height and window width, height
395
+ */
396
+ function ___getPageSize() {
397
+ var xScroll, yScroll;
398
+ if (window.innerHeight && window.scrollMaxY) {
399
+ xScroll = window.innerWidth + window.scrollMaxX;
400
+ yScroll = window.innerHeight + window.scrollMaxY;
401
+ } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
402
+ xScroll = document.body.scrollWidth;
403
+ yScroll = document.body.scrollHeight;
404
+ } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
405
+ xScroll = document.body.offsetWidth;
406
+ yScroll = document.body.offsetHeight;
407
+ }
408
+ var windowWidth, windowHeight;
409
+ if (self.innerHeight) { // all except Explorer
410
+ if(document.documentElement.clientWidth){
411
+ windowWidth = document.documentElement.clientWidth;
412
+ } else {
413
+ windowWidth = self.innerWidth;
414
+ }
415
+ windowHeight = self.innerHeight;
416
+ } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
417
+ windowWidth = document.documentElement.clientWidth;
418
+ windowHeight = document.documentElement.clientHeight;
419
+ } else if (document.body) { // other Explorers
420
+ windowWidth = document.body.clientWidth;
421
+ windowHeight = document.body.clientHeight;
422
+ }
423
+ // for small pages with total height less then height of the viewport
424
+ if(yScroll < windowHeight){
425
+ pageHeight = windowHeight;
426
+ } else {
427
+ pageHeight = yScroll;
428
+ }
429
+ // for small pages with total width less then width of the viewport
430
+ if(xScroll < windowWidth){
431
+ pageWidth = xScroll;
432
+ } else {
433
+ pageWidth = windowWidth;
434
+ }
435
+ arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
436
+ return arrayPageSize;
437
+ };
438
+ /**
439
+ / THIRD FUNCTION
440
+ * getPageScroll() by quirksmode.com
441
+ *
442
+ * @return Array Return an array with x,y page scroll values.
443
+ */
444
+ function ___getPageScroll() {
445
+ var xScroll, yScroll;
446
+ if (self.pageYOffset) {
447
+ yScroll = self.pageYOffset;
448
+ xScroll = self.pageXOffset;
449
+ } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
450
+ yScroll = document.documentElement.scrollTop;
451
+ xScroll = document.documentElement.scrollLeft;
452
+ } else if (document.body) {// all other Explorers
453
+ yScroll = document.body.scrollTop;
454
+ xScroll = document.body.scrollLeft;
455
+ }
456
+ arrayPageScroll = new Array(xScroll,yScroll);
457
+ return arrayPageScroll;
458
+ };
459
+ /**
460
+ * Stop the code execution from a escified time in milisecond
461
+ *
462
+ */
463
+ function ___pause(ms) {
464
+ var date = new Date();
465
+ curDate = null;
466
+ do { var curDate = new Date(); }
467
+ while ( curDate - date < ms);
468
+ };
469
+ // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
470
+ return this.unbind('click').click(_initialize);
471
+ };
472
+ })(jQuery); // Call and execute the function immediately passing the jQuery object
js/magebuzz/jquery/script.js ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // JavaScript Document
2
+ /*! Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
3
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
4
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
5
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
6
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
7
+ *
8
+ * Version: 3.0.2
9
+ *
10
+ * Requires: 1.2.2+
11
+ */
12
+
13
+ (function($) {
14
+
15
+ var types = ['DOMMouseScroll', 'mousewheel'];
16
+
17
+ $.event.special.mousewheel = {
18
+ setup: function() {
19
+ if ( this.addEventListener )
20
+ for ( var i=types.length; i; )
21
+ this.addEventListener( types[--i], handler, false );
22
+ else
23
+ this.onmousewheel = handler;
24
+ },
25
+
26
+ teardown: function() {
27
+ if ( this.removeEventListener )
28
+ for ( var i=types.length; i; )
29
+ this.removeEventListener( types[--i], handler, false );
30
+ else
31
+ this.onmousewheel = null;
32
+ }
33
+ };
34
+
35
+ $.fn.extend({
36
+ mousewheel: function(fn) {
37
+ return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
38
+ },
39
+
40
+ unmousewheel: function(fn) {
41
+ return this.unbind("mousewheel", fn);
42
+ }
43
+ });
44
+
45
+
46
+ function handler(event) {
47
+ var args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true;
48
+
49
+ event = $.event.fix(event || window.event);
50
+ event.type = "mousewheel";
51
+
52
+ if ( event.wheelDelta ) delta = event.wheelDelta/120;
53
+ if ( event.detail ) delta = -event.detail/3;
54
+
55
+ // Add events and delta to the front of the arguments
56
+ args.unshift(event, delta);
57
+
58
+ return $.event.handle.apply(this, args);
59
+ }
60
+
61
+ })(jQuery);
62
+
63
+ /**
64
+ * @version $Id: $Revision
65
+ * @package jquery
66
+ * @subpackage lofslidernews
67
+ * @copyright Copyright (C) JAN 2010 LandOfCoder.com <@emai:landofcoder@gmail.com>. All rights reserved.
68
+ * @website http://landofcoder.com
69
+ * @license This plugin is dual-licensed under the GNU General Public License and the MIT License
70
+ */
71
+ // JavaScript Document
72
+ (function($) {
73
+ $.fn.lofJSidernews = function( settings ) {
74
+ return this.each(function() {
75
+ // get instance of the lofSiderNew.
76
+ new $.lofSidernews( this, settings );
77
+ });
78
+ }
79
+ $.lofSidernews = function( obj, settings ){
80
+ this.settings = {
81
+ direction : '',
82
+ mainItemSelector : 'li',
83
+ navInnerSelector : 'ul',
84
+ navSelector : 'li' ,
85
+ navigatorEvent : 'click',
86
+ wapperSelector: '.lof-main-wapper',
87
+ interval : 4000,
88
+ auto : true, // whether to automatic play the slideshow
89
+ maxItemDisplay : 3,
90
+ startItem : 0,
91
+ navPosition : 'vertical',
92
+ navigatorHeight : 100,
93
+ navigatorWidth : 310,
94
+ duration : 600,
95
+ navItemsSelector : '.lof-navigator li',
96
+ navOuterSelector : '.lof-navigator-outer' ,
97
+ isPreloaded : true,
98
+ easing : 'easeInOutSine'
99
+ }
100
+ $.extend( this.settings, settings ||{} );
101
+ this.nextNo = null;
102
+ this.previousNo = null;
103
+ this.maxWidth = this.settings.mainWidth || 600;
104
+ this.wrapper = $( obj ).find( this.settings.wapperSelector );
105
+ this.slides = this.wrapper.find( this.settings.mainItemSelector );
106
+ if( !this.wrapper.length || !this.slides.length ) return ;
107
+ // set width of wapper
108
+ if( this.settings.maxItemDisplay > this.slides.length ){
109
+ this.settings.maxItemDisplay = this.slides.length;
110
+ }
111
+ this.currentNo = isNaN(this.settings.startItem)||this.settings.startItem > this.slides.length?0:this.settings.startItem;
112
+ this.navigatorOuter = $( obj ).find( this.settings.navOuterSelector );
113
+ this.navigatorItems = $( obj ).find( this.settings.navItemsSelector ) ;
114
+ this.navigatorInner = this.navigatorOuter.find( this.settings.navInnerSelector );
115
+
116
+ if( this.settings.navPosition == 'horizontal' ){
117
+ this.navigatorInner.width( this.slides.length * this.settings.navigatorWidth );
118
+ this.navigatorOuter.width( this.settings.maxItemDisplay * this.settings.navigatorWidth );
119
+ this.navigatorOuter.height( this.settings.navigatorHeight );
120
+
121
+ } else {
122
+ this.navigatorInner.height( this.slides.length * this.settings.navigatorHeight );
123
+
124
+ this.navigatorOuter.height( this.settings.maxItemDisplay * this.settings.navigatorHeight );
125
+ this.navigatorOuter.width( this.settings.navigatorWidth );
126
+ }
127
+ this.navigratorStep = this.__getPositionMode( this.settings.navPosition );
128
+ this.directionMode = this.__getDirectionMode();
129
+
130
+
131
+ if( this.settings.direction == 'opacity') {
132
+ this.wrapper.addClass( 'lof-opacity' );
133
+ $(this.slides).css('opacity',0).eq(this.currentNo).css('opacity',1);
134
+ } else {
135
+ this.wrapper.css({'left':'-'+this.currentNo*this.maxSize+'px', 'width':( this.maxWidth ) * this.slides.length } );
136
+ }
137
+
138
+
139
+ if( this.settings.isPreloaded ) {
140
+ this.preLoadImage( this.onComplete );
141
+ } else {
142
+ this.onComplete();
143
+ }
144
+
145
+ }
146
+ $.lofSidernews.fn = $.lofSidernews.prototype;
147
+ $.lofSidernews.fn.extend = $.lofSidernews.extend = $.extend;
148
+
149
+ $.lofSidernews.fn.extend({
150
+
151
+ startUp:function( obj, wrapper ) {
152
+ seft = this;
153
+
154
+ this.navigatorItems.each( function(index, item ){
155
+ $(item).click( function(){
156
+ seft.jumping( index, true );
157
+ seft.setNavActive( index, item );
158
+ } );
159
+ $(item).css( {'height': seft.settings.navigatorHeight, 'width': seft.settings.navigatorWidth} );
160
+ })
161
+ this.registerWheelHandler( this.navigatorOuter, this );
162
+ this.setNavActive(this.currentNo );
163
+
164
+ if( this.settings.buttons && typeof (this.settings.buttons) == "object" ){
165
+ this.registerButtonsControl( 'click', this.settings.buttons, this );
166
+
167
+ }
168
+ if( this.settings.auto )
169
+ this.play( this.settings.interval,'next', true );
170
+
171
+ return this;
172
+ },
173
+ onComplete:function(){
174
+ setTimeout( function(){ $('.preload').fadeOut( 900 ); }, 400 ); this.startUp( );
175
+ },
176
+ preLoadImage:function( callback ){
177
+ var self = this;
178
+ var images = this.wrapper.find( 'img' );
179
+
180
+ var count = 0;
181
+ images.each( function(index,image){
182
+ if( !image.complete ){
183
+ image.onload =function(){
184
+ count++;
185
+ if( count >= images.length ){
186
+ self.onComplete();
187
+ }
188
+ }
189
+ image.onerror =function(){
190
+ count++;
191
+ if( count >= images.length ){
192
+ self.onComplete();
193
+ }
194
+ }
195
+ }else {
196
+ count++;
197
+ if( count >= images.length ){
198
+ self.onComplete();
199
+ }
200
+ }
201
+ } );
202
+ },
203
+ navivationAnimate:function( currentIndex ) {
204
+ if (currentIndex <= this.settings.startItem
205
+ || currentIndex - this.settings.startItem >= this.settings.maxItemDisplay-1) {
206
+ this.settings.startItem = currentIndex - this.settings.maxItemDisplay+2;
207
+ if (this.settings.startItem < 0) this.settings.startItem = 0;
208
+ if (this.settings.startItem >this.slides.length-this.settings.maxItemDisplay) {
209
+ this.settings.startItem = this.slides.length-this.settings.maxItemDisplay;
210
+ }
211
+ }
212
+ this.navigatorInner.stop().animate( eval('({'+this.navigratorStep[0]+':-'+this.settings.startItem*this.navigratorStep[1]+'})'),
213
+ {duration:500, easing:'easeInOutSine'} );
214
+ },
215
+ setNavActive:function( index, item ){
216
+ if( (this.navigatorItems) ){
217
+ this.navigatorItems.removeClass( 'active' );
218
+ $(this.navigatorItems.get(index)).addClass( 'active' );
219
+ this.navivationAnimate( this.currentNo );
220
+ }
221
+ },
222
+ __getPositionMode:function( position ){
223
+ if( position == 'horizontal' ){
224
+ return ['left', this.settings.navigatorWidth];
225
+ }
226
+ return ['top', this.settings.navigatorHeight];
227
+ },
228
+ __getDirectionMode:function(){
229
+ switch( this.settings.direction ){
230
+ case 'opacity': this.maxSize=0; return ['opacity','opacity'];
231
+ default: this.maxSize=this.maxWidth; return ['left','width'];
232
+ }
233
+ },
234
+ registerWheelHandler:function( element, obj ){
235
+ element.bind('mousewheel', function(event, delta ) {
236
+ var dir = delta > 0 ? 'Up' : 'Down',
237
+ vel = Math.abs(delta);
238
+ if( delta > 0 ){
239
+ obj.previous( true );
240
+ } else {
241
+ obj.next( true );
242
+ }
243
+ return false;
244
+ });
245
+ },
246
+ registerButtonsControl:function( eventHandler, objects, self ){
247
+ for( var action in objects ){
248
+ switch (action.toString() ){
249
+ case 'next':
250
+ objects[action].click( function() { self.next( true) } );
251
+ break;
252
+ case 'previous':
253
+ objects[action].click( function() { self.previous( true) } );
254
+ break;
255
+ }
256
+ }
257
+ return this;
258
+ },
259
+ onProcessing:function( manual, start, end ){
260
+ this.previousNo = this.currentNo + (this.currentNo>0 ? -1 : this.slides.length-1);
261
+ this.nextNo = this.currentNo + (this.currentNo < this.slides.length-1 ? 1 : 1- this.slides.length);
262
+ return this;
263
+ },
264
+ finishFx:function( manual ){
265
+ if( manual ) this.stop();
266
+ if( manual && this.settings.auto ){
267
+ this.play( this.settings.interval,'next', true );
268
+ }
269
+ this.setNavActive( this.currentNo );
270
+ },
271
+ getObjectDirection:function( start, end ){
272
+ return eval("({'"+this.directionMode[0]+"':-"+(this.currentNo*start)+"})");
273
+ },
274
+ fxStart:function( index, obj, currentObj ){
275
+ if( this.settings.direction == 'opacity' ) {
276
+ $(this.slides).stop().animate({opacity:0}, {duration: this.settings.duration, easing:this.settings.easing} );
277
+ $(this.slides).eq(index).stop().animate( {opacity:1}, {duration: this.settings.duration, easing:this.settings.easing} );
278
+ }else {
279
+ this.wrapper.stop().animate( obj, {duration: this.settings.duration, easing:this.settings.easing} );
280
+ }
281
+ return this;
282
+ },
283
+ jumping:function( no, manual ){
284
+ this.stop();
285
+ if( this.currentNo == no ) return;
286
+ var obj = eval("({'"+this.directionMode[0]+"':-"+(this.maxSize*no)+"})");
287
+ this.onProcessing( null, manual, 0, this.maxSize )
288
+ .fxStart( no, obj, this )
289
+ .finishFx( manual );
290
+ this.currentNo = no;
291
+ },
292
+ next:function( manual , item){
293
+
294
+ this.currentNo += (this.currentNo < this.slides.length-1) ? 1 : (1 - this.slides.length);
295
+ this.onProcessing( item, manual, 0, this.maxSize )
296
+ .fxStart( this.currentNo, this.getObjectDirection(this.maxSize ), this )
297
+ .finishFx( manual );
298
+ },
299
+ previous:function( manual, item ){
300
+ this.currentNo += this.currentNo > 0 ? -1 : this.slides.length - 1;
301
+ this.onProcessing( item, manual )
302
+ .fxStart( this.currentNo, this.getObjectDirection(this.maxSize ), this )
303
+ .finishFx( manual );
304
+ },
305
+ play:function( delay, direction, wait ){
306
+ this.stop();
307
+ if(!wait){ this[direction](false); }
308
+ var self = this;
309
+ this.isRun = setTimeout(function() { self[direction](true); }, delay);
310
+ },
311
+ stop:function(){
312
+ if (this.isRun == null) return;
313
+ clearTimeout(this.isRun);
314
+ this.isRun = null;
315
+ }
316
+ })
317
+ })(jQuery)
318
+
js/magebuzz/jquery/slider-config.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var $newslider = jQuery.noConflict();
2
+ $newslider(document).ready(function(){
3
+ $newslider.easing.backout = function(x, t, b, c, d){
4
+ var s=1.70158;
5
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
6
+ };
7
+
8
+ $newslider('#features-screen').scrollShow({
9
+ elements:'div.item',//elements selector (relative to view)
10
+ view:'#view',
11
+ content:'#images',
12
+ easing:'backout',
13
+ wrappers:'link,crop',
14
+ navigators:'a[id]',
15
+ navigationMode:'s',
16
+ circular:true,
17
+ start:0
18
+ });
19
+
20
+ });
js/magebuzz/productslider.js ADDED
@@ -0,0 +1 @@
 
1
+ /********Js For productslider************/
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>magebuzz_product_slider</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Product Slider extension</summary>
10
+ <description>Product slider extension for Magento</description>
11
+ <notes>Product slider version 0.1.0</notes>
12
+ <authors><author><name>Magebuzz</name><user>magebuzz</user><email>magebuzz@gmail.com</email></author></authors>
13
+ <date>2012-08-25</date>
14
+ <time>08:24:58</time>
15
+ <contents><target name="magecommunity"><dir name="Magebuzz"><dir name="Productslider"><dir name="Block"><dir name="Adminhtml"><dir name="Productslider"><dir name="Edit"><file name="Form.php" hash="951ef8539702342595b653927700316d"/><dir name="Tab"><file name="Main.php" hash="a48d6aa9e62139228be7f3c8d59ff95d"/></dir><file name="Tabs.php" hash="ebac0af25c27cb2ce1d7b5383443a5ef"/></dir><file name="Edit.php" hash="0e5d80da43865f7550c16c667282f5a1"/><file name="Grid.php" hash="5bdeb3b696d53b8d2109def8b2f88c9e"/></dir><file name="Productslider.php" hash="a5603d383a9e2de1a6bbc8aec091fbbf"/></dir><dir name="Catalog"><dir name="Product"><dir name="List"><file name="Bestseller.php" hash="0f4962439ab852d088ed5f117514677f"/><file name="Mostviewed.php" hash="b4cb5b0710e7fe8d6b26b1a1d562a126"/><file name="Random.php" hash="90a6added83c59fa675122b57ee2aabc"/><file name="RecentlyAdd.php" hash="2acc2184220e065ae3c47966c6b19c62"/></dir></dir></dir><file name="Position.php" hash="8c2dcc009401d2ff8c0e4658c18d458c"/><file name="Productslider.php" hash="4809a7300a01ed28f6c2320fe97727a3"/></dir><dir name="Helper"><file name="Data.php" hash="8d3efdb728fe4095d21bb5d0cdfb96cc"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Productslider"><file name="Collection.php" hash="d8f906e20263052254d5c433c977fe02"/></dir><file name="Productslider.php" hash="974a67289ccf8b463c76a333e8b75df1"/></dir><file name="Productslider.php" hash="8ddbb5ececbc0af7b50ab5362b74c768"/><file name="Session.php" hash="9f7420294267b43d454ce37bdff9f076"/><file name="Status.php" hash="33a773eef771f4528a6445e44444ecfe"/><dir name="System"><dir name="Config"><file name="Position.php" hash="4ac40a43d758bd1cce98b048547a1d0e"/><file name="Styles.php" hash="6d8f546a74a2f1a78e3a9f934c30801e"/><file name="Type.php" hash="f0ff237b6b91ae4fd27a0e231851b277"/></dir></dir><dir name="Wysiwyg"><file name="Config.php" hash="9a85327ffe6fea993c66b221a3efc7ce"/></dir></dir><dir name="controllers"><file name="BestsellerController.php" hash="3df65dc89f5bbd6c975f2f002d6de33f"/><file name="IndexController.php" hash="7fe0c83e90c4ee89308034c9b4b4a6dc"/><file name="MostviewedController.php" hash="146aef7a8b16a0799ee41b8fb18a23c6"/><file name="RandomController.php" hash="e7bc2e270dc46368c1c7ce11808f20d7"/><file name="RecentlyAddController.php" hash="22760bbdc2e842087662f39f6da3b210"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8c901bd992f9aa7a15d90b9cb19681c3"/><file name="config.xml" hash="cfaa58ee2a770d5a0334da2a7255e0f3"/><file name="system.xml" hash="8ccb375f53fee8c8049e7008bf871f92"/></dir><dir name="sql"><dir name="productslider_setup"><file name="mysql4-install-0.1.0.php" hash="17de854fd861f292843548f2f773ddc4"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="productslider.xml" hash="7f029b5178b5b468b119f13f29579f8b"/></dir><dir name="template"><dir name="productslider"><file name="productslider.phtml" hash="39912d9aa6b7bebe6187c112bc083f3d"/><dir name="type"><file name="slider1.phtml" hash="1dc5bf01d184ec3dd62b7dcae3a910af"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="productslider.xml" hash="91f2a28d241510d93363972cae9352d8"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magebuzz_Productslider.xml" hash="4a111fe8a91f3e1318079cc8198a4d44"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Magebuzz_Productslider.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="mage"><dir name="js"><dir name="magebuzz"><file name="productslider.js" hash="4e5e81646fdf60a3191d0cd45dd7083d"/><dir name="jquery"><file name="jquery-latest.js" hash="968e84789263b1e440f7cb4b9a07855a"/><file name="jquery-ui-1.7.2.custom.min.js" hash="6d9a17f8e58f5c207ef014085a407100"/><file name="jquery.bxSlider.js" hash="d688e268ab7e946d1b4caeb5a0a603f2"/><file name="jquery.easing.1.3.js" hash="f4195499d3cfc40ae09588aae02ff2dc"/><file name="jquery.pngFix.js" hash="39710cb566807b4dfcf7058f615650d1"/><file name="jquery.scrollShow.js" hash="8afcf221590b8d3c18f5046475d112a7"/><file name="jquery.scrollTo-min.js" hash="38608df4691e60bf6d74868bc02acdb4"/><dir name="lightbox"><file name="jquery.lightbox-0.5.js" hash="60ccd8c3c27d077f1667c7c963a38b07"/></dir><file name="script.js" hash="4a4624c90d1dccf732fe375633aaae33"/><file name="slider-config.js" hash="11820264377581484dcc62aea461c3b2"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="magebuzz"><file name="productslider.css" hash="0d8160a32de72769739844b07f61ddc3"/><dir name="productslider"><dir name="images"><file name="arrow-bg.png" hash="dd02d2e167a7ad76df8f10bf1147de70"/><file name="arrow-l.png" hash="9a4f1aadda0df80f8db6ebc7d0c938d7"/><file name="arrow-r.png" hash="94af413ec776ca1b09b9fff4f81cc618"/><file name="bg_dark.png" hash="7b2a5f91384c5506d0301407a23886b7"/><file name="bg_trans.png" hash="a79bdd39abd7923b383763cfa0b27068"/><file name="btn-cart.gif" hash="121b944b70a24e293002a7046c3ea1f0"/><file name="btn_next.png" hash="b70dbdd9c9cdba2df7faa885a97263bc"/><file name="btn_next_active.png" hash="c1b752ab415ab2d91068f6ef846e34d2"/><file name="btn_prev-active.png" hash="1b9c4054799f8e6631b0f34e5c7edef8"/><file name="btn_prev.png" hash="5b2643aa2fe83a5d0d9e881579a3c10e"/><file name="grad-bg.gif" hash="ea5c5db23b9fb55afe5c64a14620a69e"/><file name="icon-uparrowsmallwhite.png" hash="e20f9a64db38e2345a876f85e3b87806"/><file name="lightbox-blank.gif" hash="fc94fb0c3ed8a8f909dbc7630a0987ff"/><file name="lightbox-btn-close.gif" hash="2c38ae5be85141bf8867c9523f4bc357"/><file name="lightbox-btn-next.gif" hash="23414965ebe526012e473c1d4d65d4e7"/><file name="lightbox-btn-prev.gif" hash="5a9118de4ef6226473190d6e82f6d80d"/><file name="lightbox-ico-loading.gif" hash="b5fe8df97005341f898e2cf84e68de01"/><file name="load-indicator.gif" hash="4de83e8e2fb6ae4fe8d50453e3bc45ea"/><dir name="mopSlider"><file name="logo.png" hash="32e36acaf9db2701f45071865312f296"/><file name="monoBack.gif" hash="e2b307a546021ba3ad60a643138a81d6"/><file name="mopSlider-2.4.js" hash="9ea653968b6a84309abadd192b3c9c73"/><file name="paperBack.gif" hash="ccea3ba0fa8b0573ca184e684944472b"/><file name="paperBack.jpg" hash="c7fc174d3febd06f94224741b8bee641"/><file name="sliderBack.png" hash="94975be258b7eb54187be1a42cc26d45"/><file name="sliderBackLeft.png" hash="5437ae9d84052d3ecec981eba1f21ce3"/><file name="sliderBackLeftLeft.png" hash="fb47be03e56323b7e37ee3462cf737d8"/><file name="sliderBackLeftLeftW.png" hash="1cbd1d2be5ec6fcc92e27ec404c2c73a"/><file name="sliderBackLeftW.png" hash="13a9d085973993fb7630dd339b0628af"/><file name="sliderBackRight.png" hash="4dcb5d823b828e1baa56a76107ef3d88"/><file name="sliderBackRightRight.png" hash="3255f0dc97e1153dc25f99a876da3c46"/><file name="sliderBackRightRightW.png" hash="3d3a86f2e5e34ab556c605e32c27e447"/><file name="sliderBackRightRightW_f.png" hash="cee2301871d372580491ae8184440f33"/><file name="sliderBackRightRight_f.png" hash="bc7a19ff713b2333cae923cab799a03f"/><file name="sliderBackRightW.png" hash="8010a4b73de14c717953c1753ebe0570"/><file name="sliderBackW.png" hash="cb402275562f8e92fd7f01e0f9de7bf9"/><file name="sliderBtn.png" hash="edca4077cfb86a1f26f88d915cb00b1d"/><file name="sliderBtnLeft.png" hash="1093dc30d956db98b09219ef0351ba45"/><file name="sliderBtnLeftW.png" hash="9f1f73ba01353ca46cb2d410d7c90864"/><file name="sliderBtnLeftW_f.png" hash="19cb085e46f3ddef12d093b76ee19081"/><file name="sliderBtnLeft_f.png" hash="d9724727ffb75de44544eccf4d87922b"/><file name="sliderBtnRight.png" hash="8958e20835265a084176526b85c21cb8"/><file name="sliderBtnRightW.png" hash="e51ff8cc303f6001c32ee85e330523fe"/><file name="sliderBtnRightW_f.png" hash="777873b6a65b0228bd126dd9a4590e4f"/><file name="sliderBtnRight_f.png" hash="e4f2ad444219019f069f4597376373e4"/><file name="sliderBtnW.png" hash="6db7ccfb6687f9c4f1a1d8a77e421c3a"/><file name="sliderCorner_leftBottom.png" hash="de61a254ab7b82ee055b493aaef6312b"/><file name="sliderCorner_leftTop.png" hash="d56736e6bd04a61b148ebefe03490e37"/><file name="sliderCorner_rightBottom.png" hash="bb4edc731175d3b6a3b3800fb775c5cf"/><file name="sliderCorner_rightTop.png" hash="86a124668cfbdab6a1f2bcad1fb7480d"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name="next_icon.png" hash="4493198fbdf6ec09cec91a1046e85e96"/><file name="previous_icon.png" hash="7df329d7d8041cba7f7bc88aff1ca825"/><file name="product-image-bg.png" hash="217a3783c24845a87f38559cfe5523e2"/><file name="product_bg.png" hash="03eba209981fa189dd74cf13ca8076ac"/><file name="transpBlack.png" hash="346fd634dc6fd656232300275b4a26db"/><file name="transparent_bg.png" hash="341a78f55fb58bb02e93b2a385e0353f"/><file name="ui-bg_flat_75_ffffff_40x100.png" hash="8692e6efddf882acbff144c38ea7dfdf"/></dir><file name="jquery-ui-1.7.2.custom.css" hash="7395a9032dd3a0ffcc54e8ff185aa4a6"/><file name="jquery.lightbox-0.5.css" hash="79ec543bbe42f8852aac14381b9ffff8"/><file name="layout.css" hash="1ff11e00d2d5cb416d7fd9d0c6188b6c"/><file name="lightbox.css" hash="7e8c397b451099e0946e89ed149fc19f"/><file name="simple-slider.css" hash="9c20bb981c581ced6209b631159565fd"/><file name="slidebar.css" hash="74683c7c1795c61d3ce4afd1ffc3a813"/><file name="slider-navright.css" hash="c54cef4450dbb854c4071b30e1abd776"/><file name="slider-scroll.css" hash="d6915f6436371b7ae4a2a378e6856509"/><file name="slider.css" hash="c2b101d37d685152d020b72fcad05491"/><file name="style.css" hash="efa3390458caca49ababd20264dd07c7"/></dir></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>
skin/frontend/default/default/css/magebuzz/productslider.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /********All CSS Productslider ************/
2
+ #product-slider{margin:0 0 20px;}
3
+ #product-slider button.btn-cart {
4
+ background: none repeat scroll 0 0 transparent;
5
+ border: 0 none;
6
+ cursor: pointer;
7
+ margin: 0;
8
+ overflow: visible;
9
+ padding: 0;
10
+ width: auto;
11
+ }
12
+ #product-slider button.btn-cart span {
13
+ background: url(productslider/images/btn-cart.gif) no-repeat scroll left top transparent;
14
+ border: 0 none;
15
+ float: left;
16
+ height: 30px;
17
+ line-height: 30px;
18
+ padding: 0;
19
+ width: 90px;
20
+ }
21
+ #product-slider button.btn-cart span span {
22
+ background: none repeat scroll 0 50% transparent;
23
+ color: #1E7EC8;
24
+ font-weight: bold;
25
+ padding-left: 20px;
26
+ width: auto;
27
+ }
28
+ #product-slider .price-box .price{color:#f4453c; font-size:15px;}
skin/frontend/default/default/css/magebuzz/productslider/images/arrow-bg.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/arrow-l.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/arrow-r.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/bg_dark.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/bg_trans.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/btn-cart.gif ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/btn_next.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/btn_next_active.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/btn_prev-active.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/btn_prev.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/grad-bg.gif ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/icon-uparrowsmallwhite.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/lightbox-blank.gif ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/lightbox-btn-close.gif ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/lightbox-btn-next.gif ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/lightbox-btn-prev.gif ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/lightbox-ico-loading.gif ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/load-indicator.gif ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/.DS_Store ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/logo.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/monoBack.gif ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/mopSlider-2.4.js ADDED
@@ -0,0 +1,443 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * mopSlider 2.4
3
+ * By Hiroki Miura (http://www.mopstudio.jp)
4
+ * Copyright (c) 2009 mopStudio
5
+ * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
6
+ * July 18, 2009
7
+ */
8
+
9
+ jQuery.fn.extend({
10
+ mopSlider:function(setting){
11
+ var ua=navigator.userAgent,browser,os,ie67=false;
12
+ var px="px"
13
+ var btnPosi,boxPosi,btnPast,boxPast,whitchDrag="";
14
+ var btnMoveNum,btnMoveTo,boxMoveNum,boxMoveTo;
15
+ var timeCheck1,timeCheck2,DragCheck1,DragCheck2,finalTime1,finalTime2;
16
+ var mopSliderName;
17
+ var nextMov=[];
18
+ var scrollMax,scrollNum,caseW,itemNum,sliderNum,checkNum,movNum;
19
+ var mopSliderMotion;
20
+ var boxW,itemMgnAll;
21
+ var finalCount=0;
22
+ var indication=setting.indi
23
+ var mopSliderW=setting.w;
24
+ var mopSliderH=setting.h;
25
+ var sldW=setting.sldW;
26
+ var btnW=setting.btnW;
27
+ var itemMgn=setting.itemMgn;
28
+ var shuffle=setting.shuffle;
29
+ var mopSliderNo=setting.no;
30
+ var mopSliderType=setting.type;
31
+ /*path to image*/
32
+ var btnLeft=new Image();
33
+ var btnLeftF=new Image();
34
+ var btnRight=new Image();
35
+ var btnRightF=new Image();
36
+ var btnCenter=new Image();
37
+ var btnChange=new Image();
38
+ var btnChangeF=new Image();
39
+ var backImg=new Image();
40
+ var sldcLeftImg=new Image();
41
+ var sldcRightImg=new Image();
42
+ var sldBackLeft=new Image();
43
+ var sldBackCenter=new Image();
44
+ var sldBackRight=new Image();
45
+ if(mopSliderType=="paper"){
46
+ btnLeft.src="mopSlider/sliderBtnLeftW.png";
47
+ btnLeftF.src="mopSlider/sliderBtnLeftW_f.png";
48
+ btnRight.src="mopSlider/sliderBtnRightW.png";
49
+ btnRightF.src="mopSlider/sliderBtnRightW_f.png";
50
+ btnCenter.src="mopSlider/sliderBtnW.png";
51
+ btnChange.src="mopSlider/sliderBackRightRightW.png";
52
+ btnChangeF.src="mopSlider/sliderBackRightRightW_f.png";
53
+ backImg.src="mopSlider/paperBack.gif";
54
+ sldcLeftImg.src="mopSlider/sliderBackLeftLeftW.png";
55
+ sldcRightImg.src="mopSlider/sliderBackRightRightW.png";
56
+ sldBackLeft.src="mopSlider/sliderBackLeftW.png";
57
+ sldBackCenter.src="mopSlider/sliderBackW.png";
58
+ sldBackRight.src="mopSlider/sliderBackRightW.png";
59
+ }else if(mopSliderType=="black"){
60
+ btnLeft.src="mopSlider/sliderBtnLeft.png";
61
+ btnLeftF.src="mopSlider/sliderBtnLeft_f.png";
62
+ btnRight.src="mopSlider/sliderBtnRight.png";
63
+ btnRightF.src="mopSlider/sliderBtnRight_f.png";
64
+ btnCenter.src="mopSlider/sliderBtn.png";
65
+ btnChange.src="mopSlider/sliderBackRightRight.png";
66
+ btnChangeF.src="mopSlider/sliderBackRightRight_f.png";
67
+ backImg.src="mopSlider/monoBack.gif";
68
+ sldcLeftImg.src="mopSlider/sliderBackLeftLeft.png";
69
+ sldcRightImg.src="mopSlider/sliderBackRightRight.png";
70
+ sldBackLeft.src="mopSlider/sliderBackLeft.png";
71
+ sldBackCenter.src="mopSlider/sliderBack.png";
72
+ sldBackRight.src="mopSlider/sliderBackRight.png";
73
+ }
74
+
75
+ /* Modifed for tutorialzine */
76
+ else if(mopSliderType=="tutorialzine"){
77
+ btnLeft.src="mopSlider/sliderBtnLeftW.png";
78
+ btnLeftF.src="mopSlider/sliderBtnLeftW_f.png";
79
+ btnRight.src="mopSlider/sliderBtnRightW.png";
80
+ btnRightF.src="mopSlider/sliderBtnRightW_f.png";
81
+ btnCenter.src="mopSlider/sliderBtnW.png";
82
+ btnChange.src="mopSlider/sliderBackRightRightW.png";
83
+ btnChangeF.src="mopSlider/sliderBackRightRightW_f.png";
84
+ /* backImg.src="mopSlider/paperBack.gif";*/
85
+ sldcLeftImg.src="mopSlider/sliderBackLeftLeftW.png";
86
+ sldcRightImg.src="mopSlider/sliderBackRightRightW.png";
87
+ sldBackLeft.src="mopSlider/sliderBackLeftW.png";
88
+ sldBackCenter.src="mopSlider/sliderBackW.png";
89
+ sldBackRight.src="mopSlider/sliderBackRightW.png";
90
+
91
+ }
92
+
93
+ if(setting.itemMgn==null){itemMgn=20};
94
+ if(setting.shuffle==null){shuffle=1};
95
+
96
+ if((mopSliderNo==null)||(mopSliderNo=="01")){
97
+ mopSliderName="#mopSlider01";
98
+ mopSliderNo="01";
99
+ }else{
100
+ mopSliderName="#mopSlider"+setting.no;
101
+ }
102
+ var noSharp=mopSliderName.split("#")[1];
103
+ $(mopSliderName).hide();
104
+ /*shuffle*/
105
+ var arr=jQuery.makeArray($(this).children());
106
+ Array.prototype.shuffle = function() {
107
+ var i = this.length;
108
+ while(i){
109
+ var j = Math.floor(Math.random()*i);
110
+ var t = this[--i];
111
+ this[i] = this[j];
112
+ this[j] = t;
113
+ };
114
+ return this;
115
+ };
116
+ if(shuffle==1){
117
+ arr.shuffle();
118
+ $(arr).appendTo(this);
119
+ };
120
+ if(ua.indexOf("Mac",0)>=0){
121
+ os="mac";
122
+ }else if(ua.indexOf("Win",0)>=0){
123
+ os="win";
124
+ };
125
+ if(ua.indexOf("MSIE 6")>-1){
126
+ browser="ie6";
127
+ };
128
+ if(ua.indexOf("MSIE 7")>-1){
129
+ browser="ie7";
130
+ };
131
+ if((browser=="ie6")||(browser=="ie7")){
132
+ ie67=true;
133
+ };
134
+ $(this).css({position:"absolute",overflow: "hidden",left: "0px",display: "block"});
135
+ /*items number*/
136
+ itemNum=$(this).children().length;
137
+ var allW=0;
138
+ var num=0;
139
+ for (i=1; i<(itemNum+1); i++){
140
+ var itemW=eval($(this).children().eq(num).css("width").split("px")[0]);
141
+ nextMov.push(itemW);
142
+ var itemH=eval($(this).children().eq(num).css("height").split("px")[0]);
143
+ var mgn=(mopSliderH-itemH)/2;
144
+ $(this).children().eq(num).css({marginTop:mgn+px});
145
+ num+=1;
146
+ allW+=itemW;
147
+ };
148
+ /*width of all content & margin*/
149
+ itemMgnAll=itemMgn*itemNum;
150
+ boxW=allW+itemMgnAll+itemMgn;
151
+ /*put mopSlider*/
152
+ $(this).wrap('<div id="mopSlider"><div id="'+noSharp+'"><div class="holder"></div></div></div>');
153
+ $(this).parent().after(
154
+ '<div class="sliderCase">'+
155
+ '<div class="sliderCaseLeft"></div>'+
156
+ '<div class="sliderCaseRight"></div>'+
157
+ '<div class="slider">'+
158
+ '<div class="sldLeft"></div>'+
159
+ '<div class="sldCenter"></div>'+
160
+ '<div class="sldRight"></div>'+
161
+ '<div class="sliderBtn">'+
162
+ '<div class="sldBtnLeft"></div>'+
163
+ '<div class="sldBtnCenter"><div class="indi"></div></div>'+
164
+ '<div class="sldBtnRight"></div>'+
165
+ '</div>'+
166
+ '</div>'+
167
+ '</div>'+
168
+ '<div class="leftTop"><div class="leftTopIn"></div></div>'+
169
+ '<div class="rightTop"><div class="rightTopIn"></div></div>'+
170
+ '<div class="leftBottom"><div class="leftBottomIn"></div></div>'+
171
+ '<div class="rightBottom"><div class="rightBottomIn"></div></div>'+
172
+ '<div class="logo"><div class="logoIn"></div></div>'
173
+ );
174
+ /*set css*/
175
+ $(mopSliderName+" .sliderCase").css({height:"22px",position:"relative",top:"0px"});
176
+ $(mopSliderName+" .sliderCaseLeft").css({height:"22px",width:"25px",position:"absolute",top:"0px",left:"0px",backgroundImage:"url("+sldcLeftImg.src+")",backgroundRepeat:"no-repeat"});
177
+ $(mopSliderName+" .sliderCaseRight").css({height:"22px",width:"25px",position:"absolute",top:"0px",right:"0px",backgroundImage:"url("+sldcRightImg.src+")",cursor:"",backgroundRepeat:"no-repeat"});
178
+ $(mopSliderName+" .slider").css({height:"22px",position:"relative",top:"0px",left:"25px"});
179
+ $(mopSliderName+" .sldLeft").css({left:"0px",position:"absolute",height:"22px",width:"20px",backgroundImage:"url("+sldBackLeft.src+")",backgroundRepeat:"no-repeat"});
180
+ $(mopSliderName+" .sldCenter").css({left:"20px",width:sldW-40+px,position:"absolute",height:"22px",backgroundImage:"url("+sldBackCenter.src+")",backgroundRepeat:"repeat-x"});
181
+ $(mopSliderName+" .sldRight").css({right:"0px",position:"absolute",height:"22px",width:"20px",backgroundImage:"url("+sldBackRight.src+")",backgroundRepeat:"no-repeat"});
182
+ $(mopSliderName+" .sliderBtn").css({position:"absolute",height:"22px",left:"0px",cursor:"default"});
183
+ $(mopSliderName+" .sldBtnLeft").css({left:"0px",position:"absolute",height:"22px",width:"20px",backgroundImage:"url("+btnLeft.src+")",backgroundRepeat:"no-repeat"});
184
+ $(mopSliderName+" .sldBtnCenter").css({left:"20px",width:btnW-40+px,position:"absolute",height:"22px",backgroundImage:"url("+btnCenter.src+")",backgroundRepeat:"repeat-x"});
185
+ $(mopSliderName+" .sldBtnRight").css({right:"0px",position:"absolute",height:"22px",width:"20px",backgroundImage:"url("+btnRight.src+")",backgroundRepeat:"no-repeat"});
186
+ $(mopSliderName+" .indi").css({paddingTop:"5px",fontSize: "10px",textAlign:"center",fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:"0.05em",color:"#2b313e"});
187
+ $(mopSliderName).css({width:mopSliderW+px,height:mopSliderH+28+px});
188
+ $(mopSliderName).css({position:"relative",overflow:"hidden",margin:"0 auto 0 auto",backgroundImage:"url("+backImg.src+")"});
189
+
190
+
191
+ if(mopSliderType=="black"){
192
+ $(mopSliderName).css({backgroundColor:"#484848",backgroundRepeat:"repeat-x",backgroundPosition:"bottom"});
193
+ }
194
+
195
+
196
+ if(mopSliderType!="tutorialzine")
197
+ {
198
+ $(mopSliderName+" .leftTop").css({height:"10px",width:"10px",position:"absolute",top:"0px",left:"0px"});
199
+ $(mopSliderName+" .leftTopIn").css({height:"10px",width:"10px",backgroundImage:"url(mopSlider/sliderCorner_leftTop.png)",backgroundRepeat:"no-repeat"});
200
+ $(mopSliderName+" .rightTop").css({height:"10px",width:"10px",position:"absolute",top:"0px",right:"0px"});
201
+ $(mopSliderName+" .rightTopIn").css({height:"10px",width:"10px",backgroundImage:"url(mopSlider/sliderCorner_rightTop.png)",backgroundRepeat:"no-repeat"});
202
+ $(mopSliderName+" .leftBottom").css({height:"10px",width:"10px",position:"absolute",bottom:"0px",left:"0px"});
203
+ $(mopSliderName+" .leftBottomIn").css({height:"10px",width:"10px",backgroundImage:"url(mopSlider/sliderCorner_leftBottom.png)",backgroundRepeat:"no-repeat",backgroundPosition:"bottom"});
204
+ $(mopSliderName+" .rightBottom").css({height:"10px",width:"10px",position:"absolute",bottom:"0px",right:"0px"});
205
+ $(mopSliderName+" .rightBottomIn").css({height:"10px",width:"10px",backgroundImage:"url(mopSlider/sliderCorner_rightBottom.png)",backgroundRepeat:"no-repeat",backgroundPosition:"bottom"});
206
+
207
+ /*logo*/
208
+ $(mopSliderName+" .logo").css({height:"50px",width:"80px",position:"absolute",top:"0px",left:"0px"});
209
+ $(mopSliderName+" .logoIn").css({height:"50px",width:"80px",backgroundImage:"url(mopSlider/logo.png)",backgroundRepeat:"no-repeat"});
210
+ }
211
+
212
+ if(os=="mac"){$(mopSliderName+" .indi").css({letterSpacing:"0.1em"})};/*foe mac*/
213
+ scrollMax=boxW-mopSliderW;
214
+ scrollNum=scrollMax*0.01;/*0 to100 (box)*/
215
+ sliderNum=(sldW-btnW)*0.01;/*0 to100 (slider)*/
216
+ var holderWidth=(mopSliderW+scrollMax*2);
217
+ $(mopSliderName+" .holder").css({width:holderWidth+"px",height:mopSliderH+px,position:"relative",left:-(scrollMax)+px,cursor:'move'});
218
+ $(mopSliderName+" .holder").children().css({width:boxW+px,left:scrollMax+px});
219
+ $(mopSliderName+" .holder").children().children().css({marginLeft:itemMgn+"px",float:"left",position:"relative"});
220
+ $(mopSliderName+" .sliderCase").css({width:sldW+50+px});
221
+ var sldCaseW=eval($(mopSliderName+" .sliderCase").css("width").split("px")[0]);
222
+ var sliderLeftMgn=(mopSliderW-sldCaseW)/2;
223
+ $(mopSliderName+" .sliderCase").css({left:sliderLeftMgn+px});
224
+ $(mopSliderName+" .slider").css({width:sldW+px});
225
+ $(mopSliderName+" .sliderBtn").css({width:btnW+px});
226
+ /*pngFix*/
227
+ $(this).pngFix();
228
+ $("#mopSlider .sliderCase,#mopSlider .leftTop,#mopSlider .rightTop").pngFix();
229
+ $("#mopSlider .leftBottom,#mopSlider .rightBottom,#mopSlider .logo").pngFix();
230
+ $(mopSliderName+" .indi").html(indication);
231
+ $(mopSliderName).show();
232
+ /*draggable*/
233
+ $(mopSliderName+" .sliderBtn").draggable({
234
+ axis:"x",
235
+ containment:"parent",
236
+ start:function(){
237
+ whitchDrag="btn";
238
+ btnMoveNum=0;
239
+ if(mopSliderNo=="01"){
240
+ DragCheck1=setInterval("mopSliderFunc.DragCheckItv('"+mopSliderNo+"','"+mopSliderName+"','"+whitchDrag+"','"+scrollNum+"','"+boxW+"','"+mopSliderW+"','"+sldW+"','"+btnW+"')",20);
241
+ timeCheck1=setInterval("mopSliderFunc.timeCheckItv('"+mopSliderName+"','"+whitchDrag+"')",50);/*finalMove speed*/
242
+ }
243
+ else if(mopSliderNo=="02"){
244
+ timeCheck2=setInterval("mopSliderFunc.timeCheckItv('"+mopSliderName+"','"+whitchDrag+"')",50);/*finalMove speed*/
245
+ DragCheck2=setInterval("mopSliderFunc.DragCheckItv('"+mopSliderNo+"','"+mopSliderName+"','"+whitchDrag+"','"+scrollNum+"','"+boxW+"','"+mopSliderW+"','"+sldW+"','"+btnW+"')",20);
246
+ }
247
+ },
248
+ drag:function(){},
249
+ stop:function(){
250
+ clearInterval(DragCheck1);
251
+ clearInterval(DragCheck2);
252
+ mopSliderFunc.finalMove(mopSliderName,whitchDrag,sldW,btnW,scrollNum,boxW,mopSliderW);
253
+ }
254
+ });
255
+ $(mopSliderName+" .holder").children().draggable({
256
+ axis:"x",
257
+ containment:"parent",
258
+ start:function(){
259
+ whitchDrag="holder";
260
+ boxMoveNum=0;
261
+ if(mopSliderNo=="01"){
262
+ timeCheck1=setInterval("mopSliderFunc.timeCheckItv()",50);
263
+ DragCheck1=setInterval("mopSliderFunc.DragCheckItv('"+mopSliderNo+"','"+mopSliderName+"','"+whitchDrag+"','"+scrollNum+"','"+boxW+"','"+mopSliderW+"','"+sldW+"','"+btnW+"')",20);
264
+ }
265
+ else if(mopSliderNo=="02"){
266
+ timeCheck2=setInterval("mopSliderFunc.timeCheckItv()",50);
267
+ DragCheck2=setInterval("mopSliderFunc.DragCheckItv('"+mopSliderNo+"','"+mopSliderName+"','"+whitchDrag+"','"+scrollNum+"','"+boxW+"','"+mopSliderW+"','"+sldW+"','"+btnW+"')",20);
268
+ }
269
+
270
+ },
271
+ drag:function(){},
272
+ stop:function(){
273
+ clearInterval(DragCheck1);
274
+ clearInterval(DragCheck2);
275
+ mopSliderFunc.finalMove(mopSliderName,whitchDrag,sldW,btnW,scrollNum,boxW,mopSliderW);
276
+ }
277
+ });
278
+ $("#mopSlider .sliderBtn").mousedown(
279
+ function(){
280
+ clearInterval(timeCheck1);
281
+ clearInterval(timeCheck2);
282
+ clearInterval(finalTime1);
283
+ clearInterval(finalTime2);
284
+ }
285
+ );
286
+ $("#mopSlider .holder").children().mousedown(
287
+ function(){
288
+ clearInterval(timeCheck1);
289
+ clearInterval(timeCheck2);
290
+ clearInterval(finalTime1);
291
+ clearInterval(finalTime2);
292
+ }
293
+ );
294
+ $(mopSliderName+" .sliderCaseRight").mouseover(
295
+ function(){
296
+ btnPosi=eval($(mopSliderName+" .sliderBtn").css("left").split("px")[0]);
297
+ if(btnPosi!=0){
298
+ $(mopSliderName+" .sliderCaseRight").css({cursor:"pointer"});
299
+ if(browser!="ie6"){
300
+ $(mopSliderName+" .sliderCaseRight").css({backgroundImage:"url("+btnChangeF.src+")"});
301
+ }
302
+ }else{
303
+ $(mopSliderName+" .sliderCaseRight").css({cursor:""});
304
+ }
305
+ }
306
+ );
307
+ $(mopSliderName+" .sliderCaseRight").mouseout(
308
+ function(){
309
+ if(browser!="ie6"){
310
+ $(mopSliderName+" .sliderCaseRight").css({backgroundImage:"url("+btnChange.src+")"});
311
+ }
312
+ }
313
+ );
314
+ $(mopSliderName+" .sliderCaseRight").click(
315
+ function(){
316
+ btnPosi=eval($(mopSliderName+" .sliderBtn").css("left").split("px")[0]);
317
+ if(btnPosi!=0){
318
+ if(browser!="ie6"){
319
+ $(mopSliderName+" .sldBtnLeft").css({backgroundImage:"url("+btnLeftF.src+")"});
320
+ $(mopSliderName+" .sldBtnRight").css({backgroundImage:"url("+btnRightF.src+")"});
321
+ }
322
+ }
323
+ $(mopSliderName+" .sliderBtn").animate({left:"0px"},{duration:"1000",easing:"linear",complete:function (){complate()}});
324
+ $(mopSliderName+" .holder").children().animate({left:scrollMax+px},{duration:"1000",easing:"linear",complete:function (){complate()}});
325
+ }
326
+ );
327
+ var complate=function(){
328
+ if(browser!="ie6"){
329
+ $(mopSliderName+" .sldBtnLeft").css({backgroundImage:"url("+btnLeft.src+")"});
330
+ $(mopSliderName+" .sldBtnRight").css({backgroundImage:"url("+btnRight.src+")"});
331
+ $(mopSliderName+" .sliderCaseRight").css({backgroundImage:"url("+btnChange.src+")"});
332
+ }
333
+ }
334
+ mopSliderFunc={
335
+ DragCheckItv:function(mopSliderNo,mopSliderName,whitchDrag,scrollNum,boxW,mopSliderW,sldW,btnW){
336
+ scrollMax=boxW-mopSliderW;
337
+ sliderNum=(sldW-btnW)*0.01;
338
+ var btnPosiPx=$(mopSliderName+" .sliderBtn").css("left");
339
+ var boxPosiPx=$(mopSliderName+" .holder").children().css("left");
340
+ btnPosi=eval(btnPosiPx.split("px")[0]);
341
+ boxPosi=eval(boxPosiPx.split("px")[0]);
342
+ var sliderNum100=btnPosi/sliderNum;
343
+ var boxPosi0=-(boxPosi-scrollMax);
344
+ var boxNum=-(boxPosi0/scrollNum);
345
+ if(whitchDrag=="btn"){
346
+ $(mopSliderName+" .holder").children().css({left:-(sliderNum100*scrollNum)+scrollMax+px});
347
+ }else if(whitchDrag=="holder"){
348
+ $(mopSliderName+" .sliderBtn").css({left:-(boxNum*sliderNum)+px});
349
+ };
350
+ },
351
+ timeCheckItv:function(mopSliderName,whitchDrag){
352
+ btnPast=btnPosi;
353
+ boxPast=boxPosi;
354
+ },
355
+ finalMove:function(mopSliderName,whitchDrag,sldW,btnW,scrollNum,boxW,mopSliderW){
356
+ finalCount=0;
357
+ if((btnPosi!=undefined)&&(btnPast!=undefined)){
358
+ btnMoveNumStart=btnPosi-btnPast;
359
+ boxMoveNumStart=boxPosi-boxPast;
360
+ if(mopSliderName=="#mopSlider01"){
361
+ finalTime1=setInterval("mopSliderFunc.finalTimeItv('"+mopSliderName+"','"+whitchDrag+"','"+btnMoveNumStart+"','"+boxMoveNumStart+"','"+sldW+"','"+btnW+"','"+scrollNum+"','"+boxW+"','"+mopSliderW+"')",50);/*last slip move*/
362
+ }
363
+ if(mopSliderName=="#mopSlider02"){
364
+ finalTime2=setInterval("mopSliderFunc.finalTimeItv('"+mopSliderName+"','"+whitchDrag+"','"+btnMoveNumStart+"','"+boxMoveNumStart+"','"+sldW+"','"+btnW+"','"+scrollNum+"','"+boxW+"','"+mopSliderW+"')",50);/*last slip move*/
365
+ }
366
+ }
367
+ },
368
+ finalTimeItv:function(mopSliderName,whitchDrag,btnMoveNumStart,boxMoveNumStart,sldW,btnW,scrollNum,boxW,mopSliderW){
369
+ finalCount+=1;
370
+ if(finalCount==1){
371
+ btnMoveNum=btnMoveNumStart;
372
+ boxMoveNum=boxMoveNumStart;
373
+ mopSliderNameTemp=mopSliderName;
374
+ }
375
+ btnPosi=eval($(mopSliderNameTemp+" .sliderBtn").css("left").split("px")[0]);
376
+ boxPosi=eval($(mopSliderNameTemp+" .holder").children().css("left").split("px")[0]);
377
+ if(whitchDrag=="btn"){
378
+ if((btnMoveNum<0.1)&&(btnMoveNum>-0.1)){
379
+ btnMoveNum=0;
380
+ }else{
381
+ if(browser=="ie6"){
382
+ btnMoveNum=btnMoveNum/1.75;
383
+ }else{
384
+ btnMoveNum=btnMoveNum/1.5;
385
+ }
386
+ }
387
+ btnMoveTo=btnMoveNum+btnPosi;
388
+ if(btnMoveTo>(sldW-btnW)){
389
+ btnMoveTo=sldW-btnW;
390
+ }else if(btnMoveTo<0){
391
+ btnMoveTo=0;
392
+ };
393
+ $(mopSliderNameTemp+" .sliderBtn").css({left:btnMoveTo+px});
394
+ /*set btnPast*/
395
+ btnPast=btnMoveTo;
396
+
397
+ if(btnMoveNum==0){
398
+ clearInterval(finalTime1);
399
+ clearInterval(finalTime2);
400
+ }
401
+ mopSliderFunc.checkFinal(mopSliderName,whitchDrag,sldW,btnW,scrollNum,boxW,mopSliderW);
402
+ }
403
+ else if(whitchDrag=="holder"){
404
+ if((boxMoveNum<1)&&(boxMoveNum>-1)){
405
+ boxMoveNum=0;
406
+ }else{
407
+ if(browser=="ie6"){
408
+ boxMoveNum=boxMoveNum/1.75;
409
+ }else{
410
+ boxMoveNum=boxMoveNum/1.5;
411
+ }
412
+ }
413
+ boxMoveTo=boxMoveNum+boxPosi;
414
+ if(boxMoveTo>scrollMax){
415
+ boxMoveTo=scrollMax;
416
+ }else if(boxMoveTo<0){
417
+ boxMoveTo=0;
418
+ };
419
+ $(mopSliderNameTemp+" .holder").children().css({left:boxMoveTo+px});
420
+ /*set boxPast*/
421
+ boxPast=boxMoveTo;
422
+ if(boxMoveNum==0){
423
+ clearInterval(finalTime1);
424
+ clearInterval(finalTime2);
425
+ }
426
+ mopSliderFunc.checkFinal(mopSliderName,whitchDrag,sldW,btnW,scrollNum,boxW,mopSliderW);
427
+ }
428
+ },
429
+ checkFinal:function(mopSliderName,whitchDrag,sldW,btnW,scrollNum,boxW,mopSliderW){
430
+ btnPosi=eval($(mopSliderName+" .sliderBtn").css("left").split("px")[0]);
431
+ boxPosi=eval($(mopSliderName+" .holder").children().css("left").split("px")[0]);
432
+ var sliderNum100=btnPosi/sliderNum;
433
+ var boxPosi0=-(boxPosi-scrollMax);
434
+ var boxNum=-(boxPosi0/scrollNum);
435
+ if(whitchDrag=="btn"){
436
+ $(mopSliderName+" .holder").children().css({left:-(sliderNum100*scrollNum)+scrollMax+px});
437
+ }else if(whitchDrag=="holder"){
438
+ $(mopSliderName+" .sliderBtn").css({left:-(boxNum*sliderNum)+px});
439
+ };
440
+ }/*end mopSliderFunc*/
441
+ }
442
+ }
443
+ });
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/paperBack.gif ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/paperBack.jpg ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBack.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackLeft.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackLeftLeft.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackLeftLeftW.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackLeftW.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRight.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRightRight.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRightRightW.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRightRightW_f.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRightRight_f.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackRightW.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBackW.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtn.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnLeft.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnLeftW.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnLeftW_f.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnLeft_f.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnRight.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnRightW.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnRightW_f.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnRight_f.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderBtnW.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderCorner_leftBottom.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderCorner_leftTop.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderCorner_rightBottom.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/mopSlider/sliderCorner_rightTop.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/next_icon.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/previous_icon.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/product-image-bg.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/product_bg.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/transpBlack.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/transparent_bg.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/images/ui-bg_flat_75_ffffff_40x100.png ADDED
Binary file
skin/frontend/default/default/css/magebuzz/productslider/jquery-ui-1.7.2.custom.css ADDED
@@ -0,0 +1,395 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI CSS Framework
3
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
4
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
5
+ */
6
+
7
+ /* Layout helpers
8
+ ----------------------------------*/
9
+ .ui-helper-hidden { display: none; }
10
+ .ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
11
+ .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
12
+ .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
13
+ .ui-helper-clearfix { display: inline-block; }
14
+ /* required comment for clearfix to work in Opera \*/
15
+ * html .ui-helper-clearfix { height:1%; }
16
+ .ui-helper-clearfix { display:block; }
17
+ /* end clearfix */
18
+ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
19
+
20
+
21
+ /* Interaction Cues
22
+ ----------------------------------*/
23
+ .ui-state-disabled { cursor: default !important; }
24
+
25
+
26
+ /* Icons
27
+ ----------------------------------*/
28
+
29
+ /* states and images */
30
+ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
31
+
32
+
33
+ /* Misc visuals
34
+ ----------------------------------*/
35
+
36
+ /* Overlays */
37
+ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
38
+
39
+
40
+
41
+ /*
42
+ * jQuery UI CSS Framework
43
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
44
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
45
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
46
+ */
47
+
48
+
49
+ /* Component containers
50
+ ----------------------------------*/
51
+ .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
52
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
53
+ .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
54
+ .ui-widget-content a { color: #222222; }
55
+ .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
56
+ .ui-widget-header a { color: #222222; }
57
+
58
+ /* Interaction states
59
+ ----------------------------------*/
60
+ .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; outline: none; }
61
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; outline: none; }
62
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; outline: none; }
63
+ .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; outline: none; }
64
+ .ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; outline: none; }
65
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; outline: none; text-decoration: none; }
66
+
67
+ /* Interaction Cues
68
+ ----------------------------------*/
69
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
70
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; }
71
+ .ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
72
+ .ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; }
73
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; }
74
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
75
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
76
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
77
+
78
+ /* Icons
79
+ ----------------------------------*/
80
+
81
+ /* states and images */
82
+ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
83
+ .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
84
+ .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
85
+ .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
86
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
87
+ .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
88
+ .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
89
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
90
+
91
+ /* positioning */
92
+ .ui-icon-carat-1-n { background-position: 0 0; }
93
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
94
+ .ui-icon-carat-1-e { background-position: -32px 0; }
95
+ .ui-icon-carat-1-se { background-position: -48px 0; }
96
+ .ui-icon-carat-1-s { background-position: -64px 0; }
97
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
98
+ .ui-icon-carat-1-w { background-position: -96px 0; }
99
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
100
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
101
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
102
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
103
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
104
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
105
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
106
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
107
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
108
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
109
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
110
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
111
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
112
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
113
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
114
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
115
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
116
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
117
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
118
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
119
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
120
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
121
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
122
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
123
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
124
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
125
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
126
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
127
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
128
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
129
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
130
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
131
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
132
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
133
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
134
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
135
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
136
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
137
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
138
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
139
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
140
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
141
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
142
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
143
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
144
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
145
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
146
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
147
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
148
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
149
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
150
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
151
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
152
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
153
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
154
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
155
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
156
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
157
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
158
+ .ui-icon-extlink { background-position: -32px -80px; }
159
+ .ui-icon-newwin { background-position: -48px -80px; }
160
+ .ui-icon-refresh { background-position: -64px -80px; }
161
+ .ui-icon-shuffle { background-position: -80px -80px; }
162
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
163
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
164
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
165
+ .ui-icon-folder-open { background-position: -16px -96px; }
166
+ .ui-icon-document { background-position: -32px -96px; }
167
+ .ui-icon-document-b { background-position: -48px -96px; }
168
+ .ui-icon-note { background-position: -64px -96px; }
169
+ .ui-icon-mail-closed { background-position: -80px -96px; }
170
+ .ui-icon-mail-open { background-position: -96px -96px; }
171
+ .ui-icon-suitcase { background-position: -112px -96px; }
172
+ .ui-icon-comment { background-position: -128px -96px; }
173
+ .ui-icon-person { background-position: -144px -96px; }
174
+ .ui-icon-print { background-position: -160px -96px; }
175
+ .ui-icon-trash { background-position: -176px -96px; }
176
+ .ui-icon-locked { background-position: -192px -96px; }
177
+ .ui-icon-unlocked { background-position: -208px -96px; }
178
+ .ui-icon-bookmark { background-position: -224px -96px; }
179
+ .ui-icon-tag { background-position: -240px -96px; }
180
+ .ui-icon-home { background-position: 0 -112px; }
181
+ .ui-icon-flag { background-position: -16px -112px; }
182
+ .ui-icon-calendar { background-position: -32px -112px; }
183
+ .ui-icon-cart { background-position: -48px -112px; }
184
+ .ui-icon-pencil { background-position: -64px -112px; }
185
+ .ui-icon-clock { background-position: -80px -112px; }
186
+ .ui-icon-disk { background-position: -96px -112px; }
187
+ .ui-icon-calculator { background-position: -112px -112px; }
188
+ .ui-icon-zoomin { background-position: -128px -112px; }
189
+ .ui-icon-zoomout { background-position: -144px -112px; }
190
+ .ui-icon-search { background-position: -160px -112px; }
191
+ .ui-icon-wrench { background-position: -176px -112px; }
192
+ .ui-icon-gear { background-position: -192px -112px; }
193
+ .ui-icon-heart { background-position: -208px -112px; }
194
+ .ui-icon-star { background-position: -224px -112px; }
195
+ .ui-icon-link { background-position: -240px -112px; }
196
+ .ui-icon-cancel { background-position: 0 -128px; }
197
+ .ui-icon-plus { background-position: -16px -128px; }
198
+ .ui-icon-plusthick { background-position: -32px -128px; }
199
+ .ui-icon-minus { background-position: -48px -128px; }
200
+ .ui-icon-minusthick { background-position: -64px -128px; }
201
+ .ui-icon-close { background-position: -80px -128px; }
202
+ .ui-icon-closethick { background-position: -96px -128px; }
203
+ .ui-icon-key { background-position: -112px -128px; }
204
+ .ui-icon-lightbulb { background-position: -128px -128px; }
205
+ .ui-icon-scissors { background-position: -144px -128px; }
206
+ .ui-icon-clipboard { background-position: -160px -128px; }
207
+ .ui-icon-copy { background-position: -176px -128px; }
208
+ .ui-icon-contact { background-position: -192px -128px; }
209
+ .ui-icon-image { background-position: -208px -128px; }
210
+ .ui-icon-video { background-position: -224px -128px; }
211
+ .ui-icon-script { background-position: -240px -128px; }
212
+ .ui-icon-alert { background-position: 0 -144px; }
213
+ .ui-icon-info { background-position: -16px -144px; }
214
+ .ui-icon-notice { background-position: -32px -144px; }
215
+ .ui-icon-help { background-position: -48px -144px; }
216
+ .ui-icon-check { background-position: -64px -144px; }
217
+ .ui-icon-bullet { background-position: -80px -144px; }
218
+ .ui-icon-radio-off { background-position: -96px -144px; }
219
+ .ui-icon-radio-on { background-position: -112px -144px; }
220
+ .ui-icon-pin-w { background-position: -128px -144px; }
221
+ .ui-icon-pin-s { background-position: -144px -144px; }
222
+ .ui-icon-play { background-position: 0 -160px; }
223
+ .ui-icon-pause { background-position: -16px -160px; }
224
+ .ui-icon-seek-next { background-position: -32px -160px; }
225
+ .ui-icon-seek-prev { background-position: -48px -160px; }
226
+ .ui-icon-seek-end { background-position: -64px -160px; }
227
+ .ui-icon-seek-first { background-position: -80px -160px; }
228
+ .ui-icon-stop { background-position: -96px -160px; }
229
+ .ui-icon-eject { background-position: -112px -160px; }
230
+ .ui-icon-volume-off { background-position: -128px -160px; }
231
+ .ui-icon-volume-on { background-position: -144px -160px; }
232
+ .ui-icon-power { background-position: 0 -176px; }
233
+ .ui-icon-signal-diag { background-position: -16px -176px; }
234
+ .ui-icon-signal { background-position: -32px -176px; }
235
+ .ui-icon-battery-0 { background-position: -48px -176px; }
236
+ .ui-icon-battery-1 { background-position: -64px -176px; }
237
+ .ui-icon-battery-2 { background-position: -80px -176px; }
238
+ .ui-icon-battery-3 { background-position: -96px -176px; }
239
+ .ui-icon-circle-plus { background-position: 0 -192px; }
240
+ .ui-icon-circle-minus { background-position: -16px -192px; }
241
+ .ui-icon-circle-close { background-position: -32px -192px; }
242
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
243
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
244
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
245
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
246
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
247
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
248
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
249
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
250
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
251
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
252
+ .ui-icon-circle-check { background-position: -208px -192px; }
253
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
254
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
255
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
256
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
257
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
258
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
259
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
260
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
261
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
262
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
263
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
264
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
265
+
266
+
267
+ /* Misc visuals
268
+ ----------------------------------*/
269
+
270
+ /* Overlays */
271
+ .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
272
+ .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; }/* Accordion
273
+ ----------------------------------*/
274
+ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
275
+ .ui-accordion .ui-accordion-li-fix { display: inline; }
276
+ .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
277
+ .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
278
+ .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
279
+ .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; }
280
+ .ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker
281
+ ----------------------------------*/
282
+ .ui-datepicker { width: 17em; padding: .2em .2em 0; }
283
+ .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
284
+ .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
285
+ .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
286
+ .ui-datepicker .ui-datepicker-prev { left:2px; }
287
+ .ui-datepicker .ui-datepicker-next { right:2px; }
288
+ .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
289
+ .ui-datepicker .ui-datepicker-next-hover { right:1px; }
290
+ .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
291
+ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
292
+ .ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
293
+ .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
294
+ .ui-datepicker select.ui-datepicker-month,
295
+ .ui-datepicker select.ui-datepicker-year { width: 49%;}
296
+ .ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
297
+ .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
298
+ .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
299
+ .ui-datepicker td { border: 0; padding: 1px; }
300
+ .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
301
+ .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
302
+ .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
303
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
304
+
305
+ /* with multiple calendars */
306
+ .ui-datepicker.ui-datepicker-multi { width:auto; }
307
+ .ui-datepicker-multi .ui-datepicker-group { float:left; }
308
+ .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
309
+ .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
310
+ .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
311
+ .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
312
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
313
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
314
+ .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
315
+ .ui-datepicker-row-break { clear:both; width:100%; }
316
+
317
+ /* RTL support */
318
+ .ui-datepicker-rtl { direction: rtl; }
319
+ .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
320
+ .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
321
+ .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
322
+ .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
323
+ .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
324
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
325
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
326
+ .ui-datepicker-rtl .ui-datepicker-group { float:right; }
327
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
328
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
329
+
330
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
331
+ .ui-datepicker-cover {
332
+ display: none; /*sorry for IE5*/
333
+ display/**/: block; /*sorry for IE5*/
334
+ position: absolute; /*must have*/
335
+ z-index: -1; /*must have*/
336
+ filter: mask(); /*must have*/
337
+ top: -4px; /*must have*/
338
+ left: -4px; /*must have*/
339
+ width: 200px; /*must have*/
340
+ height: 200px; /*must have*/
341
+ }/* Dialog
342
+ ----------------------------------*/
343
+ .ui-dialog { position: relative; padding: .2em; width: 300px; }
344
+ .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; }
345
+ .ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; }
346
+ .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
347
+ .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
348
+ .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
349
+ .ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
350
+ .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
351
+ .ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
352
+ .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
353
+ .ui-draggable .ui-dialog-titlebar { cursor: move; }
354
+ /* Progressbar
355
+ ----------------------------------*/
356
+ .ui-progressbar { height:2em; text-align: left; }
357
+ .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable
358
+ ----------------------------------*/
359
+ .ui-resizable { position: relative;}
360
+ .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
361
+ .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
362
+ .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
363
+ .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
364
+ .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
365
+ .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
366
+ .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
367
+ .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
368
+ .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
369
+ .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider
370
+ ----------------------------------*/
371
+ .ui-slider { position: relative; text-align: left; }
372
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
373
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
374
+
375
+ .ui-slider-horizontal { height: .8em; }
376
+ .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
377
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
378
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
379
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
380
+
381
+ .ui-slider-vertical { width: .8em; height: 100px; }
382
+ .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
383
+ .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
384
+ .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
385
+ .ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
386
+ ----------------------------------*/
387
+ .ui-tabs { padding: .2em; zoom: 1; }
388
+ .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
389
+ .ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
390
+ .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
391
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
392
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
393
+ .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
394
+ .ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
395
+ .ui-tabs .ui-tabs-hide { display: none !important; }
skin/frontend/default/default/css/magebuzz/productslider/jquery.lightbox-0.5.css ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery lightBox plugin
3
+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
4
+ * and adapted to me for use like a plugin from jQuery.
5
+ * @name jquery-lightbox-0.5.css
6
+ * @author Leandro Vieira Pinho - http://leandrovieira.com
7
+ * @version 0.5
8
+ * @date April 11, 2008
9
+ * @category jQuery plugin
10
+ * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
11
+ * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
12
+ * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
13
+ */
14
+ #jquery-overlay {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ z-index: 90;
19
+ width: 100%;
20
+ height: 500px;
21
+ }
22
+ #jquery-lightbox {
23
+ position: absolute;
24
+ top: 0;
25
+ left: 0;
26
+ width: 100%;
27
+ z-index: 100;
28
+ text-align: center;
29
+ line-height: 0;
30
+ }
31
+ #jquery-lightbox a img { border: none; }
32
+ #lightbox-container-image-box {
33
+ position: relative;
34
+ background-color: #fff;
35
+ width: 250px;
36
+ height: 250px;
37
+ margin: 0 auto;
38
+ }
39
+ #lightbox-container-image { padding: 10px; }
40
+ #lightbox-loading {
41
+ position: absolute;
42
+ top: 40%;
43
+ left: 0%;
44
+ height: 25%;
45
+ width: 100%;
46
+ text-align: center;
47
+ line-height: 0;
48
+ }
49
+ #lightbox-nav {
50
+ position: absolute;
51
+ top: 0;
52
+ left: 0;
53
+ height: 100%;
54
+ width: 100%;
55
+ z-index: 10;
56
+ }
57
+ #lightbox-container-image-box > #lightbox-nav { left: 0; }
58
+ #lightbox-nav a { outline: none;}
59
+ #lightbox-nav-btnPrev, #lightbox-nav-btnNext {
60
+ width: 49%;
61
+ height: 100%;
62
+ zoom: 1;
63
+ display: block;
64
+ }
65
+ #lightbox-nav-btnPrev {
66
+ left: 0;
67
+ float: left;
68
+ }
69
+ #lightbox-nav-btnNext {
70
+ right: 0;
71
+ float: right;
72
+ }
73
+ #lightbox-container-image-data-box {
74
+ font: 10px Verdana, Helvetica, sans-serif;
75
+ background-color: #fff;
76
+ margin: 0 auto;
77
+ line-height: 1.4em;
78
+ overflow: auto;
79
+ width: 100%;
80
+ padding: 0 10px 0;
81
+ }
82
+ #lightbox-container-image-data {
83
+ padding: 0 10px;
84
+ color: #666;
85
+ }
86
+ #lightbox-container-image-data #lightbox-image-details {
87
+ width: 70%;
88
+ float: left;
89
+ text-align: left;
90
+ }
91
+ #lightbox-image-details-caption { font-weight: bold; }
92
+ #lightbox-image-details-currentNumber {
93
+ display: block;
94
+ clear: left;
95
+ padding-bottom: 1.0em;
96
+ }
97
+ #lightbox-secNav-btnClose {
98
+ width: 66px;
99
+ float: right;
100
+ padding-bottom: 0.7em;
101
+ }
skin/frontend/default/default/css/magebuzz/productslider/layout.css ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body { margin:0px; font-family:Arial, Helvetica, sans-serif; background:#39414A; }
2
+ #container { width:980px; margin:0px auto 0px; background:#FFFFFF; padding:10px; font-size:12px; margin-top:50px; }
3
+
4
+ a{
5
+ text-transform:none;
6
+ color:#333
7
+ }
8
+ #footer{
9
+ background:#F0F0F0;
10
+ padding:10px;
11
+ border:#999 dotted 1px;
12
+ }
skin/frontend/default/default/css/magebuzz/productslider/lightbox.css ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #lightbox{ position: absolute; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;}
2
+ #lightbox img{ width: auto; height: auto;}
3
+ #lightbox a img{ border: none; }
4
+
5
+ #outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; }
6
+ #imageContainer{ padding: 10px; }
7
+
8
+ #loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; }
9
+ #hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; }
10
+ #imageContainer>#hoverNav{ left: 0;}
11
+ #hoverNav a{ outline: none;}
12
+
13
+ #prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; }
14
+ #prevLink { left: 0; float: left;}
15
+ #nextLink { right: 0; float: right;}
16
+ #prevLink:hover, #prevLink:visited:hover { background: url(../../images/prevlabel.gif) left 15% no-repeat; }
17
+ #nextLink:hover, #nextLink:visited:hover { background: url(../../images/nextlabel.gif) right 15% no-repeat; }
18
+
19
+ #imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; }
20
+
21
+ #imageData{ padding:0 10px; color: #666; }
22
+ #imageData #imageDetails{ width: 70%; float: left; text-align: left; }
23
+ #imageData #caption{ font-weight: bold; }
24
+ #imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
25
+ #imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;}
26
+
27
+ #overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; }
skin/frontend/default/default/css/magebuzz/productslider/simple-slider.css ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /********Css For Simple Slider ************/
2
+ .list-products{background:#E6E6E6; border: 3px solid #FFFFFF; padding:10px 10px 30px;}
3
+ .list-products #list-items{}
4
+ #list-items .item{}
5
+ #list-items .product-info{margin-left:180px;}
6
+ #list-items .product-name{}
7
+ #list-items .product-name a{font-size:14px; font-weight:bold; color:#2f2f2f; text-decoration:none;}
8
+ #list-items .product-image{
9
+ float:left;
10
+ background: url("images/product-image-bg.png") no-repeat scroll left top transparent;
11
+ display: block;
12
+ height: 123px;
13
+ padding: 1px 1px 14px;
14
+ text-align: left;
15
+ width: 161px;
16
+ }
17
+ .list-products .bx-prev{position:absolute; background:url(images/btn_prev.png) top left no-repeat; height: 32px; width: 32px;top:50%;left: -30px;right: auto;float:left; text-align:left; text-indent:-999em; }
18
+ .list-products .bx-next{position:absolute; background:url(images/btn_next.png) top right no-repeat; height: 32px; width: 32px;top:50%; right:-30px;float:left; text-align:left; text-indent:-999em; }
skin/frontend/default/default/css/magebuzz/productslider/slidebar.css ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #sliderContent {
2
+ background-color: #E6E6E6;
3
+ border: 3px solid #FFFFFF;
4
+ margin: auto;
5
+ padding:10px 20px;
6
+ }
7
+ .viewer { margin:0 auto 20px; padding:1px; overflow:hidden; position:relative;}
8
+ .content-conveyor { position:relative; }
9
+ #sliderContent .item { width:200px; float:left;text-align:left;}
10
+ #sliderContent .item .product-name{ min-height:50px; margin:0 0 10px; width:163px;}
11
+ #sliderContent .item .product-name a{font-size:13px; font-weight:bold; color:#1E7EC8; text-decoration:none;}
12
+ #sliderContent .item .product-image{
13
+ background: url(images/product-image-bg.png) no-repeat scroll left top transparent;
14
+ display: block;
15
+ height: 123px;
16
+ padding: 1px 1px 14px;
17
+ text-align: left;
18
+ width: 161px;
19
+ }
20
+ #sliderContent li img{
21
+ border: 0 none;
22
+ height: 123px;
23
+ width: 161px;
24
+ }
skin/frontend/default/default/css/magebuzz/productslider/slider-navright.css ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ /* CSS Document */
3
+ .lof-slidecontent{
4
+ position:relative;
5
+ overflow:hidden;
6
+ border:#F4F4F4 solid 4px;
7
+ height:300px;
8
+ }
9
+ .lof-slidecontent .preload{
10
+ height:100%;
11
+ width:100%;
12
+ background:#FFF;
13
+ position:absolute;
14
+ top:0;
15
+ left:0;
16
+ z-index:100000;
17
+ color:#FFF;
18
+ text-align:center
19
+ }
20
+ .lof-slidecontent .preload div{
21
+ height:100%;
22
+ width:100%;
23
+ background:transparent url(images/load-indicator.gif) no-repeat scroll 50% 50%;
24
+ }
25
+ .lof-main-outer{
26
+ position:relative;
27
+ height:100%;
28
+ z-index:3px;
29
+ overflow:hidden;
30
+ }
31
+
32
+
33
+ /*******************************************************/
34
+ .lof-main-item-desc{
35
+ z-index:100px;
36
+ position:absolute;
37
+ top:50px;
38
+ left:30px;
39
+ width:300px;
40
+ background:url(images/transparent_bg.png);
41
+
42
+ /* filter:0.7(opacity:60) */
43
+ }
44
+ .lof-main-item-desc p{
45
+ color:#FFF;
46
+ margin:0 8px;
47
+ padding:8px 0
48
+ }
49
+ .lof-main-item-desc h3 a{
50
+ color:#FFF;
51
+ margin:0;
52
+ font-size:140%;
53
+ padding:20px 8px 2px;
54
+ font-family:"Trebuchet MS",Trebuchet,Arial,Verdana,sans-serif;
55
+ }
56
+ .lof-main-item-desc h3 a:hover{
57
+ color:#FF6;
58
+ text-decoration:underline;
59
+ }
60
+
61
+
62
+ /* main flash */
63
+ ul.lof-main-wapper{
64
+ /* margin-right:auto; */
65
+ overflow:hidden;
66
+ background:transparent url(images/load-indicator.gif) no-repeat scroll 50% 50%;
67
+ padding:0px;
68
+ margin:0;
69
+ height:100%;
70
+ width:100%;
71
+ position:absolute;
72
+ overflow:hidden;
73
+ }
74
+
75
+ ul.lof-main-wapper li{
76
+ overflow:hidden;
77
+ padding:0px;
78
+ margin:0px;
79
+ height:100%;
80
+ width:100%;
81
+ float:left;
82
+ }
83
+ .lof-opacity li{
84
+ position:absolute;
85
+ top:0;
86
+ left:0;
87
+ float:inherit;
88
+ }
89
+ ul.lof-main-wapper li img{
90
+ padding:0px;
91
+ width:100%;
92
+ }
93
+
94
+ /* item navigator */
95
+ ul.lof-navigator{
96
+ top:0;
97
+ padding:0;
98
+ margin:0;
99
+ position:absolute;
100
+ width:100%;
101
+ }
102
+ ul.lof-navigator li{
103
+ cursor:hand;
104
+ cursor:pointer;
105
+ list-style:none;
106
+ width:100%;
107
+ padding:0;
108
+ margin:0;
109
+ overflow:hidden;
110
+ }
111
+ .lof-navigator-outer{
112
+ position:absolute;
113
+ right:0;
114
+ top:00px;
115
+ z-index:100;
116
+ height:300px;
117
+ width:310px;
118
+ overflow:hidden;
119
+ color:#FFF
120
+ }
121
+ .lof-navigator li.active{
122
+ background:url(images/arrow-bg.png) no-repeat scroll left center;
123
+ color:#FFF
124
+ }
125
+ .lof-navigator li:hover{
126
+
127
+ }
128
+
129
+
130
+ .lof-navigator li h3{
131
+ color:#FFF;
132
+ font-size:100%;
133
+ padding:15px 0 0 !important;
134
+ margin:0;
135
+ font-weight:bold;
136
+
137
+ }
138
+ .lof-navigator li div{
139
+ background:url(images/transparent_bg.png);
140
+ color:#FFF;
141
+ height:100%;
142
+ position:relative;
143
+ margin-left:15px;
144
+ padding-left:15px;
145
+ border-top:1px solid #E1E1E1;
146
+ }
147
+
148
+ .lof-navigator li.active div{
149
+ background:url(images/grad-bg.gif);
150
+ color:#FFF;
151
+ }
152
+ .lof-navigator li img{
153
+ height:60px;
154
+ width:60px;
155
+ margin:15px 15px 10px 0px;
156
+ float:left;
157
+ padding:3px;
158
+ border:#C5C5C5 solid 1px;
159
+ }
160
+ .lof-navigator li.active img{
161
+ border:#6C8E5C solid 1px;
162
+ }
163
+ .lof-navigator li.active h3{
164
+ color:#FFF;
165
+ }
skin/frontend/default/default/css/magebuzz/productslider/slider-scroll.css ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .container{
2
+ color:white;
3
+ margin-top:30px;
4
+ width:100%;
5
+ overflow:hidden;
6
+
7
+ background:url(images/bg_dark.png) #28313b;
8
+ padding:20px 10px 10px;
9
+ -moz-border-radius:12px;
10
+ -khtml-border-radius: 12px;
11
+ -webkit-border-radius: 12px;
12
+ border-radius:12px;
13
+ }
14
+ .product{
15
+ width:370px;
16
+ height:150px;
17
+ background:url(images/product_bg.png) repeat-x;
18
+ padding-top:10px;
19
+ float:left;
20
+
21
+ -moz-border-radius:12px;
22
+ -khtml-border-radius: 12px;
23
+ -webkit-border-radius: 12px;
24
+ border-radius:12px;
25
+ }
26
+ .product .pic{
27
+ float:left;
28
+ width:128px;
29
+ height:128px;
30
+ padding:0 10px 5px;
31
+ margin-top:-15px;
32
+ }
skin/frontend/default/default/css/magebuzz/productslider/slider.css ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #slider-content #sl-screen li#sl-view, #slider-content #sl-screen li.nav-left{margin-right: 2px!important;}
2
+ #slider-content #sl-screen li.nav-right{ margin-right: 0;}
3
+ #slider-content #sl-screen li{
4
+ float:left;
5
+ list-style:none;
6
+ margin-right: 7px;
7
+ }
8
+ #list-items{
9
+ }
10
+ #slider-content {
11
+ background: none repeat scroll 0 0 #E6E6E6;
12
+ border: 3px solid #FFFFFF;
13
+ padding: 15px;
14
+ position:relative;
15
+ }
16
+ #slider-content #sl-screen{
17
+ margin:0 auto;
18
+ }
19
+ #slider-content #sl-screen .jq-ss-crop{
20
+ float:left;
21
+ border:0 none;
22
+
23
+ }
24
+ #slider-content #sl-screen li.nav-left, #slider-content #sl-screen li.nav-right{
25
+ cursor: pointer;
26
+ margin-right: 0;
27
+ padding: 0;
28
+ width: 12px;
29
+ }
30
+ #slider-content #sl-screen #left,#right{
31
+ display:block;
32
+ height: 13px; width: 12px;
33
+ text-decoration: none;
34
+ overflow:hidden;
35
+ position:absolute;
36
+ z-index: 9;
37
+ margin:0;
38
+ top:50%;
39
+ }
40
+ #slider-content #sl-screen #left{background:url(images/btn_prev.png) top left no-repeat; height: 32px; width: 32px;left: -20px;right: auto;}
41
+ #slider-content #sl-screen #right{background:url(images/btn_next.png) top right no-repeat; height: 32px; width: 32px; right:-20px;}
42
+ #slider-content #sl-view{
43
+ margin: 0;
44
+ overflow: hidden;
45
+ padding: 0;
46
+ }
47
+ #slider-content #sl-images{
48
+ width:3818px !important;
49
+ width:3822px;
50
+ padding:0;
51
+ }
52
+ #slider-content #sl-images li{
53
+ text-align: left;
54
+ margin:0;
55
+ }
56
+
57
+ #slider-content #sl-images li .item{
58
+ float:left;
59
+ text-align:left;
60
+ }
61
+ #slider-content #sl-images li .item .product-info{padding-right:15px;}
62
+ #slider-content #sl-images li .item .product-name{}
63
+ #slider-content #sl-images li .item .product-name a{font-size:13px; font-weight:bold; color:#1E7EC8; text-decoration:none;}
64
+ #slider-content #sl-images li .item .product-image{
65
+ background: url("images/product-image-bg.png") no-repeat scroll left top transparent;
66
+ display: block;
67
+ height: 123px;
68
+ padding: 1px 1px 14px;
69
+ text-align: left;
70
+ width: 161px;
71
+ }
72
+ #slider-content #sl-images li img{
73
+ border: 0 none;
74
+ height: 123px;
75
+ width: 161px;
76
+ }
77
+ #slider-content #sl-images li .item .price-box .price{color:#f4453c; font-size:15px;}
78
+ #slider-content #sl-images li .item button.btn-cart {
79
+ background: none repeat scroll 0 0 transparent;
80
+ border: 0 none;
81
+ cursor: pointer;
82
+ margin: 0;
83
+ overflow: visible;
84
+ padding: 0;
85
+ width: auto;
86
+ }
87
+ #slider-content #sl-images li .item button.btn-cart span {
88
+ background: url(images/btn-cart.gif) no-repeat scroll left top transparent;
89
+ border: 0 none;
90
+ float: left;
91
+ height: 30px;
92
+ line-height: 30px;
93
+ padding: 0;
94
+ width: 90px;
95
+ }
96
+ #slider-content #sl-images li .item button.btn-cart span span {
97
+ background: none repeat scroll 0 50% transparent;
98
+ color: #1E7EC8;
99
+ font-weight: bold;
100
+ padding-left: 20px;
101
+ width: auto;
102
+ }
skin/frontend/default/default/css/magebuzz/productslider/style.css ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #page-wrap {position: relative;}
2
+ .slider-wrap {background:#FFFFFF;border: 3px solid #E6E6E6;}
3
+ .stripViewer .panelContainer
4
+ .panel ul { text-align: left; margin: 0 15px 0 30px; }
5
+ .stripViewer { position: relative; overflow: hidden;}
6
+ .stripViewer .panelContainer { position: relative; left: 0; top: 0; }
7
+ .stripViewer .panelContainer .panel { float: left; height: 100%; position: relative; }
8
+ .stripNavL, .stripNavR, .stripNav { display: none; }
9
+ .nav-thumb { border: 1px solid black; margin-right: 5px; }
10
+ #thumbnails-nav {background:#FFFFFF;border: 3px solid #E6E6E6; width:100%; border-top:0 none;}
11
+ #movers-row div {float: left; }
12
+ #movers-row div a.cross-link { float: right; }
13
+ .photo-meta-data { background: url(images/transpBlack.png); padding: 10px; height: 30px;
14
+ margin-top: -50px; position: relative; z-index: 9999; color: white; }
15
+ .photo-meta-data span { font-size: 13px; }
16
+ .cross-link { display: block; width:50px;position: relative;z-index: 9999; }
17
+ .active-thumb { background: transparent url(images/icon-uparrowsmallwhite.png) top center no-repeat; }
18
+
19
+
20
+
21
+
22
+
23
+