Version Notes
Remove jquery in case already available
Download this release
Release Info
| Developer | Harpreet Singh |
| Extension | hslider |
| Version | 1.0.2 |
| Comparing to | |
| See all releases | |
Version 1.0.2
- app/code/community/Harpreet/Slider/Block/Slider.php +12 -0
- app/code/community/Harpreet/Slider/Helper/Config.php +225 -0
- app/code/community/Harpreet/Slider/Model/System/Config/Source/Dropdown/Animations.php +75 -0
- app/code/community/Harpreet/Slider/Model/System/Config/Source/Dropdown/Pieces.php +94 -0
- app/code/community/Harpreet/Slider/Model/System/Config/Source/Dropdown/Position.php +35 -0
- app/code/community/Harpreet/Slider/Model/System/Config/Source/Dropdown/Speed.php +91 -0
- app/code/community/Harpreet/Slider/Model/System/Config/Source/Dropdown/Times.php +79 -0
- app/code/community/Harpreet/Slider/etc/adminhtml.xml +26 -0
- app/code/community/Harpreet/Slider/etc/config.xml +80 -0
- app/code/community/Harpreet/Slider/etc/system.xml +695 -0
- app/design/adminhtml/default/default/layout/harpreet_slider_admin.xml +20 -0
- app/design/frontend/base/default/layout/harpreet_slider.xml +19 -0
- app/design/frontend/base/default/template/harpreet/slider/slider.phtml +82 -0
- app/etc/modules/Harpreet_Slider.xml +9 -0
- js/harpreet/jquery-1-7-1.js +4 -0
- media/harpreet/slider/default/magento-banner.png +0 -0
- media/harpreet/slider/default/merry-christmas-banner-ghita-andersen.jpg +0 -0
- media/harpreet/slider/default1.jpg +0 -0
- media/harpreet/slider/default2.jpg +0 -0
- package.xml +18 -0
- skin/adminhtml/default/default/harpreet/colorpicker/css/colorpicker.css +162 -0
- skin/adminhtml/default/default/harpreet/colorpicker/css/layout.css +82 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/Thumbs.db +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/blank.gif +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_background.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_hex.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_hsb_b.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_hsb_h.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_hsb_s.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_indic.gif +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_overlay.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_rgb_b.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_rgb_g.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_rgb_r.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_select.gif +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_submit.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/custom_background.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/custom_hex.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/custom_hsb_b.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/custom_hsb_h.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/custom_hsb_s.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/custom_indic.gif +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/custom_rgb_b.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/custom_rgb_g.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/custom_rgb_r.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/custom_submit.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/select.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/select2.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/images/slider.png +0 -0
- skin/adminhtml/default/default/harpreet/colorpicker/js/colorpicker.js +484 -0
- skin/adminhtml/default/default/harpreet/colorpicker/js/eye.js +34 -0
- skin/adminhtml/default/default/harpreet/colorpicker/js/jquery.js +4376 -0
- skin/adminhtml/default/default/harpreet/colorpicker/js/layout.js +67 -0
- skin/adminhtml/default/default/harpreet/colorpicker/js/utils.js +252 -0
- skin/adminhtml/default/default/harpreet/colorpicker/start.js +41 -0
- skin/frontend/base/default/css/harpreet/slider/slider.css +141 -0
- skin/frontend/base/default/images/harpreet/slider/slider-left.png +0 -0
- skin/frontend/base/default/images/harpreet/slider/slider.png +0 -0
- skin/frontend/base/default/js/harpreet/slider/slider.js +654 -0
app/code/community/Harpreet/Slider/Block/Slider.php
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class Harpreet_Slider_Block_Slider extends Mage_Core_Block_Template
|
| 5 |
+
{
|
| 6 |
+
public function _construct()
|
| 7 |
+
{
|
| 8 |
+
parent::_construct();
|
| 9 |
+
}
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
?>
|
app/code/community/Harpreet/Slider/Helper/Config.php
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
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|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Harpreet_Slider_Helper_Config extends Mage_Core_Helper_Abstract
|
| 4 |
+
{
|
| 5 |
+
private $_configs;
|
| 6 |
+
private $_sliders;
|
| 7 |
+
private $_design;
|
| 8 |
+
private $_animation;
|
| 9 |
+
private $_event;
|
| 10 |
+
private $_media;
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
public function __construct()
|
| 14 |
+
{
|
| 15 |
+
$this->_configs = Mage::getStoreConfig('harpreetslider');
|
| 16 |
+
$this->_media = Mage::getBaseUrl('media') . 'harpreet'. DS . 'slider' . DS;
|
| 17 |
+
|
| 18 |
+
$this->setSliders();
|
| 19 |
+
$this->setDesign();
|
| 20 |
+
$this->setAnimation();
|
| 21 |
+
$this->setEvent();
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
private function setSliders()
|
| 25 |
+
{
|
| 26 |
+
$sliderItems = array();
|
| 27 |
+
|
| 28 |
+
$item = 0;
|
| 29 |
+
for ($i = 0; $i < 6; $i++)
|
| 30 |
+
{
|
| 31 |
+
if ($this->_configs["slideritem$i"]['image'] != null && $this->_configs["slideritem$i"]['image'] != '')
|
| 32 |
+
{
|
| 33 |
+
$sliderItems[$item]['image'] = $this->_media . $this->_configs["slideritem$i"]['image'];
|
| 34 |
+
$sliderItems[$item]['title'] = $this->_configs["slideritem$i"]['title'];
|
| 35 |
+
$sliderItems[$item]['link'] = $this->_configs["slideritem$i"]['link'];
|
| 36 |
+
$item++;
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
if (!isset($sliderItems[0]))
|
| 41 |
+
{
|
| 42 |
+
$sliderItems[0]['image'] = $this->_media . 'default1.jpg';
|
| 43 |
+
$sliderItems[0]['title'] = 'Harpreet Slider is installed';
|
| 44 |
+
$sliderItems[0]['link'] = '#';
|
| 45 |
+
|
| 46 |
+
$sliderItems[1]['image'] = $this->_media . 'default2.jpg';
|
| 47 |
+
$sliderItems[1]['title'] = 'Lorem ipsum sit dolor amet. This is not Klingon language.';
|
| 48 |
+
$sliderItems[1]['link'] = '#';
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
$this->_sliders = $sliderItems;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
public function getSliders()
|
| 55 |
+
{
|
| 56 |
+
return $this->_sliders;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
private function setDesign()
|
| 60 |
+
{
|
| 61 |
+
$this->_configs['design']['width'] = ((int)$this->_configs['design']['width'] != '') ? 'width:' . (int)$this->_configs['design']['width'] . 'px;' : '';
|
| 62 |
+
$this->_configs['design']['height'] = ((int)$this->_configs['design']['height'] != '') ? 'height:' . (int)$this->_configs['design']['height'] . 'px;' : '';
|
| 63 |
+
|
| 64 |
+
$this->_configs['design']['textscolor'] = (ctype_xdigit($this->_configs['design']['textscolor']) == true && strlen($this->_configs['design']['textscolor']) == 6) ? 'color:#' . $this->_configs['design']['textscolor'] . ';' : '';
|
| 65 |
+
$this->_configs['design']['bgscolor'] = (ctype_xdigit($this->_configs['design']['bgscolor']) && strlen($this->_configs['design']['bgscolor']) == 6) ? 'background-color:#' . $this->_configs['design']['bgscolor'] . ';' : '';
|
| 66 |
+
|
| 67 |
+
if ($this->_configs['design']['textopacity'] != '')
|
| 68 |
+
{
|
| 69 |
+
$opc = $this->_configs['design']['textopacity'];
|
| 70 |
+
$this->_configs['design']['textopacity'] = 'opacity:' . $opc . ';-moz-opacity:' . $opc . ';filter:alpha(opacity=' . (10*$opc) . ');';
|
| 71 |
+
}
|
| 72 |
+
else
|
| 73 |
+
{
|
| 74 |
+
$this->_configs['design']['textopacity'] = '';
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
if ($this->_configs['design']['textpos'] == 'top')
|
| 78 |
+
{
|
| 79 |
+
$this->_configs['design']['textpos'] = 'left:0;top:0;width:100%;';
|
| 80 |
+
}
|
| 81 |
+
elseif ($this->_configs['design']['textpos'] == 'bottom')
|
| 82 |
+
{
|
| 83 |
+
$this->_configs['design']['textpos'] = 'left:0;bottom:0;width:100%;';
|
| 84 |
+
}
|
| 85 |
+
elseif ($this->_configs['design']['textpos'] == 'lefttop')
|
| 86 |
+
{
|
| 87 |
+
$this->_configs['design']['textpos'] = 'left:0;top:10%;';
|
| 88 |
+
}
|
| 89 |
+
elseif ($this->_configs['design']['textpos'] == 'righttop')
|
| 90 |
+
{
|
| 91 |
+
$this->_configs['design']['textpos'] = 'right:0;top:10%;';
|
| 92 |
+
}
|
| 93 |
+
elseif ($this->_configs['design']['textpos'] == 'leftbottom')
|
| 94 |
+
{
|
| 95 |
+
$this->_configs['design']['textpos'] = 'left:0;bottom:10%;';
|
| 96 |
+
}
|
| 97 |
+
elseif ($this->_configs['design']['textpos'] == 'rightbottom')
|
| 98 |
+
{
|
| 99 |
+
$this->_configs['design']['textpos'] = 'right:0;bottom:10%;';
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
if ($this->_configs['design']['buttonen'] == 1)
|
| 103 |
+
{
|
| 104 |
+
$this->_configs['design']['buttonen'] = 'true';
|
| 105 |
+
}
|
| 106 |
+
else
|
| 107 |
+
{
|
| 108 |
+
$this->_configs['design']['buttonen'] = 'false';
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
if ($this->_configs['design']['buttonscolor'] != '')
|
| 112 |
+
{
|
| 113 |
+
$color1 = '#' . $this->_configs['design']['buttonscolor'];
|
| 114 |
+
$color2 = '#' . $this->_configs['design']['buttonscolorup'];
|
| 115 |
+
|
| 116 |
+
$colors .= 'background-color:' . $color1 . ';';
|
| 117 |
+
$colors .= 'background-image:linear-gradient(bottom, ' . $color1 . ' 1%, ' . $color2 . ' 100%);';
|
| 118 |
+
$colors .= 'background-image:-o-linear-gradient(bottom, ' . $color1 . ' 1%, ' . $color2 . ' 100%);';
|
| 119 |
+
$colors .= 'background-image:-moz-linear-gradient(bottom, ' . $color1 . ' 1%, ' . $color2 . ' 100%);';
|
| 120 |
+
$colors .= 'background-image:-webkit-linear-gradient(bottom, ' . $color1 . ' 1%, ' . $color2 . ' 100%);';
|
| 121 |
+
$colors .= 'background-image:-ms-linear-gradient(bottom, ' . $color1 . ' 1%, ' . $color2 . ' 100%);';
|
| 122 |
+
$colors .= "filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='" . $color1 . "', endColorstr='" . $color2 . "',GradientType=0 );";
|
| 123 |
+
|
| 124 |
+
$this->_configs['design']['buttonscolor'] = $colors;
|
| 125 |
+
|
| 126 |
+
$colorshover .= 'background-color:' . $color2 . ';';
|
| 127 |
+
$colorshover .= 'background-image:linear-gradient(bottom, ' . $color2 . ' 1%, ' . $color1 . ' 100%);';
|
| 128 |
+
$colorshover .= 'background-image:-o-linear-gradient(bottom, ' . $color2 . ' 1%, ' . $color1 . ' 100%);';
|
| 129 |
+
$colorshover .= 'background-image:-moz-linear-gradient(bottom, ' . $color2 . ' 1%, ' . $color1 . ' 100%);';
|
| 130 |
+
$colorshover .= 'background-image:-webkit-linear-gradient(bottom, ' . $color2 . ' 1%, ' . $color1 . ' 100%);';
|
| 131 |
+
$colorshover .= 'background-image:-ms-linear-gradient(bottom, ' . $color2 . ' 1%, ' . $color1 . ' 100%);';
|
| 132 |
+
$colorshover .= "filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='" . $color2 . "', endColorstr='" . $color1 . "',GradientType=0 );";
|
| 133 |
+
|
| 134 |
+
$this->_configs['design']['buttonscolorhover'] = $colorshover;
|
| 135 |
+
}
|
| 136 |
+
else
|
| 137 |
+
{
|
| 138 |
+
$this->_configs['design']['buttonscolorhover'] = '';
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
if ($this->_configs['design']['buttonpos'] == 'top')
|
| 142 |
+
{
|
| 143 |
+
$this->_configs['design']['buttonpos'] = 'left:0;right:0;top:0;';
|
| 144 |
+
}
|
| 145 |
+
elseif ($this->_configs['design']['buttonpos'] == 'bottom')
|
| 146 |
+
{
|
| 147 |
+
$this->_configs['design']['buttonpos'] = 'left:0;right:0;bottom:0;';
|
| 148 |
+
}
|
| 149 |
+
elseif ($this->_configs['design']['buttonpos'] == 'lefttop')
|
| 150 |
+
{
|
| 151 |
+
$this->_configs['design']['buttonpos'] = 'left:10px;top:0;';
|
| 152 |
+
}
|
| 153 |
+
elseif ($this->_configs['design']['buttonpos'] == 'righttop')
|
| 154 |
+
{
|
| 155 |
+
$this->_configs['design']['buttonpos'] = 'right:10px;top:0';
|
| 156 |
+
}
|
| 157 |
+
elseif ($this->_configs['design']['buttonpos'] == 'leftbottom')
|
| 158 |
+
{
|
| 159 |
+
$this->_configs['design']['buttonpos'] = 'left:10px;bottom:0';
|
| 160 |
+
}
|
| 161 |
+
elseif ($this->_configs['design']['buttonpos'] == 'rightbottom')
|
| 162 |
+
{
|
| 163 |
+
$this->_configs['design']['buttonpos'] = 'right:10px;bottom:0;';
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
if ($this->_configs['design']['nextpreven'] == 1)
|
| 167 |
+
{
|
| 168 |
+
$this->_configs['design']['nextpreven'] = 'true';
|
| 169 |
+
}
|
| 170 |
+
else
|
| 171 |
+
{
|
| 172 |
+
$this->_configs['design']['nextpreven'] = 'false';
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
if ($this->_configs['design']['nextimage'] != '' && $this->_configs['design']['nextimage'] != null)
|
| 176 |
+
{
|
| 177 |
+
$this->_configs['design']['nextimage'] = "background-image:url('" . $this->_media . DS . 'nextprev' . DS . $this->_configs['design']['nextimage'] . "')";
|
| 178 |
+
}
|
| 179 |
+
if ($this->_configs['design']['previmage'] != '' && $this->_configs['design']['previmage'] != null)
|
| 180 |
+
{
|
| 181 |
+
$this->_configs['design']['previmage'] = "background-image:url('" . $this->_media . DS . 'nextprev' . DS . $this->_configs['design']['previmage'] . "')";
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
$fontsize = ((int)$this->_configs['design']['textsize'] >= 6 && (int)$this->_configs['design']['textsize'] <= 62) ? (int)$this->_configs['design']['textsize'] : '18';
|
| 185 |
+
$this->_configs['design']['textsize'] = 'font-size:' . $fontsize . 'px;';
|
| 186 |
+
|
| 187 |
+
$this->_design = $this->_configs['design'];
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
public function getDesign()
|
| 191 |
+
{
|
| 192 |
+
return $this->_design;
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
private function setAnimation()
|
| 196 |
+
{
|
| 197 |
+
if ($this->_configs['animations']['hover'] == 1)
|
| 198 |
+
{
|
| 199 |
+
$this->_configs['animations']['hover'] = 'true';
|
| 200 |
+
}
|
| 201 |
+
else
|
| 202 |
+
{
|
| 203 |
+
$this->_configs['animations']['hover'] = 'false';
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
$this->_animation = $this->_configs['animations'];
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
public function getAnimation()
|
| 210 |
+
{
|
| 211 |
+
return $this->_animation;
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
private function setEvent()
|
| 215 |
+
{
|
| 216 |
+
$this->_event = $this->_configs['events'];
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
public function getEvent()
|
| 220 |
+
{
|
| 221 |
+
return $this->_event;
|
| 222 |
+
}
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
?>
|
app/code/community/Harpreet/Slider/Model/System/Config/Source/Dropdown/Animations.php
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class Harpreet_Slider_Model_System_Config_Source_Dropdown_Animations
|
| 5 |
+
{
|
| 6 |
+
public function toOptionArray()
|
| 7 |
+
{
|
| 8 |
+
return array(
|
| 9 |
+
array(
|
| 10 |
+
'value' => 'random',
|
| 11 |
+
'label' => 'Full Random',
|
| 12 |
+
),
|
| 13 |
+
array(
|
| 14 |
+
'value' => 'sliceDown',
|
| 15 |
+
'label' => 'Slice Down',
|
| 16 |
+
),
|
| 17 |
+
array(
|
| 18 |
+
'value' => 'sliceDownLeft',
|
| 19 |
+
'label' => 'Slice Down Left',
|
| 20 |
+
),
|
| 21 |
+
array(
|
| 22 |
+
'value' => 'sliceUp',
|
| 23 |
+
'label' => 'Slice Up',
|
| 24 |
+
),
|
| 25 |
+
array(
|
| 26 |
+
'value' => 'sliceUpLeft',
|
| 27 |
+
'label' => 'Slice Up Left',
|
| 28 |
+
),
|
| 29 |
+
array(
|
| 30 |
+
'value' => 'sliceUpDown',
|
| 31 |
+
'label' => 'Slice Up Down',
|
| 32 |
+
),
|
| 33 |
+
array(
|
| 34 |
+
'value' => 'sliceUpDownLeft',
|
| 35 |
+
'label' => 'Slice Up Down Left',
|
| 36 |
+
),
|
| 37 |
+
array(
|
| 38 |
+
'value' => 'fold',
|
| 39 |
+
'label' => 'Fold',
|
| 40 |
+
),
|
| 41 |
+
array(
|
| 42 |
+
'value' => 'fade',
|
| 43 |
+
'label' => 'Fade',
|
| 44 |
+
),
|
| 45 |
+
array(
|
| 46 |
+
'value' => 'slideInRight',
|
| 47 |
+
'label' => 'Slide In Right',
|
| 48 |
+
),
|
| 49 |
+
array(
|
| 50 |
+
'value' => 'slideInLeft',
|
| 51 |
+
'label' => 'Slide In Left',
|
| 52 |
+
),
|
| 53 |
+
array(
|
| 54 |
+
'value' => 'boxRandom',
|
| 55 |
+
'label' => 'Box Random',
|
| 56 |
+
),
|
| 57 |
+
array(
|
| 58 |
+
'value' => 'boxRain',
|
| 59 |
+
'label' => 'Box Rain',
|
| 60 |
+
),
|
| 61 |
+
array(
|
| 62 |
+
'value' => 'boxRainReverse',
|
| 63 |
+
'label' => 'Box Rain Reverse',
|
| 64 |
+
),
|
| 65 |
+
array(
|
| 66 |
+
'value' => 'boxRainGrow',
|
| 67 |
+
'label' => 'Box Rain Grow',
|
| 68 |
+
),
|
| 69 |
+
array(
|
| 70 |
+
'value' => 'boxRainGrowReverse',
|
| 71 |
+
'label' => 'Box Rain Grow Reverse',
|
| 72 |
+
)
|
| 73 |
+
);
|
| 74 |
+
}
|
| 75 |
+
}
|
app/code/community/Harpreet/Slider/Model/System/Config/Source/Dropdown/Pieces.php
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Harpreet_Slider_Model_System_Config_Source_Dropdown_Pieces
|
| 4 |
+
{
|
| 5 |
+
public function toOptionArray()
|
| 6 |
+
{
|
| 7 |
+
return array(
|
| 8 |
+
array(
|
| 9 |
+
'value' => '4',
|
| 10 |
+
'label' => '4',
|
| 11 |
+
),
|
| 12 |
+
array(
|
| 13 |
+
'value' => '5',
|
| 14 |
+
'label' => '5',
|
| 15 |
+
),
|
| 16 |
+
array(
|
| 17 |
+
'value' => '6',
|
| 18 |
+
'label' => '6',
|
| 19 |
+
),
|
| 20 |
+
array(
|
| 21 |
+
'value' => '7',
|
| 22 |
+
'label' => '7',
|
| 23 |
+
),
|
| 24 |
+
array(
|
| 25 |
+
'value' => '8',
|
| 26 |
+
'label' => '8',
|
| 27 |
+
),
|
| 28 |
+
array(
|
| 29 |
+
'value' => '9',
|
| 30 |
+
'label' => '9',
|
| 31 |
+
),
|
| 32 |
+
array(
|
| 33 |
+
'value' => '10',
|
| 34 |
+
'label' => '10',
|
| 35 |
+
),
|
| 36 |
+
array(
|
| 37 |
+
'value' => '11',
|
| 38 |
+
'label' => '11',
|
| 39 |
+
),
|
| 40 |
+
array(
|
| 41 |
+
'value' => '12',
|
| 42 |
+
'label' => '12',
|
| 43 |
+
),
|
| 44 |
+
array(
|
| 45 |
+
'value' => '13',
|
| 46 |
+
'label' => '13',
|
| 47 |
+
),
|
| 48 |
+
array(
|
| 49 |
+
'value' => '14',
|
| 50 |
+
'label' => '14',
|
| 51 |
+
),
|
| 52 |
+
array(
|
| 53 |
+
'value' => '15',
|
| 54 |
+
'label' => '15',
|
| 55 |
+
),
|
| 56 |
+
array(
|
| 57 |
+
'value' => '16',
|
| 58 |
+
'label' => '16',
|
| 59 |
+
),
|
| 60 |
+
array(
|
| 61 |
+
'value' => '17',
|
| 62 |
+
'label' => '17',
|
| 63 |
+
),
|
| 64 |
+
array(
|
| 65 |
+
'value' => '18',
|
| 66 |
+
'label' => '18',
|
| 67 |
+
),
|
| 68 |
+
array(
|
| 69 |
+
'value' => '19',
|
| 70 |
+
'label' => '19',
|
| 71 |
+
),
|
| 72 |
+
array(
|
| 73 |
+
'value' => '20',
|
| 74 |
+
'label' => '20',
|
| 75 |
+
),
|
| 76 |
+
array(
|
| 77 |
+
'value' => '21',
|
| 78 |
+
'label' => '21',
|
| 79 |
+
),
|
| 80 |
+
array(
|
| 81 |
+
'value' => '22',
|
| 82 |
+
'label' => '22',
|
| 83 |
+
),
|
| 84 |
+
array(
|
| 85 |
+
'value' => '23',
|
| 86 |
+
'label' => '23',
|
| 87 |
+
),
|
| 88 |
+
array(
|
| 89 |
+
'value' => '24',
|
| 90 |
+
'label' => '24',
|
| 91 |
+
)
|
| 92 |
+
);
|
| 93 |
+
}
|
| 94 |
+
}
|
app/code/community/Harpreet/Slider/Model/System/Config/Source/Dropdown/Position.php
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class Harpreet_Slider_Model_System_Config_Source_Dropdown_Position
|
| 5 |
+
{
|
| 6 |
+
public function toOptionArray()
|
| 7 |
+
{
|
| 8 |
+
return array(
|
| 9 |
+
array(
|
| 10 |
+
'value' => 'top',
|
| 11 |
+
'label' => 'Top',
|
| 12 |
+
),
|
| 13 |
+
array(
|
| 14 |
+
'value' => 'bottom',
|
| 15 |
+
'label' => 'Bottom',
|
| 16 |
+
),
|
| 17 |
+
array(
|
| 18 |
+
'value' => 'lefttop',
|
| 19 |
+
'label' => 'Top at Left side',
|
| 20 |
+
),
|
| 21 |
+
array(
|
| 22 |
+
'value' => 'righttop',
|
| 23 |
+
'label' => 'Top at Right side',
|
| 24 |
+
),
|
| 25 |
+
array(
|
| 26 |
+
'value' => 'leftbottom',
|
| 27 |
+
'label' => 'Bottom at Left side',
|
| 28 |
+
),
|
| 29 |
+
array(
|
| 30 |
+
'value' => 'rightbottom',
|
| 31 |
+
'label' => 'Bottom at Right side',
|
| 32 |
+
)
|
| 33 |
+
);
|
| 34 |
+
}
|
| 35 |
+
}
|
app/code/community/Harpreet/Slider/Model/System/Config/Source/Dropdown/Speed.php
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class Harpreet_Slider_Model_System_Config_Source_Dropdown_Speed
|
| 5 |
+
{
|
| 6 |
+
public function toOptionArray()
|
| 7 |
+
{
|
| 8 |
+
return array(
|
| 9 |
+
array(
|
| 10 |
+
'value' => '100',
|
| 11 |
+
'label' => '0.1',
|
| 12 |
+
),
|
| 13 |
+
array(
|
| 14 |
+
'value' => '200',
|
| 15 |
+
'label' => '0.2',
|
| 16 |
+
),
|
| 17 |
+
array(
|
| 18 |
+
'value' => '300',
|
| 19 |
+
'label' => '0.3',
|
| 20 |
+
),
|
| 21 |
+
array(
|
| 22 |
+
'value' => '400',
|
| 23 |
+
'label' => '0.4',
|
| 24 |
+
),
|
| 25 |
+
array(
|
| 26 |
+
'value' => '500',
|
| 27 |
+
'label' => '0.5',
|
| 28 |
+
),
|
| 29 |
+
array(
|
| 30 |
+
'value' => '600',
|
| 31 |
+
'label' => '0.6',
|
| 32 |
+
),
|
| 33 |
+
array(
|
| 34 |
+
'value' => '700',
|
| 35 |
+
'label' => '0.7',
|
| 36 |
+
),
|
| 37 |
+
array(
|
| 38 |
+
'value' => '800',
|
| 39 |
+
'label' => '0.8',
|
| 40 |
+
),
|
| 41 |
+
array(
|
| 42 |
+
'value' => '900',
|
| 43 |
+
'label' => '0.9',
|
| 44 |
+
),
|
| 45 |
+
array(
|
| 46 |
+
'value' => '1000',
|
| 47 |
+
'label' => '1',
|
| 48 |
+
),
|
| 49 |
+
array(
|
| 50 |
+
'value' => '1100',
|
| 51 |
+
'label' => '1.1',
|
| 52 |
+
),
|
| 53 |
+
array(
|
| 54 |
+
'value' => '1200',
|
| 55 |
+
'label' => '1.2',
|
| 56 |
+
),
|
| 57 |
+
array(
|
| 58 |
+
'value' => '1300',
|
| 59 |
+
'label' => '1.3',
|
| 60 |
+
),
|
| 61 |
+
array(
|
| 62 |
+
'value' => '1400',
|
| 63 |
+
'label' => '1.4',
|
| 64 |
+
),
|
| 65 |
+
array(
|
| 66 |
+
'value' => '1500',
|
| 67 |
+
'label' => '1.5',
|
| 68 |
+
),
|
| 69 |
+
array(
|
| 70 |
+
'value' => '1600',
|
| 71 |
+
'label' => '1.6',
|
| 72 |
+
),
|
| 73 |
+
array(
|
| 74 |
+
'value' => '1700',
|
| 75 |
+
'label' => '1.7',
|
| 76 |
+
),
|
| 77 |
+
array(
|
| 78 |
+
'value' => '1800',
|
| 79 |
+
'label' => '1.8',
|
| 80 |
+
),
|
| 81 |
+
array(
|
| 82 |
+
'value' => '1900',
|
| 83 |
+
'label' => '1.9',
|
| 84 |
+
),
|
| 85 |
+
array(
|
| 86 |
+
'value' => '2000',
|
| 87 |
+
'label' => '2',
|
| 88 |
+
)
|
| 89 |
+
);
|
| 90 |
+
}
|
| 91 |
+
}
|
app/code/community/Harpreet/Slider/Model/System/Config/Source/Dropdown/Times.php
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class Harpreet_Slider_Model_System_Config_Source_Dropdown_Times
|
| 5 |
+
{
|
| 6 |
+
public function toOptionArray()
|
| 7 |
+
{
|
| 8 |
+
return array(
|
| 9 |
+
array(
|
| 10 |
+
'value' => '2000',
|
| 11 |
+
'label' => '2',
|
| 12 |
+
),
|
| 13 |
+
array(
|
| 14 |
+
'value' => '2500',
|
| 15 |
+
'label' => '2.5',
|
| 16 |
+
),
|
| 17 |
+
array(
|
| 18 |
+
'value' => '3000',
|
| 19 |
+
'label' => '3',
|
| 20 |
+
),
|
| 21 |
+
array(
|
| 22 |
+
'value' => '3500',
|
| 23 |
+
'label' => '3.5',
|
| 24 |
+
),
|
| 25 |
+
array(
|
| 26 |
+
'value' => '4000',
|
| 27 |
+
'label' => '4',
|
| 28 |
+
),
|
| 29 |
+
array(
|
| 30 |
+
'value' => '4500',
|
| 31 |
+
'label' => '4.5',
|
| 32 |
+
),
|
| 33 |
+
array(
|
| 34 |
+
'value' => '5000',
|
| 35 |
+
'label' => '5',
|
| 36 |
+
),
|
| 37 |
+
array(
|
| 38 |
+
'value' => '5500',
|
| 39 |
+
'label' => '5.5',
|
| 40 |
+
),
|
| 41 |
+
array(
|
| 42 |
+
'value' => '6000',
|
| 43 |
+
'label' => '6',
|
| 44 |
+
),
|
| 45 |
+
array(
|
| 46 |
+
'value' => '6500',
|
| 47 |
+
'label' => '6.5',
|
| 48 |
+
),
|
| 49 |
+
array(
|
| 50 |
+
'value' => '7000',
|
| 51 |
+
'label' => '7',
|
| 52 |
+
),
|
| 53 |
+
array(
|
| 54 |
+
'value' => '7500',
|
| 55 |
+
'label' => '7.5',
|
| 56 |
+
),
|
| 57 |
+
array(
|
| 58 |
+
'value' => '8000',
|
| 59 |
+
'label' => '8',
|
| 60 |
+
),
|
| 61 |
+
array(
|
| 62 |
+
'value' => '8500',
|
| 63 |
+
'label' => '8.5',
|
| 64 |
+
),
|
| 65 |
+
array(
|
| 66 |
+
'value' => '9000',
|
| 67 |
+
'label' => '9',
|
| 68 |
+
),
|
| 69 |
+
array(
|
| 70 |
+
'value' => '9500',
|
| 71 |
+
'label' => '9.5',
|
| 72 |
+
),
|
| 73 |
+
array(
|
| 74 |
+
'value' => '10000',
|
| 75 |
+
'label' => '10',
|
| 76 |
+
)
|
| 77 |
+
);
|
| 78 |
+
}
|
| 79 |
+
}
|
app/code/community/Harpreet/Slider/etc/adminhtml.xml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<acl>
|
| 4 |
+
<resources>
|
| 5 |
+
<all>
|
| 6 |
+
<title>HSLIDER Modules</title>
|
| 7 |
+
</all>
|
| 8 |
+
<admin>
|
| 9 |
+
<children>
|
| 10 |
+
<system>
|
| 11 |
+
<children>
|
| 12 |
+
<config>
|
| 13 |
+
<children>
|
| 14 |
+
<harpreetslider translate="title">
|
| 15 |
+
<title>HSLIDER Modules</title>
|
| 16 |
+
<sort_order>1</sort_order>
|
| 17 |
+
</harpreetslider>
|
| 18 |
+
</children>
|
| 19 |
+
</config>
|
| 20 |
+
</children>
|
| 21 |
+
</system>
|
| 22 |
+
</children>
|
| 23 |
+
</admin>
|
| 24 |
+
</resources>
|
| 25 |
+
</acl>
|
| 26 |
+
</config>
|
app/code/community/Harpreet/Slider/etc/config.xml
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8" ?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Harpreet_Slider>
|
| 5 |
+
<version>1.0.1</version>
|
| 6 |
+
</Harpreet_Slider>
|
| 7 |
+
</modules>
|
| 8 |
+
<global>
|
| 9 |
+
<models>
|
| 10 |
+
<harpreet_slider>
|
| 11 |
+
<class>Harpreet_Slider_Model</class>
|
| 12 |
+
</harpreet_slider>
|
| 13 |
+
</models>
|
| 14 |
+
<blocks>
|
| 15 |
+
<harpreet_slider>
|
| 16 |
+
<class>Harpreet_Slider_Block</class>
|
| 17 |
+
</harpreet_slider>
|
| 18 |
+
</blocks>
|
| 19 |
+
<helpers>
|
| 20 |
+
<harpreet_slider>
|
| 21 |
+
<class>Harpreet_Slider_Helper</class>
|
| 22 |
+
</harpreet_slider>
|
| 23 |
+
</helpers>
|
| 24 |
+
</global>
|
| 25 |
+
<frontend>
|
| 26 |
+
<layout>
|
| 27 |
+
<updates>
|
| 28 |
+
<Harpreet_Slider>
|
| 29 |
+
<file>harpreet_slider.xml</file>
|
| 30 |
+
</Harpreet_Slider>
|
| 31 |
+
</updates>
|
| 32 |
+
</layout>
|
| 33 |
+
</frontend>
|
| 34 |
+
<adminhtml>
|
| 35 |
+
<layout>
|
| 36 |
+
<updates>
|
| 37 |
+
<Harpreet_Slider>
|
| 38 |
+
<file>harpreet_slider_admin.xml</file>
|
| 39 |
+
</Harpreet_Slider>
|
| 40 |
+
</updates>
|
| 41 |
+
</layout>
|
| 42 |
+
</adminhtml>
|
| 43 |
+
|
| 44 |
+
<default>
|
| 45 |
+
<harpreetslider>
|
| 46 |
+
<slideritem1>
|
| 47 |
+
<link>#</link>
|
| 48 |
+
<title>You have successfully installed Harpreet Slider</title>
|
| 49 |
+
</slideritem1>
|
| 50 |
+
<slideritem2>
|
| 51 |
+
<link>#</link>
|
| 52 |
+
<title>Some Text for next banner</title>
|
| 53 |
+
</slideritem2>
|
| 54 |
+
<animations>
|
| 55 |
+
<type>random</type>
|
| 56 |
+
<speed>400</speed>
|
| 57 |
+
<pausetime>4000</pausetime>
|
| 58 |
+
<hover>1</hover>
|
| 59 |
+
<slices>15</slices>
|
| 60 |
+
<boxcols>8</boxcols>
|
| 61 |
+
<boxrows>4</boxrows>
|
| 62 |
+
</animations>
|
| 63 |
+
<design>
|
| 64 |
+
<width>900</width>
|
| 65 |
+
<height>340</height>
|
| 66 |
+
<texten>1</texten>
|
| 67 |
+
<textsize>18</textsize>
|
| 68 |
+
<textpos>leftbottom</textpos>
|
| 69 |
+
<textopacity>0.8</textopacity>
|
| 70 |
+
<textscolor>ffffff</textscolor>
|
| 71 |
+
<bgscolor>000000</bgscolor>
|
| 72 |
+
<buttonen>1</buttonen>
|
| 73 |
+
<buttonscolor>bbbbbb</buttonscolor>
|
| 74 |
+
<buttonscolorup>ffffff</buttonscolorup>
|
| 75 |
+
<buttonpos>righttop</buttonpos>
|
| 76 |
+
<nextpreven>1</nextpreven>
|
| 77 |
+
</design>
|
| 78 |
+
</harpreetslider>
|
| 79 |
+
</default>
|
| 80 |
+
</config>
|
app/code/community/Harpreet/Slider/etc/system.xml
ADDED
|
@@ -0,0 +1,695 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|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
| 4 |
+
<harpreet translate="label" module="customer">
|
| 5 |
+
<label>HSLIDER</label>
|
| 6 |
+
<sort_order>1</sort_order>
|
| 7 |
+
</harpreet>
|
| 8 |
+
</tabs>
|
| 9 |
+
<sections>
|
| 10 |
+
<harpreetslider translate="label">
|
| 11 |
+
<label>Harpreet Slider</label>
|
| 12 |
+
<tab>harpreet</tab>
|
| 13 |
+
<frontend_type>text</frontend_type>
|
| 14 |
+
<sort_order>1</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 |
+
|
| 19 |
+
<groups>
|
| 20 |
+
<readme translate="label">
|
| 21 |
+
<label>Information about Harpreet Slider</label>
|
| 22 |
+
<frontend_type>text</frontend_type>
|
| 23 |
+
<sort_order>1</sort_order>
|
| 24 |
+
<show_in_default>1</show_in_default>
|
| 25 |
+
<show_in_website>1</show_in_website>
|
| 26 |
+
<show_in_store>1</show_in_store>
|
| 27 |
+
|
| 28 |
+
<fields>
|
| 29 |
+
<information>
|
| 30 |
+
<label>The Code</label>
|
| 31 |
+
<comment>
|
| 32 |
+
<![CDATA[Past the following Block into any page<br />(Homepage example)<br /><strong>{{block type="harpreet_slider/slider" name="harpreetslider" alias="harpreetslider" template="harpreet/slider/slider.phtml"}}</strong>]]>
|
| 33 |
+
</comment>
|
| 34 |
+
<frontend_type>label</frontend_type>
|
| 35 |
+
<sort_order>1</sort_order>
|
| 36 |
+
<show_in_default>1</show_in_default>
|
| 37 |
+
<show_in_website>1</show_in_website>
|
| 38 |
+
<show_in_store>1</show_in_store>
|
| 39 |
+
</information>
|
| 40 |
+
</fields>
|
| 41 |
+
</readme>
|
| 42 |
+
<slideritem1 translate="label">
|
| 43 |
+
<label>Slider Item #1</label>
|
| 44 |
+
<frontend_type>text</frontend_type>
|
| 45 |
+
<sort_order>1</sort_order>
|
| 46 |
+
<show_in_default>1</show_in_default>
|
| 47 |
+
<show_in_website>1</show_in_website>
|
| 48 |
+
<show_in_store>1</show_in_store>
|
| 49 |
+
|
| 50 |
+
<fields>
|
| 51 |
+
<image translate="label comment">
|
| 52 |
+
<label>Image</label>
|
| 53 |
+
<comment>
|
| 54 |
+
<![CDATA[Upload an image from your computer]]>
|
| 55 |
+
</comment>
|
| 56 |
+
<frontend_type>image</frontend_type>
|
| 57 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
| 58 |
+
<upload_dir config="system/filesystem/media" scope_info="1">harpreet/slider</upload_dir>
|
| 59 |
+
<base_url type="media" scope_info="1">harpreet/slider</base_url>
|
| 60 |
+
<sort_order>1</sort_order>
|
| 61 |
+
<show_in_default>1</show_in_default>
|
| 62 |
+
<show_in_website>1</show_in_website>
|
| 63 |
+
<show_in_store>1</show_in_store>
|
| 64 |
+
</image>
|
| 65 |
+
|
| 66 |
+
<link translate="label comment">
|
| 67 |
+
<label>Link</label>
|
| 68 |
+
<comment>
|
| 69 |
+
<![CDATA[Link on the Image]]>
|
| 70 |
+
</comment>
|
| 71 |
+
<frontend_type>text</frontend_type>
|
| 72 |
+
<sort_order>2</sort_order>
|
| 73 |
+
<show_in_default>1</show_in_default>
|
| 74 |
+
<show_in_website>1</show_in_website>
|
| 75 |
+
<show_in_store>1</show_in_store>
|
| 76 |
+
</link>
|
| 77 |
+
|
| 78 |
+
<title translate="label comment">
|
| 79 |
+
<label>Text</label>
|
| 80 |
+
<comment>
|
| 81 |
+
<![CDATA[Text on the Image - HTML allowed]]>
|
| 82 |
+
</comment>
|
| 83 |
+
<frontend_type>textarea</frontend_type>
|
| 84 |
+
<sort_order>3</sort_order>
|
| 85 |
+
<show_in_default>1</show_in_default>
|
| 86 |
+
<show_in_website>1</show_in_website>
|
| 87 |
+
<show_in_store>1</show_in_store>
|
| 88 |
+
</title>
|
| 89 |
+
</fields>
|
| 90 |
+
</slideritem1>
|
| 91 |
+
|
| 92 |
+
<slideritem2 translate="label">
|
| 93 |
+
<label>Slider Item #2</label>
|
| 94 |
+
<frontend_type>text</frontend_type>
|
| 95 |
+
<sort_order>2</sort_order>
|
| 96 |
+
<show_in_default>1</show_in_default>
|
| 97 |
+
<show_in_website>1</show_in_website>
|
| 98 |
+
<show_in_store>1</show_in_store>
|
| 99 |
+
|
| 100 |
+
<fields>
|
| 101 |
+
<image translate="label comment">
|
| 102 |
+
<label>Image</label>
|
| 103 |
+
<comment>
|
| 104 |
+
<![CDATA[Upload an image from your computer]]>
|
| 105 |
+
</comment>
|
| 106 |
+
<frontend_type>image</frontend_type>
|
| 107 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
| 108 |
+
<upload_dir config="system/filesystem/media" scope_info="1">harpreet/slider</upload_dir>
|
| 109 |
+
<base_url type="media" scope_info="1">harpreet/slider</base_url>
|
| 110 |
+
<sort_order>1</sort_order>
|
| 111 |
+
<show_in_default>1</show_in_default>
|
| 112 |
+
<show_in_website>1</show_in_website>
|
| 113 |
+
<show_in_store>1</show_in_store>
|
| 114 |
+
</image>
|
| 115 |
+
|
| 116 |
+
<link translate="label comment">
|
| 117 |
+
<label>Link</label>
|
| 118 |
+
<comment>
|
| 119 |
+
<![CDATA[Link on the Image]]>
|
| 120 |
+
</comment>
|
| 121 |
+
<frontend_type>text</frontend_type>
|
| 122 |
+
<sort_order>2</sort_order>
|
| 123 |
+
<show_in_default>1</show_in_default>
|
| 124 |
+
<show_in_website>1</show_in_website>
|
| 125 |
+
<show_in_store>1</show_in_store>
|
| 126 |
+
</link>
|
| 127 |
+
|
| 128 |
+
<title translate="label comment">
|
| 129 |
+
<label>Text</label>
|
| 130 |
+
<comment>
|
| 131 |
+
<![CDATA[Text on the Image - HTML allowed]]>
|
| 132 |
+
</comment>
|
| 133 |
+
<frontend_type>textarea</frontend_type>
|
| 134 |
+
<sort_order>3</sort_order>
|
| 135 |
+
<show_in_default>1</show_in_default>
|
| 136 |
+
<show_in_website>1</show_in_website>
|
| 137 |
+
<show_in_store>1</show_in_store>
|
| 138 |
+
</title>
|
| 139 |
+
</fields>
|
| 140 |
+
</slideritem2>
|
| 141 |
+
|
| 142 |
+
<slideritem3 translate="label">
|
| 143 |
+
<label>Slider Item #3</label>
|
| 144 |
+
<frontend_type>text</frontend_type>
|
| 145 |
+
<sort_order>3</sort_order>
|
| 146 |
+
<show_in_default>1</show_in_default>
|
| 147 |
+
<show_in_website>1</show_in_website>
|
| 148 |
+
<show_in_store>1</show_in_store>
|
| 149 |
+
|
| 150 |
+
<fields>
|
| 151 |
+
<image translate="label comment">
|
| 152 |
+
<label>Image</label>
|
| 153 |
+
<comment>
|
| 154 |
+
<![CDATA[Upload an image from your computer]]>
|
| 155 |
+
</comment>
|
| 156 |
+
<frontend_type>image</frontend_type>
|
| 157 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
| 158 |
+
<upload_dir config="system/filesystem/media" scope_info="1">harpreet/slider</upload_dir>
|
| 159 |
+
<base_url type="media" scope_info="1">harpreet/slider</base_url>
|
| 160 |
+
<sort_order>1</sort_order>
|
| 161 |
+
<show_in_default>1</show_in_default>
|
| 162 |
+
<show_in_website>1</show_in_website>
|
| 163 |
+
<show_in_store>1</show_in_store>
|
| 164 |
+
</image>
|
| 165 |
+
|
| 166 |
+
<link translate="label comment">
|
| 167 |
+
<label>Link</label>
|
| 168 |
+
<comment>
|
| 169 |
+
<![CDATA[Link on the Image]]>
|
| 170 |
+
</comment>
|
| 171 |
+
<frontend_type>text</frontend_type>
|
| 172 |
+
<sort_order>2</sort_order>
|
| 173 |
+
<show_in_default>1</show_in_default>
|
| 174 |
+
<show_in_website>1</show_in_website>
|
| 175 |
+
<show_in_store>1</show_in_store>
|
| 176 |
+
</link>
|
| 177 |
+
|
| 178 |
+
<title translate="label comment">
|
| 179 |
+
<label>Text</label>
|
| 180 |
+
<comment>
|
| 181 |
+
<![CDATA[Text on the Image - HTML allowed]]>
|
| 182 |
+
</comment>
|
| 183 |
+
<frontend_type>textarea</frontend_type>
|
| 184 |
+
<sort_order>3</sort_order>
|
| 185 |
+
<show_in_default>1</show_in_default>
|
| 186 |
+
<show_in_website>1</show_in_website>
|
| 187 |
+
<show_in_store>1</show_in_store>
|
| 188 |
+
</title>
|
| 189 |
+
</fields>
|
| 190 |
+
</slideritem3>
|
| 191 |
+
|
| 192 |
+
<slideritem4 translate="label">
|
| 193 |
+
<label>Slider Item #4</label>
|
| 194 |
+
<frontend_type>text</frontend_type>
|
| 195 |
+
<sort_order>4</sort_order>
|
| 196 |
+
<show_in_default>1</show_in_default>
|
| 197 |
+
<show_in_website>1</show_in_website>
|
| 198 |
+
<show_in_store>1</show_in_store>
|
| 199 |
+
|
| 200 |
+
<fields>
|
| 201 |
+
<image translate="label comment">
|
| 202 |
+
<label>Image</label>
|
| 203 |
+
<comment>
|
| 204 |
+
<![CDATA[Upload an image from your computer]]>
|
| 205 |
+
</comment>
|
| 206 |
+
<frontend_type>image</frontend_type>
|
| 207 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
| 208 |
+
<upload_dir config="system/filesystem/media" scope_info="1">harpreet/slider</upload_dir>
|
| 209 |
+
<base_url type="media" scope_info="1">harpreet/slider</base_url>
|
| 210 |
+
<sort_order>1</sort_order>
|
| 211 |
+
<show_in_default>1</show_in_default>
|
| 212 |
+
<show_in_website>1</show_in_website>
|
| 213 |
+
<show_in_store>1</show_in_store>
|
| 214 |
+
</image>
|
| 215 |
+
|
| 216 |
+
<link translate="label comment">
|
| 217 |
+
<label>Link</label>
|
| 218 |
+
<comment>
|
| 219 |
+
<![CDATA[Link on the Image]]>
|
| 220 |
+
</comment>
|
| 221 |
+
<frontend_type>text</frontend_type>
|
| 222 |
+
<sort_order>2</sort_order>
|
| 223 |
+
<show_in_default>1</show_in_default>
|
| 224 |
+
<show_in_website>1</show_in_website>
|
| 225 |
+
<show_in_store>1</show_in_store>
|
| 226 |
+
</link>
|
| 227 |
+
|
| 228 |
+
<title translate="label comment">
|
| 229 |
+
<label>Text</label>
|
| 230 |
+
<comment>
|
| 231 |
+
<![CDATA[Text on the Image - HTML allowed]]>
|
| 232 |
+
</comment>
|
| 233 |
+
<frontend_type>textarea</frontend_type>
|
| 234 |
+
<sort_order>3</sort_order>
|
| 235 |
+
<show_in_default>1</show_in_default>
|
| 236 |
+
<show_in_website>1</show_in_website>
|
| 237 |
+
<show_in_store>1</show_in_store>
|
| 238 |
+
</title>
|
| 239 |
+
</fields>
|
| 240 |
+
</slideritem4>
|
| 241 |
+
|
| 242 |
+
<slideritem5 translate="label">
|
| 243 |
+
<label>Slider Item #5</label>
|
| 244 |
+
<frontend_type>text</frontend_type>
|
| 245 |
+
<sort_order>5</sort_order>
|
| 246 |
+
<show_in_default>1</show_in_default>
|
| 247 |
+
<show_in_website>1</show_in_website>
|
| 248 |
+
<show_in_store>1</show_in_store>
|
| 249 |
+
|
| 250 |
+
<fields>
|
| 251 |
+
<image translate="label comment">
|
| 252 |
+
<label>Image</label>
|
| 253 |
+
<comment>
|
| 254 |
+
<![CDATA[Upload an image from your computer]]>
|
| 255 |
+
</comment>
|
| 256 |
+
<frontend_type>image</frontend_type>
|
| 257 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
| 258 |
+
<upload_dir config="system/filesystem/media" scope_info="1">harpreet/slider</upload_dir>
|
| 259 |
+
<base_url type="media" scope_info="1">harpreet/slider</base_url>
|
| 260 |
+
<sort_order>1</sort_order>
|
| 261 |
+
<show_in_default>1</show_in_default>
|
| 262 |
+
<show_in_website>1</show_in_website>
|
| 263 |
+
<show_in_store>1</show_in_store>
|
| 264 |
+
</image>
|
| 265 |
+
|
| 266 |
+
<link translate="label comment">
|
| 267 |
+
<label>Link</label>
|
| 268 |
+
<comment>
|
| 269 |
+
<![CDATA[Link on the Image]]>
|
| 270 |
+
</comment>
|
| 271 |
+
<frontend_type>text</frontend_type>
|
| 272 |
+
<sort_order>2</sort_order>
|
| 273 |
+
<show_in_default>1</show_in_default>
|
| 274 |
+
<show_in_website>1</show_in_website>
|
| 275 |
+
<show_in_store>1</show_in_store>
|
| 276 |
+
</link>
|
| 277 |
+
|
| 278 |
+
<title translate="label comment">
|
| 279 |
+
<label>Text</label>
|
| 280 |
+
<comment>
|
| 281 |
+
<![CDATA[Text on the Image - HTML allowed]]>
|
| 282 |
+
</comment>
|
| 283 |
+
<frontend_type>textarea</frontend_type>
|
| 284 |
+
<sort_order>3</sort_order>
|
| 285 |
+
<show_in_default>1</show_in_default>
|
| 286 |
+
<show_in_website>1</show_in_website>
|
| 287 |
+
<show_in_store>1</show_in_store>
|
| 288 |
+
</title>
|
| 289 |
+
</fields>
|
| 290 |
+
</slideritem5>
|
| 291 |
+
|
| 292 |
+
<slideritem6 translate="label">
|
| 293 |
+
<label>Slider Item #6</label>
|
| 294 |
+
<frontend_type>text</frontend_type>
|
| 295 |
+
<sort_order>6</sort_order>
|
| 296 |
+
<show_in_default>1</show_in_default>
|
| 297 |
+
<show_in_website>1</show_in_website>
|
| 298 |
+
<show_in_store>1</show_in_store>
|
| 299 |
+
|
| 300 |
+
<fields>
|
| 301 |
+
<image translate="label comment">
|
| 302 |
+
<label>Image</label>
|
| 303 |
+
<comment>
|
| 304 |
+
<![CDATA[Upload an image from your computer]]>
|
| 305 |
+
</comment>
|
| 306 |
+
<frontend_type>image</frontend_type>
|
| 307 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
| 308 |
+
<upload_dir config="system/filesystem/media" scope_info="1">harpreet/slider</upload_dir>
|
| 309 |
+
<base_url type="media" scope_info="1">harpreet/slider</base_url>
|
| 310 |
+
<sort_order>1</sort_order>
|
| 311 |
+
<show_in_default>1</show_in_default>
|
| 312 |
+
<show_in_website>1</show_in_website>
|
| 313 |
+
<show_in_store>1</show_in_store>
|
| 314 |
+
</image>
|
| 315 |
+
|
| 316 |
+
<link translate="label comment">
|
| 317 |
+
<label>Link</label>
|
| 318 |
+
<comment>
|
| 319 |
+
<![CDATA[Link on the Image]]>
|
| 320 |
+
</comment>
|
| 321 |
+
<frontend_type>text</frontend_type>
|
| 322 |
+
<sort_order>2</sort_order>
|
| 323 |
+
<show_in_default>1</show_in_default>
|
| 324 |
+
<show_in_website>1</show_in_website>
|
| 325 |
+
<show_in_store>1</show_in_store>
|
| 326 |
+
</link>
|
| 327 |
+
|
| 328 |
+
<title translate="label comment">
|
| 329 |
+
<label>Text</label>
|
| 330 |
+
<comment>
|
| 331 |
+
<![CDATA[Text on the Image - HTML allowed]]>
|
| 332 |
+
</comment>
|
| 333 |
+
<frontend_type>textarea</frontend_type>
|
| 334 |
+
<sort_order>3</sort_order>
|
| 335 |
+
<show_in_default>1</show_in_default>
|
| 336 |
+
<show_in_website>1</show_in_website>
|
| 337 |
+
<show_in_store>1</show_in_store>
|
| 338 |
+
</title>
|
| 339 |
+
</fields>
|
| 340 |
+
</slideritem6>
|
| 341 |
+
|
| 342 |
+
<animations translate="label">
|
| 343 |
+
<label>Animation Settings</label>
|
| 344 |
+
<frontend_type>text</frontend_type>
|
| 345 |
+
<sort_order>8</sort_order>
|
| 346 |
+
<show_in_default>1</show_in_default>
|
| 347 |
+
<show_in_website>1</show_in_website>
|
| 348 |
+
<show_in_store>1</show_in_store>
|
| 349 |
+
|
| 350 |
+
<fields>
|
| 351 |
+
<type translate="label comment">
|
| 352 |
+
<label>Animation Type</label>
|
| 353 |
+
<comment>
|
| 354 |
+
<![CDATA[Type of Animation of the Images]]>
|
| 355 |
+
</comment>
|
| 356 |
+
<frontend_type>select</frontend_type>
|
| 357 |
+
<source_model>harpreet_slider/system_config_source_dropdown_animations</source_model>
|
| 358 |
+
<sort_order>1</sort_order>
|
| 359 |
+
<show_in_default>1</show_in_default>
|
| 360 |
+
<show_in_website>1</show_in_website>
|
| 361 |
+
<show_in_store>1</show_in_store>
|
| 362 |
+
</type>
|
| 363 |
+
<speed translate="label comment">
|
| 364 |
+
<label>Speed</label>
|
| 365 |
+
<comment>
|
| 366 |
+
<![CDATA[Speed of the Animations by seconds]]>
|
| 367 |
+
</comment>
|
| 368 |
+
<frontend_type>select</frontend_type>
|
| 369 |
+
<source_model>harpreet_slider/system_config_source_dropdown_speed</source_model>
|
| 370 |
+
<sort_order>2</sort_order>
|
| 371 |
+
<show_in_default>1</show_in_default>
|
| 372 |
+
<show_in_website>1</show_in_website>
|
| 373 |
+
<show_in_store>1</show_in_store>
|
| 374 |
+
</speed>
|
| 375 |
+
<pausetime translate="label comment">
|
| 376 |
+
<label>Pause Time</label>
|
| 377 |
+
<comment>
|
| 378 |
+
<![CDATA[Time before next Animation by seconds]]>
|
| 379 |
+
</comment>
|
| 380 |
+
<frontend_type>select</frontend_type>
|
| 381 |
+
<source_model>harpreet_slider/system_config_source_dropdown_times</source_model>
|
| 382 |
+
<sort_order>3</sort_order>
|
| 383 |
+
<show_in_default>1</show_in_default>
|
| 384 |
+
<show_in_website>1</show_in_website>
|
| 385 |
+
<show_in_store>1</show_in_store>
|
| 386 |
+
</pausetime>
|
| 387 |
+
<hover>
|
| 388 |
+
<label>Hover Pause</label>
|
| 389 |
+
<comment>
|
| 390 |
+
<![CDATA[Pause the Time on hover]]>
|
| 391 |
+
</comment>
|
| 392 |
+
<frontend_type>select</frontend_type>
|
| 393 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 394 |
+
<sort_order>4</sort_order>
|
| 395 |
+
<show_in_default>1</show_in_default>
|
| 396 |
+
<show_in_website>1</show_in_website>
|
| 397 |
+
<show_in_store>1</show_in_store>
|
| 398 |
+
</hover>
|
| 399 |
+
<slices translate="label comment">
|
| 400 |
+
<label>Slices</label>
|
| 401 |
+
<comment>
|
| 402 |
+
<![CDATA[For Slices Animations]]>
|
| 403 |
+
</comment>
|
| 404 |
+
<frontend_type>select</frontend_type>
|
| 405 |
+
<source_model>harpreet_slider/system_config_source_dropdown_pieces</source_model>
|
| 406 |
+
<sort_order>5</sort_order>
|
| 407 |
+
<show_in_default>1</show_in_default>
|
| 408 |
+
<show_in_website>1</show_in_website>
|
| 409 |
+
<show_in_store>1</show_in_store>
|
| 410 |
+
</slices>
|
| 411 |
+
<boxcols translate="label comment">
|
| 412 |
+
<label>Box Columns</label>
|
| 413 |
+
<comment>
|
| 414 |
+
<![CDATA[For Box Animations]]>
|
| 415 |
+
</comment>
|
| 416 |
+
<frontend_type>select</frontend_type>
|
| 417 |
+
<source_model>harpreet_slider/system_config_source_dropdown_pieces</source_model>
|
| 418 |
+
<sort_order>6</sort_order>
|
| 419 |
+
<show_in_default>1</show_in_default>
|
| 420 |
+
<show_in_website>1</show_in_website>
|
| 421 |
+
<show_in_store>1</show_in_store>
|
| 422 |
+
</boxcols>
|
| 423 |
+
<boxrows translate="label comment">
|
| 424 |
+
<label>Box Rows</label>
|
| 425 |
+
<comment>
|
| 426 |
+
<![CDATA[For Box Animations]]>
|
| 427 |
+
</comment>
|
| 428 |
+
<frontend_type>select</frontend_type>
|
| 429 |
+
<source_model>harpreet_slider/system_config_source_dropdown_pieces</source_model>
|
| 430 |
+
<sort_order>7</sort_order>
|
| 431 |
+
<show_in_default>1</show_in_default>
|
| 432 |
+
<show_in_website>1</show_in_website>
|
| 433 |
+
<show_in_store>1</show_in_store>
|
| 434 |
+
</boxrows>
|
| 435 |
+
</fields>
|
| 436 |
+
</animations>
|
| 437 |
+
|
| 438 |
+
<design translate="label">
|
| 439 |
+
<label>Design Options</label>
|
| 440 |
+
<frontend_type>text</frontend_type>
|
| 441 |
+
<sort_order>9</sort_order>
|
| 442 |
+
<show_in_default>1</show_in_default>
|
| 443 |
+
<show_in_website>1</show_in_website>
|
| 444 |
+
<show_in_store>1</show_in_store>
|
| 445 |
+
|
| 446 |
+
<fields>
|
| 447 |
+
<width translate="label comment">
|
| 448 |
+
<label>Width</label>
|
| 449 |
+
<comment>
|
| 450 |
+
<![CDATA[Width of the Slider by pixels]]>
|
| 451 |
+
</comment>
|
| 452 |
+
<frontend_type>text</frontend_type>
|
| 453 |
+
<sort_order>1</sort_order>
|
| 454 |
+
<show_in_default>1</show_in_default>
|
| 455 |
+
<show_in_website>1</show_in_website>
|
| 456 |
+
<show_in_store>1</show_in_store>
|
| 457 |
+
</width>
|
| 458 |
+
<height translate="label comment">
|
| 459 |
+
<label>height</label>
|
| 460 |
+
<comment>
|
| 461 |
+
<![CDATA[Height of the Slider by pixels]]>
|
| 462 |
+
</comment>
|
| 463 |
+
<frontend_type>text</frontend_type>
|
| 464 |
+
<sort_order>2</sort_order>
|
| 465 |
+
<show_in_default>1</show_in_default>
|
| 466 |
+
<show_in_website>1</show_in_website>
|
| 467 |
+
<show_in_store>1</show_in_store>
|
| 468 |
+
</height>
|
| 469 |
+
<texten translate="label comment">
|
| 470 |
+
<label>Enable Text</label>
|
| 471 |
+
<comment>
|
| 472 |
+
<![CDATA[Enable texts with background on the slider]]>
|
| 473 |
+
</comment>
|
| 474 |
+
<frontend_type>select</frontend_type>
|
| 475 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 476 |
+
<sort_order>3</sort_order>
|
| 477 |
+
<show_in_default>1</show_in_default>
|
| 478 |
+
<show_in_website>1</show_in_website>
|
| 479 |
+
<show_in_store>1</show_in_store>
|
| 480 |
+
</texten>
|
| 481 |
+
<textsize>
|
| 482 |
+
<label>Font size</label>
|
| 483 |
+
<comment>
|
| 484 |
+
<![CDATA[Font size of the text on the Slider by pixels]]>
|
| 485 |
+
</comment>
|
| 486 |
+
<frontend_type>text</frontend_type>
|
| 487 |
+
<sort_order>4</sort_order>
|
| 488 |
+
<show_in_default>1</show_in_default>
|
| 489 |
+
<show_in_website>1</show_in_website>
|
| 490 |
+
<show_in_store>1</show_in_store>
|
| 491 |
+
</textsize>
|
| 492 |
+
<textpos translate="label comment">
|
| 493 |
+
<label>Text Position</label>
|
| 494 |
+
<comment>
|
| 495 |
+
<![CDATA[Position of Text on the Slider]]>
|
| 496 |
+
</comment>
|
| 497 |
+
<frontend_type>select</frontend_type>
|
| 498 |
+
<source_model>harpreet_slider/system_config_source_dropdown_Position</source_model>
|
| 499 |
+
<sort_order>5</sort_order>
|
| 500 |
+
<show_in_default>1</show_in_default>
|
| 501 |
+
<show_in_website>1</show_in_website>
|
| 502 |
+
<show_in_store>1</show_in_store>
|
| 503 |
+
</textpos>
|
| 504 |
+
<textscolor translate="label comment">
|
| 505 |
+
<label>Text Color</label>
|
| 506 |
+
<comment>
|
| 507 |
+
<![CDATA[Color of Text on Slider]]>
|
| 508 |
+
</comment>
|
| 509 |
+
<frontend_type>text</frontend_type>
|
| 510 |
+
<sort_order>6</sort_order>
|
| 511 |
+
<show_in_default>1</show_in_default>
|
| 512 |
+
<show_in_website>1</show_in_website>
|
| 513 |
+
<show_in_store>1</show_in_store>
|
| 514 |
+
</textscolor>
|
| 515 |
+
<bgscolor translate="label comment">
|
| 516 |
+
<label>Background Color</label>
|
| 517 |
+
<comment>
|
| 518 |
+
<![CDATA[Background Color of Text on Slider]]>
|
| 519 |
+
</comment>
|
| 520 |
+
<frontend_type>text</frontend_type>
|
| 521 |
+
<sort_order>7</sort_order>
|
| 522 |
+
<show_in_default>1</show_in_default>
|
| 523 |
+
<show_in_website>1</show_in_website>
|
| 524 |
+
<show_in_store>1</show_in_store>
|
| 525 |
+
</bgscolor>
|
| 526 |
+
<textopacity>
|
| 527 |
+
<label>Text Opacity</label>
|
| 528 |
+
<comment>
|
| 529 |
+
<![CDATA[Opacity of the Text and Background on Slider. Value should be between 0.1 and 10]]>
|
| 530 |
+
</comment>
|
| 531 |
+
<frontend_type>text</frontend_type>
|
| 532 |
+
<sort_order>8</sort_order>
|
| 533 |
+
<show_in_default>1</show_in_default>
|
| 534 |
+
<show_in_website>1</show_in_website>
|
| 535 |
+
<show_in_store>1</show_in_store>
|
| 536 |
+
</textopacity>
|
| 537 |
+
<buttonen translate="label comment">
|
| 538 |
+
<label>Enable Buttons</label>
|
| 539 |
+
<comment>
|
| 540 |
+
<![CDATA[Enable Navigation Buttons on the Slider]]>
|
| 541 |
+
</comment>
|
| 542 |
+
<frontend_type>select</frontend_type>
|
| 543 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 544 |
+
<sort_order>9</sort_order>
|
| 545 |
+
<show_in_default>1</show_in_default>
|
| 546 |
+
<show_in_website>1</show_in_website>
|
| 547 |
+
<show_in_store>1</show_in_store>
|
| 548 |
+
</buttonen>
|
| 549 |
+
<buttonscolor translate="label comment">
|
| 550 |
+
<label>Navigate Button Color (to)</label>
|
| 551 |
+
<comment>
|
| 552 |
+
<![CDATA[Gradien Color of the Navigate Buttons on Slider]]>
|
| 553 |
+
</comment>
|
| 554 |
+
<frontend_type>text</frontend_type>
|
| 555 |
+
<sort_order>10</sort_order>
|
| 556 |
+
<show_in_default>1</show_in_default>
|
| 557 |
+
<show_in_website>1</show_in_website>
|
| 558 |
+
<show_in_store>1</show_in_store>
|
| 559 |
+
</buttonscolor>
|
| 560 |
+
<buttonscolorup translate="label comment">
|
| 561 |
+
<label>Navigate Button Color (from)</label>
|
| 562 |
+
<comment>
|
| 563 |
+
<![CDATA[Gradien Color of the Navigate Buttons on Slider]]>
|
| 564 |
+
</comment>
|
| 565 |
+
<frontend_type>text</frontend_type>
|
| 566 |
+
<sort_order>10</sort_order>
|
| 567 |
+
<show_in_default>1</show_in_default>
|
| 568 |
+
<show_in_website>1</show_in_website>
|
| 569 |
+
<show_in_store>1</show_in_store>
|
| 570 |
+
</buttonscolorup>
|
| 571 |
+
<buttonpos translate="label comment">
|
| 572 |
+
<label>Button Position</label>
|
| 573 |
+
<comment>
|
| 574 |
+
<![CDATA[Position of Navigate Buttons on the Slider]]>
|
| 575 |
+
</comment>
|
| 576 |
+
<frontend_type>select</frontend_type>
|
| 577 |
+
<source_model>harpreet_slider/system_config_source_dropdown_Position</source_model>
|
| 578 |
+
<sort_order>11</sort_order>
|
| 579 |
+
<show_in_default>1</show_in_default>
|
| 580 |
+
<show_in_website>1</show_in_website>
|
| 581 |
+
<show_in_store>1</show_in_store>
|
| 582 |
+
</buttonpos>
|
| 583 |
+
<nextpreven translate="label comment">
|
| 584 |
+
<label>Enable Next-Prev Buttons</label>
|
| 585 |
+
<comment>
|
| 586 |
+
<![CDATA[Enable Next-Prev Buttons on the Slider]]>
|
| 587 |
+
</comment>
|
| 588 |
+
<frontend_type>select</frontend_type>
|
| 589 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 590 |
+
<sort_order>12</sort_order>
|
| 591 |
+
<show_in_default>1</show_in_default>
|
| 592 |
+
<show_in_website>1</show_in_website>
|
| 593 |
+
<show_in_store>1</show_in_store>
|
| 594 |
+
</nextpreven>
|
| 595 |
+
<nextimage translate="label comment">
|
| 596 |
+
<label>Next Button</label>
|
| 597 |
+
<comment>
|
| 598 |
+
<![CDATA[Upload an image (32x52 pixels) for use custom Next-Prev buttons or not and use Harpreet's default image]]>
|
| 599 |
+
</comment>
|
| 600 |
+
<frontend_type>image</frontend_type>
|
| 601 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
| 602 |
+
<upload_dir config="system/filesystem/media" scope_info="1">harpreet/slider/nextprev</upload_dir>
|
| 603 |
+
<base_url type="media" scope_info="1">harpreet/slider/nextprev</base_url>
|
| 604 |
+
<sort_order>13</sort_order>
|
| 605 |
+
<show_in_default>1</show_in_default>
|
| 606 |
+
<show_in_website>1</show_in_website>
|
| 607 |
+
<show_in_store>1</show_in_store>
|
| 608 |
+
</nextimage>
|
| 609 |
+
<previmage translate="label comment">
|
| 610 |
+
<label>Prev Button</label>
|
| 611 |
+
<comment>
|
| 612 |
+
<![CDATA[Upload an image (32x52 pixels) for use custom Next-Prev buttons or not and use Harpreet's default image]]>
|
| 613 |
+
</comment>
|
| 614 |
+
<frontend_type>image</frontend_type>
|
| 615 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
| 616 |
+
<upload_dir config="system/filesystem/media" scope_info="1">harpreet/slider/nextprev</upload_dir>
|
| 617 |
+
<base_url type="media" scope_info="1">harpreet/slider/nextprev</base_url>
|
| 618 |
+
<sort_order>14</sort_order>
|
| 619 |
+
<show_in_default>1</show_in_default>
|
| 620 |
+
<show_in_website>1</show_in_website>
|
| 621 |
+
<show_in_store>1</show_in_store>
|
| 622 |
+
</previmage>
|
| 623 |
+
</fields>
|
| 624 |
+
</design>
|
| 625 |
+
|
| 626 |
+
<events translate="label">
|
| 627 |
+
<label>Advanced Developer (Hooking events)</label>
|
| 628 |
+
<frontend_type>text</frontend_type>
|
| 629 |
+
<sort_order>99</sort_order>
|
| 630 |
+
<show_in_default>1</show_in_default>
|
| 631 |
+
<show_in_website>1</show_in_website>
|
| 632 |
+
<show_in_store>1</show_in_store>
|
| 633 |
+
|
| 634 |
+
<fields>
|
| 635 |
+
<beforechange>
|
| 636 |
+
<label>Before Change</label>
|
| 637 |
+
<comment>
|
| 638 |
+
<![CDATA[jQuery script in 'Before Change' event - Triggers before a slide transition]]>
|
| 639 |
+
</comment>
|
| 640 |
+
<frontend_type>textarea</frontend_type>
|
| 641 |
+
<sort_order>1</sort_order>
|
| 642 |
+
<show_in_default>1</show_in_default>
|
| 643 |
+
<show_in_website>1</show_in_website>
|
| 644 |
+
<show_in_store>1</show_in_store>
|
| 645 |
+
</beforechange>
|
| 646 |
+
<afterchange>
|
| 647 |
+
<label>After Change</label>
|
| 648 |
+
<comment>
|
| 649 |
+
<![CDATA[jQuery script in 'After Change' event - Triggers after a slide transition]]>
|
| 650 |
+
</comment>
|
| 651 |
+
<frontend_type>textarea</frontend_type>
|
| 652 |
+
<sort_order>2</sort_order>
|
| 653 |
+
<show_in_default>1</show_in_default>
|
| 654 |
+
<show_in_website>1</show_in_website>
|
| 655 |
+
<show_in_store>1</show_in_store>
|
| 656 |
+
</afterchange>
|
| 657 |
+
<slideshowEnd>
|
| 658 |
+
<label>Slide Show End</label>
|
| 659 |
+
<comment>
|
| 660 |
+
<![CDATA[jQuery script in 'Slide Show End' event - Triggers after all slides have been shown]]>
|
| 661 |
+
</comment>
|
| 662 |
+
<frontend_type>textarea</frontend_type>
|
| 663 |
+
<sort_order>2</sort_order>
|
| 664 |
+
<show_in_default>1</show_in_default>
|
| 665 |
+
<show_in_website>1</show_in_website>
|
| 666 |
+
<show_in_store>1</show_in_store>
|
| 667 |
+
</slideshowEnd>
|
| 668 |
+
<lastSlide>
|
| 669 |
+
<label>Last Slide</label>
|
| 670 |
+
<comment>
|
| 671 |
+
<![CDATA[jQuery script in 'Last Slide' event - Triggers when last slide is shown]]>
|
| 672 |
+
</comment>
|
| 673 |
+
<frontend_type>textarea</frontend_type>
|
| 674 |
+
<sort_order>3</sort_order>
|
| 675 |
+
<show_in_default>1</show_in_default>
|
| 676 |
+
<show_in_website>1</show_in_website>
|
| 677 |
+
<show_in_store>1</show_in_store>
|
| 678 |
+
</lastSlide>
|
| 679 |
+
<afterLoad>
|
| 680 |
+
<label>After Load</label>
|
| 681 |
+
<comment>
|
| 682 |
+
<![CDATA[jQuery script in 'After Load' event - Triggers when slider has loaded]]>
|
| 683 |
+
</comment>
|
| 684 |
+
<frontend_type>textarea</frontend_type>
|
| 685 |
+
<sort_order>4</sort_order>
|
| 686 |
+
<show_in_default>1</show_in_default>
|
| 687 |
+
<show_in_website>1</show_in_website>
|
| 688 |
+
<show_in_store>1</show_in_store>
|
| 689 |
+
</afterLoad>
|
| 690 |
+
</fields>
|
| 691 |
+
</events>
|
| 692 |
+
</groups>
|
| 693 |
+
</harpreetslider>
|
| 694 |
+
</sections>
|
| 695 |
+
</config>
|
app/design/adminhtml/default/default/layout/harpreet_slider_admin.xml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
|
| 3 |
+
<layout version="0.1.0">
|
| 4 |
+
<default>
|
| 5 |
+
<reference name="head">
|
| 6 |
+
<!-- delete the following one line if you have integrated jquery on admin area by another module -->
|
| 7 |
+
<action method="addJs"><script>harpreet/jquery-1-7-1.js</script></action>
|
| 8 |
+
|
| 9 |
+
<action method="addItem"><type>skin_css</type><name>harpreet/colorpicker/css/colorpicker.css</name></action>
|
| 10 |
+
<action method="addItem"><type>skin_css</type><name>harpreet/colorpicker/css/layout.css</name></action>
|
| 11 |
+
|
| 12 |
+
<action method="addItem"><type>skin_js</type><name>harpreet/colorpicker/js/colorpicker.js</name></action>
|
| 13 |
+
<action method="addItem"><type>skin_js</type><name>harpreet/colorpicker/js/eye.js</name></action>
|
| 14 |
+
<action method="addItem"><type>skin_js</type><name>harpreet/colorpicker/js/utils.js</name></action>
|
| 15 |
+
<action method="addItem"><type>skin_js</type><name>harpreet/colorpicker/js/layout.js</name></action>
|
| 16 |
+
|
| 17 |
+
<action method="addItem"><type>skin_js</type><name>harpreet/colorpicker/start.js</name></action>
|
| 18 |
+
</reference>
|
| 19 |
+
</default>
|
| 20 |
+
</layout>
|
app/design/frontend/base/default/layout/harpreet_slider.xml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
|
| 3 |
+
<layout version="0.1.0">
|
| 4 |
+
<default>
|
| 5 |
+
<reference name="head">
|
| 6 |
+
<action method="addItem"><type>skin_css</type><name>css/harpreet/slider/slider.css</name></action>
|
| 7 |
+
<!-- delete the following one line if you have integrated jquery on frontend area by another module -->
|
| 8 |
+
<action method="addJs"><script>harpreet/jquery-1-7-1.js</script></action>
|
| 9 |
+
<action method="addItem"><type>skin_js</type><name>js/harpreet/slider/slider.js</name></action>
|
| 10 |
+
</reference>
|
| 11 |
+
<reference name="content">
|
| 12 |
+
<!--<block type="harpreet_slider/slider" name="harpreetslider" as="harpreetslider">
|
| 13 |
+
<action method="setTemplate">
|
| 14 |
+
<template>harpreet/slider/slider.phtml</template>
|
| 15 |
+
</action>
|
| 16 |
+
</block>-->
|
| 17 |
+
</reference>
|
| 18 |
+
</default>
|
| 19 |
+
</layout>
|
app/design/frontend/base/default/template/harpreet/slider/slider.phtml
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
|
| 2 |
+
<?php $harpreet = $this->helper('harpreet_slider/config'); ?>
|
| 3 |
+
<?php $design = $harpreet->getDesign(); ?>
|
| 4 |
+
<?php $animation = $harpreet->getAnimation(); ?>
|
| 5 |
+
<?php $event = $harpreet->getEvent(); ?>
|
| 6 |
+
|
| 7 |
+
<div class="harpreet-slider-block">
|
| 8 |
+
<div class="slider-wrapper" style="<?php echo $design['width'] . $design['height'] ?>px;">
|
| 9 |
+
<div id="slider" class="nivoSlider" style="<?php echo $design['height'] ?>" >
|
| 10 |
+
<?php $_counter = 0 ?>
|
| 11 |
+
<?php foreach ($harpreet->getSliders() as $_slider) : ?>
|
| 12 |
+
<a href="<?php echo $_slider['link'] ?>">
|
| 13 |
+
<img src="<?php echo $_slider['image'] ?>" <?php if ($design['texten'] == 1) : ?>title="#harpreet-elem<?php echo $_counter ?>"<?php endif; ?> />
|
| 14 |
+
</a>
|
| 15 |
+
<?php $_counter++ ?>
|
| 16 |
+
<?php endforeach; ?>
|
| 17 |
+
</div>
|
| 18 |
+
</div>
|
| 19 |
+
|
| 20 |
+
<?php $_counter = 0 ?>
|
| 21 |
+
<?php foreach ($harpreet->getSliders() as $_slider) : ?>
|
| 22 |
+
<div id="harpreet-elem<?php echo $_counter ?>" class="nivo-html-caption">
|
| 23 |
+
<?php echo $_slider['title'] ?>
|
| 24 |
+
</div>
|
| 25 |
+
<?php $_counter++ ?>
|
| 26 |
+
<?php endforeach; ?>
|
| 27 |
+
</div>
|
| 28 |
+
|
| 29 |
+
<style>
|
| 30 |
+
.nivo-caption, .nivo-caption *{
|
| 31 |
+
<?php echo $design['textscolor']; ?>
|
| 32 |
+
}
|
| 33 |
+
.nivo-caption{
|
| 34 |
+
<?php echo $design['bgscolor']; ?>
|
| 35 |
+
<?php echo $design['textopacity']; ?>
|
| 36 |
+
<?php echo $design['textpos']; ?>
|
| 37 |
+
<?php echo $design['textsize']; ?>
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.nivo-controlNav a{
|
| 41 |
+
<?php echo $design['buttonscolor']; ?>
|
| 42 |
+
}
|
| 43 |
+
.nivo-controlNav a.active, .nivo-controlNav a:hover{
|
| 44 |
+
<?php echo $design['buttonscolorhover']; ?>
|
| 45 |
+
}
|
| 46 |
+
.nivo-controlNav{
|
| 47 |
+
<?php echo $design['buttonpos']; ?>
|
| 48 |
+
}
|
| 49 |
+
.nivo-nextNav{
|
| 50 |
+
<?php echo $design['nextimage']; ?>
|
| 51 |
+
}
|
| 52 |
+
.nivo-prevNav{
|
| 53 |
+
<?php echo $design['previmage']; ?>
|
| 54 |
+
}
|
| 55 |
+
</style>
|
| 56 |
+
|
| 57 |
+
<script type="text/javascript">
|
| 58 |
+
jQuery(document).ready(function() {
|
| 59 |
+
jQuery('#slider').nivoSlider({
|
| 60 |
+
effect: '<?php echo $animation['type'] ?>',
|
| 61 |
+
slices: <?php echo $animation['slices'] ?>,
|
| 62 |
+
boxCols: <?php echo $animation['boxcols'] ?>,
|
| 63 |
+
boxRows: <?php echo $animation['boxrows'] ?>,
|
| 64 |
+
animSpeed: <?php echo $animation['speed'] ?>,
|
| 65 |
+
pauseTime: <?php echo $animation['pausetime'] ?>,
|
| 66 |
+
startSlide: 0,
|
| 67 |
+
directionNav: <?php echo $design['nextpreven'] ?>,
|
| 68 |
+
controlNav: <?php echo $design['buttonen'] ?>,
|
| 69 |
+
controlNavThumbs: false,
|
| 70 |
+
pauseOnHover: <?php echo $animation['hover'] ?>,
|
| 71 |
+
manualAdvance: false,
|
| 72 |
+
prevText: 'Prev',
|
| 73 |
+
nextText: 'Next',
|
| 74 |
+
randomStart: false,
|
| 75 |
+
beforeChange: function(){<?php echo $event['beforechange'] ?>},
|
| 76 |
+
afterChange: function(){<?php echo $event['afterchange'] ?>},
|
| 77 |
+
slideshowEnd: function(){<?php echo $event['slideshowEnd'] ?>},
|
| 78 |
+
lastSlide: function(){<?php echo $event['lastSlide'] ?>},
|
| 79 |
+
afterLoad: function(){<?php echo $event['afterLoad'] ?>}
|
| 80 |
+
});
|
| 81 |
+
});
|
| 82 |
+
</script>
|
app/etc/modules/Harpreet_Slider.xml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Harpreet_Slider>
|
| 5 |
+
<active>true</active>
|
| 6 |
+
<codePool>community</codePool>
|
| 7 |
+
</Harpreet_Slider>
|
| 8 |
+
</modules>
|
| 9 |
+
</config>
|
js/harpreet/jquery-1-7-1.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
/*! jQuery v1.7.1 jquery.com | jquery.org/license */
|
| 2 |
+
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test("Â ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
|
| 3 |
+
f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
|
| 4 |
+
{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);jQuery.noConflict();
|
media/harpreet/slider/default/magento-banner.png
ADDED
|
Binary file
|
media/harpreet/slider/default/merry-christmas-banner-ghita-andersen.jpg
ADDED
|
Binary file
|
media/harpreet/slider/default1.jpg
ADDED
|
Binary file
|
media/harpreet/slider/default2.jpg
ADDED
|
Binary file
|
package.xml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<package>
|
| 3 |
+
<name>hslider</name>
|
| 4 |
+
<version>1.0.2</version>
|
| 5 |
+
<stability>stable</stability>
|
| 6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
+
<channel>community</channel>
|
| 8 |
+
<extends/>
|
| 9 |
+
<summary>Nivo Slider for Magento CE</summary>
|
| 10 |
+
<description>Dynamic image slider with 16 effects. </description>
|
| 11 |
+
<notes>Remove jquery in case already available</notes>
|
| 12 |
+
<authors><author><name>Harpreet Singh</name><user>ahyharpreet</user><email>ahyharpreet@gmail.com</email></author></authors>
|
| 13 |
+
<date>2012-12-26</date>
|
| 14 |
+
<time>13:50:11</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir name="Harpreet"><dir name="Slider"><dir name="Block"><file name="Slider.php" hash="ea2b4e17cf77cbb34e7d0784a4da4d05"/></dir><dir name="Helper"><file name="Config.php" hash="d1cc337e0f436e3fa08015a6391b49d6"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><dir name="Dropdown"><file name="Animations.php" hash="8c94bc42729650c9157f48c8e48228f1"/><file name="Pieces.php" hash="84deee9b47543f24f91c9182e526353c"/><file name="Position.php" hash="1d9c5a9eb2dd73369fe09daefb0ccc0c"/><file name="Speed.php" hash="e9ab06ab7aeddaf598195f945f2c3721"/><file name="Times.php" hash="c5b84216246743c73c43f6db4a45567a"/></dir></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="3e6e7c82601d369db56d44d4978be6fa"/><file name="config.xml" hash="255f30acd73cadaba6edbc0dcd2664ed"/><file name="system.xml" hash="cd67fdc4858d9ebb7f2ccb098d692df3"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Harpreet_Slider.xml" hash="e8b303f51d09d479263bb1a824a5df81"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="harpreet_slider_admin.xml" hash="f7a4b80355d1e8ab7c92970213ab9b6c"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="harpreet_slider.xml" hash="ff2be42ece7fc0c9d4095a92e66bd1ca"/></dir><dir name="template"><dir name="harpreet"><dir name="slider"><file name="slider.phtml" hash="e540992a37d35fa503baa82dc390db4d"/></dir></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="harpreet"><dir name="slider"><dir name="default"><file name="magento-banner.png" hash="61cfcd078fea24c8b69e0434acc39ba1"/><file name="merry-christmas-banner-ghita-andersen.jpg" hash="08db60c79a8a1634eaf3268842f4d1e7"/></dir><file name="default1.jpg" hash="480bbdd4b8214716ed9d49a0f956f3c0"/><file name="default2.jpg" hash="1ee5c66c5c7a9255cd063e3c5164135c"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="harpreet"><dir name="colorpicker"><dir name="css"><file name="colorpicker.css" hash="ff716dc559ef39ab13b109dff1ec3a6d"/><file name="layout.css" hash="79334658e3689b08001a332fa7f1bfe4"/></dir><dir name="images"><file name="Thumbs.db" hash="45dc3eb768213c86b48dc15b55e9897e"/><file name="blank.gif" hash="56398e76be6355ad5999b262208a17c9"/><file name="colorpicker_background.png" hash="a79f1a2a81bfe3ed1c2ca4c41b8e1fbf"/><file name="colorpicker_hex.png" hash="16d6870c36e379c06fb26ebd2e16bf44"/><file name="colorpicker_hsb_b.png" hash="2be4e81b4a5c98674abe6fc60b447e9a"/><file name="colorpicker_hsb_h.png" hash="d47409a203bedc76b26dc60b71a69f6b"/><file name="colorpicker_hsb_s.png" hash="5ff5e43ab6b7b41b6123bfab692a9b19"/><file name="colorpicker_indic.gif" hash="f485d07540a89502e36dc1a55cec05d0"/><file name="colorpicker_overlay.png" hash="c7a33805ffda0d32bd2a9904c8b02750"/><file name="colorpicker_rgb_b.png" hash="2be4e81b4a5c98674abe6fc60b447e9a"/><file name="colorpicker_rgb_g.png" hash="dc17f953a6febbe174e92b54690586c3"/><file name="colorpicker_rgb_r.png" hash="87eeb205d093b713b68a341771f4ee27"/><file name="colorpicker_select.gif" hash="cec464162af0cce10348e7bb7701ef86"/><file name="colorpicker_submit.png" hash="12d1746e6b52e007f1b78d772d9248ba"/><file name="custom_background.png" hash="06c91f7ae1561ccd8f1c79119529600d"/><file name="custom_hex.png" hash="e27aaa92b15d9392d909f8b94e797524"/><file name="custom_hsb_b.png" hash="b45588ca2fe9ba46673862300fcd3083"/><file name="custom_hsb_h.png" hash="4a1afa5636421aae4c44471d2273496d"/><file name="custom_hsb_s.png" hash="83aa97407fb76615a7db5ed721681148"/><file name="custom_indic.gif" hash="04660eb352eb259581a36a0fe8da2d4d"/><file name="custom_rgb_b.png" hash="f6e50cd567bd3059742d45ab224a413b"/><file name="custom_rgb_g.png" hash="b1e286e06692b3640862a3d07f636a80"/><file name="custom_rgb_r.png" hash="8ae4b3ef109ee66ec1022632470ddd0f"/><file name="custom_submit.png" hash="35423f0f2538e507dec193b52f8d0327"/><file name="select.png" hash="7b086953a8c62d2685a65644979d5d04"/><file name="select2.png" hash="c8d194d92dbad98615b2a9140b34ab48"/><file name="slider.png" hash="3a50b8078dea50b9811603a85ecef836"/></dir><dir name="js"><file name="colorpicker.js" hash="87bd30f8c0fd2dbbe7fe89b7fb198227"/><file name="eye.js" hash="50009a4cf7548a9028c506b6ba67eb92"/><file name="jquery.js" hash="e4af2b4805203f1ac490ad67531b848b"/><file name="layout.js" hash="59c7c780e6a1222121cdd2395565bebf"/><file name="utils.js" hash="c783cb08bc50b4cff0a107ec2f147613"/></dir><file name="start.js" hash="cc1dde401d093cf5e10c28797cba2d43"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="harpreet"><dir name="slider"><file name="slider.css" hash="bb3e602292558ad3e3a42c4f629117f4"/></dir></dir></dir><dir name="images"><dir name="harpreet"><dir name="slider"><file name="slider-left.png" hash="521e512a9a3ba998e4194bdb1436f859"/><file name="slider.png" hash="6f1f7dd995b4287fb02fbfb322dd59e0"/></dir></dir></dir><dir name="js"><dir name="harpreet"><dir name="slider"><file name="slider.js" hash="c8f70672ccf6caac3f0faa5e2a294e84"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="harpreet"><file name="jquery-1-7-1.js" hash="2c57990a020cc3a35c4a603413d67a28"/></dir></dir></target></contents>
|
| 16 |
+
<compatible/>
|
| 17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
+
</package>
|
skin/adminhtml/default/default/harpreet/colorpicker/css/colorpicker.css
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
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|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
|
| 2 |
+
.colorpicker {
|
| 3 |
+
width: 356px;
|
| 4 |
+
height: 176px;
|
| 5 |
+
overflow: hidden;
|
| 6 |
+
position: absolute;
|
| 7 |
+
background: url(../images/custom_background.png);
|
| 8 |
+
font-family: Arial, Helvetica, sans-serif;
|
| 9 |
+
display: none;
|
| 10 |
+
}
|
| 11 |
+
.colorpicker_color {
|
| 12 |
+
width: 150px;
|
| 13 |
+
height: 150px;
|
| 14 |
+
left: 14px;
|
| 15 |
+
top: 13px;
|
| 16 |
+
position: absolute;
|
| 17 |
+
background: #f00;
|
| 18 |
+
overflow: hidden;
|
| 19 |
+
cursor: crosshair;
|
| 20 |
+
}
|
| 21 |
+
.colorpicker_color div {
|
| 22 |
+
position: absolute;
|
| 23 |
+
top: 0;
|
| 24 |
+
left: 0;
|
| 25 |
+
width: 150px;
|
| 26 |
+
height: 150px;
|
| 27 |
+
background: url(../images/colorpicker_overlay.png);
|
| 28 |
+
}
|
| 29 |
+
.colorpicker_color div div {
|
| 30 |
+
position: absolute;
|
| 31 |
+
top: 0;
|
| 32 |
+
left: 0;
|
| 33 |
+
width: 11px;
|
| 34 |
+
height: 11px;
|
| 35 |
+
overflow: hidden;
|
| 36 |
+
background: url(../images/colorpicker_select.gif);
|
| 37 |
+
margin: -5px 0 0 -5px;
|
| 38 |
+
}
|
| 39 |
+
.colorpicker_hue {
|
| 40 |
+
position: absolute;
|
| 41 |
+
top: 13px;
|
| 42 |
+
left: 171px;
|
| 43 |
+
width: 35px;
|
| 44 |
+
height: 150px;
|
| 45 |
+
cursor: n-resize;
|
| 46 |
+
}
|
| 47 |
+
.colorpicker_hue div {
|
| 48 |
+
position: absolute;
|
| 49 |
+
width: 35px;
|
| 50 |
+
height: 9px;
|
| 51 |
+
overflow: hidden;
|
| 52 |
+
background: url(../images/custom_indic.gif) left top;
|
| 53 |
+
margin: -4px 0 0 0;
|
| 54 |
+
left: 0px;
|
| 55 |
+
}
|
| 56 |
+
.colorpicker_new_color {
|
| 57 |
+
position: absolute;
|
| 58 |
+
width: 60px;
|
| 59 |
+
height: 30px;
|
| 60 |
+
left: 213px;
|
| 61 |
+
top: 13px;
|
| 62 |
+
background: #f00;
|
| 63 |
+
}
|
| 64 |
+
.colorpicker_current_color {
|
| 65 |
+
position: absolute;
|
| 66 |
+
width: 60px;
|
| 67 |
+
height: 30px;
|
| 68 |
+
left: 283px;
|
| 69 |
+
top: 13px;
|
| 70 |
+
background: #f00;
|
| 71 |
+
}
|
| 72 |
+
.colorpicker input {
|
| 73 |
+
background-color: transparent;
|
| 74 |
+
border: 1px solid transparent;
|
| 75 |
+
position: absolute;
|
| 76 |
+
font-size: 10px;
|
| 77 |
+
font-family: Arial, Helvetica, sans-serif;
|
| 78 |
+
color: #898989;
|
| 79 |
+
top: 4px;
|
| 80 |
+
right: 11px;
|
| 81 |
+
text-align: right;
|
| 82 |
+
margin: 0;
|
| 83 |
+
padding: 0;
|
| 84 |
+
height: 11px;
|
| 85 |
+
}
|
| 86 |
+
.colorpicker_hex {
|
| 87 |
+
position: absolute;
|
| 88 |
+
width: 72px;
|
| 89 |
+
height: 22px;
|
| 90 |
+
background: url(../images/custom_hex.png) top;
|
| 91 |
+
left: 212px;
|
| 92 |
+
top: 142px;
|
| 93 |
+
}
|
| 94 |
+
.colorpicker_hex input {
|
| 95 |
+
right: 6px;
|
| 96 |
+
}
|
| 97 |
+
.colorpicker_field {
|
| 98 |
+
height: 22px;
|
| 99 |
+
width: 62px;
|
| 100 |
+
background-position: top;
|
| 101 |
+
position: absolute;
|
| 102 |
+
}
|
| 103 |
+
.colorpicker_field span {
|
| 104 |
+
position: absolute;
|
| 105 |
+
width: 12px;
|
| 106 |
+
height: 22px;
|
| 107 |
+
overflow: hidden;
|
| 108 |
+
top: 0;
|
| 109 |
+
right: 0;
|
| 110 |
+
cursor: n-resize;
|
| 111 |
+
}
|
| 112 |
+
.colorpicker_rgb_r {
|
| 113 |
+
background-image: url(../images/custom_rgb_r.png);
|
| 114 |
+
top: 52px;
|
| 115 |
+
left: 212px;
|
| 116 |
+
}
|
| 117 |
+
.colorpicker_rgb_g {
|
| 118 |
+
background-image: url(../images/custom_rgb_g.png);
|
| 119 |
+
top: 82px;
|
| 120 |
+
left: 212px;
|
| 121 |
+
}
|
| 122 |
+
.colorpicker_rgb_b {
|
| 123 |
+
background-image: url(../images/custom_rgb_b.png);
|
| 124 |
+
top: 112px;
|
| 125 |
+
left: 212px;
|
| 126 |
+
}
|
| 127 |
+
.colorpicker_hsb_h {
|
| 128 |
+
background-image: url(../images/custom_hsb_h.png);
|
| 129 |
+
top: 52px;
|
| 130 |
+
left: 282px;
|
| 131 |
+
}
|
| 132 |
+
.colorpicker_hsb_s {
|
| 133 |
+
background-image: url(../images/custom_hsb_s.png);
|
| 134 |
+
top: 82px;
|
| 135 |
+
left: 282px;
|
| 136 |
+
}
|
| 137 |
+
.colorpicker_hsb_b {
|
| 138 |
+
background-image: url(../images/custom_hsb_b.png);
|
| 139 |
+
top: 112px;
|
| 140 |
+
left: 282px;
|
| 141 |
+
}
|
| 142 |
+
.colorpicker_submit {
|
| 143 |
+
position: absolute;
|
| 144 |
+
width: 22px;
|
| 145 |
+
height: 22px;
|
| 146 |
+
background: url(../images/custom_submit.png) top;
|
| 147 |
+
left: 322px;
|
| 148 |
+
top: 142px;
|
| 149 |
+
overflow: hidden;
|
| 150 |
+
}
|
| 151 |
+
.colorpicker_focus {
|
| 152 |
+
background-position: center;
|
| 153 |
+
}
|
| 154 |
+
.colorpicker_hex.colorpicker_focus {
|
| 155 |
+
background-position: bottom;
|
| 156 |
+
}
|
| 157 |
+
.colorpicker_submit.colorpicker_focus {
|
| 158 |
+
background-position: bottom;
|
| 159 |
+
}
|
| 160 |
+
.colorpicker_slider {
|
| 161 |
+
background-position: bottom;
|
| 162 |
+
}
|
skin/adminhtml/default/default/harpreet/colorpicker/css/layout.css
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
|
| 2 |
+
#colorSelector {
|
| 3 |
+
position: relative;
|
| 4 |
+
width: 36px;
|
| 5 |
+
height: 36px;
|
| 6 |
+
background: url(../images/select.png);
|
| 7 |
+
}
|
| 8 |
+
#colorSelector div {
|
| 9 |
+
position: absolute;
|
| 10 |
+
top: 3px;
|
| 11 |
+
left: 3px;
|
| 12 |
+
width: 30px;
|
| 13 |
+
height: 30px;
|
| 14 |
+
background: url(../images/select.png) center;
|
| 15 |
+
}
|
| 16 |
+
#colorSelector2 {
|
| 17 |
+
position: absolute;
|
| 18 |
+
top: 0;
|
| 19 |
+
left: 0;
|
| 20 |
+
width: 36px;
|
| 21 |
+
height: 36px;
|
| 22 |
+
background: url(../images/select2.png);
|
| 23 |
+
}
|
| 24 |
+
#colorSelector2 div {
|
| 25 |
+
position: absolute;
|
| 26 |
+
top: 4px;
|
| 27 |
+
left: 4px;
|
| 28 |
+
width: 28px;
|
| 29 |
+
height: 28px;
|
| 30 |
+
background: url(../images/select2.png) center;
|
| 31 |
+
}
|
| 32 |
+
#colorpickerHolder2 {
|
| 33 |
+
top: 32px;
|
| 34 |
+
left: 0;
|
| 35 |
+
width: 356px;
|
| 36 |
+
height: 0;
|
| 37 |
+
overflow: hidden;
|
| 38 |
+
position: absolute;
|
| 39 |
+
}
|
| 40 |
+
#colorpickerHolder2 .colorpicker {
|
| 41 |
+
background-image: url(../images/custom_background.png);
|
| 42 |
+
position: absolute;
|
| 43 |
+
bottom: 0;
|
| 44 |
+
left: 0;
|
| 45 |
+
}
|
| 46 |
+
#colorpickerHolder2 .colorpicker_hue div {
|
| 47 |
+
background-image: url(../images/custom_indic.gif);
|
| 48 |
+
}
|
| 49 |
+
#colorpickerHolder2 .colorpicker_hex {
|
| 50 |
+
background-image: url(../images/custom_hex.png);
|
| 51 |
+
}
|
| 52 |
+
#colorpickerHolder2 .colorpicker_rgb_r {
|
| 53 |
+
background-image: url(../images/custom_rgb_r.png);
|
| 54 |
+
}
|
| 55 |
+
#colorpickerHolder2 .colorpicker_rgb_g {
|
| 56 |
+
background-image: url(../images/custom_rgb_g.png);
|
| 57 |
+
}
|
| 58 |
+
#colorpickerHolder2 .colorpicker_rgb_b {
|
| 59 |
+
background-image: url(../images/custom_rgb_b.png);
|
| 60 |
+
}
|
| 61 |
+
#colorpickerHolder2 .colorpicker_hsb_s {
|
| 62 |
+
background-image: url(../images/custom_hsb_s.png);
|
| 63 |
+
display: none;
|
| 64 |
+
}
|
| 65 |
+
#colorpickerHolder2 .colorpicker_hsb_h {
|
| 66 |
+
background-image: url(../images/custom_hsb_h.png);
|
| 67 |
+
display: none;
|
| 68 |
+
}
|
| 69 |
+
#colorpickerHolder2 .colorpicker_hsb_b {
|
| 70 |
+
background-image: url(../images/custom_hsb_b.png);
|
| 71 |
+
display: none;
|
| 72 |
+
}
|
| 73 |
+
#colorpickerHolder2 .colorpicker_submit {
|
| 74 |
+
background-image: url(../images/custom_submit.png);
|
| 75 |
+
}
|
| 76 |
+
#colorpickerHolder2 .colorpicker input {
|
| 77 |
+
color: #778398;
|
| 78 |
+
}
|
| 79 |
+
#customWidget {
|
| 80 |
+
position: relative;
|
| 81 |
+
height: 36px;
|
| 82 |
+
}
|
skin/adminhtml/default/default/harpreet/colorpicker/images/Thumbs.db
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/blank.gif
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_background.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_hex.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_hsb_b.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_hsb_h.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_hsb_s.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_indic.gif
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_overlay.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_rgb_b.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_rgb_g.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_rgb_r.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_select.gif
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/colorpicker_submit.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/custom_background.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/custom_hex.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/custom_hsb_b.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/custom_hsb_h.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/custom_hsb_s.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/custom_indic.gif
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/custom_rgb_b.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/custom_rgb_g.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/custom_rgb_r.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/custom_submit.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/select.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/select2.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/images/slider.png
ADDED
|
Binary file
|
skin/adminhtml/default/default/harpreet/colorpicker/js/colorpicker.js
ADDED
|
@@ -0,0 +1,484 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
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
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
/**
|
| 2 |
+
*
|
| 3 |
+
* Color picker
|
| 4 |
+
* Author: Stefan Petre www.eyecon.ro
|
| 5 |
+
*
|
| 6 |
+
* Dual licensed under the MIT and GPL licenses
|
| 7 |
+
*
|
| 8 |
+
*/
|
| 9 |
+
(function ($) {
|
| 10 |
+
var ColorPicker = function () {
|
| 11 |
+
var
|
| 12 |
+
ids = {},
|
| 13 |
+
inAction,
|
| 14 |
+
charMin = 65,
|
| 15 |
+
visible,
|
| 16 |
+
tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
|
| 17 |
+
defaults = {
|
| 18 |
+
eventName: 'click',
|
| 19 |
+
onShow: function () {},
|
| 20 |
+
onBeforeShow: function(){},
|
| 21 |
+
onHide: function () {},
|
| 22 |
+
onChange: function () {},
|
| 23 |
+
onSubmit: function () {},
|
| 24 |
+
color: 'ff0000',
|
| 25 |
+
livePreview: true,
|
| 26 |
+
flat: false
|
| 27 |
+
},
|
| 28 |
+
fillRGBFields = function (hsb, cal) {
|
| 29 |
+
var rgb = HSBToRGB(hsb);
|
| 30 |
+
$(cal).data('colorpicker').fields
|
| 31 |
+
.eq(1).val(rgb.r).end()
|
| 32 |
+
.eq(2).val(rgb.g).end()
|
| 33 |
+
.eq(3).val(rgb.b).end();
|
| 34 |
+
},
|
| 35 |
+
fillHSBFields = function (hsb, cal) {
|
| 36 |
+
$(cal).data('colorpicker').fields
|
| 37 |
+
.eq(4).val(hsb.h).end()
|
| 38 |
+
.eq(5).val(hsb.s).end()
|
| 39 |
+
.eq(6).val(hsb.b).end();
|
| 40 |
+
},
|
| 41 |
+
fillHexFields = function (hsb, cal) {
|
| 42 |
+
$(cal).data('colorpicker').fields
|
| 43 |
+
.eq(0).val(HSBToHex(hsb)).end();
|
| 44 |
+
},
|
| 45 |
+
setSelector = function (hsb, cal) {
|
| 46 |
+
$(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
|
| 47 |
+
$(cal).data('colorpicker').selectorIndic.css({
|
| 48 |
+
left: parseInt(150 * hsb.s/100, 10),
|
| 49 |
+
top: parseInt(150 * (100-hsb.b)/100, 10)
|
| 50 |
+
});
|
| 51 |
+
},
|
| 52 |
+
setHue = function (hsb, cal) {
|
| 53 |
+
$(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
|
| 54 |
+
},
|
| 55 |
+
setCurrentColor = function (hsb, cal) {
|
| 56 |
+
$(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
| 57 |
+
},
|
| 58 |
+
setNewColor = function (hsb, cal) {
|
| 59 |
+
$(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
| 60 |
+
},
|
| 61 |
+
keyDown = function (ev) {
|
| 62 |
+
var pressedKey = ev.charCode || ev.keyCode || -1;
|
| 63 |
+
if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
|
| 64 |
+
return false;
|
| 65 |
+
}
|
| 66 |
+
var cal = $(this).parent().parent();
|
| 67 |
+
if (cal.data('colorpicker').livePreview === true) {
|
| 68 |
+
change.apply(this);
|
| 69 |
+
}
|
| 70 |
+
},
|
| 71 |
+
change = function (ev) {
|
| 72 |
+
var cal = $(this).parent().parent(), col;
|
| 73 |
+
if (this.parentNode.className.indexOf('_hex') > 0) {
|
| 74 |
+
cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
|
| 75 |
+
} else if (this.parentNode.className.indexOf('_hsb') > 0) {
|
| 76 |
+
cal.data('colorpicker').color = col = fixHSB({
|
| 77 |
+
h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
|
| 78 |
+
s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
|
| 79 |
+
b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
|
| 80 |
+
});
|
| 81 |
+
} else {
|
| 82 |
+
cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
|
| 83 |
+
r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
|
| 84 |
+
g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
|
| 85 |
+
b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
|
| 86 |
+
}));
|
| 87 |
+
}
|
| 88 |
+
if (ev) {
|
| 89 |
+
fillRGBFields(col, cal.get(0));
|
| 90 |
+
fillHexFields(col, cal.get(0));
|
| 91 |
+
fillHSBFields(col, cal.get(0));
|
| 92 |
+
}
|
| 93 |
+
setSelector(col, cal.get(0));
|
| 94 |
+
setHue(col, cal.get(0));
|
| 95 |
+
setNewColor(col, cal.get(0));
|
| 96 |
+
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
|
| 97 |
+
},
|
| 98 |
+
blur = function (ev) {
|
| 99 |
+
var cal = $(this).parent().parent();
|
| 100 |
+
cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
| 101 |
+
},
|
| 102 |
+
focus = function () {
|
| 103 |
+
charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
|
| 104 |
+
$(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
| 105 |
+
$(this).parent().addClass('colorpicker_focus');
|
| 106 |
+
},
|
| 107 |
+
downIncrement = function (ev) {
|
| 108 |
+
var field = $(this).parent().find('input').focus();
|
| 109 |
+
var current = {
|
| 110 |
+
el: $(this).parent().addClass('colorpicker_slider'),
|
| 111 |
+
max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
|
| 112 |
+
y: ev.pageY,
|
| 113 |
+
field: field,
|
| 114 |
+
val: parseInt(field.val(), 10),
|
| 115 |
+
preview: $(this).parent().parent().data('colorpicker').livePreview
|
| 116 |
+
};
|
| 117 |
+
$(document).bind('mouseup', current, upIncrement);
|
| 118 |
+
$(document).bind('mousemove', current, moveIncrement);
|
| 119 |
+
},
|
| 120 |
+
moveIncrement = function (ev) {
|
| 121 |
+
ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
|
| 122 |
+
if (ev.data.preview) {
|
| 123 |
+
change.apply(ev.data.field.get(0), [true]);
|
| 124 |
+
}
|
| 125 |
+
return false;
|
| 126 |
+
},
|
| 127 |
+
upIncrement = function (ev) {
|
| 128 |
+
change.apply(ev.data.field.get(0), [true]);
|
| 129 |
+
ev.data.el.removeClass('colorpicker_slider').find('input').focus();
|
| 130 |
+
$(document).unbind('mouseup', upIncrement);
|
| 131 |
+
$(document).unbind('mousemove', moveIncrement);
|
| 132 |
+
return false;
|
| 133 |
+
},
|
| 134 |
+
downHue = function (ev) {
|
| 135 |
+
var current = {
|
| 136 |
+
cal: $(this).parent(),
|
| 137 |
+
y: $(this).offset().top
|
| 138 |
+
};
|
| 139 |
+
current.preview = current.cal.data('colorpicker').livePreview;
|
| 140 |
+
$(document).bind('mouseup', current, upHue);
|
| 141 |
+
$(document).bind('mousemove', current, moveHue);
|
| 142 |
+
},
|
| 143 |
+
moveHue = function (ev) {
|
| 144 |
+
change.apply(
|
| 145 |
+
ev.data.cal.data('colorpicker')
|
| 146 |
+
.fields
|
| 147 |
+
.eq(4)
|
| 148 |
+
.val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
|
| 149 |
+
.get(0),
|
| 150 |
+
[ev.data.preview]
|
| 151 |
+
);
|
| 152 |
+
return false;
|
| 153 |
+
},
|
| 154 |
+
upHue = function (ev) {
|
| 155 |
+
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
| 156 |
+
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
| 157 |
+
$(document).unbind('mouseup', upHue);
|
| 158 |
+
$(document).unbind('mousemove', moveHue);
|
| 159 |
+
return false;
|
| 160 |
+
},
|
| 161 |
+
downSelector = function (ev) {
|
| 162 |
+
var current = {
|
| 163 |
+
cal: $(this).parent(),
|
| 164 |
+
pos: $(this).offset()
|
| 165 |
+
};
|
| 166 |
+
current.preview = current.cal.data('colorpicker').livePreview;
|
| 167 |
+
$(document).bind('mouseup', current, upSelector);
|
| 168 |
+
$(document).bind('mousemove', current, moveSelector);
|
| 169 |
+
},
|
| 170 |
+
moveSelector = function (ev) {
|
| 171 |
+
change.apply(
|
| 172 |
+
ev.data.cal.data('colorpicker')
|
| 173 |
+
.fields
|
| 174 |
+
.eq(6)
|
| 175 |
+
.val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
|
| 176 |
+
.end()
|
| 177 |
+
.eq(5)
|
| 178 |
+
.val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
|
| 179 |
+
.get(0),
|
| 180 |
+
[ev.data.preview]
|
| 181 |
+
);
|
| 182 |
+
return false;
|
| 183 |
+
},
|
| 184 |
+
upSelector = function (ev) {
|
| 185 |
+
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
| 186 |
+
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
| 187 |
+
$(document).unbind('mouseup', upSelector);
|
| 188 |
+
$(document).unbind('mousemove', moveSelector);
|
| 189 |
+
return false;
|
| 190 |
+
},
|
| 191 |
+
enterSubmit = function (ev) {
|
| 192 |
+
$(this).addClass('colorpicker_focus');
|
| 193 |
+
},
|
| 194 |
+
leaveSubmit = function (ev) {
|
| 195 |
+
$(this).removeClass('colorpicker_focus');
|
| 196 |
+
},
|
| 197 |
+
clickSubmit = function (ev) {
|
| 198 |
+
var cal = $(this).parent();
|
| 199 |
+
var col = cal.data('colorpicker').color;
|
| 200 |
+
cal.data('colorpicker').origColor = col;
|
| 201 |
+
setCurrentColor(col, cal.get(0));
|
| 202 |
+
cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
|
| 203 |
+
},
|
| 204 |
+
show = function (ev) {
|
| 205 |
+
var cal = $('#' + $(this).data('colorpickerId'));
|
| 206 |
+
cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
|
| 207 |
+
var pos = $(this).offset();
|
| 208 |
+
var viewPort = getViewport();
|
| 209 |
+
var top = pos.top + this.offsetHeight;
|
| 210 |
+
var left = pos.left;
|
| 211 |
+
if (top + 176 > viewPort.t + viewPort.h) {
|
| 212 |
+
top -= this.offsetHeight + 176;
|
| 213 |
+
}
|
| 214 |
+
if (left + 356 > viewPort.l + viewPort.w) {
|
| 215 |
+
left -= 356;
|
| 216 |
+
}
|
| 217 |
+
cal.css({left: left + 'px', top: top + 'px'});
|
| 218 |
+
if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
|
| 219 |
+
cal.show();
|
| 220 |
+
}
|
| 221 |
+
$(document).bind('mousedown', {cal: cal}, hide);
|
| 222 |
+
return false;
|
| 223 |
+
},
|
| 224 |
+
hide = function (ev) {
|
| 225 |
+
if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
|
| 226 |
+
if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
|
| 227 |
+
ev.data.cal.hide();
|
| 228 |
+
}
|
| 229 |
+
$(document).unbind('mousedown', hide);
|
| 230 |
+
}
|
| 231 |
+
},
|
| 232 |
+
isChildOf = function(parentEl, el, container) {
|
| 233 |
+
if (parentEl == el) {
|
| 234 |
+
return true;
|
| 235 |
+
}
|
| 236 |
+
if (parentEl.contains) {
|
| 237 |
+
return parentEl.contains(el);
|
| 238 |
+
}
|
| 239 |
+
if ( parentEl.compareDocumentPosition ) {
|
| 240 |
+
return !!(parentEl.compareDocumentPosition(el) & 16);
|
| 241 |
+
}
|
| 242 |
+
var prEl = el.parentNode;
|
| 243 |
+
while(prEl && prEl != container) {
|
| 244 |
+
if (prEl == parentEl)
|
| 245 |
+
return true;
|
| 246 |
+
prEl = prEl.parentNode;
|
| 247 |
+
}
|
| 248 |
+
return false;
|
| 249 |
+
},
|
| 250 |
+
getViewport = function () {
|
| 251 |
+
var m = document.compatMode == 'CSS1Compat';
|
| 252 |
+
return {
|
| 253 |
+
l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
|
| 254 |
+
t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
|
| 255 |
+
w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
|
| 256 |
+
h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
|
| 257 |
+
};
|
| 258 |
+
},
|
| 259 |
+
fixHSB = function (hsb) {
|
| 260 |
+
return {
|
| 261 |
+
h: Math.min(360, Math.max(0, hsb.h)),
|
| 262 |
+
s: Math.min(100, Math.max(0, hsb.s)),
|
| 263 |
+
b: Math.min(100, Math.max(0, hsb.b))
|
| 264 |
+
};
|
| 265 |
+
},
|
| 266 |
+
fixRGB = function (rgb) {
|
| 267 |
+
return {
|
| 268 |
+
r: Math.min(255, Math.max(0, rgb.r)),
|
| 269 |
+
g: Math.min(255, Math.max(0, rgb.g)),
|
| 270 |
+
b: Math.min(255, Math.max(0, rgb.b))
|
| 271 |
+
};
|
| 272 |
+
},
|
| 273 |
+
fixHex = function (hex) {
|
| 274 |
+
var len = 6 - hex.length;
|
| 275 |
+
if (len > 0) {
|
| 276 |
+
var o = [];
|
| 277 |
+
for (var i=0; i<len; i++) {
|
| 278 |
+
o.push('0');
|
| 279 |
+
}
|
| 280 |
+
o.push(hex);
|
| 281 |
+
hex = o.join('');
|
| 282 |
+
}
|
| 283 |
+
return hex;
|
| 284 |
+
},
|
| 285 |
+
HexToRGB = function (hex) {
|
| 286 |
+
var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
|
| 287 |
+
return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
|
| 288 |
+
},
|
| 289 |
+
HexToHSB = function (hex) {
|
| 290 |
+
return RGBToHSB(HexToRGB(hex));
|
| 291 |
+
},
|
| 292 |
+
RGBToHSB = function (rgb) {
|
| 293 |
+
var hsb = {
|
| 294 |
+
h: 0,
|
| 295 |
+
s: 0,
|
| 296 |
+
b: 0
|
| 297 |
+
};
|
| 298 |
+
var min = Math.min(rgb.r, rgb.g, rgb.b);
|
| 299 |
+
var max = Math.max(rgb.r, rgb.g, rgb.b);
|
| 300 |
+
var delta = max - min;
|
| 301 |
+
hsb.b = max;
|
| 302 |
+
if (max != 0) {
|
| 303 |
+
|
| 304 |
+
}
|
| 305 |
+
hsb.s = max != 0 ? 255 * delta / max : 0;
|
| 306 |
+
if (hsb.s != 0) {
|
| 307 |
+
if (rgb.r == max) {
|
| 308 |
+
hsb.h = (rgb.g - rgb.b) / delta;
|
| 309 |
+
} else if (rgb.g == max) {
|
| 310 |
+
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
| 311 |
+
} else {
|
| 312 |
+
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
| 313 |
+
}
|
| 314 |
+
} else {
|
| 315 |
+
hsb.h = -1;
|
| 316 |
+
}
|
| 317 |
+
hsb.h *= 60;
|
| 318 |
+
if (hsb.h < 0) {
|
| 319 |
+
hsb.h += 360;
|
| 320 |
+
}
|
| 321 |
+
hsb.s *= 100/255;
|
| 322 |
+
hsb.b *= 100/255;
|
| 323 |
+
return hsb;
|
| 324 |
+
},
|
| 325 |
+
HSBToRGB = function (hsb) {
|
| 326 |
+
var rgb = {};
|
| 327 |
+
var h = Math.round(hsb.h);
|
| 328 |
+
var s = Math.round(hsb.s*255/100);
|
| 329 |
+
var v = Math.round(hsb.b*255/100);
|
| 330 |
+
if(s == 0) {
|
| 331 |
+
rgb.r = rgb.g = rgb.b = v;
|
| 332 |
+
} else {
|
| 333 |
+
var t1 = v;
|
| 334 |
+
var t2 = (255-s)*v/255;
|
| 335 |
+
var t3 = (t1-t2)*(h%60)/60;
|
| 336 |
+
if(h==360) h = 0;
|
| 337 |
+
if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
|
| 338 |
+
else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
|
| 339 |
+
else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
|
| 340 |
+
else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
|
| 341 |
+
else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
|
| 342 |
+
else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
|
| 343 |
+
else {rgb.r=0; rgb.g=0; rgb.b=0}
|
| 344 |
+
}
|
| 345 |
+
return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
|
| 346 |
+
},
|
| 347 |
+
RGBToHex = function (rgb) {
|
| 348 |
+
var hex = [
|
| 349 |
+
rgb.r.toString(16),
|
| 350 |
+
rgb.g.toString(16),
|
| 351 |
+
rgb.b.toString(16)
|
| 352 |
+
];
|
| 353 |
+
$.each(hex, function (nr, val) {
|
| 354 |
+
if (val.length == 1) {
|
| 355 |
+
hex[nr] = '0' + val;
|
| 356 |
+
}
|
| 357 |
+
});
|
| 358 |
+
return hex.join('');
|
| 359 |
+
},
|
| 360 |
+
HSBToHex = function (hsb) {
|
| 361 |
+
return RGBToHex(HSBToRGB(hsb));
|
| 362 |
+
},
|
| 363 |
+
restoreOriginal = function () {
|
| 364 |
+
var cal = $(this).parent();
|
| 365 |
+
var col = cal.data('colorpicker').origColor;
|
| 366 |
+
cal.data('colorpicker').color = col;
|
| 367 |
+
fillRGBFields(col, cal.get(0));
|
| 368 |
+
fillHexFields(col, cal.get(0));
|
| 369 |
+
fillHSBFields(col, cal.get(0));
|
| 370 |
+
setSelector(col, cal.get(0));
|
| 371 |
+
setHue(col, cal.get(0));
|
| 372 |
+
setNewColor(col, cal.get(0));
|
| 373 |
+
};
|
| 374 |
+
return {
|
| 375 |
+
init: function (opt) {
|
| 376 |
+
opt = $.extend({}, defaults, opt||{});
|
| 377 |
+
if (typeof opt.color == 'string') {
|
| 378 |
+
opt.color = HexToHSB(opt.color);
|
| 379 |
+
} else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
|
| 380 |
+
opt.color = RGBToHSB(opt.color);
|
| 381 |
+
} else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
|
| 382 |
+
opt.color = fixHSB(opt.color);
|
| 383 |
+
} else {
|
| 384 |
+
return this;
|
| 385 |
+
}
|
| 386 |
+
return this.each(function () {
|
| 387 |
+
if (!$(this).data('colorpickerId')) {
|
| 388 |
+
var options = $.extend({}, opt);
|
| 389 |
+
options.origColor = opt.color;
|
| 390 |
+
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
| 391 |
+
$(this).data('colorpickerId', id);
|
| 392 |
+
var cal = $(tpl).attr('id', id);
|
| 393 |
+
if (options.flat) {
|
| 394 |
+
cal.appendTo(this).show();
|
| 395 |
+
} else {
|
| 396 |
+
cal.appendTo(document.body);
|
| 397 |
+
}
|
| 398 |
+
options.fields = cal
|
| 399 |
+
.find('input')
|
| 400 |
+
.bind('keyup', keyDown)
|
| 401 |
+
.bind('change', change)
|
| 402 |
+
.bind('blur', blur)
|
| 403 |
+
.bind('focus', focus);
|
| 404 |
+
cal
|
| 405 |
+
.find('span').bind('mousedown', downIncrement).end()
|
| 406 |
+
.find('>div.colorpicker_current_color').bind('click', restoreOriginal);
|
| 407 |
+
options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
|
| 408 |
+
options.selectorIndic = options.selector.find('div div');
|
| 409 |
+
options.el = this;
|
| 410 |
+
options.hue = cal.find('div.colorpicker_hue div');
|
| 411 |
+
cal.find('div.colorpicker_hue').bind('mousedown', downHue);
|
| 412 |
+
options.newColor = cal.find('div.colorpicker_new_color');
|
| 413 |
+
options.currentColor = cal.find('div.colorpicker_current_color');
|
| 414 |
+
cal.data('colorpicker', options);
|
| 415 |
+
cal.find('div.colorpicker_submit')
|
| 416 |
+
.bind('mouseenter', enterSubmit)
|
| 417 |
+
.bind('mouseleave', leaveSubmit)
|
| 418 |
+
.bind('click', clickSubmit);
|
| 419 |
+
fillRGBFields(options.color, cal.get(0));
|
| 420 |
+
fillHSBFields(options.color, cal.get(0));
|
| 421 |
+
fillHexFields(options.color, cal.get(0));
|
| 422 |
+
setHue(options.color, cal.get(0));
|
| 423 |
+
setSelector(options.color, cal.get(0));
|
| 424 |
+
setCurrentColor(options.color, cal.get(0));
|
| 425 |
+
setNewColor(options.color, cal.get(0));
|
| 426 |
+
if (options.flat) {
|
| 427 |
+
cal.css({
|
| 428 |
+
position: 'relative',
|
| 429 |
+
display: 'block'
|
| 430 |
+
});
|
| 431 |
+
} else {
|
| 432 |
+
$(this).bind(options.eventName, show);
|
| 433 |
+
}
|
| 434 |
+
}
|
| 435 |
+
});
|
| 436 |
+
},
|
| 437 |
+
showPicker: function() {
|
| 438 |
+
return this.each( function () {
|
| 439 |
+
if ($(this).data('colorpickerId')) {
|
| 440 |
+
show.apply(this);
|
| 441 |
+
}
|
| 442 |
+
});
|
| 443 |
+
},
|
| 444 |
+
hidePicker: function() {
|
| 445 |
+
return this.each( function () {
|
| 446 |
+
if ($(this).data('colorpickerId')) {
|
| 447 |
+
$('#' + $(this).data('colorpickerId')).hide();
|
| 448 |
+
}
|
| 449 |
+
});
|
| 450 |
+
},
|
| 451 |
+
setColor: function(col) {
|
| 452 |
+
if (typeof col == 'string') {
|
| 453 |
+
col = HexToHSB(col);
|
| 454 |
+
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
| 455 |
+
col = RGBToHSB(col);
|
| 456 |
+
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
| 457 |
+
col = fixHSB(col);
|
| 458 |
+
} else {
|
| 459 |
+
return this;
|
| 460 |
+
}
|
| 461 |
+
return this.each(function(){
|
| 462 |
+
if ($(this).data('colorpickerId')) {
|
| 463 |
+
var cal = $('#' + $(this).data('colorpickerId'));
|
| 464 |
+
cal.data('colorpicker').color = col;
|
| 465 |
+
cal.data('colorpicker').origColor = col;
|
| 466 |
+
fillRGBFields(col, cal.get(0));
|
| 467 |
+
fillHSBFields(col, cal.get(0));
|
| 468 |
+
fillHexFields(col, cal.get(0));
|
| 469 |
+
setHue(col, cal.get(0));
|
| 470 |
+
setSelector(col, cal.get(0));
|
| 471 |
+
setCurrentColor(col, cal.get(0));
|
| 472 |
+
setNewColor(col, cal.get(0));
|
| 473 |
+
}
|
| 474 |
+
});
|
| 475 |
+
}
|
| 476 |
+
};
|
| 477 |
+
}();
|
| 478 |
+
$.fn.extend({
|
| 479 |
+
ColorPicker: ColorPicker.init,
|
| 480 |
+
ColorPickerHide: ColorPicker.hidePicker,
|
| 481 |
+
ColorPickerShow: ColorPicker.showPicker,
|
| 482 |
+
ColorPickerSetColor: ColorPicker.setColor
|
| 483 |
+
});
|
| 484 |
+
})(jQuery)
|
skin/adminhtml/default/default/harpreet/colorpicker/js/eye.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
/**
|
| 2 |
+
*
|
| 3 |
+
* Zoomimage
|
| 4 |
+
* Author: Stefan Petre www.eyecon.ro
|
| 5 |
+
*
|
| 6 |
+
*/
|
| 7 |
+
(function($){
|
| 8 |
+
var EYE = window.EYE = function() {
|
| 9 |
+
var _registered = {
|
| 10 |
+
init: []
|
| 11 |
+
};
|
| 12 |
+
return {
|
| 13 |
+
init: function() {
|
| 14 |
+
$.each(_registered.init, function(nr, fn){
|
| 15 |
+
fn.call();
|
| 16 |
+
});
|
| 17 |
+
},
|
| 18 |
+
extend: function(prop) {
|
| 19 |
+
for (var i in prop) {
|
| 20 |
+
if (prop[i] != undefined) {
|
| 21 |
+
this[i] = prop[i];
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
},
|
| 25 |
+
register: function(fn, type) {
|
| 26 |
+
if (!_registered[type]) {
|
| 27 |
+
_registered[type] = [];
|
| 28 |
+
}
|
| 29 |
+
_registered[type].push(fn);
|
| 30 |
+
}
|
| 31 |
+
};
|
| 32 |
+
}();
|
| 33 |
+
$(EYE.init);
|
| 34 |
+
})(jQuery);
|
skin/adminhtml/default/default/harpreet/colorpicker/js/jquery.js
ADDED
|
@@ -0,0 +1,4376 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|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
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
/*!
|
| 2 |
+
* jQuery JavaScript Library v1.3.2
|
| 3 |
+
* http://jquery.com/
|
| 4 |
+
*
|
| 5 |
+
* Copyright (c) 2009 John Resig
|
| 6 |
+
* Dual licensed under the MIT and GPL licenses.
|
| 7 |
+
* http://docs.jquery.com/License
|
| 8 |
+
*
|
| 9 |
+
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
|
| 10 |
+
* Revision: 6246
|
| 11 |
+
*/
|
| 12 |
+
(function(){
|
| 13 |
+
|
| 14 |
+
var
|
| 15 |
+
// Will speed up references to window, and allows munging its name.
|
| 16 |
+
window = this,
|
| 17 |
+
// Will speed up references to undefined, and allows munging its name.
|
| 18 |
+
undefined,
|
| 19 |
+
// Map over jQuery in case of overwrite
|
| 20 |
+
_jQuery = window.jQuery,
|
| 21 |
+
// Map over the $ in case of overwrite
|
| 22 |
+
_$ = window.$,
|
| 23 |
+
|
| 24 |
+
jQuery = window.jQuery = window.$ = function( selector, context ) {
|
| 25 |
+
// The jQuery object is actually just the init constructor 'enhanced'
|
| 26 |
+
return new jQuery.fn.init( selector, context );
|
| 27 |
+
},
|
| 28 |
+
|
| 29 |
+
// A simple way to check for HTML strings or ID strings
|
| 30 |
+
// (both of which we optimize for)
|
| 31 |
+
quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,
|
| 32 |
+
// Is it a simple selector
|
| 33 |
+
isSimple = /^.[^:#\[\.,]*$/;
|
| 34 |
+
|
| 35 |
+
jQuery.fn = jQuery.prototype = {
|
| 36 |
+
init: function( selector, context ) {
|
| 37 |
+
// Make sure that a selection was provided
|
| 38 |
+
selector = selector || document;
|
| 39 |
+
|
| 40 |
+
// Handle $(DOMElement)
|
| 41 |
+
if ( selector.nodeType ) {
|
| 42 |
+
this[0] = selector;
|
| 43 |
+
this.length = 1;
|
| 44 |
+
this.context = selector;
|
| 45 |
+
return this;
|
| 46 |
+
}
|
| 47 |
+
// Handle HTML strings
|
| 48 |
+
if ( typeof selector === "string" ) {
|
| 49 |
+
// Are we dealing with HTML string or an ID?
|
| 50 |
+
var match = quickExpr.exec( selector );
|
| 51 |
+
|
| 52 |
+
// Verify a match, and that no context was specified for #id
|
| 53 |
+
if ( match && (match[1] || !context) ) {
|
| 54 |
+
|
| 55 |
+
// HANDLE: $(html) -> $(array)
|
| 56 |
+
if ( match[1] )
|
| 57 |
+
selector = jQuery.clean( [ match[1] ], context );
|
| 58 |
+
|
| 59 |
+
// HANDLE: $("#id")
|
| 60 |
+
else {
|
| 61 |
+
var elem = document.getElementById( match[3] );
|
| 62 |
+
|
| 63 |
+
// Handle the case where IE and Opera return items
|
| 64 |
+
// by name instead of ID
|
| 65 |
+
if ( elem && elem.id != match[3] )
|
| 66 |
+
return jQuery().find( selector );
|
| 67 |
+
|
| 68 |
+
// Otherwise, we inject the element directly into the jQuery object
|
| 69 |
+
var ret = jQuery( elem || [] );
|
| 70 |
+
ret.context = document;
|
| 71 |
+
ret.selector = selector;
|
| 72 |
+
return ret;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
// HANDLE: $(expr, [context])
|
| 76 |
+
// (which is just equivalent to: $(content).find(expr)
|
| 77 |
+
} else
|
| 78 |
+
return jQuery( context ).find( selector );
|
| 79 |
+
|
| 80 |
+
// HANDLE: $(function)
|
| 81 |
+
// Shortcut for document ready
|
| 82 |
+
} else if ( jQuery.isFunction( selector ) )
|
| 83 |
+
return jQuery( document ).ready( selector );
|
| 84 |
+
|
| 85 |
+
// Make sure that old selector state is passed along
|
| 86 |
+
if ( selector.selector && selector.context ) {
|
| 87 |
+
this.selector = selector.selector;
|
| 88 |
+
this.context = selector.context;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
return this.setArray(jQuery.isArray( selector ) ?
|
| 92 |
+
selector :
|
| 93 |
+
jQuery.makeArray(selector));
|
| 94 |
+
},
|
| 95 |
+
|
| 96 |
+
// Start with an empty selector
|
| 97 |
+
selector: "",
|
| 98 |
+
|
| 99 |
+
// The current version of jQuery being used
|
| 100 |
+
jquery: "1.3.2",
|
| 101 |
+
|
| 102 |
+
// The number of elements contained in the matched element set
|
| 103 |
+
size: function() {
|
| 104 |
+
return this.length;
|
| 105 |
+
},
|
| 106 |
+
|
| 107 |
+
// Get the Nth element in the matched element set OR
|
| 108 |
+
// Get the whole matched element set as a clean array
|
| 109 |
+
get: function( num ) {
|
| 110 |
+
return num === undefined ?
|
| 111 |
+
|
| 112 |
+
// Return a 'clean' array
|
| 113 |
+
Array.prototype.slice.call( this ) :
|
| 114 |
+
|
| 115 |
+
// Return just the object
|
| 116 |
+
this[ num ];
|
| 117 |
+
},
|
| 118 |
+
|
| 119 |
+
// Take an array of elements and push it onto the stack
|
| 120 |
+
// (returning the new matched element set)
|
| 121 |
+
pushStack: function( elems, name, selector ) {
|
| 122 |
+
// Build a new jQuery matched element set
|
| 123 |
+
var ret = jQuery( elems );
|
| 124 |
+
|
| 125 |
+
// Add the old object onto the stack (as a reference)
|
| 126 |
+
ret.prevObject = this;
|
| 127 |
+
|
| 128 |
+
ret.context = this.context;
|
| 129 |
+
|
| 130 |
+
if ( name === "find" )
|
| 131 |
+
ret.selector = this.selector + (this.selector ? " " : "") + selector;
|
| 132 |
+
else if ( name )
|
| 133 |
+
ret.selector = this.selector + "." + name + "(" + selector + ")";
|
| 134 |
+
|
| 135 |
+
// Return the newly-formed element set
|
| 136 |
+
return ret;
|
| 137 |
+
},
|
| 138 |
+
|
| 139 |
+
// Force the current matched set of elements to become
|
| 140 |
+
// the specified array of elements (destroying the stack in the process)
|
| 141 |
+
// You should use pushStack() in order to do this, but maintain the stack
|
| 142 |
+
setArray: function( elems ) {
|
| 143 |
+
// Resetting the length to 0, then using the native Array push
|
| 144 |
+
// is a super-fast way to populate an object with array-like properties
|
| 145 |
+
this.length = 0;
|
| 146 |
+
Array.prototype.push.apply( this, elems );
|
| 147 |
+
|
| 148 |
+
return this;
|
| 149 |
+
},
|
| 150 |
+
|
| 151 |
+
// Execute a callback for every element in the matched set.
|
| 152 |
+
// (You can seed the arguments with an array of args, but this is
|
| 153 |
+
// only used internally.)
|
| 154 |
+
each: function( callback, args ) {
|
| 155 |
+
return jQuery.each( this, callback, args );
|
| 156 |
+
},
|
| 157 |
+
|
| 158 |
+
// Determine the position of an element within
|
| 159 |
+
// the matched set of elements
|
| 160 |
+
index: function( elem ) {
|
| 161 |
+
// Locate the position of the desired element
|
| 162 |
+
return jQuery.inArray(
|
| 163 |
+
// If it receives a jQuery object, the first element is used
|
| 164 |
+
elem && elem.jquery ? elem[0] : elem
|
| 165 |
+
, this );
|
| 166 |
+
},
|
| 167 |
+
|
| 168 |
+
attr: function( name, value, type ) {
|
| 169 |
+
var options = name;
|
| 170 |
+
|
| 171 |
+
// Look for the case where we're accessing a style value
|
| 172 |
+
if ( typeof name === "string" )
|
| 173 |
+
if ( value === undefined )
|
| 174 |
+
return this[0] && jQuery[ type || "attr" ]( this[0], name );
|
| 175 |
+
|
| 176 |
+
else {
|
| 177 |
+
options = {};
|
| 178 |
+
options[ name ] = value;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
// Check to see if we're setting style values
|
| 182 |
+
return this.each(function(i){
|
| 183 |
+
// Set all the styles
|
| 184 |
+
for ( name in options )
|
| 185 |
+
jQuery.attr(
|
| 186 |
+
type ?
|
| 187 |
+
this.style :
|
| 188 |
+
this,
|
| 189 |
+
name, jQuery.prop( this, options[ name ], type, i, name )
|
| 190 |
+
);
|
| 191 |
+
});
|
| 192 |
+
},
|
| 193 |
+
|
| 194 |
+
css: function( key, value ) {
|
| 195 |
+
// ignore negative width and height values
|
| 196 |
+
if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
|
| 197 |
+
value = undefined;
|
| 198 |
+
return this.attr( key, value, "curCSS" );
|
| 199 |
+
},
|
| 200 |
+
|
| 201 |
+
text: function( text ) {
|
| 202 |
+
if ( typeof text !== "object" && text != null )
|
| 203 |
+
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
|
| 204 |
+
|
| 205 |
+
var ret = "";
|
| 206 |
+
|
| 207 |
+
jQuery.each( text || this, function(){
|
| 208 |
+
jQuery.each( this.childNodes, function(){
|
| 209 |
+
if ( this.nodeType != 8 )
|
| 210 |
+
ret += this.nodeType != 1 ?
|
| 211 |
+
this.nodeValue :
|
| 212 |
+
jQuery.fn.text( [ this ] );
|
| 213 |
+
});
|
| 214 |
+
});
|
| 215 |
+
|
| 216 |
+
return ret;
|
| 217 |
+
},
|
| 218 |
+
|
| 219 |
+
wrapAll: function( html ) {
|
| 220 |
+
if ( this[0] ) {
|
| 221 |
+
// The elements to wrap the target around
|
| 222 |
+
var wrap = jQuery( html, this[0].ownerDocument ).clone();
|
| 223 |
+
|
| 224 |
+
if ( this[0].parentNode )
|
| 225 |
+
wrap.insertBefore( this[0] );
|
| 226 |
+
|
| 227 |
+
wrap.map(function(){
|
| 228 |
+
var elem = this;
|
| 229 |
+
|
| 230 |
+
while ( elem.firstChild )
|
| 231 |
+
elem = elem.firstChild;
|
| 232 |
+
|
| 233 |
+
return elem;
|
| 234 |
+
}).append(this);
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
return this;
|
| 238 |
+
},
|
| 239 |
+
|
| 240 |
+
wrapInner: function( html ) {
|
| 241 |
+
return this.each(function(){
|
| 242 |
+
jQuery( this ).contents().wrapAll( html );
|
| 243 |
+
});
|
| 244 |
+
},
|
| 245 |
+
|
| 246 |
+
wrap: function( html ) {
|
| 247 |
+
return this.each(function(){
|
| 248 |
+
jQuery( this ).wrapAll( html );
|
| 249 |
+
});
|
| 250 |
+
},
|
| 251 |
+
|
| 252 |
+
append: function() {
|
| 253 |
+
return this.domManip(arguments, true, function(elem){
|
| 254 |
+
if (this.nodeType == 1)
|
| 255 |
+
this.appendChild( elem );
|
| 256 |
+
});
|
| 257 |
+
},
|
| 258 |
+
|
| 259 |
+
prepend: function() {
|
| 260 |
+
return this.domManip(arguments, true, function(elem){
|
| 261 |
+
if (this.nodeType == 1)
|
| 262 |
+
this.insertBefore( elem, this.firstChild );
|
| 263 |
+
});
|
| 264 |
+
},
|
| 265 |
+
|
| 266 |
+
before: function() {
|
| 267 |
+
return this.domManip(arguments, false, function(elem){
|
| 268 |
+
this.parentNode.insertBefore( elem, this );
|
| 269 |
+
});
|
| 270 |
+
},
|
| 271 |
+
|
| 272 |
+
after: function() {
|
| 273 |
+
return this.domManip(arguments, false, function(elem){
|
| 274 |
+
this.parentNode.insertBefore( elem, this.nextSibling );
|
| 275 |
+
});
|
| 276 |
+
},
|
| 277 |
+
|
| 278 |
+
end: function() {
|
| 279 |
+
return this.prevObject || jQuery( [] );
|
| 280 |
+
},
|
| 281 |
+
|
| 282 |
+
// For internal use only.
|
| 283 |
+
// Behaves like an Array's method, not like a jQuery method.
|
| 284 |
+
push: [].push,
|
| 285 |
+
sort: [].sort,
|
| 286 |
+
splice: [].splice,
|
| 287 |
+
|
| 288 |
+
find: function( selector ) {
|
| 289 |
+
if ( this.length === 1 ) {
|
| 290 |
+
var ret = this.pushStack( [], "find", selector );
|
| 291 |
+
ret.length = 0;
|
| 292 |
+
jQuery.find( selector, this[0], ret );
|
| 293 |
+
return ret;
|
| 294 |
+
} else {
|
| 295 |
+
return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){
|
| 296 |
+
return jQuery.find( selector, elem );
|
| 297 |
+
})), "find", selector );
|
| 298 |
+
}
|
| 299 |
+
},
|
| 300 |
+
|
| 301 |
+
clone: function( events ) {
|
| 302 |
+
// Do the clone
|
| 303 |
+
var ret = this.map(function(){
|
| 304 |
+
if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
|
| 305 |
+
// IE copies events bound via attachEvent when
|
| 306 |
+
// using cloneNode. Calling detachEvent on the
|
| 307 |
+
// clone will also remove the events from the orignal
|
| 308 |
+
// In order to get around this, we use innerHTML.
|
| 309 |
+
// Unfortunately, this means some modifications to
|
| 310 |
+
// attributes in IE that are actually only stored
|
| 311 |
+
// as properties will not be copied (such as the
|
| 312 |
+
// the name attribute on an input).
|
| 313 |
+
var html = this.outerHTML;
|
| 314 |
+
if ( !html ) {
|
| 315 |
+
var div = this.ownerDocument.createElement("div");
|
| 316 |
+
div.appendChild( this.cloneNode(true) );
|
| 317 |
+
html = div.innerHTML;
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0];
|
| 321 |
+
} else
|
| 322 |
+
return this.cloneNode(true);
|
| 323 |
+
});
|
| 324 |
+
|
| 325 |
+
// Copy the events from the original to the clone
|
| 326 |
+
if ( events === true ) {
|
| 327 |
+
var orig = this.find("*").andSelf(), i = 0;
|
| 328 |
+
|
| 329 |
+
ret.find("*").andSelf().each(function(){
|
| 330 |
+
if ( this.nodeName !== orig[i].nodeName )
|
| 331 |
+
return;
|
| 332 |
+
|
| 333 |
+
var events = jQuery.data( orig[i], "events" );
|
| 334 |
+
|
| 335 |
+
for ( var type in events ) {
|
| 336 |
+
for ( var handler in events[ type ] ) {
|
| 337 |
+
jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
|
| 338 |
+
}
|
| 339 |
+
}
|
| 340 |
+
|
| 341 |
+
i++;
|
| 342 |
+
});
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
// Return the cloned set
|
| 346 |
+
return ret;
|
| 347 |
+
},
|
| 348 |
+
|
| 349 |
+
filter: function( selector ) {
|
| 350 |
+
return this.pushStack(
|
| 351 |
+
jQuery.isFunction( selector ) &&
|
| 352 |
+
jQuery.grep(this, function(elem, i){
|
| 353 |
+
return selector.call( elem, i );
|
| 354 |
+
}) ||
|
| 355 |
+
|
| 356 |
+
jQuery.multiFilter( selector, jQuery.grep(this, function(elem){
|
| 357 |
+
return elem.nodeType === 1;
|
| 358 |
+
}) ), "filter", selector );
|
| 359 |
+
},
|
| 360 |
+
|
| 361 |
+
closest: function( selector ) {
|
| 362 |
+
var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null,
|
| 363 |
+
closer = 0;
|
| 364 |
+
|
| 365 |
+
return this.map(function(){
|
| 366 |
+
var cur = this;
|
| 367 |
+
while ( cur && cur.ownerDocument ) {
|
| 368 |
+
if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) {
|
| 369 |
+
jQuery.data(cur, "closest", closer);
|
| 370 |
+
return cur;
|
| 371 |
+
}
|
| 372 |
+
cur = cur.parentNode;
|
| 373 |
+
closer++;
|
| 374 |
+
}
|
| 375 |
+
});
|
| 376 |
+
},
|
| 377 |
+
|
| 378 |
+
not: function( selector ) {
|
| 379 |
+
if ( typeof selector === "string" )
|
| 380 |
+
// test special case where just one selector is passed in
|
| 381 |
+
if ( isSimple.test( selector ) )
|
| 382 |
+
return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector );
|
| 383 |
+
else
|
| 384 |
+
selector = jQuery.multiFilter( selector, this );
|
| 385 |
+
|
| 386 |
+
var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
|
| 387 |
+
return this.filter(function() {
|
| 388 |
+
return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
|
| 389 |
+
});
|
| 390 |
+
},
|
| 391 |
+
|
| 392 |
+
add: function( selector ) {
|
| 393 |
+
return this.pushStack( jQuery.unique( jQuery.merge(
|
| 394 |
+
this.get(),
|
| 395 |
+
typeof selector === "string" ?
|
| 396 |
+
jQuery( selector ) :
|
| 397 |
+
jQuery.makeArray( selector )
|
| 398 |
+
)));
|
| 399 |
+
},
|
| 400 |
+
|
| 401 |
+
is: function( selector ) {
|
| 402 |
+
return !!selector && jQuery.multiFilter( selector, this ).length > 0;
|
| 403 |
+
},
|
| 404 |
+
|
| 405 |
+
hasClass: function( selector ) {
|
| 406 |
+
return !!selector && this.is( "." + selector );
|
| 407 |
+
},
|
| 408 |
+
|
| 409 |
+
val: function( value ) {
|
| 410 |
+
if ( value === undefined ) {
|
| 411 |
+
var elem = this[0];
|
| 412 |
+
|
| 413 |
+
if ( elem ) {
|
| 414 |
+
if( jQuery.nodeName( elem, 'option' ) )
|
| 415 |
+
return (elem.attributes.value || {}).specified ? elem.value : elem.text;
|
| 416 |
+
|
| 417 |
+
// We need to handle select boxes special
|
| 418 |
+
if ( jQuery.nodeName( elem, "select" ) ) {
|
| 419 |
+
var index = elem.selectedIndex,
|
| 420 |
+
values = [],
|
| 421 |
+
options = elem.options,
|
| 422 |
+
one = elem.type == "select-one";
|
| 423 |
+
|
| 424 |
+
// Nothing was selected
|
| 425 |
+
if ( index < 0 )
|
| 426 |
+
return null;
|
| 427 |
+
|
| 428 |
+
// Loop through all the selected options
|
| 429 |
+
for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
|
| 430 |
+
var option = options[ i ];
|
| 431 |
+
|
| 432 |
+
if ( option.selected ) {
|
| 433 |
+
// Get the specifc value for the option
|
| 434 |
+
value = jQuery(option).val();
|
| 435 |
+
|
| 436 |
+
// We don't need an array for one selects
|
| 437 |
+
if ( one )
|
| 438 |
+
return value;
|
| 439 |
+
|
| 440 |
+
// Multi-Selects return an array
|
| 441 |
+
values.push( value );
|
| 442 |
+
}
|
| 443 |
+
}
|
| 444 |
+
|
| 445 |
+
return values;
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
// Everything else, we just grab the value
|
| 449 |
+
return (elem.value || "").replace(/\r/g, "");
|
| 450 |
+
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
return undefined;
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
if ( typeof value === "number" )
|
| 457 |
+
value += '';
|
| 458 |
+
|
| 459 |
+
return this.each(function(){
|
| 460 |
+
if ( this.nodeType != 1 )
|
| 461 |
+
return;
|
| 462 |
+
|
| 463 |
+
if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )
|
| 464 |
+
this.checked = (jQuery.inArray(this.value, value) >= 0 ||
|
| 465 |
+
jQuery.inArray(this.name, value) >= 0);
|
| 466 |
+
|
| 467 |
+
else if ( jQuery.nodeName( this, "select" ) ) {
|
| 468 |
+
var values = jQuery.makeArray(value);
|
| 469 |
+
|
| 470 |
+
jQuery( "option", this ).each(function(){
|
| 471 |
+
this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
|
| 472 |
+
jQuery.inArray( this.text, values ) >= 0);
|
| 473 |
+
});
|
| 474 |
+
|
| 475 |
+
if ( !values.length )
|
| 476 |
+
this.selectedIndex = -1;
|
| 477 |
+
|
| 478 |
+
} else
|
| 479 |
+
this.value = value;
|
| 480 |
+
});
|
| 481 |
+
},
|
| 482 |
+
|
| 483 |
+
html: function( value ) {
|
| 484 |
+
return value === undefined ?
|
| 485 |
+
(this[0] ?
|
| 486 |
+
this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") :
|
| 487 |
+
null) :
|
| 488 |
+
this.empty().append( value );
|
| 489 |
+
},
|
| 490 |
+
|
| 491 |
+
replaceWith: function( value ) {
|
| 492 |
+
return this.after( value ).remove();
|
| 493 |
+
},
|
| 494 |
+
|
| 495 |
+
eq: function( i ) {
|
| 496 |
+
return this.slice( i, +i + 1 );
|
| 497 |
+
},
|
| 498 |
+
|
| 499 |
+
slice: function() {
|
| 500 |
+
return this.pushStack( Array.prototype.slice.apply( this, arguments ),
|
| 501 |
+
"slice", Array.prototype.slice.call(arguments).join(",") );
|
| 502 |
+
},
|
| 503 |
+
|
| 504 |
+
map: function( callback ) {
|
| 505 |
+
return this.pushStack( jQuery.map(this, function(elem, i){
|
| 506 |
+
return callback.call( elem, i, elem );
|
| 507 |
+
}));
|
| 508 |
+
},
|
| 509 |
+
|
| 510 |
+
andSelf: function() {
|
| 511 |
+
return this.add( this.prevObject );
|
| 512 |
+
},
|
| 513 |
+
|
| 514 |
+
domManip: function( args, table, callback ) {
|
| 515 |
+
if ( this[0] ) {
|
| 516 |
+
var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),
|
| 517 |
+
scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),
|
| 518 |
+
first = fragment.firstChild;
|
| 519 |
+
|
| 520 |
+
if ( first )
|
| 521 |
+
for ( var i = 0, l = this.length; i < l; i++ )
|
| 522 |
+
callback.call( root(this[i], first), this.length > 1 || i > 0 ?
|
| 523 |
+
fragment.cloneNode(true) : fragment );
|
| 524 |
+
|
| 525 |
+
if ( scripts )
|
| 526 |
+
jQuery.each( scripts, evalScript );
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
return this;
|
| 530 |
+
|
| 531 |
+
function root( elem, cur ) {
|
| 532 |
+
return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ?
|
| 533 |
+
(elem.getElementsByTagName("tbody")[0] ||
|
| 534 |
+
elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
|
| 535 |
+
elem;
|
| 536 |
+
}
|
| 537 |
+
}
|
| 538 |
+
};
|
| 539 |
+
|
| 540 |
+
// Give the init function the jQuery prototype for later instantiation
|
| 541 |
+
jQuery.fn.init.prototype = jQuery.fn;
|
| 542 |
+
|
| 543 |
+
function evalScript( i, elem ) {
|
| 544 |
+
if ( elem.src )
|
| 545 |
+
jQuery.ajax({
|
| 546 |
+
url: elem.src,
|
| 547 |
+
async: false,
|
| 548 |
+
dataType: "script"
|
| 549 |
+
});
|
| 550 |
+
|
| 551 |
+
else
|
| 552 |
+
jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
|
| 553 |
+
|
| 554 |
+
if ( elem.parentNode )
|
| 555 |
+
elem.parentNode.removeChild( elem );
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
function now(){
|
| 559 |
+
return +new Date;
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
jQuery.extend = jQuery.fn.extend = function() {
|
| 563 |
+
// copy reference to target object
|
| 564 |
+
var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;
|
| 565 |
+
|
| 566 |
+
// Handle a deep copy situation
|
| 567 |
+
if ( typeof target === "boolean" ) {
|
| 568 |
+
deep = target;
|
| 569 |
+
target = arguments[1] || {};
|
| 570 |
+
// skip the boolean and the target
|
| 571 |
+
i = 2;
|
| 572 |
+
}
|
| 573 |
+
|
| 574 |
+
// Handle case when target is a string or something (possible in deep copy)
|
| 575 |
+
if ( typeof target !== "object" && !jQuery.isFunction(target) )
|
| 576 |
+
target = {};
|
| 577 |
+
|
| 578 |
+
// extend jQuery itself if only one argument is passed
|
| 579 |
+
if ( length == i ) {
|
| 580 |
+
target = this;
|
| 581 |
+
--i;
|
| 582 |
+
}
|
| 583 |
+
|
| 584 |
+
for ( ; i < length; i++ )
|
| 585 |
+
// Only deal with non-null/undefined values
|
| 586 |
+
if ( (options = arguments[ i ]) != null )
|
| 587 |
+
// Extend the base object
|
| 588 |
+
for ( var name in options ) {
|
| 589 |
+
var src = target[ name ], copy = options[ name ];
|
| 590 |
+
|
| 591 |
+
// Prevent never-ending loop
|
| 592 |
+
if ( target === copy )
|
| 593 |
+
continue;
|
| 594 |
+
|
| 595 |
+
// Recurse if we're merging object values
|
| 596 |
+
if ( deep && copy && typeof copy === "object" && !copy.nodeType )
|
| 597 |
+
target[ name ] = jQuery.extend( deep,
|
| 598 |
+
// Never move original objects, clone them
|
| 599 |
+
src || ( copy.length != null ? [ ] : { } )
|
| 600 |
+
, copy );
|
| 601 |
+
|
| 602 |
+
// Don't bring in undefined values
|
| 603 |
+
else if ( copy !== undefined )
|
| 604 |
+
target[ name ] = copy;
|
| 605 |
+
|
| 606 |
+
}
|
| 607 |
+
|
| 608 |
+
// Return the modified object
|
| 609 |
+
return target;
|
| 610 |
+
};
|
| 611 |
+
|
| 612 |
+
// exclude the following css properties to add px
|
| 613 |
+
var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
|
| 614 |
+
// cache defaultView
|
| 615 |
+
defaultView = document.defaultView || {},
|
| 616 |
+
toString = Object.prototype.toString;
|
| 617 |
+
|
| 618 |
+
jQuery.extend({
|
| 619 |
+
noConflict: function( deep ) {
|
| 620 |
+
window.$ = _$;
|
| 621 |
+
|
| 622 |
+
if ( deep )
|
| 623 |
+
window.jQuery = _jQuery;
|
| 624 |
+
|
| 625 |
+
return jQuery;
|
| 626 |
+
},
|
| 627 |
+
|
| 628 |
+
// See test/unit/core.js for details concerning isFunction.
|
| 629 |
+
// Since version 1.3, DOM methods and functions like alert
|
| 630 |
+
// aren't supported. They return false on IE (#2968).
|
| 631 |
+
isFunction: function( obj ) {
|
| 632 |
+
return toString.call(obj) === "[object Function]";
|
| 633 |
+
},
|
| 634 |
+
|
| 635 |
+
isArray: function( obj ) {
|
| 636 |
+
return toString.call(obj) === "[object Array]";
|
| 637 |
+
},
|
| 638 |
+
|
| 639 |
+
// check if an element is in a (or is an) XML document
|
| 640 |
+
isXMLDoc: function( elem ) {
|
| 641 |
+
return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
|
| 642 |
+
!!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
|
| 643 |
+
},
|
| 644 |
+
|
| 645 |
+
// Evalulates a script in a global context
|
| 646 |
+
globalEval: function( data ) {
|
| 647 |
+
if ( data && /\S/.test(data) ) {
|
| 648 |
+
// Inspired by code by Andrea Giammarchi
|
| 649 |
+
// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
|
| 650 |
+
var head = document.getElementsByTagName("head")[0] || document.documentElement,
|
| 651 |
+
script = document.createElement("script");
|
| 652 |
+
|
| 653 |
+
script.type = "text/javascript";
|
| 654 |
+
if ( jQuery.support.scriptEval )
|
| 655 |
+
script.appendChild( document.createTextNode( data ) );
|
| 656 |
+
else
|
| 657 |
+
script.text = data;
|
| 658 |
+
|
| 659 |
+
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
|
| 660 |
+
// This arises when a base node is used (#2709).
|
| 661 |
+
head.insertBefore( script, head.firstChild );
|
| 662 |
+
head.removeChild( script );
|
| 663 |
+
}
|
| 664 |
+
},
|
| 665 |
+
|
| 666 |
+
nodeName: function( elem, name ) {
|
| 667 |
+
return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
|
| 668 |
+
},
|
| 669 |
+
|
| 670 |
+
// args is for internal usage only
|
| 671 |
+
each: function( object, callback, args ) {
|
| 672 |
+
var name, i = 0, length = object.length;
|
| 673 |
+
|
| 674 |
+
if ( args ) {
|
| 675 |
+
if ( length === undefined ) {
|
| 676 |
+
for ( name in object )
|
| 677 |
+
if ( callback.apply( object[ name ], args ) === false )
|
| 678 |
+
break;
|
| 679 |
+
} else
|
| 680 |
+
for ( ; i < length; )
|
| 681 |
+
if ( callback.apply( object[ i++ ], args ) === false )
|
| 682 |
+
break;
|
| 683 |
+
|
| 684 |
+
// A special, fast, case for the most common use of each
|
| 685 |
+
} else {
|
| 686 |
+
if ( length === undefined ) {
|
| 687 |
+
for ( name in object )
|
| 688 |
+
if ( callback.call( object[ name ], name, object[ name ] ) === false )
|
| 689 |
+
break;
|
| 690 |
+
} else
|
| 691 |
+
for ( var value = object[0];
|
| 692 |
+
i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
|
| 693 |
+
}
|
| 694 |
+
|
| 695 |
+
return object;
|
| 696 |
+
},
|
| 697 |
+
|
| 698 |
+
prop: function( elem, value, type, i, name ) {
|
| 699 |
+
// Handle executable functions
|
| 700 |
+
if ( jQuery.isFunction( value ) )
|
| 701 |
+
value = value.call( elem, i );
|
| 702 |
+
|
| 703 |
+
// Handle passing in a number to a CSS property
|
| 704 |
+
return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ?
|
| 705 |
+
value + "px" :
|
| 706 |
+
value;
|
| 707 |
+
},
|
| 708 |
+
|
| 709 |
+
className: {
|
| 710 |
+
// internal only, use addClass("class")
|
| 711 |
+
add: function( elem, classNames ) {
|
| 712 |
+
jQuery.each((classNames || "").split(/\s+/), function(i, className){
|
| 713 |
+
if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
|
| 714 |
+
elem.className += (elem.className ? " " : "") + className;
|
| 715 |
+
});
|
| 716 |
+
},
|
| 717 |
+
|
| 718 |
+
// internal only, use removeClass("class")
|
| 719 |
+
remove: function( elem, classNames ) {
|
| 720 |
+
if (elem.nodeType == 1)
|
| 721 |
+
elem.className = classNames !== undefined ?
|
| 722 |
+
jQuery.grep(elem.className.split(/\s+/), function(className){
|
| 723 |
+
return !jQuery.className.has( classNames, className );
|
| 724 |
+
}).join(" ") :
|
| 725 |
+
"";
|
| 726 |
+
},
|
| 727 |
+
|
| 728 |
+
// internal only, use hasClass("class")
|
| 729 |
+
has: function( elem, className ) {
|
| 730 |
+
return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
|
| 731 |
+
}
|
| 732 |
+
},
|
| 733 |
+
|
| 734 |
+
// A method for quickly swapping in/out CSS properties to get correct calculations
|
| 735 |
+
swap: function( elem, options, callback ) {
|
| 736 |
+
var old = {};
|
| 737 |
+
// Remember the old values, and insert the new ones
|
| 738 |
+
for ( var name in options ) {
|
| 739 |
+
old[ name ] = elem.style[ name ];
|
| 740 |
+
elem.style[ name ] = options[ name ];
|
| 741 |
+
}
|
| 742 |
+
|
| 743 |
+
callback.call( elem );
|
| 744 |
+
|
| 745 |
+
// Revert the old values
|
| 746 |
+
for ( var name in options )
|
| 747 |
+
elem.style[ name ] = old[ name ];
|
| 748 |
+
},
|
| 749 |
+
|
| 750 |
+
css: function( elem, name, force, extra ) {
|
| 751 |
+
if ( name == "width" || name == "height" ) {
|
| 752 |
+
var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
|
| 753 |
+
|
| 754 |
+
function getWH() {
|
| 755 |
+
val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
|
| 756 |
+
|
| 757 |
+
if ( extra === "border" )
|
| 758 |
+
return;
|
| 759 |
+
|
| 760 |
+
jQuery.each( which, function() {
|
| 761 |
+
if ( !extra )
|
| 762 |
+
val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
|
| 763 |
+
if ( extra === "margin" )
|
| 764 |
+
val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
|
| 765 |
+
else
|
| 766 |
+
val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
|
| 767 |
+
});
|
| 768 |
+
}
|
| 769 |
+
|
| 770 |
+
if ( elem.offsetWidth !== 0 )
|
| 771 |
+
getWH();
|
| 772 |
+
else
|
| 773 |
+
jQuery.swap( elem, props, getWH );
|
| 774 |
+
|
| 775 |
+
return Math.max(0, Math.round(val));
|
| 776 |
+
}
|
| 777 |
+
|
| 778 |
+
return jQuery.curCSS( elem, name, force );
|
| 779 |
+
},
|
| 780 |
+
|
| 781 |
+
curCSS: function( elem, name, force ) {
|
| 782 |
+
var ret, style = elem.style;
|
| 783 |
+
|
| 784 |
+
// We need to handle opacity special in IE
|
| 785 |
+
if ( name == "opacity" && !jQuery.support.opacity ) {
|
| 786 |
+
ret = jQuery.attr( style, "opacity" );
|
| 787 |
+
|
| 788 |
+
return ret == "" ?
|
| 789 |
+
"1" :
|
| 790 |
+
ret;
|
| 791 |
+
}
|
| 792 |
+
|
| 793 |
+
// Make sure we're using the right name for getting the float value
|
| 794 |
+
if ( name.match( /float/i ) )
|
| 795 |
+
name = styleFloat;
|
| 796 |
+
|
| 797 |
+
if ( !force && style && style[ name ] )
|
| 798 |
+
ret = style[ name ];
|
| 799 |
+
|
| 800 |
+
else if ( defaultView.getComputedStyle ) {
|
| 801 |
+
|
| 802 |
+
// Only "float" is needed here
|
| 803 |
+
if ( name.match( /float/i ) )
|
| 804 |
+
name = "float";
|
| 805 |
+
|
| 806 |
+
name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();
|
| 807 |
+
|
| 808 |
+
var computedStyle = defaultView.getComputedStyle( elem, null );
|
| 809 |
+
|
| 810 |
+
if ( computedStyle )
|
| 811 |
+
ret = computedStyle.getPropertyValue( name );
|
| 812 |
+
|
| 813 |
+
// We should always get a number back from opacity
|
| 814 |
+
if ( name == "opacity" && ret == "" )
|
| 815 |
+
ret = "1";
|
| 816 |
+
|
| 817 |
+
} else if ( elem.currentStyle ) {
|
| 818 |
+
var camelCase = name.replace(/\-(\w)/g, function(all, letter){
|
| 819 |
+
return letter.toUpperCase();
|
| 820 |
+
});
|
| 821 |
+
|
| 822 |
+
ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
|
| 823 |
+
|
| 824 |
+
// From the awesome hack by Dean Edwards
|
| 825 |
+
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
|
| 826 |
+
|
| 827 |
+
// If we're not dealing with a regular pixel number
|
| 828 |
+
// but a number that has a weird ending, we need to convert it to pixels
|
| 829 |
+
if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
|
| 830 |
+
// Remember the original values
|
| 831 |
+
var left = style.left, rsLeft = elem.runtimeStyle.left;
|
| 832 |
+
|
| 833 |
+
// Put in the new values to get a computed value out
|
| 834 |
+
elem.runtimeStyle.left = elem.currentStyle.left;
|
| 835 |
+
style.left = ret || 0;
|
| 836 |
+
ret = style.pixelLeft + "px";
|
| 837 |
+
|
| 838 |
+
// Revert the changed values
|
| 839 |
+
style.left = left;
|
| 840 |
+
elem.runtimeStyle.left = rsLeft;
|
| 841 |
+
}
|
| 842 |
+
}
|
| 843 |
+
|
| 844 |
+
return ret;
|
| 845 |
+
},
|
| 846 |
+
|
| 847 |
+
clean: function( elems, context, fragment ) {
|
| 848 |
+
context = context || document;
|
| 849 |
+
|
| 850 |
+
// !context.createElement fails in IE with an error but returns typeof 'object'
|
| 851 |
+
if ( typeof context.createElement === "undefined" )
|
| 852 |
+
context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
|
| 853 |
+
|
| 854 |
+
// If a single string is passed in and it's a single tag
|
| 855 |
+
// just do a createElement and skip the rest
|
| 856 |
+
if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) {
|
| 857 |
+
var match = /^<(\w+)\s*\/?>$/.exec(elems[0]);
|
| 858 |
+
if ( match )
|
| 859 |
+
return [ context.createElement( match[1] ) ];
|
| 860 |
+
}
|
| 861 |
+
|
| 862 |
+
var ret = [], scripts = [], div = context.createElement("div");
|
| 863 |
+
|
| 864 |
+
jQuery.each(elems, function(i, elem){
|
| 865 |
+
if ( typeof elem === "number" )
|
| 866 |
+
elem += '';
|
| 867 |
+
|
| 868 |
+
if ( !elem )
|
| 869 |
+
return;
|
| 870 |
+
|
| 871 |
+
// Convert html string into DOM nodes
|
| 872 |
+
if ( typeof elem === "string" ) {
|
| 873 |
+
// Fix "XHTML"-style tags in all browsers
|
| 874 |
+
elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
|
| 875 |
+
return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
|
| 876 |
+
all :
|
| 877 |
+
front + "></" + tag + ">";
|
| 878 |
+
});
|
| 879 |
+
|
| 880 |
+
// Trim whitespace, otherwise indexOf won't work as expected
|
| 881 |
+
var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase();
|
| 882 |
+
|
| 883 |
+
var wrap =
|
| 884 |
+
// option or optgroup
|
| 885 |
+
!tags.indexOf("<opt") &&
|
| 886 |
+
[ 1, "<select multiple='multiple'>", "</select>" ] ||
|
| 887 |
+
|
| 888 |
+
!tags.indexOf("<leg") &&
|
| 889 |
+
[ 1, "<fieldset>", "</fieldset>" ] ||
|
| 890 |
+
|
| 891 |
+
tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
|
| 892 |
+
[ 1, "<table>", "</table>" ] ||
|
| 893 |
+
|
| 894 |
+
!tags.indexOf("<tr") &&
|
| 895 |
+
[ 2, "<table><tbody>", "</tbody></table>" ] ||
|
| 896 |
+
|
| 897 |
+
// <thead> matched above
|
| 898 |
+
(!tags.indexOf("<td") || !tags.indexOf("<th")) &&
|
| 899 |
+
[ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
|
| 900 |
+
|
| 901 |
+
!tags.indexOf("<col") &&
|
| 902 |
+
[ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
|
| 903 |
+
|
| 904 |
+
// IE can't serialize <link> and <script> tags normally
|
| 905 |
+
!jQuery.support.htmlSerialize &&
|
| 906 |
+
[ 1, "div<div>", "</div>" ] ||
|
| 907 |
+
|
| 908 |
+
[ 0, "", "" ];
|
| 909 |
+
|
| 910 |
+
// Go to html and back, then peel off extra wrappers
|
| 911 |
+
div.innerHTML = wrap[1] + elem + wrap[2];
|
| 912 |
+
|
| 913 |
+
// Move to the right depth
|
| 914 |
+
while ( wrap[0]-- )
|
| 915 |
+
div = div.lastChild;
|
| 916 |
+
|
| 917 |
+
// Remove IE's autoinserted <tbody> from table fragments
|
| 918 |
+
if ( !jQuery.support.tbody ) {
|
| 919 |
+
|
| 920 |
+
// String was a <table>, *may* have spurious <tbody>
|
| 921 |
+
var hasBody = /<tbody/i.test(elem),
|
| 922 |
+
tbody = !tags.indexOf("<table") && !hasBody ?
|
| 923 |
+
div.firstChild && div.firstChild.childNodes :
|
| 924 |
+
|
| 925 |
+
// String was a bare <thead> or <tfoot>
|
| 926 |
+
wrap[1] == "<table>" && !hasBody ?
|
| 927 |
+
div.childNodes :
|
| 928 |
+
[];
|
| 929 |
+
|
| 930 |
+
for ( var j = tbody.length - 1; j >= 0 ; --j )
|
| 931 |
+
if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
|
| 932 |
+
tbody[ j ].parentNode.removeChild( tbody[ j ] );
|
| 933 |
+
|
| 934 |
+
}
|
| 935 |
+
|
| 936 |
+
// IE completely kills leading whitespace when innerHTML is used
|
| 937 |
+
if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) )
|
| 938 |
+
div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
|
| 939 |
+
|
| 940 |
+
elem = jQuery.makeArray( div.childNodes );
|
| 941 |
+
}
|
| 942 |
+
|
| 943 |
+
if ( elem.nodeType )
|
| 944 |
+
ret.push( elem );
|
| 945 |
+
else
|
| 946 |
+
ret = jQuery.merge( ret, elem );
|
| 947 |
+
|
| 948 |
+
});
|
| 949 |
+
|
| 950 |
+
if ( fragment ) {
|
| 951 |
+
for ( var i = 0; ret[i]; i++ ) {
|
| 952 |
+
if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
|
| 953 |
+
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
|
| 954 |
+
} else {
|
| 955 |
+
if ( ret[i].nodeType === 1 )
|
| 956 |
+
ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
|
| 957 |
+
fragment.appendChild( ret[i] );
|
| 958 |
+
}
|
| 959 |
+
}
|
| 960 |
+
|
| 961 |
+
return scripts;
|
| 962 |
+
}
|
| 963 |
+
|
| 964 |
+
return ret;
|
| 965 |
+
},
|
| 966 |
+
|
| 967 |
+
attr: function( elem, name, value ) {
|
| 968 |
+
// don't set attributes on text and comment nodes
|
| 969 |
+
if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
|
| 970 |
+
return undefined;
|
| 971 |
+
|
| 972 |
+
var notxml = !jQuery.isXMLDoc( elem ),
|
| 973 |
+
// Whether we are setting (or getting)
|
| 974 |
+
set = value !== undefined;
|
| 975 |
+
|
| 976 |
+
// Try to normalize/fix the name
|
| 977 |
+
name = notxml && jQuery.props[ name ] || name;
|
| 978 |
+
|
| 979 |
+
// Only do all the following if this is a node (faster for style)
|
| 980 |
+
// IE elem.getAttribute passes even for style
|
| 981 |
+
if ( elem.tagName ) {
|
| 982 |
+
|
| 983 |
+
// These attributes require special treatment
|
| 984 |
+
var special = /href|src|style/.test( name );
|
| 985 |
+
|
| 986 |
+
// Safari mis-reports the default selected property of a hidden option
|
| 987 |
+
// Accessing the parent's selectedIndex property fixes it
|
| 988 |
+
if ( name == "selected" && elem.parentNode )
|
| 989 |
+
elem.parentNode.selectedIndex;
|
| 990 |
+
|
| 991 |
+
// If applicable, access the attribute via the DOM 0 way
|
| 992 |
+
if ( name in elem && notxml && !special ) {
|
| 993 |
+
if ( set ){
|
| 994 |
+
// We can't allow the type property to be changed (since it causes problems in IE)
|
| 995 |
+
if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
|
| 996 |
+
throw "type property can't be changed";
|
| 997 |
+
|
| 998 |
+
elem[ name ] = value;
|
| 999 |
+
}
|
| 1000 |
+
|
| 1001 |
+
// browsers index elements by id/name on forms, give priority to attributes.
|
| 1002 |
+
if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) )
|
| 1003 |
+
return elem.getAttributeNode( name ).nodeValue;
|
| 1004 |
+
|
| 1005 |
+
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
|
| 1006 |
+
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
| 1007 |
+
if ( name == "tabIndex" ) {
|
| 1008 |
+
var attributeNode = elem.getAttributeNode( "tabIndex" );
|
| 1009 |
+
return attributeNode && attributeNode.specified
|
| 1010 |
+
? attributeNode.value
|
| 1011 |
+
: elem.nodeName.match(/(button|input|object|select|textarea)/i)
|
| 1012 |
+
? 0
|
| 1013 |
+
: elem.nodeName.match(/^(a|area)$/i) && elem.href
|
| 1014 |
+
? 0
|
| 1015 |
+
: undefined;
|
| 1016 |
+
}
|
| 1017 |
+
|
| 1018 |
+
return elem[ name ];
|
| 1019 |
+
}
|
| 1020 |
+
|
| 1021 |
+
if ( !jQuery.support.style && notxml && name == "style" )
|
| 1022 |
+
return jQuery.attr( elem.style, "cssText", value );
|
| 1023 |
+
|
| 1024 |
+
if ( set )
|
| 1025 |
+
// convert the value to a string (all browsers do this but IE) see #1070
|
| 1026 |
+
elem.setAttribute( name, "" + value );
|
| 1027 |
+
|
| 1028 |
+
var attr = !jQuery.support.hrefNormalized && notxml && special
|
| 1029 |
+
// Some attributes require a special call on IE
|
| 1030 |
+
? elem.getAttribute( name, 2 )
|
| 1031 |
+
: elem.getAttribute( name );
|
| 1032 |
+
|
| 1033 |
+
// Non-existent attributes return null, we normalize to undefined
|
| 1034 |
+
return attr === null ? undefined : attr;
|
| 1035 |
+
}
|
| 1036 |
+
|
| 1037 |
+
// elem is actually elem.style ... set the style
|
| 1038 |
+
|
| 1039 |
+
// IE uses filters for opacity
|
| 1040 |
+
if ( !jQuery.support.opacity && name == "opacity" ) {
|
| 1041 |
+
if ( set ) {
|
| 1042 |
+
// IE has trouble with opacity if it does not have layout
|
| 1043 |
+
// Force it by setting the zoom level
|
| 1044 |
+
elem.zoom = 1;
|
| 1045 |
+
|
| 1046 |
+
// Set the alpha filter to set the opacity
|
| 1047 |
+
elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
|
| 1048 |
+
(parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
|
| 1049 |
+
}
|
| 1050 |
+
|
| 1051 |
+
return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
|
| 1052 |
+
(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
|
| 1053 |
+
"";
|
| 1054 |
+
}
|
| 1055 |
+
|
| 1056 |
+
name = name.replace(/-([a-z])/ig, function(all, letter){
|
| 1057 |
+
return letter.toUpperCase();
|
| 1058 |
+
});
|
| 1059 |
+
|
| 1060 |
+
if ( set )
|
| 1061 |
+
elem[ name ] = value;
|
| 1062 |
+
|
| 1063 |
+
return elem[ name ];
|
| 1064 |
+
},
|
| 1065 |
+
|
| 1066 |
+
trim: function( text ) {
|
| 1067 |
+
return (text || "").replace( /^\s+|\s+$/g, "" );
|
| 1068 |
+
},
|
| 1069 |
+
|
| 1070 |
+
makeArray: function( array ) {
|
| 1071 |
+
var ret = [];
|
| 1072 |
+
|
| 1073 |
+
if( array != null ){
|
| 1074 |
+
var i = array.length;
|
| 1075 |
+
// The window, strings (and functions) also have 'length'
|
| 1076 |
+
if( i == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval )
|
| 1077 |
+
ret[0] = array;
|
| 1078 |
+
else
|
| 1079 |
+
while( i )
|
| 1080 |
+
ret[--i] = array[i];
|
| 1081 |
+
}
|
| 1082 |
+
|
| 1083 |
+
return ret;
|
| 1084 |
+
},
|
| 1085 |
+
|
| 1086 |
+
inArray: function( elem, array ) {
|
| 1087 |
+
for ( var i = 0, length = array.length; i < length; i++ )
|
| 1088 |
+
// Use === because on IE, window == document
|
| 1089 |
+
if ( array[ i ] === elem )
|
| 1090 |
+
return i;
|
| 1091 |
+
|
| 1092 |
+
return -1;
|
| 1093 |
+
},
|
| 1094 |
+
|
| 1095 |
+
merge: function( first, second ) {
|
| 1096 |
+
// We have to loop this way because IE & Opera overwrite the length
|
| 1097 |
+
// expando of getElementsByTagName
|
| 1098 |
+
var i = 0, elem, pos = first.length;
|
| 1099 |
+
// Also, we need to make sure that the correct elements are being returned
|
| 1100 |
+
// (IE returns comment nodes in a '*' query)
|
| 1101 |
+
if ( !jQuery.support.getAll ) {
|
| 1102 |
+
while ( (elem = second[ i++ ]) != null )
|
| 1103 |
+
if ( elem.nodeType != 8 )
|
| 1104 |
+
first[ pos++ ] = elem;
|
| 1105 |
+
|
| 1106 |
+
} else
|
| 1107 |
+
while ( (elem = second[ i++ ]) != null )
|
| 1108 |
+
first[ pos++ ] = elem;
|
| 1109 |
+
|
| 1110 |
+
return first;
|
| 1111 |
+
},
|
| 1112 |
+
|
| 1113 |
+
unique: function( array ) {
|
| 1114 |
+
var ret = [], done = {};
|
| 1115 |
+
|
| 1116 |
+
try {
|
| 1117 |
+
|
| 1118 |
+
for ( var i = 0, length = array.length; i < length; i++ ) {
|
| 1119 |
+
var id = jQuery.data( array[ i ] );
|
| 1120 |
+
|
| 1121 |
+
if ( !done[ id ] ) {
|
| 1122 |
+
done[ id ] = true;
|
| 1123 |
+
ret.push( array[ i ] );
|
| 1124 |
+
}
|
| 1125 |
+
}
|
| 1126 |
+
|
| 1127 |
+
} catch( e ) {
|
| 1128 |
+
ret = array;
|
| 1129 |
+
}
|
| 1130 |
+
|
| 1131 |
+
return ret;
|
| 1132 |
+
},
|
| 1133 |
+
|
| 1134 |
+
grep: function( elems, callback, inv ) {
|
| 1135 |
+
var ret = [];
|
| 1136 |
+
|
| 1137 |
+
// Go through the array, only saving the items
|
| 1138 |
+
// that pass the validator function
|
| 1139 |
+
for ( var i = 0, length = elems.length; i < length; i++ )
|
| 1140 |
+
if ( !inv != !callback( elems[ i ], i ) )
|
| 1141 |
+
ret.push( elems[ i ] );
|
| 1142 |
+
|
| 1143 |
+
return ret;
|
| 1144 |
+
},
|
| 1145 |
+
|
| 1146 |
+
map: function( elems, callback ) {
|
| 1147 |
+
var ret = [];
|
| 1148 |
+
|
| 1149 |
+
// Go through the array, translating each of the items to their
|
| 1150 |
+
// new value (or values).
|
| 1151 |
+
for ( var i = 0, length = elems.length; i < length; i++ ) {
|
| 1152 |
+
var value = callback( elems[ i ], i );
|
| 1153 |
+
|
| 1154 |
+
if ( value != null )
|
| 1155 |
+
ret[ ret.length ] = value;
|
| 1156 |
+
}
|
| 1157 |
+
|
| 1158 |
+
return ret.concat.apply( [], ret );
|
| 1159 |
+
}
|
| 1160 |
+
});
|
| 1161 |
+
|
| 1162 |
+
// Use of jQuery.browser is deprecated.
|
| 1163 |
+
// It's included for backwards compatibility and plugins,
|
| 1164 |
+
// although they should work to migrate away.
|
| 1165 |
+
|
| 1166 |
+
var userAgent = navigator.userAgent.toLowerCase();
|
| 1167 |
+
|
| 1168 |
+
// Figure out what browser is being used
|
| 1169 |
+
jQuery.browser = {
|
| 1170 |
+
version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
|
| 1171 |
+
safari: /webkit/.test( userAgent ),
|
| 1172 |
+
opera: /opera/.test( userAgent ),
|
| 1173 |
+
msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
|
| 1174 |
+
mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
|
| 1175 |
+
};
|
| 1176 |
+
|
| 1177 |
+
jQuery.each({
|
| 1178 |
+
parent: function(elem){return elem.parentNode;},
|
| 1179 |
+
parents: function(elem){return jQuery.dir(elem,"parentNode");},
|
| 1180 |
+
next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
|
| 1181 |
+
prev: function(elem){return jQuery.nth(elem,2,"previousSibling");},
|
| 1182 |
+
nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
|
| 1183 |
+
prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
|
| 1184 |
+
siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
|
| 1185 |
+
children: function(elem){return jQuery.sibling(elem.firstChild);},
|
| 1186 |
+
contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
|
| 1187 |
+
}, function(name, fn){
|
| 1188 |
+
jQuery.fn[ name ] = function( selector ) {
|
| 1189 |
+
var ret = jQuery.map( this, fn );
|
| 1190 |
+
|
| 1191 |
+
if ( selector && typeof selector == "string" )
|
| 1192 |
+
ret = jQuery.multiFilter( selector, ret );
|
| 1193 |
+
|
| 1194 |
+
return this.pushStack( jQuery.unique( ret ), name, selector );
|
| 1195 |
+
};
|
| 1196 |
+
});
|
| 1197 |
+
|
| 1198 |
+
jQuery.each({
|
| 1199 |
+
appendTo: "append",
|
| 1200 |
+
prependTo: "prepend",
|
| 1201 |
+
insertBefore: "before",
|
| 1202 |
+
insertAfter: "after",
|
| 1203 |
+
replaceAll: "replaceWith"
|
| 1204 |
+
}, function(name, original){
|
| 1205 |
+
jQuery.fn[ name ] = function( selector ) {
|
| 1206 |
+
var ret = [], insert = jQuery( selector );
|
| 1207 |
+
|
| 1208 |
+
for ( var i = 0, l = insert.length; i < l; i++ ) {
|
| 1209 |
+
var elems = (i > 0 ? this.clone(true) : this).get();
|
| 1210 |
+
jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
|
| 1211 |
+
ret = ret.concat( elems );
|
| 1212 |
+
}
|
| 1213 |
+
|
| 1214 |
+
return this.pushStack( ret, name, selector );
|
| 1215 |
+
};
|
| 1216 |
+
});
|
| 1217 |
+
|
| 1218 |
+
jQuery.each({
|
| 1219 |
+
removeAttr: function( name ) {
|
| 1220 |
+
jQuery.attr( this, name, "" );
|
| 1221 |
+
if (this.nodeType == 1)
|
| 1222 |
+
this.removeAttribute( name );
|
| 1223 |
+
},
|
| 1224 |
+
|
| 1225 |
+
addClass: function( classNames ) {
|
| 1226 |
+
jQuery.className.add( this, classNames );
|
| 1227 |
+
},
|
| 1228 |
+
|
| 1229 |
+
removeClass: function( classNames ) {
|
| 1230 |
+
jQuery.className.remove( this, classNames );
|
| 1231 |
+
},
|
| 1232 |
+
|
| 1233 |
+
toggleClass: function( classNames, state ) {
|
| 1234 |
+
if( typeof state !== "boolean" )
|
| 1235 |
+
state = !jQuery.className.has( this, classNames );
|
| 1236 |
+
jQuery.className[ state ? "add" : "remove" ]( this, classNames );
|
| 1237 |
+
},
|
| 1238 |
+
|
| 1239 |
+
remove: function( selector ) {
|
| 1240 |
+
if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
|
| 1241 |
+
// Prevent memory leaks
|
| 1242 |
+
jQuery( "*", this ).add([this]).each(function(){
|
| 1243 |
+
jQuery.event.remove(this);
|
| 1244 |
+
jQuery.removeData(this);
|
| 1245 |
+
});
|
| 1246 |
+
if (this.parentNode)
|
| 1247 |
+
this.parentNode.removeChild( this );
|
| 1248 |
+
}
|
| 1249 |
+
},
|
| 1250 |
+
|
| 1251 |
+
empty: function() {
|
| 1252 |
+
// Remove element nodes and prevent memory leaks
|
| 1253 |
+
jQuery(this).children().remove();
|
| 1254 |
+
|
| 1255 |
+
// Remove any remaining nodes
|
| 1256 |
+
while ( this.firstChild )
|
| 1257 |
+
this.removeChild( this.firstChild );
|
| 1258 |
+
}
|
| 1259 |
+
}, function(name, fn){
|
| 1260 |
+
jQuery.fn[ name ] = function(){
|
| 1261 |
+
return this.each( fn, arguments );
|
| 1262 |
+
};
|
| 1263 |
+
});
|
| 1264 |
+
|
| 1265 |
+
// Helper function used by the dimensions and offset modules
|
| 1266 |
+
function num(elem, prop) {
|
| 1267 |
+
return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
|
| 1268 |
+
}
|
| 1269 |
+
var expando = "jQuery" + now(), uuid = 0, windowData = {};
|
| 1270 |
+
|
| 1271 |
+
jQuery.extend({
|
| 1272 |
+
cache: {},
|
| 1273 |
+
|
| 1274 |
+
data: function( elem, name, data ) {
|
| 1275 |
+
elem = elem == window ?
|
| 1276 |
+
windowData :
|
| 1277 |
+
elem;
|
| 1278 |
+
|
| 1279 |
+
var id = elem[ expando ];
|
| 1280 |
+
|
| 1281 |
+
// Compute a unique ID for the element
|
| 1282 |
+
if ( !id )
|
| 1283 |
+
id = elem[ expando ] = ++uuid;
|
| 1284 |
+
|
| 1285 |
+
// Only generate the data cache if we're
|
| 1286 |
+
// trying to access or manipulate it
|
| 1287 |
+
if ( name && !jQuery.cache[ id ] )
|
| 1288 |
+
jQuery.cache[ id ] = {};
|
| 1289 |
+
|
| 1290 |
+
// Prevent overriding the named cache with undefined values
|
| 1291 |
+
if ( data !== undefined )
|
| 1292 |
+
jQuery.cache[ id ][ name ] = data;
|
| 1293 |
+
|
| 1294 |
+
// Return the named cache data, or the ID for the element
|
| 1295 |
+
return name ?
|
| 1296 |
+
jQuery.cache[ id ][ name ] :
|
| 1297 |
+
id;
|
| 1298 |
+
},
|
| 1299 |
+
|
| 1300 |
+
removeData: function( elem, name ) {
|
| 1301 |
+
elem = elem == window ?
|
| 1302 |
+
windowData :
|
| 1303 |
+
elem;
|
| 1304 |
+
|
| 1305 |
+
var id = elem[ expando ];
|
| 1306 |
+
|
| 1307 |
+
// If we want to remove a specific section of the element's data
|
| 1308 |
+
if ( name ) {
|
| 1309 |
+
if ( jQuery.cache[ id ] ) {
|
| 1310 |
+
// Remove the section of cache data
|
| 1311 |
+
delete jQuery.cache[ id ][ name ];
|
| 1312 |
+
|
| 1313 |
+
// If we've removed all the data, remove the element's cache
|
| 1314 |
+
name = "";
|
| 1315 |
+
|
| 1316 |
+
for ( name in jQuery.cache[ id ] )
|
| 1317 |
+
break;
|
| 1318 |
+
|
| 1319 |
+
if ( !name )
|
| 1320 |
+
jQuery.removeData( elem );
|
| 1321 |
+
}
|
| 1322 |
+
|
| 1323 |
+
// Otherwise, we want to remove all of the element's data
|
| 1324 |
+
} else {
|
| 1325 |
+
// Clean up the element expando
|
| 1326 |
+
try {
|
| 1327 |
+
delete elem[ expando ];
|
| 1328 |
+
} catch(e){
|
| 1329 |
+
// IE has trouble directly removing the expando
|
| 1330 |
+
// but it's ok with using removeAttribute
|
| 1331 |
+
if ( elem.removeAttribute )
|
| 1332 |
+
elem.removeAttribute( expando );
|
| 1333 |
+
}
|
| 1334 |
+
|
| 1335 |
+
// Completely remove the data cache
|
| 1336 |
+
delete jQuery.cache[ id ];
|
| 1337 |
+
}
|
| 1338 |
+
},
|
| 1339 |
+
queue: function( elem, type, data ) {
|
| 1340 |
+
if ( elem ){
|
| 1341 |
+
|
| 1342 |
+
type = (type || "fx") + "queue";
|
| 1343 |
+
|
| 1344 |
+
var q = jQuery.data( elem, type );
|
| 1345 |
+
|
| 1346 |
+
if ( !q || jQuery.isArray(data) )
|
| 1347 |
+
q = jQuery.data( elem, type, jQuery.makeArray(data) );
|
| 1348 |
+
else if( data )
|
| 1349 |
+
q.push( data );
|
| 1350 |
+
|
| 1351 |
+
}
|
| 1352 |
+
return q;
|
| 1353 |
+
},
|
| 1354 |
+
|
| 1355 |
+
dequeue: function( elem, type ){
|
| 1356 |
+
var queue = jQuery.queue( elem, type ),
|
| 1357 |
+
fn = queue.shift();
|
| 1358 |
+
|
| 1359 |
+
if( !type || type === "fx" )
|
| 1360 |
+
fn = queue[0];
|
| 1361 |
+
|
| 1362 |
+
if( fn !== undefined )
|
| 1363 |
+
fn.call(elem);
|
| 1364 |
+
}
|
| 1365 |
+
});
|
| 1366 |
+
|
| 1367 |
+
jQuery.fn.extend({
|
| 1368 |
+
data: function( key, value ){
|
| 1369 |
+
var parts = key.split(".");
|
| 1370 |
+
parts[1] = parts[1] ? "." + parts[1] : "";
|
| 1371 |
+
|
| 1372 |
+
if ( value === undefined ) {
|
| 1373 |
+
var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
|
| 1374 |
+
|
| 1375 |
+
if ( data === undefined && this.length )
|
| 1376 |
+
data = jQuery.data( this[0], key );
|
| 1377 |
+
|
| 1378 |
+
return data === undefined && parts[1] ?
|
| 1379 |
+
this.data( parts[0] ) :
|
| 1380 |
+
data;
|
| 1381 |
+
} else
|
| 1382 |
+
return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
|
| 1383 |
+
jQuery.data( this, key, value );
|
| 1384 |
+
});
|
| 1385 |
+
},
|
| 1386 |
+
|
| 1387 |
+
removeData: function( key ){
|
| 1388 |
+
return this.each(function(){
|
| 1389 |
+
jQuery.removeData( this, key );
|
| 1390 |
+
});
|
| 1391 |
+
},
|
| 1392 |
+
queue: function(type, data){
|
| 1393 |
+
if ( typeof type !== "string" ) {
|
| 1394 |
+
data = type;
|
| 1395 |
+
type = "fx";
|
| 1396 |
+
}
|
| 1397 |
+
|
| 1398 |
+
if ( data === undefined )
|
| 1399 |
+
return jQuery.queue( this[0], type );
|
| 1400 |
+
|
| 1401 |
+
return this.each(function(){
|
| 1402 |
+
var queue = jQuery.queue( this, type, data );
|
| 1403 |
+
|
| 1404 |
+
if( type == "fx" && queue.length == 1 )
|
| 1405 |
+
queue[0].call(this);
|
| 1406 |
+
});
|
| 1407 |
+
},
|
| 1408 |
+
dequeue: function(type){
|
| 1409 |
+
return this.each(function(){
|
| 1410 |
+
jQuery.dequeue( this, type );
|
| 1411 |
+
});
|
| 1412 |
+
}
|
| 1413 |
+
});/*!
|
| 1414 |
+
* Sizzle CSS Selector Engine - v0.9.3
|
| 1415 |
+
* Copyright 2009, The Dojo Foundation
|
| 1416 |
+
* Released under the MIT, BSD, and GPL Licenses.
|
| 1417 |
+
* More information: http://sizzlejs.com/
|
| 1418 |
+
*/
|
| 1419 |
+
(function(){
|
| 1420 |
+
|
| 1421 |
+
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,
|
| 1422 |
+
done = 0,
|
| 1423 |
+
toString = Object.prototype.toString;
|
| 1424 |
+
|
| 1425 |
+
var Sizzle = function(selector, context, results, seed) {
|
| 1426 |
+
results = results || [];
|
| 1427 |
+
context = context || document;
|
| 1428 |
+
|
| 1429 |
+
if ( context.nodeType !== 1 && context.nodeType !== 9 )
|
| 1430 |
+
return [];
|
| 1431 |
+
|
| 1432 |
+
if ( !selector || typeof selector !== "string" ) {
|
| 1433 |
+
return results;
|
| 1434 |
+
}
|
| 1435 |
+
|
| 1436 |
+
var parts = [], m, set, checkSet, check, mode, extra, prune = true;
|
| 1437 |
+
|
| 1438 |
+
// Reset the position of the chunker regexp (start from head)
|
| 1439 |
+
chunker.lastIndex = 0;
|
| 1440 |
+
|
| 1441 |
+
while ( (m = chunker.exec(selector)) !== null ) {
|
| 1442 |
+
parts.push( m[1] );
|
| 1443 |
+
|
| 1444 |
+
if ( m[2] ) {
|
| 1445 |
+
extra = RegExp.rightContext;
|
| 1446 |
+
break;
|
| 1447 |
+
}
|
| 1448 |
+
}
|
| 1449 |
+
|
| 1450 |
+
if ( parts.length > 1 && origPOS.exec( selector ) ) {
|
| 1451 |
+
if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
|
| 1452 |
+
set = posProcess( parts[0] + parts[1], context );
|
| 1453 |
+
} else {
|
| 1454 |
+
set = Expr.relative[ parts[0] ] ?
|
| 1455 |
+
[ context ] :
|
| 1456 |
+
Sizzle( parts.shift(), context );
|
| 1457 |
+
|
| 1458 |
+
while ( parts.length ) {
|
| 1459 |
+
selector = parts.shift();
|
| 1460 |
+
|
| 1461 |
+
if ( Expr.relative[ selector ] )
|
| 1462 |
+
selector += parts.shift();
|
| 1463 |
+
|
| 1464 |
+
set = posProcess( selector, set );
|
| 1465 |
+
}
|
| 1466 |
+
}
|
| 1467 |
+
} else {
|
| 1468 |
+
var ret = seed ?
|
| 1469 |
+
{ expr: parts.pop(), set: makeArray(seed) } :
|
| 1470 |
+
Sizzle.find( parts.pop(), parts.length === 1 && context.parentNode ? context.parentNode : context, isXML(context) );
|
| 1471 |
+
set = Sizzle.filter( ret.expr, ret.set );
|
| 1472 |
+
|
| 1473 |
+
if ( parts.length > 0 ) {
|
| 1474 |
+
checkSet = makeArray(set);
|
| 1475 |
+
} else {
|
| 1476 |
+
prune = false;
|
| 1477 |
+
}
|
| 1478 |
+
|
| 1479 |
+
while ( parts.length ) {
|
| 1480 |
+
var cur = parts.pop(), pop = cur;
|
| 1481 |
+
|
| 1482 |
+
if ( !Expr.relative[ cur ] ) {
|
| 1483 |
+
cur = "";
|
| 1484 |
+
} else {
|
| 1485 |
+
pop = parts.pop();
|
| 1486 |
+
}
|
| 1487 |
+
|
| 1488 |
+
if ( pop == null ) {
|
| 1489 |
+
pop = context;
|
| 1490 |
+
}
|
| 1491 |
+
|
| 1492 |
+
Expr.relative[ cur ]( checkSet, pop, isXML(context) );
|
| 1493 |
+
}
|
| 1494 |
+
}
|
| 1495 |
+
|
| 1496 |
+
if ( !checkSet ) {
|
| 1497 |
+
checkSet = set;
|
| 1498 |
+
}
|
| 1499 |
+
|
| 1500 |
+
if ( !checkSet ) {
|
| 1501 |
+
throw "Syntax error, unrecognized expression: " + (cur || selector);
|
| 1502 |
+
}
|
| 1503 |
+
|
| 1504 |
+
if ( toString.call(checkSet) === "[object Array]" ) {
|
| 1505 |
+
if ( !prune ) {
|
| 1506 |
+
results.push.apply( results, checkSet );
|
| 1507 |
+
} else if ( context.nodeType === 1 ) {
|
| 1508 |
+
for ( var i = 0; checkSet[i] != null; i++ ) {
|
| 1509 |
+
if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
|
| 1510 |
+
results.push( set[i] );
|
| 1511 |
+
}
|
| 1512 |
+
}
|
| 1513 |
+
} else {
|
| 1514 |
+
for ( var i = 0; checkSet[i] != null; i++ ) {
|
| 1515 |
+
if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
|
| 1516 |
+
results.push( set[i] );
|
| 1517 |
+
}
|
| 1518 |
+
}
|
| 1519 |
+
}
|
| 1520 |
+
} else {
|
| 1521 |
+
makeArray( checkSet, results );
|
| 1522 |
+
}
|
| 1523 |
+
|
| 1524 |
+
if ( extra ) {
|
| 1525 |
+
Sizzle( extra, context, results, seed );
|
| 1526 |
+
|
| 1527 |
+
if ( sortOrder ) {
|
| 1528 |
+
hasDuplicate = false;
|
| 1529 |
+
results.sort(sortOrder);
|
| 1530 |
+
|
| 1531 |
+
if ( hasDuplicate ) {
|
| 1532 |
+
for ( var i = 1; i < results.length; i++ ) {
|
| 1533 |
+
if ( results[i] === results[i-1] ) {
|
| 1534 |
+
results.splice(i--, 1);
|
| 1535 |
+
}
|
| 1536 |
+
}
|
| 1537 |
+
}
|
| 1538 |
+
}
|
| 1539 |
+
}
|
| 1540 |
+
|
| 1541 |
+
return results;
|
| 1542 |
+
};
|
| 1543 |
+
|
| 1544 |
+
Sizzle.matches = function(expr, set){
|
| 1545 |
+
return Sizzle(expr, null, null, set);
|
| 1546 |
+
};
|
| 1547 |
+
|
| 1548 |
+
Sizzle.find = function(expr, context, isXML){
|
| 1549 |
+
var set, match;
|
| 1550 |
+
|
| 1551 |
+
if ( !expr ) {
|
| 1552 |
+
return [];
|
| 1553 |
+
}
|
| 1554 |
+
|
| 1555 |
+
for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
|
| 1556 |
+
var type = Expr.order[i], match;
|
| 1557 |
+
|
| 1558 |
+
if ( (match = Expr.match[ type ].exec( expr )) ) {
|
| 1559 |
+
var left = RegExp.leftContext;
|
| 1560 |
+
|
| 1561 |
+
if ( left.substr( left.length - 1 ) !== "\\" ) {
|
| 1562 |
+
match[1] = (match[1] || "").replace(/\\/g, "");
|
| 1563 |
+
set = Expr.find[ type ]( match, context, isXML );
|
| 1564 |
+
if ( set != null ) {
|
| 1565 |
+
expr = expr.replace( Expr.match[ type ], "" );
|
| 1566 |
+
break;
|
| 1567 |
+
}
|
| 1568 |
+
}
|
| 1569 |
+
}
|
| 1570 |
+
}
|
| 1571 |
+
|
| 1572 |
+
if ( !set ) {
|
| 1573 |
+
set = context.getElementsByTagName("*");
|
| 1574 |
+
}
|
| 1575 |
+
|
| 1576 |
+
return {set: set, expr: expr};
|
| 1577 |
+
};
|
| 1578 |
+
|
| 1579 |
+
Sizzle.filter = function(expr, set, inplace, not){
|
| 1580 |
+
var old = expr, result = [], curLoop = set, match, anyFound,
|
| 1581 |
+
isXMLFilter = set && set[0] && isXML(set[0]);
|
| 1582 |
+
|
| 1583 |
+
while ( expr && set.length ) {
|
| 1584 |
+
for ( var type in Expr.filter ) {
|
| 1585 |
+
if ( (match = Expr.match[ type ].exec( expr )) != null ) {
|
| 1586 |
+
var filter = Expr.filter[ type ], found, item;
|
| 1587 |
+
anyFound = false;
|
| 1588 |
+
|
| 1589 |
+
if ( curLoop == result ) {
|
| 1590 |
+
result = [];
|
| 1591 |
+
}
|
| 1592 |
+
|
| 1593 |
+
if ( Expr.preFilter[ type ] ) {
|
| 1594 |
+
match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
|
| 1595 |
+
|
| 1596 |
+
if ( !match ) {
|
| 1597 |
+
anyFound = found = true;
|
| 1598 |
+
} else if ( match === true ) {
|
| 1599 |
+
continue;
|
| 1600 |
+
}
|
| 1601 |
+
}
|
| 1602 |
+
|
| 1603 |
+
if ( match ) {
|
| 1604 |
+
for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
|
| 1605 |
+
if ( item ) {
|
| 1606 |
+
found = filter( item, match, i, curLoop );
|
| 1607 |
+
var pass = not ^ !!found;
|
| 1608 |
+
|
| 1609 |
+
if ( inplace && found != null ) {
|
| 1610 |
+
if ( pass ) {
|
| 1611 |
+
anyFound = true;
|
| 1612 |
+
} else {
|
| 1613 |
+
curLoop[i] = false;
|
| 1614 |
+
}
|
| 1615 |
+
} else if ( pass ) {
|
| 1616 |
+
result.push( item );
|
| 1617 |
+
anyFound = true;
|
| 1618 |
+
}
|
| 1619 |
+
}
|
| 1620 |
+
}
|
| 1621 |
+
}
|
| 1622 |
+
|
| 1623 |
+
if ( found !== undefined ) {
|
| 1624 |
+
if ( !inplace ) {
|
| 1625 |
+
curLoop = result;
|
| 1626 |
+
}
|
| 1627 |
+
|
| 1628 |
+
expr = expr.replace( Expr.match[ type ], "" );
|
| 1629 |
+
|
| 1630 |
+
if ( !anyFound ) {
|
| 1631 |
+
return [];
|
| 1632 |
+
}
|
| 1633 |
+
|
| 1634 |
+
break;
|
| 1635 |
+
}
|
| 1636 |
+
}
|
| 1637 |
+
}
|
| 1638 |
+
|
| 1639 |
+
// Improper expression
|
| 1640 |
+
if ( expr == old ) {
|
| 1641 |
+
if ( anyFound == null ) {
|
| 1642 |
+
throw "Syntax error, unrecognized expression: " + expr;
|
| 1643 |
+
} else {
|
| 1644 |
+
break;
|
| 1645 |
+
}
|
| 1646 |
+
}
|
| 1647 |
+
|
| 1648 |
+
old = expr;
|
| 1649 |
+
}
|
| 1650 |
+
|
| 1651 |
+
return curLoop;
|
| 1652 |
+
};
|
| 1653 |
+
|
| 1654 |
+
var Expr = Sizzle.selectors = {
|
| 1655 |
+
order: [ "ID", "NAME", "TAG" ],
|
| 1656 |
+
match: {
|
| 1657 |
+
ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
|
| 1658 |
+
CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
|
| 1659 |
+
NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,
|
| 1660 |
+
ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
|
| 1661 |
+
TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,
|
| 1662 |
+
CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
|
| 1663 |
+
POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
|
| 1664 |
+
PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
|
| 1665 |
+
},
|
| 1666 |
+
attrMap: {
|
| 1667 |
+
"class": "className",
|
| 1668 |
+
"for": "htmlFor"
|
| 1669 |
+
},
|
| 1670 |
+
attrHandle: {
|
| 1671 |
+
href: function(elem){
|
| 1672 |
+
return elem.getAttribute("href");
|
| 1673 |
+
}
|
| 1674 |
+
},
|
| 1675 |
+
relative: {
|
| 1676 |
+
"+": function(checkSet, part, isXML){
|
| 1677 |
+
var isPartStr = typeof part === "string",
|
| 1678 |
+
isTag = isPartStr && !/\W/.test(part),
|
| 1679 |
+
isPartStrNotTag = isPartStr && !isTag;
|
| 1680 |
+
|
| 1681 |
+
if ( isTag && !isXML ) {
|
| 1682 |
+
part = part.toUpperCase();
|
| 1683 |
+
}
|
| 1684 |
+
|
| 1685 |
+
for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
|
| 1686 |
+
if ( (elem = checkSet[i]) ) {
|
| 1687 |
+
while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
|
| 1688 |
+
|
| 1689 |
+
checkSet[i] = isPartStrNotTag || elem && elem.nodeName === part ?
|
| 1690 |
+
elem || false :
|
| 1691 |
+
elem === part;
|
| 1692 |
+
}
|
| 1693 |
+
}
|
| 1694 |
+
|
| 1695 |
+
if ( isPartStrNotTag ) {
|
| 1696 |
+
Sizzle.filter( part, checkSet, true );
|
| 1697 |
+
}
|
| 1698 |
+
},
|
| 1699 |
+
">": function(checkSet, part, isXML){
|
| 1700 |
+
var isPartStr = typeof part === "string";
|
| 1701 |
+
|
| 1702 |
+
if ( isPartStr && !/\W/.test(part) ) {
|
| 1703 |
+
part = isXML ? part : part.toUpperCase();
|
| 1704 |
+
|
| 1705 |
+
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
|
| 1706 |
+
var elem = checkSet[i];
|
| 1707 |
+
if ( elem ) {
|
| 1708 |
+
var parent = elem.parentNode;
|
| 1709 |
+
checkSet[i] = parent.nodeName === part ? parent : false;
|
| 1710 |
+
}
|
| 1711 |
+
}
|
| 1712 |
+
} else {
|
| 1713 |
+
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
|
| 1714 |
+
var elem = checkSet[i];
|
| 1715 |
+
if ( elem ) {
|
| 1716 |
+
checkSet[i] = isPartStr ?
|
| 1717 |
+
elem.parentNode :
|
| 1718 |
+
elem.parentNode === part;
|
| 1719 |
+
}
|
| 1720 |
+
}
|
| 1721 |
+
|
| 1722 |
+
if ( isPartStr ) {
|
| 1723 |
+
Sizzle.filter( part, checkSet, true );
|
| 1724 |
+
}
|
| 1725 |
+
}
|
| 1726 |
+
},
|
| 1727 |
+
"": function(checkSet, part, isXML){
|
| 1728 |
+
var doneName = done++, checkFn = dirCheck;
|
| 1729 |
+
|
| 1730 |
+
if ( !part.match(/\W/) ) {
|
| 1731 |
+
var nodeCheck = part = isXML ? part : part.toUpperCase();
|
| 1732 |
+
checkFn = dirNodeCheck;
|
| 1733 |
+
}
|
| 1734 |
+
|
| 1735 |
+
checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
|
| 1736 |
+
},
|
| 1737 |
+
"~": function(checkSet, part, isXML){
|
| 1738 |
+
var doneName = done++, checkFn = dirCheck;
|
| 1739 |
+
|
| 1740 |
+
if ( typeof part === "string" && !part.match(/\W/) ) {
|
| 1741 |
+
var nodeCheck = part = isXML ? part : part.toUpperCase();
|
| 1742 |
+
checkFn = dirNodeCheck;
|
| 1743 |
+
}
|
| 1744 |
+
|
| 1745 |
+
checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
|
| 1746 |
+
}
|
| 1747 |
+
},
|
| 1748 |
+
find: {
|
| 1749 |
+
ID: function(match, context, isXML){
|
| 1750 |
+
if ( typeof context.getElementById !== "undefined" && !isXML ) {
|
| 1751 |
+
var m = context.getElementById(match[1]);
|
| 1752 |
+
return m ? [m] : [];
|
| 1753 |
+
}
|
| 1754 |
+
},
|
| 1755 |
+
NAME: function(match, context, isXML){
|
| 1756 |
+
if ( typeof context.getElementsByName !== "undefined" ) {
|
| 1757 |
+
var ret = [], results = context.getElementsByName(match[1]);
|
| 1758 |
+
|
| 1759 |
+
for ( var i = 0, l = results.length; i < l; i++ ) {
|
| 1760 |
+
if ( results[i].getAttribute("name") === match[1] ) {
|
| 1761 |
+
ret.push( results[i] );
|
| 1762 |
+
}
|
| 1763 |
+
}
|
| 1764 |
+
|
| 1765 |
+
return ret.length === 0 ? null : ret;
|
| 1766 |
+
}
|
| 1767 |
+
},
|
| 1768 |
+
TAG: function(match, context){
|
| 1769 |
+
return context.getElementsByTagName(match[1]);
|
| 1770 |
+
}
|
| 1771 |
+
},
|
| 1772 |
+
preFilter: {
|
| 1773 |
+
CLASS: function(match, curLoop, inplace, result, not, isXML){
|
| 1774 |
+
match = " " + match[1].replace(/\\/g, "") + " ";
|
| 1775 |
+
|
| 1776 |
+
if ( isXML ) {
|
| 1777 |
+
return match;
|
| 1778 |
+
}
|
| 1779 |
+
|
| 1780 |
+
for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
|
| 1781 |
+
if ( elem ) {
|
| 1782 |
+
if ( not ^ (elem.className && (" " + elem.className + " ").indexOf(match) >= 0) ) {
|
| 1783 |
+
if ( !inplace )
|
| 1784 |
+
result.push( elem );
|
| 1785 |
+
} else if ( inplace ) {
|
| 1786 |
+
curLoop[i] = false;
|
| 1787 |
+
}
|
| 1788 |
+
}
|
| 1789 |
+
}
|
| 1790 |
+
|
| 1791 |
+
return false;
|
| 1792 |
+
},
|
| 1793 |
+
ID: function(match){
|
| 1794 |
+
return match[1].replace(/\\/g, "");
|
| 1795 |
+
},
|
| 1796 |
+
TAG: function(match, curLoop){
|
| 1797 |
+
for ( var i = 0; curLoop[i] === false; i++ ){}
|
| 1798 |
+
return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase();
|
| 1799 |
+
},
|
| 1800 |
+
CHILD: function(match){
|
| 1801 |
+
if ( match[1] == "nth" ) {
|
| 1802 |
+
// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
|
| 1803 |
+
var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
|
| 1804 |
+
match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
|
| 1805 |
+
!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
|
| 1806 |
+
|
| 1807 |
+
// calculate the numbers (first)n+(last) including if they are negative
|
| 1808 |
+
match[2] = (test[1] + (test[2] || 1)) - 0;
|
| 1809 |
+
match[3] = test[3] - 0;
|
| 1810 |
+
}
|
| 1811 |
+
|
| 1812 |
+
// TODO: Move to normal caching system
|
| 1813 |
+
match[0] = done++;
|
| 1814 |
+
|
| 1815 |
+
return match;
|
| 1816 |
+
},
|
| 1817 |
+
ATTR: function(match, curLoop, inplace, result, not, isXML){
|
| 1818 |
+
var name = match[1].replace(/\\/g, "");
|
| 1819 |
+
|
| 1820 |
+
if ( !isXML && Expr.attrMap[name] ) {
|
| 1821 |
+
match[1] = Expr.attrMap[name];
|
| 1822 |
+
}
|
| 1823 |
+
|
| 1824 |
+
if ( match[2] === "~=" ) {
|
| 1825 |
+
match[4] = " " + match[4] + " ";
|
| 1826 |
+
}
|
| 1827 |
+
|
| 1828 |
+
return match;
|
| 1829 |
+
},
|
| 1830 |
+
PSEUDO: function(match, curLoop, inplace, result, not){
|
| 1831 |
+
if ( match[1] === "not" ) {
|
| 1832 |
+
// If we're dealing with a complex expression, or a simple one
|
| 1833 |
+
if ( match[3].match(chunker).length > 1 || /^\w/.test(match[3]) ) {
|
| 1834 |
+
match[3] = Sizzle(match[3], null, null, curLoop);
|
| 1835 |
+
} else {
|
| 1836 |
+
var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
|
| 1837 |
+
if ( !inplace ) {
|
| 1838 |
+
result.push.apply( result, ret );
|
| 1839 |
+
}
|
| 1840 |
+
return false;
|
| 1841 |
+
}
|
| 1842 |
+
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
|
| 1843 |
+
return true;
|
| 1844 |
+
}
|
| 1845 |
+
|
| 1846 |
+
return match;
|
| 1847 |
+
},
|
| 1848 |
+
POS: function(match){
|
| 1849 |
+
match.unshift( true );
|
| 1850 |
+
return match;
|
| 1851 |
+
}
|
| 1852 |
+
},
|
| 1853 |
+
filters: {
|
| 1854 |
+
enabled: function(elem){
|
| 1855 |
+
return elem.disabled === false && elem.type !== "hidden";
|
| 1856 |
+
},
|
| 1857 |
+
disabled: function(elem){
|
| 1858 |
+
return elem.disabled === true;
|
| 1859 |
+
},
|
| 1860 |
+
checked: function(elem){
|
| 1861 |
+
return elem.checked === true;
|
| 1862 |
+
},
|
| 1863 |
+
selected: function(elem){
|
| 1864 |
+
// Accessing this property makes selected-by-default
|
| 1865 |
+
// options in Safari work properly
|
| 1866 |
+
elem.parentNode.selectedIndex;
|
| 1867 |
+
return elem.selected === true;
|
| 1868 |
+
},
|
| 1869 |
+
parent: function(elem){
|
| 1870 |
+
return !!elem.firstChild;
|
| 1871 |
+
},
|
| 1872 |
+
empty: function(elem){
|
| 1873 |
+
return !elem.firstChild;
|
| 1874 |
+
},
|
| 1875 |
+
has: function(elem, i, match){
|
| 1876 |
+
return !!Sizzle( match[3], elem ).length;
|
| 1877 |
+
},
|
| 1878 |
+
header: function(elem){
|
| 1879 |
+
return /h\d/i.test( elem.nodeName );
|
| 1880 |
+
},
|
| 1881 |
+
text: function(elem){
|
| 1882 |
+
return "text" === elem.type;
|
| 1883 |
+
},
|
| 1884 |
+
radio: function(elem){
|
| 1885 |
+
return "radio" === elem.type;
|
| 1886 |
+
},
|
| 1887 |
+
checkbox: function(elem){
|
| 1888 |
+
return "checkbox" === elem.type;
|
| 1889 |
+
},
|
| 1890 |
+
file: function(elem){
|
| 1891 |
+
return "file" === elem.type;
|
| 1892 |
+
},
|
| 1893 |
+
password: function(elem){
|
| 1894 |
+
return "password" === elem.type;
|
| 1895 |
+
},
|
| 1896 |
+
submit: function(elem){
|
| 1897 |
+
return "submit" === elem.type;
|
| 1898 |
+
},
|
| 1899 |
+
image: function(elem){
|
| 1900 |
+
return "image" === elem.type;
|
| 1901 |
+
},
|
| 1902 |
+
reset: function(elem){
|
| 1903 |
+
return "reset" === elem.type;
|
| 1904 |
+
},
|
| 1905 |
+
button: function(elem){
|
| 1906 |
+
return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON";
|
| 1907 |
+
},
|
| 1908 |
+
input: function(elem){
|
| 1909 |
+
return /input|select|textarea|button/i.test(elem.nodeName);
|
| 1910 |
+
}
|
| 1911 |
+
},
|
| 1912 |
+
setFilters: {
|
| 1913 |
+
first: function(elem, i){
|
| 1914 |
+
return i === 0;
|
| 1915 |
+
},
|
| 1916 |
+
last: function(elem, i, match, array){
|
| 1917 |
+
return i === array.length - 1;
|
| 1918 |
+
},
|
| 1919 |
+
even: function(elem, i){
|
| 1920 |
+
return i % 2 === 0;
|
| 1921 |
+
},
|
| 1922 |
+
odd: function(elem, i){
|
| 1923 |
+
return i % 2 === 1;
|
| 1924 |
+
},
|
| 1925 |
+
lt: function(elem, i, match){
|
| 1926 |
+
return i < match[3] - 0;
|
| 1927 |
+
},
|
| 1928 |
+
gt: function(elem, i, match){
|
| 1929 |
+
return i > match[3] - 0;
|
| 1930 |
+
},
|
| 1931 |
+
nth: function(elem, i, match){
|
| 1932 |
+
return match[3] - 0 == i;
|
| 1933 |
+
},
|
| 1934 |
+
eq: function(elem, i, match){
|
| 1935 |
+
return match[3] - 0 == i;
|
| 1936 |
+
}
|
| 1937 |
+
},
|
| 1938 |
+
filter: {
|
| 1939 |
+
PSEUDO: function(elem, match, i, array){
|
| 1940 |
+
var name = match[1], filter = Expr.filters[ name ];
|
| 1941 |
+
|
| 1942 |
+
if ( filter ) {
|
| 1943 |
+
return filter( elem, i, match, array );
|
| 1944 |
+
} else if ( name === "contains" ) {
|
| 1945 |
+
return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0;
|
| 1946 |
+
} else if ( name === "not" ) {
|
| 1947 |
+
var not = match[3];
|
| 1948 |
+
|
| 1949 |
+
for ( var i = 0, l = not.length; i < l; i++ ) {
|
| 1950 |
+
if ( not[i] === elem ) {
|
| 1951 |
+
return false;
|
| 1952 |
+
}
|
| 1953 |
+
}
|
| 1954 |
+
|
| 1955 |
+
return true;
|
| 1956 |
+
}
|
| 1957 |
+
},
|
| 1958 |
+
CHILD: function(elem, match){
|
| 1959 |
+
var type = match[1], node = elem;
|
| 1960 |
+
switch (type) {
|
| 1961 |
+
case 'only':
|
| 1962 |
+
case 'first':
|
| 1963 |
+
while (node = node.previousSibling) {
|
| 1964 |
+
if ( node.nodeType === 1 ) return false;
|
| 1965 |
+
}
|
| 1966 |
+
if ( type == 'first') return true;
|
| 1967 |
+
node = elem;
|
| 1968 |
+
case 'last':
|
| 1969 |
+
while (node = node.nextSibling) {
|
| 1970 |
+
if ( node.nodeType === 1 ) return false;
|
| 1971 |
+
}
|
| 1972 |
+
return true;
|
| 1973 |
+
case 'nth':
|
| 1974 |
+
var first = match[2], last = match[3];
|
| 1975 |
+
|
| 1976 |
+
if ( first == 1 && last == 0 ) {
|
| 1977 |
+
return true;
|
| 1978 |
+
}
|
| 1979 |
+
|
| 1980 |
+
var doneName = match[0],
|
| 1981 |
+
parent = elem.parentNode;
|
| 1982 |
+
|
| 1983 |
+
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
|
| 1984 |
+
var count = 0;
|
| 1985 |
+
for ( node = parent.firstChild; node; node = node.nextSibling ) {
|
| 1986 |
+
if ( node.nodeType === 1 ) {
|
| 1987 |
+
node.nodeIndex = ++count;
|
| 1988 |
+
}
|
| 1989 |
+
}
|
| 1990 |
+
parent.sizcache = doneName;
|
| 1991 |
+
}
|
| 1992 |
+
|
| 1993 |
+
var diff = elem.nodeIndex - last;
|
| 1994 |
+
if ( first == 0 ) {
|
| 1995 |
+
return diff == 0;
|
| 1996 |
+
} else {
|
| 1997 |
+
return ( diff % first == 0 && diff / first >= 0 );
|
| 1998 |
+
}
|
| 1999 |
+
}
|
| 2000 |
+
},
|
| 2001 |
+
ID: function(elem, match){
|
| 2002 |
+
return elem.nodeType === 1 && elem.getAttribute("id") === match;
|
| 2003 |
+
},
|
| 2004 |
+
TAG: function(elem, match){
|
| 2005 |
+
return (match === "*" && elem.nodeType === 1) || elem.nodeName === match;
|
| 2006 |
+
},
|
| 2007 |
+
CLASS: function(elem, match){
|
| 2008 |
+
return (" " + (elem.className || elem.getAttribute("class")) + " ")
|
| 2009 |
+
.indexOf( match ) > -1;
|
| 2010 |
+
},
|
| 2011 |
+
ATTR: function(elem, match){
|
| 2012 |
+
var name = match[1],
|
| 2013 |
+
result = Expr.attrHandle[ name ] ?
|
| 2014 |
+
Expr.attrHandle[ name ]( elem ) :
|
| 2015 |
+
elem[ name ] != null ?
|
| 2016 |
+
elem[ name ] :
|
| 2017 |
+
elem.getAttribute( name ),
|
| 2018 |
+
value = result + "",
|
| 2019 |
+
type = match[2],
|
| 2020 |
+
check = match[4];
|
| 2021 |
+
|
| 2022 |
+
return result == null ?
|
| 2023 |
+
type === "!=" :
|
| 2024 |
+
type === "=" ?
|
| 2025 |
+
value === check :
|
| 2026 |
+
type === "*=" ?
|
| 2027 |
+
value.indexOf(check) >= 0 :
|
| 2028 |
+
type === "~=" ?
|
| 2029 |
+
(" " + value + " ").indexOf(check) >= 0 :
|
| 2030 |
+
!check ?
|
| 2031 |
+
value && result !== false :
|
| 2032 |
+
type === "!=" ?
|
| 2033 |
+
value != check :
|
| 2034 |
+
type === "^=" ?
|
| 2035 |
+
value.indexOf(check) === 0 :
|
| 2036 |
+
type === "$=" ?
|
| 2037 |
+
value.substr(value.length - check.length) === check :
|
| 2038 |
+
type === "|=" ?
|
| 2039 |
+
value === check || value.substr(0, check.length + 1) === check + "-" :
|
| 2040 |
+
false;
|
| 2041 |
+
},
|
| 2042 |
+
POS: function(elem, match, i, array){
|
| 2043 |
+
var name = match[2], filter = Expr.setFilters[ name ];
|
| 2044 |
+
|
| 2045 |
+
if ( filter ) {
|
| 2046 |
+
return filter( elem, i, match, array );
|
| 2047 |
+
}
|
| 2048 |
+
}
|
| 2049 |
+
}
|
| 2050 |
+
};
|
| 2051 |
+
|
| 2052 |
+
var origPOS = Expr.match.POS;
|
| 2053 |
+
|
| 2054 |
+
for ( var type in Expr.match ) {
|
| 2055 |
+
Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
|
| 2056 |
+
}
|
| 2057 |
+
|
| 2058 |
+
var makeArray = function(array, results) {
|
| 2059 |
+
array = Array.prototype.slice.call( array );
|
| 2060 |
+
|
| 2061 |
+
if ( results ) {
|
| 2062 |
+
results.push.apply( results, array );
|
| 2063 |
+
return results;
|
| 2064 |
+
}
|
| 2065 |
+
|
| 2066 |
+
return array;
|
| 2067 |
+
};
|
| 2068 |
+
|
| 2069 |
+
// Perform a simple check to determine if the browser is capable of
|
| 2070 |
+
// converting a NodeList to an array using builtin methods.
|
| 2071 |
+
try {
|
| 2072 |
+
Array.prototype.slice.call( document.documentElement.childNodes );
|
| 2073 |
+
|
| 2074 |
+
// Provide a fallback method if it does not work
|
| 2075 |
+
} catch(e){
|
| 2076 |
+
makeArray = function(array, results) {
|
| 2077 |
+
var ret = results || [];
|
| 2078 |
+
|
| 2079 |
+
if ( toString.call(array) === "[object Array]" ) {
|
| 2080 |
+
Array.prototype.push.apply( ret, array );
|
| 2081 |
+
} else {
|
| 2082 |
+
if ( typeof array.length === "number" ) {
|
| 2083 |
+
for ( var i = 0, l = array.length; i < l; i++ ) {
|
| 2084 |
+
ret.push( array[i] );
|
| 2085 |
+
}
|
| 2086 |
+
} else {
|
| 2087 |
+
for ( var i = 0; array[i]; i++ ) {
|
| 2088 |
+
ret.push( array[i] );
|
| 2089 |
+
}
|
| 2090 |
+
}
|
| 2091 |
+
}
|
| 2092 |
+
|
| 2093 |
+
return ret;
|
| 2094 |
+
};
|
| 2095 |
+
}
|
| 2096 |
+
|
| 2097 |
+
var sortOrder;
|
| 2098 |
+
|
| 2099 |
+
if ( document.documentElement.compareDocumentPosition ) {
|
| 2100 |
+
sortOrder = function( a, b ) {
|
| 2101 |
+
var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
|
| 2102 |
+
if ( ret === 0 ) {
|
| 2103 |
+
hasDuplicate = true;
|
| 2104 |
+
}
|
| 2105 |
+
return ret;
|
| 2106 |
+
};
|
| 2107 |
+
} else if ( "sourceIndex" in document.documentElement ) {
|
| 2108 |
+
sortOrder = function( a, b ) {
|
| 2109 |
+
var ret = a.sourceIndex - b.sourceIndex;
|
| 2110 |
+
if ( ret === 0 ) {
|
| 2111 |
+
hasDuplicate = true;
|
| 2112 |
+
}
|
| 2113 |
+
return ret;
|
| 2114 |
+
};
|
| 2115 |
+
} else if ( document.createRange ) {
|
| 2116 |
+
sortOrder = function( a, b ) {
|
| 2117 |
+
var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
|
| 2118 |
+
aRange.selectNode(a);
|
| 2119 |
+
aRange.collapse(true);
|
| 2120 |
+
bRange.selectNode(b);
|
| 2121 |
+
bRange.collapse(true);
|
| 2122 |
+
var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
|
| 2123 |
+
if ( ret === 0 ) {
|
| 2124 |
+
hasDuplicate = true;
|
| 2125 |
+
}
|
| 2126 |
+
return ret;
|
| 2127 |
+
};
|
| 2128 |
+
}
|
| 2129 |
+
|
| 2130 |
+
// Check to see if the browser returns elements by name when
|
| 2131 |
+
// querying by getElementById (and provide a workaround)
|
| 2132 |
+
(function(){
|
| 2133 |
+
// We're going to inject a fake input element with a specified name
|
| 2134 |
+
var form = document.createElement("form"),
|
| 2135 |
+
id = "script" + (new Date).getTime();
|
| 2136 |
+
form.innerHTML = "<input name='" + id + "'/>";
|
| 2137 |
+
|
| 2138 |
+
// Inject it into the root element, check its status, and remove it quickly
|
| 2139 |
+
var root = document.documentElement;
|
| 2140 |
+
root.insertBefore( form, root.firstChild );
|
| 2141 |
+
|
| 2142 |
+
// The workaround has to do additional checks after a getElementById
|
| 2143 |
+
// Which slows things down for other browsers (hence the branching)
|
| 2144 |
+
if ( !!document.getElementById( id ) ) {
|
| 2145 |
+
Expr.find.ID = function(match, context, isXML){
|
| 2146 |
+
if ( typeof context.getElementById !== "undefined" && !isXML ) {
|
| 2147 |
+
var m = context.getElementById(match[1]);
|
| 2148 |
+
return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
|
| 2149 |
+
}
|
| 2150 |
+
};
|
| 2151 |
+
|
| 2152 |
+
Expr.filter.ID = function(elem, match){
|
| 2153 |
+
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
|
| 2154 |
+
return elem.nodeType === 1 && node && node.nodeValue === match;
|
| 2155 |
+
};
|
| 2156 |
+
}
|
| 2157 |
+
|
| 2158 |
+
root.removeChild( form );
|
| 2159 |
+
})();
|
| 2160 |
+
|
| 2161 |
+
(function(){
|
| 2162 |
+
// Check to see if the browser returns only elements
|
| 2163 |
+
// when doing getElementsByTagName("*")
|
| 2164 |
+
|
| 2165 |
+
// Create a fake element
|
| 2166 |
+
var div = document.createElement("div");
|
| 2167 |
+
div.appendChild( document.createComment("") );
|
| 2168 |
+
|
| 2169 |
+
// Make sure no comments are found
|
| 2170 |
+
if ( div.getElementsByTagName("*").length > 0 ) {
|
| 2171 |
+
Expr.find.TAG = function(match, context){
|
| 2172 |
+
var results = context.getElementsByTagName(match[1]);
|
| 2173 |
+
|
| 2174 |
+
// Filter out possible comments
|
| 2175 |
+
if ( match[1] === "*" ) {
|
| 2176 |
+
var tmp = [];
|
| 2177 |
+
|
| 2178 |
+
for ( var i = 0; results[i]; i++ ) {
|
| 2179 |
+
if ( results[i].nodeType === 1 ) {
|
| 2180 |
+
tmp.push( results[i] );
|
| 2181 |
+
}
|
| 2182 |
+
}
|
| 2183 |
+
|
| 2184 |
+
results = tmp;
|
| 2185 |
+
}
|
| 2186 |
+
|
| 2187 |
+
return results;
|
| 2188 |
+
};
|
| 2189 |
+
}
|
| 2190 |
+
|
| 2191 |
+
// Check to see if an attribute returns normalized href attributes
|
| 2192 |
+
div.innerHTML = "<a href='#'></a>";
|
| 2193 |
+
if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
|
| 2194 |
+
div.firstChild.getAttribute("href") !== "#" ) {
|
| 2195 |
+
Expr.attrHandle.href = function(elem){
|
| 2196 |
+
return elem.getAttribute("href", 2);
|
| 2197 |
+
};
|
| 2198 |
+
}
|
| 2199 |
+
})();
|
| 2200 |
+
|
| 2201 |
+
if ( document.querySelectorAll ) (function(){
|
| 2202 |
+
var oldSizzle = Sizzle, div = document.createElement("div");
|
| 2203 |
+
div.innerHTML = "<p class='TEST'></p>";
|
| 2204 |
+
|
| 2205 |
+
// Safari can't handle uppercase or unicode characters when
|
| 2206 |
+
// in quirks mode.
|
| 2207 |
+
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
|
| 2208 |
+
return;
|
| 2209 |
+
}
|
| 2210 |
+
|
| 2211 |
+
Sizzle = function(query, context, extra, seed){
|
| 2212 |
+
context = context || document;
|
| 2213 |
+
|
| 2214 |
+
// Only use querySelectorAll on non-XML documents
|
| 2215 |
+
// (ID selectors don't work in non-HTML documents)
|
| 2216 |
+
if ( !seed && context.nodeType === 9 && !isXML(context) ) {
|
| 2217 |
+
try {
|
| 2218 |
+
return makeArray( context.querySelectorAll(query), extra );
|
| 2219 |
+
} catch(e){}
|
| 2220 |
+
}
|
| 2221 |
+
|
| 2222 |
+
return oldSizzle(query, context, extra, seed);
|
| 2223 |
+
};
|
| 2224 |
+
|
| 2225 |
+
Sizzle.find = oldSizzle.find;
|
| 2226 |
+
Sizzle.filter = oldSizzle.filter;
|
| 2227 |
+
Sizzle.selectors = oldSizzle.selectors;
|
| 2228 |
+
Sizzle.matches = oldSizzle.matches;
|
| 2229 |
+
})();
|
| 2230 |
+
|
| 2231 |
+
if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) (function(){
|
| 2232 |
+
var div = document.createElement("div");
|
| 2233 |
+
div.innerHTML = "<div class='test e'></div><div class='test'></div>";
|
| 2234 |
+
|
| 2235 |
+
// Opera can't find a second classname (in 9.6)
|
| 2236 |
+
if ( div.getElementsByClassName("e").length === 0 )
|
| 2237 |
+
return;
|
| 2238 |
+
|
| 2239 |
+
// Safari caches class attributes, doesn't catch changes (in 3.2)
|
| 2240 |
+
div.lastChild.className = "e";
|
| 2241 |
+
|
| 2242 |
+
if ( div.getElementsByClassName("e").length === 1 )
|
| 2243 |
+
return;
|
| 2244 |
+
|
| 2245 |
+
Expr.order.splice(1, 0, "CLASS");
|
| 2246 |
+
Expr.find.CLASS = function(match, context, isXML) {
|
| 2247 |
+
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
|
| 2248 |
+
return context.getElementsByClassName(match[1]);
|
| 2249 |
+
}
|
| 2250 |
+
};
|
| 2251 |
+
})();
|
| 2252 |
+
|
| 2253 |
+
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
|
| 2254 |
+
var sibDir = dir == "previousSibling" && !isXML;
|
| 2255 |
+
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
|
| 2256 |
+
var elem = checkSet[i];
|
| 2257 |
+
if ( elem ) {
|
| 2258 |
+
if ( sibDir && elem.nodeType === 1 ){
|
| 2259 |
+
elem.sizcache = doneName;
|
| 2260 |
+
elem.sizset = i;
|
| 2261 |
+
}
|
| 2262 |
+
elem = elem[dir];
|
| 2263 |
+
var match = false;
|
| 2264 |
+
|
| 2265 |
+
while ( elem ) {
|
| 2266 |
+
if ( elem.sizcache === doneName ) {
|
| 2267 |
+
match = checkSet[elem.sizset];
|
| 2268 |
+
break;
|
| 2269 |
+
}
|
| 2270 |
+
|
| 2271 |
+
if ( elem.nodeType === 1 && !isXML ){
|
| 2272 |
+
elem.sizcache = doneName;
|
| 2273 |
+
elem.sizset = i;
|
| 2274 |
+
}
|
| 2275 |
+
|
| 2276 |
+
if ( elem.nodeName === cur ) {
|
| 2277 |
+
match = elem;
|
| 2278 |
+
break;
|
| 2279 |
+
}
|
| 2280 |
+
|
| 2281 |
+
elem = elem[dir];
|
| 2282 |
+
}
|
| 2283 |
+
|
| 2284 |
+
checkSet[i] = match;
|
| 2285 |
+
}
|
| 2286 |
+
}
|
| 2287 |
+
}
|
| 2288 |
+
|
| 2289 |
+
function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
|
| 2290 |
+
var sibDir = dir == "previousSibling" && !isXML;
|
| 2291 |
+
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
|
| 2292 |
+
var elem = checkSet[i];
|
| 2293 |
+
if ( elem ) {
|
| 2294 |
+
if ( sibDir && elem.nodeType === 1 ) {
|
| 2295 |
+
elem.sizcache = doneName;
|
| 2296 |
+
elem.sizset = i;
|
| 2297 |
+
}
|
| 2298 |
+
elem = elem[dir];
|
| 2299 |
+
var match = false;
|
| 2300 |
+
|
| 2301 |
+
while ( elem ) {
|
| 2302 |
+
if ( elem.sizcache === doneName ) {
|
| 2303 |
+
match = checkSet[elem.sizset];
|
| 2304 |
+
break;
|
| 2305 |
+
}
|
| 2306 |
+
|
| 2307 |
+
if ( elem.nodeType === 1 ) {
|
| 2308 |
+
if ( !isXML ) {
|
| 2309 |
+
elem.sizcache = doneName;
|
| 2310 |
+
elem.sizset = i;
|
| 2311 |
+
}
|
| 2312 |
+
if ( typeof cur !== "string" ) {
|
| 2313 |
+
if ( elem === cur ) {
|
| 2314 |
+
match = true;
|
| 2315 |
+
break;
|
| 2316 |
+
}
|
| 2317 |
+
|
| 2318 |
+
} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
|
| 2319 |
+
match = elem;
|
| 2320 |
+
break;
|
| 2321 |
+
}
|
| 2322 |
+
}
|
| 2323 |
+
|
| 2324 |
+
elem = elem[dir];
|
| 2325 |
+
}
|
| 2326 |
+
|
| 2327 |
+
checkSet[i] = match;
|
| 2328 |
+
}
|
| 2329 |
+
}
|
| 2330 |
+
}
|
| 2331 |
+
|
| 2332 |
+
var contains = document.compareDocumentPosition ? function(a, b){
|
| 2333 |
+
return a.compareDocumentPosition(b) & 16;
|
| 2334 |
+
} : function(a, b){
|
| 2335 |
+
return a !== b && (a.contains ? a.contains(b) : true);
|
| 2336 |
+
};
|
| 2337 |
+
|
| 2338 |
+
var isXML = function(elem){
|
| 2339 |
+
return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
|
| 2340 |
+
!!elem.ownerDocument && isXML( elem.ownerDocument );
|
| 2341 |
+
};
|
| 2342 |
+
|
| 2343 |
+
var posProcess = function(selector, context){
|
| 2344 |
+
var tmpSet = [], later = "", match,
|
| 2345 |
+
root = context.nodeType ? [context] : context;
|
| 2346 |
+
|
| 2347 |
+
// Position selectors must be done after the filter
|
| 2348 |
+
// And so must :not(positional) so we move all PSEUDOs to the end
|
| 2349 |
+
while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
|
| 2350 |
+
later += match[0];
|
| 2351 |
+
selector = selector.replace( Expr.match.PSEUDO, "" );
|
| 2352 |
+
}
|
| 2353 |
+
|
| 2354 |
+
selector = Expr.relative[selector] ? selector + "*" : selector;
|
| 2355 |
+
|
| 2356 |
+
for ( var i = 0, l = root.length; i < l; i++ ) {
|
| 2357 |
+
Sizzle( selector, root[i], tmpSet );
|
| 2358 |
+
}
|
| 2359 |
+
|
| 2360 |
+
return Sizzle.filter( later, tmpSet );
|
| 2361 |
+
};
|
| 2362 |
+
|
| 2363 |
+
// EXPOSE
|
| 2364 |
+
jQuery.find = Sizzle;
|
| 2365 |
+
jQuery.filter = Sizzle.filter;
|
| 2366 |
+
jQuery.expr = Sizzle.selectors;
|
| 2367 |
+
jQuery.expr[":"] = jQuery.expr.filters;
|
| 2368 |
+
|
| 2369 |
+
Sizzle.selectors.filters.hidden = function(elem){
|
| 2370 |
+
return elem.offsetWidth === 0 || elem.offsetHeight === 0;
|
| 2371 |
+
};
|
| 2372 |
+
|
| 2373 |
+
Sizzle.selectors.filters.visible = function(elem){
|
| 2374 |
+
return elem.offsetWidth > 0 || elem.offsetHeight > 0;
|
| 2375 |
+
};
|
| 2376 |
+
|
| 2377 |
+
Sizzle.selectors.filters.animated = function(elem){
|
| 2378 |
+
return jQuery.grep(jQuery.timers, function(fn){
|
| 2379 |
+
return elem === fn.elem;
|
| 2380 |
+
}).length;
|
| 2381 |
+
};
|
| 2382 |
+
|
| 2383 |
+
jQuery.multiFilter = function( expr, elems, not ) {
|
| 2384 |
+
if ( not ) {
|
| 2385 |
+
expr = ":not(" + expr + ")";
|
| 2386 |
+
}
|
| 2387 |
+
|
| 2388 |
+
return Sizzle.matches(expr, elems);
|
| 2389 |
+
};
|
| 2390 |
+
|
| 2391 |
+
jQuery.dir = function( elem, dir ){
|
| 2392 |
+
var matched = [], cur = elem[dir];
|
| 2393 |
+
while ( cur && cur != document ) {
|
| 2394 |
+
if ( cur.nodeType == 1 )
|
| 2395 |
+
matched.push( cur );
|
| 2396 |
+
cur = cur[dir];
|
| 2397 |
+
}
|
| 2398 |
+
return matched;
|
| 2399 |
+
};
|
| 2400 |
+
|
| 2401 |
+
jQuery.nth = function(cur, result, dir, elem){
|
| 2402 |
+
result = result || 1;
|
| 2403 |
+
var num = 0;
|
| 2404 |
+
|
| 2405 |
+
for ( ; cur; cur = cur[dir] )
|
| 2406 |
+
if ( cur.nodeType == 1 && ++num == result )
|
| 2407 |
+
break;
|
| 2408 |
+
|
| 2409 |
+
return cur;
|
| 2410 |
+
};
|
| 2411 |
+
|
| 2412 |
+
jQuery.sibling = function(n, elem){
|
| 2413 |
+
var r = [];
|
| 2414 |
+
|
| 2415 |
+
for ( ; n; n = n.nextSibling ) {
|
| 2416 |
+
if ( n.nodeType == 1 && n != elem )
|
| 2417 |
+
r.push( n );
|
| 2418 |
+
}
|
| 2419 |
+
|
| 2420 |
+
return r;
|
| 2421 |
+
};
|
| 2422 |
+
|
| 2423 |
+
return;
|
| 2424 |
+
|
| 2425 |
+
window.Sizzle = Sizzle;
|
| 2426 |
+
|
| 2427 |
+
})();
|
| 2428 |
+
/*
|
| 2429 |
+
* A number of helper functions used for managing events.
|
| 2430 |
+
* Many of the ideas behind this code originated from
|
| 2431 |
+
* Dean Edwards' addEvent library.
|
| 2432 |
+
*/
|
| 2433 |
+
jQuery.event = {
|
| 2434 |
+
|
| 2435 |
+
// Bind an event to an element
|
| 2436 |
+
// Original by Dean Edwards
|
| 2437 |
+
add: function(elem, types, handler, data) {
|
| 2438 |
+
if ( elem.nodeType == 3 || elem.nodeType == 8 )
|
| 2439 |
+
return;
|
| 2440 |
+
|
| 2441 |
+
// For whatever reason, IE has trouble passing the window object
|
| 2442 |
+
// around, causing it to be cloned in the process
|
| 2443 |
+
if ( elem.setInterval && elem != window )
|
| 2444 |
+
elem = window;
|
| 2445 |
+
|
| 2446 |
+
// Make sure that the function being executed has a unique ID
|
| 2447 |
+
if ( !handler.guid )
|
| 2448 |
+
handler.guid = this.guid++;
|
| 2449 |
+
|
| 2450 |
+
// if data is passed, bind to handler
|
| 2451 |
+
if ( data !== undefined ) {
|
| 2452 |
+
// Create temporary function pointer to original handler
|
| 2453 |
+
var fn = handler;
|
| 2454 |
+
|
| 2455 |
+
// Create unique handler function, wrapped around original handler
|
| 2456 |
+
handler = this.proxy( fn );
|
| 2457 |
+
|
| 2458 |
+
// Store data in unique handler
|
| 2459 |
+
handler.data = data;
|
| 2460 |
+
}
|
| 2461 |
+
|
| 2462 |
+
// Init the element's event structure
|
| 2463 |
+
var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
|
| 2464 |
+
handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
|
| 2465 |
+
// Handle the second event of a trigger and when
|
| 2466 |
+
// an event is called after a page has unloaded
|
| 2467 |
+
return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
|
| 2468 |
+
jQuery.event.handle.apply(arguments.callee.elem, arguments) :
|
| 2469 |
+
undefined;
|
| 2470 |
+
});
|
| 2471 |
+
// Add elem as a property of the handle function
|
| 2472 |
+
// This is to prevent a memory leak with non-native
|
| 2473 |
+
// event in IE.
|
| 2474 |
+
handle.elem = elem;
|
| 2475 |
+
|
| 2476 |
+
// Handle multiple events separated by a space
|
| 2477 |
+
// jQuery(...).bind("mouseover mouseout", fn);
|
| 2478 |
+
jQuery.each(types.split(/\s+/), function(index, type) {
|
| 2479 |
+
// Namespaced event handlers
|
| 2480 |
+
var namespaces = type.split(".");
|
| 2481 |
+
type = namespaces.shift();
|
| 2482 |
+
handler.type = namespaces.slice().sort().join(".");
|
| 2483 |
+
|
| 2484 |
+
// Get the current list of functions bound to this event
|
| 2485 |
+
var handlers = events[type];
|
| 2486 |
+
|
| 2487 |
+
if ( jQuery.event.specialAll[type] )
|
| 2488 |
+
jQuery.event.specialAll[type].setup.call(elem, data, namespaces);
|
| 2489 |
+
|
| 2490 |
+
// Init the event handler queue
|
| 2491 |
+
if (!handlers) {
|
| 2492 |
+
handlers = events[type] = {};
|
| 2493 |
+
|
| 2494 |
+
// Check for a special event handler
|
| 2495 |
+
// Only use addEventListener/attachEvent if the special
|
| 2496 |
+
// events handler returns false
|
| 2497 |
+
if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false ) {
|
| 2498 |
+
// Bind the global event handler to the element
|
| 2499 |
+
if (elem.addEventListener)
|
| 2500 |
+
elem.addEventListener(type, handle, false);
|
| 2501 |
+
else if (elem.attachEvent)
|
| 2502 |
+
elem.attachEvent("on" + type, handle);
|
| 2503 |
+
}
|
| 2504 |
+
}
|
| 2505 |
+
|
| 2506 |
+
// Add the function to the element's handler list
|
| 2507 |
+
handlers[handler.guid] = handler;
|
| 2508 |
+
|
| 2509 |
+
// Keep track of which events have been used, for global triggering
|
| 2510 |
+
jQuery.event.global[type] = true;
|
| 2511 |
+
});
|
| 2512 |
+
|
| 2513 |
+
// Nullify elem to prevent memory leaks in IE
|
| 2514 |
+
elem = null;
|
| 2515 |
+
},
|
| 2516 |
+
|
| 2517 |
+
guid: 1,
|
| 2518 |
+
global: {},
|
| 2519 |
+
|
| 2520 |
+
// Detach an event or set of events from an element
|
| 2521 |
+
remove: function(elem, types, handler) {
|
| 2522 |
+
// don't do events on text and comment nodes
|
| 2523 |
+
if ( elem.nodeType == 3 || elem.nodeType == 8 )
|
| 2524 |
+
return;
|
| 2525 |
+
|
| 2526 |
+
var events = jQuery.data(elem, "events"), ret, index;
|
| 2527 |
+
|
| 2528 |
+
if ( events ) {
|
| 2529 |
+
// Unbind all events for the element
|
| 2530 |
+
if ( types === undefined || (typeof types === "string" && types.charAt(0) == ".") )
|
| 2531 |
+
for ( var type in events )
|
| 2532 |
+
this.remove( elem, type + (types || "") );
|
| 2533 |
+
else {
|
| 2534 |
+
// types is actually an event object here
|
| 2535 |
+
if ( types.type ) {
|
| 2536 |
+
handler = types.handler;
|
| 2537 |
+
types = types.type;
|
| 2538 |
+
}
|
| 2539 |
+
|
| 2540 |
+
// Handle multiple events seperated by a space
|
| 2541 |
+
// jQuery(...).unbind("mouseover mouseout", fn);
|
| 2542 |
+
jQuery.each(types.split(/\s+/), function(index, type){
|
| 2543 |
+
// Namespaced event handlers
|
| 2544 |
+
var namespaces = type.split(".");
|
| 2545 |
+
type = namespaces.shift();
|
| 2546 |
+
var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
|
| 2547 |
+
|
| 2548 |
+
if ( events[type] ) {
|
| 2549 |
+
// remove the given handler for the given type
|
| 2550 |
+
if ( handler )
|
| 2551 |
+
delete events[type][handler.guid];
|
| 2552 |
+
|
| 2553 |
+
// remove all handlers for the given type
|
| 2554 |
+
else
|
| 2555 |
+
for ( var handle in events[type] )
|
| 2556 |
+
// Handle the removal of namespaced events
|
| 2557 |
+
if ( namespace.test(events[type][handle].type) )
|
| 2558 |
+
delete events[type][handle];
|
| 2559 |
+
|
| 2560 |
+
if ( jQuery.event.specialAll[type] )
|
| 2561 |
+
jQuery.event.specialAll[type].teardown.call(elem, namespaces);
|
| 2562 |
+
|
| 2563 |
+
// remove generic event handler if no more handlers exist
|
| 2564 |
+
for ( ret in events[type] ) break;
|
| 2565 |
+
if ( !ret ) {
|
| 2566 |
+
if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) {
|
| 2567 |
+
if (elem.removeEventListener)
|
| 2568 |
+
elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
|
| 2569 |
+
else if (elem.detachEvent)
|
| 2570 |
+
elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
|
| 2571 |
+
}
|
| 2572 |
+
ret = null;
|
| 2573 |
+
delete events[type];
|
| 2574 |
+
}
|
| 2575 |
+
}
|
| 2576 |
+
});
|
| 2577 |
+
}
|
| 2578 |
+
|
| 2579 |
+
// Remove the expando if it's no longer used
|
| 2580 |
+
for ( ret in events ) break;
|
| 2581 |
+
if ( !ret ) {
|
| 2582 |
+
var handle = jQuery.data( elem, "handle" );
|
| 2583 |
+
if ( handle ) handle.elem = null;
|
| 2584 |
+
jQuery.removeData( elem, "events" );
|
| 2585 |
+
jQuery.removeData( elem, "handle" );
|
| 2586 |
+
}
|
| 2587 |
+
}
|
| 2588 |
+
},
|
| 2589 |
+
|
| 2590 |
+
// bubbling is internal
|
| 2591 |
+
trigger: function( event, data, elem, bubbling ) {
|
| 2592 |
+
// Event object or event type
|
| 2593 |
+
var type = event.type || event;
|
| 2594 |
+
|
| 2595 |
+
if( !bubbling ){
|
| 2596 |
+
event = typeof event === "object" ?
|
| 2597 |
+
// jQuery.Event object
|
| 2598 |
+
event[expando] ? event :
|
| 2599 |
+
// Object literal
|
| 2600 |
+
jQuery.extend( jQuery.Event(type), event ) :
|
| 2601 |
+
// Just the event type (string)
|
| 2602 |
+
jQuery.Event(type);
|
| 2603 |
+
|
| 2604 |
+
if ( type.indexOf("!") >= 0 ) {
|
| 2605 |
+
event.type = type = type.slice(0, -1);
|
| 2606 |
+
event.exclusive = true;
|
| 2607 |
+
}
|
| 2608 |
+
|
| 2609 |
+
// Handle a global trigger
|
| 2610 |
+
if ( !elem ) {
|
| 2611 |
+
// Don't bubble custom events when global (to avoid too much overhead)
|
| 2612 |
+
event.stopPropagation();
|
| 2613 |
+
// Only trigger if we've ever bound an event for it
|
| 2614 |
+
if ( this.global[type] )
|
| 2615 |
+
jQuery.each( jQuery.cache, function(){
|
| 2616 |
+
if ( this.events && this.events[type] )
|
| 2617 |
+
jQuery.event.trigger( event, data, this.handle.elem );
|
| 2618 |
+
});
|
| 2619 |
+
}
|
| 2620 |
+
|
| 2621 |
+
// Handle triggering a single element
|
| 2622 |
+
|
| 2623 |
+
// don't do events on text and comment nodes
|
| 2624 |
+
if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
|
| 2625 |
+
return undefined;
|
| 2626 |
+
|
| 2627 |
+
// Clean up in case it is reused
|
| 2628 |
+
event.result = undefined;
|
| 2629 |
+
event.target = elem;
|
| 2630 |
+
|
| 2631 |
+
// Clone the incoming data, if any
|
| 2632 |
+
data = jQuery.makeArray(data);
|
| 2633 |
+
data.unshift( event );
|
| 2634 |
+
}
|
| 2635 |
+
|
| 2636 |
+
event.currentTarget = elem;
|
| 2637 |
+
|
| 2638 |
+
// Trigger the event, it is assumed that "handle" is a function
|
| 2639 |
+
var handle = jQuery.data(elem, "handle");
|
| 2640 |
+
if ( handle )
|
| 2641 |
+
handle.apply( elem, data );
|
| 2642 |
+
|
| 2643 |
+
// Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
|
| 2644 |
+
if ( (!elem[type] || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
|
| 2645 |
+
event.result = false;
|
| 2646 |
+
|
| 2647 |
+
// Trigger the native events (except for clicks on links)
|
| 2648 |
+
if ( !bubbling && elem[type] && !event.isDefaultPrevented() && !(jQuery.nodeName(elem, 'a') && type == "click") ) {
|
| 2649 |
+
this.triggered = true;
|
| 2650 |
+
try {
|
| 2651 |
+
elem[ type ]();
|
| 2652 |
+
// prevent IE from throwing an error for some hidden elements
|
| 2653 |
+
} catch (e) {}
|
| 2654 |
+
}
|
| 2655 |
+
|
| 2656 |
+
this.triggered = false;
|
| 2657 |
+
|
| 2658 |
+
if ( !event.isPropagationStopped() ) {
|
| 2659 |
+
var parent = elem.parentNode || elem.ownerDocument;
|
| 2660 |
+
if ( parent )
|
| 2661 |
+
jQuery.event.trigger(event, data, parent, true);
|
| 2662 |
+
}
|
| 2663 |
+
},
|
| 2664 |
+
|
| 2665 |
+
handle: function(event) {
|
| 2666 |
+
// returned undefined or false
|
| 2667 |
+
var all, handlers;
|
| 2668 |
+
|
| 2669 |
+
event = arguments[0] = jQuery.event.fix( event || window.event );
|
| 2670 |
+
event.currentTarget = this;
|
| 2671 |
+
|
| 2672 |
+
// Namespaced event handlers
|
| 2673 |
+
var namespaces = event.type.split(".");
|
| 2674 |
+
event.type = namespaces.shift();
|
| 2675 |
+
|
| 2676 |
+
// Cache this now, all = true means, any handler
|
| 2677 |
+
all = !namespaces.length && !event.exclusive;
|
| 2678 |
+
|
| 2679 |
+
var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
|
| 2680 |
+
|
| 2681 |
+
handlers = ( jQuery.data(this, "events") || {} )[event.type];
|
| 2682 |
+
|
| 2683 |
+
for ( var j in handlers ) {
|
| 2684 |
+
var handler = handlers[j];
|
| 2685 |
+
|
| 2686 |
+
// Filter the functions by class
|
| 2687 |
+
if ( all || namespace.test(handler.type) ) {
|
| 2688 |
+
// Pass in a reference to the handler function itself
|
| 2689 |
+
// So that we can later remove it
|
| 2690 |
+
event.handler = handler;
|
| 2691 |
+
event.data = handler.data;
|
| 2692 |
+
|
| 2693 |
+
var ret = handler.apply(this, arguments);
|
| 2694 |
+
|
| 2695 |
+
if( ret !== undefined ){
|
| 2696 |
+
event.result = ret;
|
| 2697 |
+
if ( ret === false ) {
|
| 2698 |
+
event.preventDefault();
|
| 2699 |
+
event.stopPropagation();
|
| 2700 |
+
}
|
| 2701 |
+
}
|
| 2702 |
+
|
| 2703 |
+
if( event.isImmediatePropagationStopped() )
|
| 2704 |
+
break;
|
| 2705 |
+
|
| 2706 |
+
}
|
| 2707 |
+
}
|
| 2708 |
+
},
|
| 2709 |
+
|
| 2710 |
+
props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
|
| 2711 |
+
|
| 2712 |
+
fix: function(event) {
|
| 2713 |
+
if ( event[expando] )
|
| 2714 |
+
return event;
|
| 2715 |
+
|
| 2716 |
+
// store a copy of the original event object
|
| 2717 |
+
// and "clone" to set read-only properties
|
| 2718 |
+
var originalEvent = event;
|
| 2719 |
+
event = jQuery.Event( originalEvent );
|
| 2720 |
+
|
| 2721 |
+
for ( var i = this.props.length, prop; i; ){
|
| 2722 |
+
prop = this.props[ --i ];
|
| 2723 |
+
event[ prop ] = originalEvent[ prop ];
|
| 2724 |
+
}
|
| 2725 |
+
|
| 2726 |
+
// Fix target property, if necessary
|
| 2727 |
+
if ( !event.target )
|
| 2728 |
+
event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
|
| 2729 |
+
|
| 2730 |
+
// check if target is a textnode (safari)
|
| 2731 |
+
if ( event.target.nodeType == 3 )
|
| 2732 |
+
event.target = event.target.parentNode;
|
| 2733 |
+
|
| 2734 |
+
// Add relatedTarget, if necessary
|
| 2735 |
+
if ( !event.relatedTarget && event.fromElement )
|
| 2736 |
+
event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
|
| 2737 |
+
|
| 2738 |
+
// Calculate pageX/Y if missing and clientX/Y available
|
| 2739 |
+
if ( event.pageX == null && event.clientX != null ) {
|
| 2740 |
+
var doc = document.documentElement, body = document.body;
|
| 2741 |
+
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
|
| 2742 |
+
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
|
| 2743 |
+
}
|
| 2744 |
+
|
| 2745 |
+
// Add which for key events
|
| 2746 |
+
if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
|
| 2747 |
+
event.which = event.charCode || event.keyCode;
|
| 2748 |
+
|
| 2749 |
+
// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
|
| 2750 |
+
if ( !event.metaKey && event.ctrlKey )
|
| 2751 |
+
event.metaKey = event.ctrlKey;
|
| 2752 |
+
|
| 2753 |
+
// Add which for click: 1 == left; 2 == middle; 3 == right
|
| 2754 |
+
// Note: button is not normalized, so don't use it
|
| 2755 |
+
if ( !event.which && event.button )
|
| 2756 |
+
event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
|
| 2757 |
+
|
| 2758 |
+
return event;
|
| 2759 |
+
},
|
| 2760 |
+
|
| 2761 |
+
proxy: function( fn, proxy ){
|
| 2762 |
+
proxy = proxy || function(){ return fn.apply(this, arguments); };
|
| 2763 |
+
// Set the guid of unique handler to the same of original handler, so it can be removed
|
| 2764 |
+
proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
|
| 2765 |
+
// So proxy can be declared as an argument
|
| 2766 |
+
return proxy;
|
| 2767 |
+
},
|
| 2768 |
+
|
| 2769 |
+
special: {
|
| 2770 |
+
ready: {
|
| 2771 |
+
// Make sure the ready event is setup
|
| 2772 |
+
setup: bindReady,
|
| 2773 |
+
teardown: function() {}
|
| 2774 |
+
}
|
| 2775 |
+
},
|
| 2776 |
+
|
| 2777 |
+
specialAll: {
|
| 2778 |
+
live: {
|
| 2779 |
+
setup: function( selector, namespaces ){
|
| 2780 |
+
jQuery.event.add( this, namespaces[0], liveHandler );
|
| 2781 |
+
},
|
| 2782 |
+
teardown: function( namespaces ){
|
| 2783 |
+
if ( namespaces.length ) {
|
| 2784 |
+
var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
|
| 2785 |
+
|
| 2786 |
+
jQuery.each( (jQuery.data(this, "events").live || {}), function(){
|
| 2787 |
+
if ( name.test(this.type) )
|
| 2788 |
+
remove++;
|
| 2789 |
+
});
|
| 2790 |
+
|
| 2791 |
+
if ( remove < 1 )
|
| 2792 |
+
jQuery.event.remove( this, namespaces[0], liveHandler );
|
| 2793 |
+
}
|
| 2794 |
+
}
|
| 2795 |
+
}
|
| 2796 |
+
}
|
| 2797 |
+
};
|
| 2798 |
+
|
| 2799 |
+
jQuery.Event = function( src ){
|
| 2800 |
+
// Allow instantiation without the 'new' keyword
|
| 2801 |
+
if( !this.preventDefault )
|
| 2802 |
+
return new jQuery.Event(src);
|
| 2803 |
+
|
| 2804 |
+
// Event object
|
| 2805 |
+
if( src && src.type ){
|
| 2806 |
+
this.originalEvent = src;
|
| 2807 |
+
this.type = src.type;
|
| 2808 |
+
// Event type
|
| 2809 |
+
}else
|
| 2810 |
+
this.type = src;
|
| 2811 |
+
|
| 2812 |
+
// timeStamp is buggy for some events on Firefox(#3843)
|
| 2813 |
+
// So we won't rely on the native value
|
| 2814 |
+
this.timeStamp = now();
|
| 2815 |
+
|
| 2816 |
+
// Mark it as fixed
|
| 2817 |
+
this[expando] = true;
|
| 2818 |
+
};
|
| 2819 |
+
|
| 2820 |
+
function returnFalse(){
|
| 2821 |
+
return false;
|
| 2822 |
+
}
|
| 2823 |
+
function returnTrue(){
|
| 2824 |
+
return true;
|
| 2825 |
+
}
|
| 2826 |
+
|
| 2827 |
+
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
|
| 2828 |
+
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
|
| 2829 |
+
jQuery.Event.prototype = {
|
| 2830 |
+
preventDefault: function() {
|
| 2831 |
+
this.isDefaultPrevented = returnTrue;
|
| 2832 |
+
|
| 2833 |
+
var e = this.originalEvent;
|
| 2834 |
+
if( !e )
|
| 2835 |
+
return;
|
| 2836 |
+
// if preventDefault exists run it on the original event
|
| 2837 |
+
if (e.preventDefault)
|
| 2838 |
+
e.preventDefault();
|
| 2839 |
+
// otherwise set the returnValue property of the original event to false (IE)
|
| 2840 |
+
e.returnValue = false;
|
| 2841 |
+
},
|
| 2842 |
+
stopPropagation: function() {
|
| 2843 |
+
this.isPropagationStopped = returnTrue;
|
| 2844 |
+
|
| 2845 |
+
var e = this.originalEvent;
|
| 2846 |
+
if( !e )
|
| 2847 |
+
return;
|
| 2848 |
+
// if stopPropagation exists run it on the original event
|
| 2849 |
+
if (e.stopPropagation)
|
| 2850 |
+
e.stopPropagation();
|
| 2851 |
+
// otherwise set the cancelBubble property of the original event to true (IE)
|
| 2852 |
+
e.cancelBubble = true;
|
| 2853 |
+
},
|
| 2854 |
+
stopImmediatePropagation:function(){
|
| 2855 |
+
this.isImmediatePropagationStopped = returnTrue;
|
| 2856 |
+
this.stopPropagation();
|
| 2857 |
+
},
|
| 2858 |
+
isDefaultPrevented: returnFalse,
|
| 2859 |
+
isPropagationStopped: returnFalse,
|
| 2860 |
+
isImmediatePropagationStopped: returnFalse
|
| 2861 |
+
};
|
| 2862 |
+
// Checks if an event happened on an element within another element
|
| 2863 |
+
// Used in jQuery.event.special.mouseenter and mouseleave handlers
|
| 2864 |
+
var withinElement = function(event) {
|
| 2865 |
+
// Check if mouse(over|out) are still within the same parent element
|
| 2866 |
+
var parent = event.relatedTarget;
|
| 2867 |
+
// Traverse up the tree
|
| 2868 |
+
while ( parent && parent != this )
|
| 2869 |
+
try { parent = parent.parentNode; }
|
| 2870 |
+
catch(e) { parent = this; }
|
| 2871 |
+
|
| 2872 |
+
if( parent != this ){
|
| 2873 |
+
// set the correct event type
|
| 2874 |
+
event.type = event.data;
|
| 2875 |
+
// handle event if we actually just moused on to a non sub-element
|
| 2876 |
+
jQuery.event.handle.apply( this, arguments );
|
| 2877 |
+
}
|
| 2878 |
+
};
|
| 2879 |
+
|
| 2880 |
+
jQuery.each({
|
| 2881 |
+
mouseover: 'mouseenter',
|
| 2882 |
+
mouseout: 'mouseleave'
|
| 2883 |
+
}, function( orig, fix ){
|
| 2884 |
+
jQuery.event.special[ fix ] = {
|
| 2885 |
+
setup: function(){
|
| 2886 |
+
jQuery.event.add( this, orig, withinElement, fix );
|
| 2887 |
+
},
|
| 2888 |
+
teardown: function(){
|
| 2889 |
+
jQuery.event.remove( this, orig, withinElement );
|
| 2890 |
+
}
|
| 2891 |
+
};
|
| 2892 |
+
});
|
| 2893 |
+
|
| 2894 |
+
jQuery.fn.extend({
|
| 2895 |
+
bind: function( type, data, fn ) {
|
| 2896 |
+
return type == "unload" ? this.one(type, data, fn) : this.each(function(){
|
| 2897 |
+
jQuery.event.add( this, type, fn || data, fn && data );
|
| 2898 |
+
});
|
| 2899 |
+
},
|
| 2900 |
+
|
| 2901 |
+
one: function( type, data, fn ) {
|
| 2902 |
+
var one = jQuery.event.proxy( fn || data, function(event) {
|
| 2903 |
+
jQuery(this).unbind(event, one);
|
| 2904 |
+
return (fn || data).apply( this, arguments );
|
| 2905 |
+
});
|
| 2906 |
+
return this.each(function(){
|
| 2907 |
+
jQuery.event.add( this, type, one, fn && data);
|
| 2908 |
+
});
|
| 2909 |
+
},
|
| 2910 |
+
|
| 2911 |
+
unbind: function( type, fn ) {
|
| 2912 |
+
return this.each(function(){
|
| 2913 |
+
jQuery.event.remove( this, type, fn );
|
| 2914 |
+
});
|
| 2915 |
+
},
|
| 2916 |
+
|
| 2917 |
+
trigger: function( type, data ) {
|
| 2918 |
+
return this.each(function(){
|
| 2919 |
+
jQuery.event.trigger( type, data, this );
|
| 2920 |
+
});
|
| 2921 |
+
},
|
| 2922 |
+
|
| 2923 |
+
triggerHandler: function( type, data ) {
|
| 2924 |
+
if( this[0] ){
|
| 2925 |
+
var event = jQuery.Event(type);
|
| 2926 |
+
event.preventDefault();
|
| 2927 |
+
event.stopPropagation();
|
| 2928 |
+
jQuery.event.trigger( event, data, this[0] );
|
| 2929 |
+
return event.result;
|
| 2930 |
+
}
|
| 2931 |
+
},
|
| 2932 |
+
|
| 2933 |
+
toggle: function( fn ) {
|
| 2934 |
+
// Save reference to arguments for access in closure
|
| 2935 |
+
var args = arguments, i = 1;
|
| 2936 |
+
|
| 2937 |
+
// link all the functions, so any of them can unbind this click handler
|
| 2938 |
+
while( i < args.length )
|
| 2939 |
+
jQuery.event.proxy( fn, args[i++] );
|
| 2940 |
+
|
| 2941 |
+
return this.click( jQuery.event.proxy( fn, function(event) {
|
| 2942 |
+
// Figure out which function to execute
|
| 2943 |
+
this.lastToggle = ( this.lastToggle || 0 ) % i;
|
| 2944 |
+
|
| 2945 |
+
// Make sure that clicks stop
|
| 2946 |
+
event.preventDefault();
|
| 2947 |
+
|
| 2948 |
+
// and execute the function
|
| 2949 |
+
return args[ this.lastToggle++ ].apply( this, arguments ) || false;
|
| 2950 |
+
}));
|
| 2951 |
+
},
|
| 2952 |
+
|
| 2953 |
+
hover: function(fnOver, fnOut) {
|
| 2954 |
+
return this.mouseenter(fnOver).mouseleave(fnOut);
|
| 2955 |
+
},
|
| 2956 |
+
|
| 2957 |
+
ready: function(fn) {
|
| 2958 |
+
// Attach the listeners
|
| 2959 |
+
bindReady();
|
| 2960 |
+
|
| 2961 |
+
// If the DOM is already ready
|
| 2962 |
+
if ( jQuery.isReady )
|
| 2963 |
+
// Execute the function immediately
|
| 2964 |
+
fn.call( document, jQuery );
|
| 2965 |
+
|
| 2966 |
+
// Otherwise, remember the function for later
|
| 2967 |
+
else
|
| 2968 |
+
// Add the function to the wait list
|
| 2969 |
+
jQuery.readyList.push( fn );
|
| 2970 |
+
|
| 2971 |
+
return this;
|
| 2972 |
+
},
|
| 2973 |
+
|
| 2974 |
+
live: function( type, fn ){
|
| 2975 |
+
var proxy = jQuery.event.proxy( fn );
|
| 2976 |
+
proxy.guid += this.selector + type;
|
| 2977 |
+
|
| 2978 |
+
jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy );
|
| 2979 |
+
|
| 2980 |
+
return this;
|
| 2981 |
+
},
|
| 2982 |
+
|
| 2983 |
+
die: function( type, fn ){
|
| 2984 |
+
jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
|
| 2985 |
+
return this;
|
| 2986 |
+
}
|
| 2987 |
+
});
|
| 2988 |
+
|
| 2989 |
+
function liveHandler( event ){
|
| 2990 |
+
var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
|
| 2991 |
+
stop = true,
|
| 2992 |
+
elems = [];
|
| 2993 |
+
|
| 2994 |
+
jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
|
| 2995 |
+
if ( check.test(fn.type) ) {
|
| 2996 |
+
var elem = jQuery(event.target).closest(fn.data)[0];
|
| 2997 |
+
if ( elem )
|
| 2998 |
+
elems.push({ elem: elem, fn: fn });
|
| 2999 |
+
}
|
| 3000 |
+
});
|
| 3001 |
+
|
| 3002 |
+
elems.sort(function(a,b) {
|
| 3003 |
+
return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
|
| 3004 |
+
});
|
| 3005 |
+
|
| 3006 |
+
jQuery.each(elems, function(){
|
| 3007 |
+
if ( this.fn.call(this.elem, event, this.fn.data) === false )
|
| 3008 |
+
return (stop = false);
|
| 3009 |
+
});
|
| 3010 |
+
|
| 3011 |
+
return stop;
|
| 3012 |
+
}
|
| 3013 |
+
|
| 3014 |
+
function liveConvert(type, selector){
|
| 3015 |
+
return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join(".");
|
| 3016 |
+
}
|
| 3017 |
+
|
| 3018 |
+
jQuery.extend({
|
| 3019 |
+
isReady: false,
|
| 3020 |
+
readyList: [],
|
| 3021 |
+
// Handle when the DOM is ready
|
| 3022 |
+
ready: function() {
|
| 3023 |
+
// Make sure that the DOM is not already loaded
|
| 3024 |
+
if ( !jQuery.isReady ) {
|
| 3025 |
+
// Remember that the DOM is ready
|
| 3026 |
+
jQuery.isReady = true;
|
| 3027 |
+
|
| 3028 |
+
// If there are functions bound, to execute
|
| 3029 |
+
if ( jQuery.readyList ) {
|
| 3030 |
+
// Execute all of them
|
| 3031 |
+
jQuery.each( jQuery.readyList, function(){
|
| 3032 |
+
this.call( document, jQuery );
|
| 3033 |
+
});
|
| 3034 |
+
|
| 3035 |
+
// Reset the list of functions
|
| 3036 |
+
jQuery.readyList = null;
|
| 3037 |
+
}
|
| 3038 |
+
|
| 3039 |
+
// Trigger any bound ready events
|
| 3040 |
+
jQuery(document).triggerHandler("ready");
|
| 3041 |
+
}
|
| 3042 |
+
}
|
| 3043 |
+
});
|
| 3044 |
+
|
| 3045 |
+
var readyBound = false;
|
| 3046 |
+
|
| 3047 |
+
function bindReady(){
|
| 3048 |
+
if ( readyBound ) return;
|
| 3049 |
+
readyBound = true;
|
| 3050 |
+
|
| 3051 |
+
// Mozilla, Opera and webkit nightlies currently support this event
|
| 3052 |
+
if ( document.addEventListener ) {
|
| 3053 |
+
// Use the handy event callback
|
| 3054 |
+
document.addEventListener( "DOMContentLoaded", function(){
|
| 3055 |
+
document.removeEventListener( "DOMContentLoaded", arguments.callee, false );
|
| 3056 |
+
jQuery.ready();
|
| 3057 |
+
}, false );
|
| 3058 |
+
|
| 3059 |
+
// If IE event model is used
|
| 3060 |
+
} else if ( document.attachEvent ) {
|
| 3061 |
+
// ensure firing before onload,
|
| 3062 |
+
// maybe late but safe also for iframes
|
| 3063 |
+
document.attachEvent("onreadystatechange", function(){
|
| 3064 |
+
if ( document.readyState === "complete" ) {
|
| 3065 |
+
document.detachEvent( "onreadystatechange", arguments.callee );
|
| 3066 |
+
jQuery.ready();
|
| 3067 |
+
}
|
| 3068 |
+
});
|
| 3069 |
+
|
| 3070 |
+
// If IE and not an iframe
|
| 3071 |
+
// continually check to see if the document is ready
|
| 3072 |
+
if ( document.documentElement.doScroll && window == window.top ) (function(){
|
| 3073 |
+
if ( jQuery.isReady ) return;
|
| 3074 |
+
|
| 3075 |
+
try {
|
| 3076 |
+
// If IE is used, use the trick by Diego Perini
|
| 3077 |
+
// http://javascript.nwbox.com/IEContentLoaded/
|
| 3078 |
+
document.documentElement.doScroll("left");
|
| 3079 |
+
} catch( error ) {
|
| 3080 |
+
setTimeout( arguments.callee, 0 );
|
| 3081 |
+
return;
|
| 3082 |
+
}
|
| 3083 |
+
|
| 3084 |
+
// and execute any waiting functions
|
| 3085 |
+
jQuery.ready();
|
| 3086 |
+
})();
|
| 3087 |
+
}
|
| 3088 |
+
|
| 3089 |
+
// A fallback to window.onload, that will always work
|
| 3090 |
+
jQuery.event.add( window, "load", jQuery.ready );
|
| 3091 |
+
}
|
| 3092 |
+
|
| 3093 |
+
jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
|
| 3094 |
+
"mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," +
|
| 3095 |
+
"change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){
|
| 3096 |
+
|
| 3097 |
+
// Handle event binding
|
| 3098 |
+
jQuery.fn[name] = function(fn){
|
| 3099 |
+
return fn ? this.bind(name, fn) : this.trigger(name);
|
| 3100 |
+
};
|
| 3101 |
+
});
|
| 3102 |
+
|
| 3103 |
+
// Prevent memory leaks in IE
|
| 3104 |
+
// And prevent errors on refresh with events like mouseover in other browsers
|
| 3105 |
+
// Window isn't included so as not to unbind existing unload events
|
| 3106 |
+
jQuery( window ).bind( 'unload', function(){
|
| 3107 |
+
for ( var id in jQuery.cache )
|
| 3108 |
+
// Skip the window
|
| 3109 |
+
if ( id != 1 && jQuery.cache[ id ].handle )
|
| 3110 |
+
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
|
| 3111 |
+
});
|
| 3112 |
+
(function(){
|
| 3113 |
+
|
| 3114 |
+
jQuery.support = {};
|
| 3115 |
+
|
| 3116 |
+
var root = document.documentElement,
|
| 3117 |
+
script = document.createElement("script"),
|
| 3118 |
+
div = document.createElement("div"),
|
| 3119 |
+
id = "script" + (new Date).getTime();
|
| 3120 |
+
|
| 3121 |
+
div.style.display = "none";
|
| 3122 |
+
div.innerHTML = ' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';
|
| 3123 |
+
|
| 3124 |
+
var all = div.getElementsByTagName("*"),
|
| 3125 |
+
a = div.getElementsByTagName("a")[0];
|
| 3126 |
+
|
| 3127 |
+
// Can't get basic test support
|
| 3128 |
+
if ( !all || !all.length || !a ) {
|
| 3129 |
+
return;
|
| 3130 |
+
}
|
| 3131 |
+
|
| 3132 |
+
jQuery.support = {
|
| 3133 |
+
// IE strips leading whitespace when .innerHTML is used
|
| 3134 |
+
leadingWhitespace: div.firstChild.nodeType == 3,
|
| 3135 |
+
|
| 3136 |
+
// Make sure that tbody elements aren't automatically inserted
|
| 3137 |
+
// IE will insert them into empty tables
|
| 3138 |
+
tbody: !div.getElementsByTagName("tbody").length,
|
| 3139 |
+
|
| 3140 |
+
// Make sure that you can get all elements in an <object> element
|
| 3141 |
+
// IE 7 always returns no results
|
| 3142 |
+
objectAll: !!div.getElementsByTagName("object")[0]
|
| 3143 |
+
.getElementsByTagName("*").length,
|
| 3144 |
+
|
| 3145 |
+
// Make sure that link elements get serialized correctly by innerHTML
|
| 3146 |
+
// This requires a wrapper element in IE
|
| 3147 |
+
htmlSerialize: !!div.getElementsByTagName("link").length,
|
| 3148 |
+
|
| 3149 |
+
// Get the style information from getAttribute
|
| 3150 |
+
// (IE uses .cssText insted)
|
| 3151 |
+
style: /red/.test( a.getAttribute("style") ),
|
| 3152 |
+
|
| 3153 |
+
// Make sure that URLs aren't manipulated
|
| 3154 |
+
// (IE normalizes it by default)
|
| 3155 |
+
hrefNormalized: a.getAttribute("href") === "/a",
|
| 3156 |
+
|
| 3157 |
+
// Make sure that element opacity exists
|
| 3158 |
+
// (IE uses filter instead)
|
| 3159 |
+
opacity: a.style.opacity === "0.5",
|
| 3160 |
+
|
| 3161 |
+
// Verify style float existence
|
| 3162 |
+
// (IE uses styleFloat instead of cssFloat)
|
| 3163 |
+
cssFloat: !!a.style.cssFloat,
|
| 3164 |
+
|
| 3165 |
+
// Will be defined later
|
| 3166 |
+
scriptEval: false,
|
| 3167 |
+
noCloneEvent: true,
|
| 3168 |
+
boxModel: null
|
| 3169 |
+
};
|
| 3170 |
+
|
| 3171 |
+
script.type = "text/javascript";
|
| 3172 |
+
try {
|
| 3173 |
+
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
|
| 3174 |
+
} catch(e){}
|
| 3175 |
+
|
| 3176 |
+
root.insertBefore( script, root.firstChild );
|
| 3177 |
+
|
| 3178 |
+
// Make sure that the execution of code works by injecting a script
|
| 3179 |
+
// tag with appendChild/createTextNode
|
| 3180 |
+
// (IE doesn't support this, fails, and uses .text instead)
|
| 3181 |
+
if ( window[ id ] ) {
|
| 3182 |
+
jQuery.support.scriptEval = true;
|
| 3183 |
+
delete window[ id ];
|
| 3184 |
+
}
|
| 3185 |
+
|
| 3186 |
+
root.removeChild( script );
|
| 3187 |
+
|
| 3188 |
+
if ( div.attachEvent && div.fireEvent ) {
|
| 3189 |
+
div.attachEvent("onclick", function(){
|
| 3190 |
+
// Cloning a node shouldn't copy over any
|
| 3191 |
+
// bound event handlers (IE does this)
|
| 3192 |
+
jQuery.support.noCloneEvent = false;
|
| 3193 |
+
div.detachEvent("onclick", arguments.callee);
|
| 3194 |
+
});
|
| 3195 |
+
div.cloneNode(true).fireEvent("onclick");
|
| 3196 |
+
}
|
| 3197 |
+
|
| 3198 |
+
// Figure out if the W3C box model works as expected
|
| 3199 |
+
// document.body must exist before we can do this
|
| 3200 |
+
jQuery(function(){
|
| 3201 |
+
var div = document.createElement("div");
|
| 3202 |
+
div.style.width = div.style.paddingLeft = "1px";
|
| 3203 |
+
|
| 3204 |
+
document.body.appendChild( div );
|
| 3205 |
+
jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
|
| 3206 |
+
document.body.removeChild( div ).style.display = 'none';
|
| 3207 |
+
});
|
| 3208 |
+
})();
|
| 3209 |
+
|
| 3210 |
+
var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat";
|
| 3211 |
+
|
| 3212 |
+
jQuery.props = {
|
| 3213 |
+
"for": "htmlFor",
|
| 3214 |
+
"class": "className",
|
| 3215 |
+
"float": styleFloat,
|
| 3216 |
+
cssFloat: styleFloat,
|
| 3217 |
+
styleFloat: styleFloat,
|
| 3218 |
+
readonly: "readOnly",
|
| 3219 |
+
maxlength: "maxLength",
|
| 3220 |
+
cellspacing: "cellSpacing",
|
| 3221 |
+
rowspan: "rowSpan",
|
| 3222 |
+
tabindex: "tabIndex"
|
| 3223 |
+
};
|
| 3224 |
+
jQuery.fn.extend({
|
| 3225 |
+
// Keep a copy of the old load
|
| 3226 |
+
_load: jQuery.fn.load,
|
| 3227 |
+
|
| 3228 |
+
load: function( url, params, callback ) {
|
| 3229 |
+
if ( typeof url !== "string" )
|
| 3230 |
+
return this._load( url );
|
| 3231 |
+
|
| 3232 |
+
var off = url.indexOf(" ");
|
| 3233 |
+
if ( off >= 0 ) {
|
| 3234 |
+
var selector = url.slice(off, url.length);
|
| 3235 |
+
url = url.slice(0, off);
|
| 3236 |
+
}
|
| 3237 |
+
|
| 3238 |
+
// Default to a GET request
|
| 3239 |
+
var type = "GET";
|
| 3240 |
+
|
| 3241 |
+
// If the second parameter was provided
|
| 3242 |
+
if ( params )
|
| 3243 |
+
// If it's a function
|
| 3244 |
+
if ( jQuery.isFunction( params ) ) {
|
| 3245 |
+
// We assume that it's the callback
|
| 3246 |
+
callback = params;
|
| 3247 |
+
params = null;
|
| 3248 |
+
|
| 3249 |
+
// Otherwise, build a param string
|
| 3250 |
+
} else if( typeof params === "object" ) {
|
| 3251 |
+
params = jQuery.param( params );
|
| 3252 |
+
type = "POST";
|
| 3253 |
+
}
|
| 3254 |
+
|
| 3255 |
+
var self = this;
|
| 3256 |
+
|
| 3257 |
+
// Request the remote document
|
| 3258 |
+
jQuery.ajax({
|
| 3259 |
+
url: url,
|
| 3260 |
+
type: type,
|
| 3261 |
+
dataType: "html",
|
| 3262 |
+
data: params,
|
| 3263 |
+
complete: function(res, status){
|
| 3264 |
+
// If successful, inject the HTML into all the matched elements
|
| 3265 |
+
if ( status == "success" || status == "notmodified" )
|
| 3266 |
+
// See if a selector was specified
|
| 3267 |
+
self.html( selector ?
|
| 3268 |
+
// Create a dummy div to hold the results
|
| 3269 |
+
jQuery("<div/>")
|
| 3270 |
+
// inject the contents of the document in, removing the scripts
|
| 3271 |
+
// to avoid any 'Permission Denied' errors in IE
|
| 3272 |
+
.append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
|
| 3273 |
+
|
| 3274 |
+
// Locate the specified elements
|
| 3275 |
+
.find(selector) :
|
| 3276 |
+
|
| 3277 |
+
// If not, just inject the full result
|
| 3278 |
+
res.responseText );
|
| 3279 |
+
|
| 3280 |
+
if( callback )
|
| 3281 |
+
self.each( callback, [res.responseText, status, res] );
|
| 3282 |
+
}
|
| 3283 |
+
});
|
| 3284 |
+
return this;
|
| 3285 |
+
},
|
| 3286 |
+
|
| 3287 |
+
serialize: function() {
|
| 3288 |
+
return jQuery.param(this.serializeArray());
|
| 3289 |
+
},
|
| 3290 |
+
serializeArray: function() {
|
| 3291 |
+
return this.map(function(){
|
| 3292 |
+
return this.elements ? jQuery.makeArray(this.elements) : this;
|
| 3293 |
+
})
|
| 3294 |
+
.filter(function(){
|
| 3295 |
+
return this.name && !this.disabled &&
|
| 3296 |
+
(this.checked || /select|textarea/i.test(this.nodeName) ||
|
| 3297 |
+
/text|hidden|password|search/i.test(this.type));
|
| 3298 |
+
})
|
| 3299 |
+
.map(function(i, elem){
|
| 3300 |
+
var val = jQuery(this).val();
|
| 3301 |
+
return val == null ? null :
|
| 3302 |
+
jQuery.isArray(val) ?
|
| 3303 |
+
jQuery.map( val, function(val, i){
|
| 3304 |
+
return {name: elem.name, value: val};
|
| 3305 |
+
}) :
|
| 3306 |
+
{name: elem.name, value: val};
|
| 3307 |
+
}).get();
|
| 3308 |
+
}
|
| 3309 |
+
});
|
| 3310 |
+
|
| 3311 |
+
// Attach a bunch of functions for handling common AJAX events
|
| 3312 |
+
jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
|
| 3313 |
+
jQuery.fn[o] = function(f){
|
| 3314 |
+
return this.bind(o, f);
|
| 3315 |
+
};
|
| 3316 |
+
});
|
| 3317 |
+
|
| 3318 |
+
var jsc = now();
|
| 3319 |
+
|
| 3320 |
+
jQuery.extend({
|
| 3321 |
+
|
| 3322 |
+
get: function( url, data, callback, type ) {
|
| 3323 |
+
// shift arguments if data argument was ommited
|
| 3324 |
+
if ( jQuery.isFunction( data ) ) {
|
| 3325 |
+
callback = data;
|
| 3326 |
+
data = null;
|
| 3327 |
+
}
|
| 3328 |
+
|
| 3329 |
+
return jQuery.ajax({
|
| 3330 |
+
type: "GET",
|
| 3331 |
+
url: url,
|
| 3332 |
+
data: data,
|
| 3333 |
+
success: callback,
|
| 3334 |
+
dataType: type
|
| 3335 |
+
});
|
| 3336 |
+
},
|
| 3337 |
+
|
| 3338 |
+
getScript: function( url, callback ) {
|
| 3339 |
+
return jQuery.get(url, null, callback, "script");
|
| 3340 |
+
},
|
| 3341 |
+
|
| 3342 |
+
getJSON: function( url, data, callback ) {
|
| 3343 |
+
return jQuery.get(url, data, callback, "json");
|
| 3344 |
+
},
|
| 3345 |
+
|
| 3346 |
+
post: function( url, data, callback, type ) {
|
| 3347 |
+
if ( jQuery.isFunction( data ) ) {
|
| 3348 |
+
callback = data;
|
| 3349 |
+
data = {};
|
| 3350 |
+
}
|
| 3351 |
+
|
| 3352 |
+
return jQuery.ajax({
|
| 3353 |
+
type: "POST",
|
| 3354 |
+
url: url,
|
| 3355 |
+
data: data,
|
| 3356 |
+
success: callback,
|
| 3357 |
+
dataType: type
|
| 3358 |
+
});
|
| 3359 |
+
},
|
| 3360 |
+
|
| 3361 |
+
ajaxSetup: function( settings ) {
|
| 3362 |
+
jQuery.extend( jQuery.ajaxSettings, settings );
|
| 3363 |
+
},
|
| 3364 |
+
|
| 3365 |
+
ajaxSettings: {
|
| 3366 |
+
url: location.href,
|
| 3367 |
+
global: true,
|
| 3368 |
+
type: "GET",
|
| 3369 |
+
contentType: "application/x-www-form-urlencoded",
|
| 3370 |
+
processData: true,
|
| 3371 |
+
async: true,
|
| 3372 |
+
/*
|
| 3373 |
+
timeout: 0,
|
| 3374 |
+
data: null,
|
| 3375 |
+
username: null,
|
| 3376 |
+
password: null,
|
| 3377 |
+
*/
|
| 3378 |
+
// Create the request object; Microsoft failed to properly
|
| 3379 |
+
// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
|
| 3380 |
+
// This function can be overriden by calling jQuery.ajaxSetup
|
| 3381 |
+
xhr:function(){
|
| 3382 |
+
return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
|
| 3383 |
+
},
|
| 3384 |
+
accepts: {
|
| 3385 |
+
xml: "application/xml, text/xml",
|
| 3386 |
+
html: "text/html",
|
| 3387 |
+
script: "text/javascript, application/javascript",
|
| 3388 |
+
json: "application/json, text/javascript",
|
| 3389 |
+
text: "text/plain",
|
| 3390 |
+
_default: "*/*"
|
| 3391 |
+
}
|
| 3392 |
+
},
|
| 3393 |
+
|
| 3394 |
+
// Last-Modified header cache for next request
|
| 3395 |
+
lastModified: {},
|
| 3396 |
+
|
| 3397 |
+
ajax: function( s ) {
|
| 3398 |
+
// Extend the settings, but re-extend 's' so that it can be
|
| 3399 |
+
// checked again later (in the test suite, specifically)
|
| 3400 |
+
s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
|
| 3401 |
+
|
| 3402 |
+
var jsonp, jsre = /=\?(&|$)/g, status, data,
|
| 3403 |
+
type = s.type.toUpperCase();
|
| 3404 |
+
|
| 3405 |
+
// convert data if not already a string
|
| 3406 |
+
if ( s.data && s.processData && typeof s.data !== "string" )
|
| 3407 |
+
s.data = jQuery.param(s.data);
|
| 3408 |
+
|
| 3409 |
+
// Handle JSONP Parameter Callbacks
|
| 3410 |
+
if ( s.dataType == "jsonp" ) {
|
| 3411 |
+
if ( type == "GET" ) {
|
| 3412 |
+
if ( !s.url.match(jsre) )
|
| 3413 |
+
s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
|
| 3414 |
+
} else if ( !s.data || !s.data.match(jsre) )
|
| 3415 |
+
s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
|
| 3416 |
+
s.dataType = "json";
|
| 3417 |
+
}
|
| 3418 |
+
|
| 3419 |
+
// Build temporary JSONP function
|
| 3420 |
+
if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
|
| 3421 |
+
jsonp = "jsonp" + jsc++;
|
| 3422 |
+
|
| 3423 |
+
// Replace the =? sequence both in the query string and the data
|
| 3424 |
+
if ( s.data )
|
| 3425 |
+
s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
|
| 3426 |
+
s.url = s.url.replace(jsre, "=" + jsonp + "$1");
|
| 3427 |
+
|
| 3428 |
+
// We need to make sure
|
| 3429 |
+
// that a JSONP style response is executed properly
|
| 3430 |
+
s.dataType = "script";
|
| 3431 |
+
|
| 3432 |
+
// Handle JSONP-style loading
|
| 3433 |
+
window[ jsonp ] = function(tmp){
|
| 3434 |
+
data = tmp;
|
| 3435 |
+
success();
|
| 3436 |
+
complete();
|
| 3437 |
+
// Garbage collect
|
| 3438 |
+
window[ jsonp ] = undefined;
|
| 3439 |
+
try{ delete window[ jsonp ]; } catch(e){}
|
| 3440 |
+
if ( head )
|
| 3441 |
+
head.removeChild( script );
|
| 3442 |
+
};
|
| 3443 |
+
}
|
| 3444 |
+
|
| 3445 |
+
if ( s.dataType == "script" && s.cache == null )
|
| 3446 |
+
s.cache = false;
|
| 3447 |
+
|
| 3448 |
+
if ( s.cache === false && type == "GET" ) {
|
| 3449 |
+
var ts = now();
|
| 3450 |
+
// try replacing _= if it is there
|
| 3451 |
+
var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
|
| 3452 |
+
// if nothing was replaced, add timestamp to the end
|
| 3453 |
+
s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
|
| 3454 |
+
}
|
| 3455 |
+
|
| 3456 |
+
// If data is available, append data to url for get requests
|
| 3457 |
+
if ( s.data && type == "GET" ) {
|
| 3458 |
+
s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
|
| 3459 |
+
|
| 3460 |
+
// IE likes to send both get and post data, prevent this
|
| 3461 |
+
s.data = null;
|
| 3462 |
+
}
|
| 3463 |
+
|
| 3464 |
+
// Watch for a new set of requests
|
| 3465 |
+
if ( s.global && ! jQuery.active++ )
|
| 3466 |
+
jQuery.event.trigger( "ajaxStart" );
|
| 3467 |
+
|
| 3468 |
+
// Matches an absolute URL, and saves the domain
|
| 3469 |
+
var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url );
|
| 3470 |
+
|
| 3471 |
+
// If we're requesting a remote document
|
| 3472 |
+
// and trying to load JSON or Script with a GET
|
| 3473 |
+
if ( s.dataType == "script" && type == "GET" && parts
|
| 3474 |
+
&& ( parts[1] && parts[1] != location.protocol || parts[2] != location.host )){
|
| 3475 |
+
|
| 3476 |
+
var head = document.getElementsByTagName("head")[0];
|
| 3477 |
+
var script = document.createElement("script");
|
| 3478 |
+
script.src = s.url;
|
| 3479 |
+
if (s.scriptCharset)
|
| 3480 |
+
script.charset = s.scriptCharset;
|
| 3481 |
+
|
| 3482 |
+
// Handle Script loading
|
| 3483 |
+
if ( !jsonp ) {
|
| 3484 |
+
var done = false;
|
| 3485 |
+
|
| 3486 |
+
// Attach handlers for all browsers
|
| 3487 |
+
script.onload = script.onreadystatechange = function(){
|
| 3488 |
+
if ( !done && (!this.readyState ||
|
| 3489 |
+
this.readyState == "loaded" || this.readyState == "complete") ) {
|
| 3490 |
+
done = true;
|
| 3491 |
+
success();
|
| 3492 |
+
complete();
|
| 3493 |
+
|
| 3494 |
+
// Handle memory leak in IE
|
| 3495 |
+
script.onload = script.onreadystatechange = null;
|
| 3496 |
+
head.removeChild( script );
|
| 3497 |
+
}
|
| 3498 |
+
};
|
| 3499 |
+
}
|
| 3500 |
+
|
| 3501 |
+
head.appendChild(script);
|
| 3502 |
+
|
| 3503 |
+
// We handle everything using the script element injection
|
| 3504 |
+
return undefined;
|
| 3505 |
+
}
|
| 3506 |
+
|
| 3507 |
+
var requestDone = false;
|
| 3508 |
+
|
| 3509 |
+
// Create the request object
|
| 3510 |
+
var xhr = s.xhr();
|
| 3511 |
+
|
| 3512 |
+
// Open the socket
|
| 3513 |
+
// Passing null username, generates a login popup on Opera (#2865)
|
| 3514 |
+
if( s.username )
|
| 3515 |
+
xhr.open(type, s.url, s.async, s.username, s.password);
|
| 3516 |
+
else
|
| 3517 |
+
xhr.open(type, s.url, s.async);
|
| 3518 |
+
|
| 3519 |
+
// Need an extra try/catch for cross domain requests in Firefox 3
|
| 3520 |
+
try {
|
| 3521 |
+
// Set the correct header, if data is being sent
|
| 3522 |
+
if ( s.data )
|
| 3523 |
+
xhr.setRequestHeader("Content-Type", s.contentType);
|
| 3524 |
+
|
| 3525 |
+
// Set the If-Modified-Since header, if ifModified mode.
|
| 3526 |
+
if ( s.ifModified )
|
| 3527 |
+
xhr.setRequestHeader("If-Modified-Since",
|
| 3528 |
+
jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
|
| 3529 |
+
|
| 3530 |
+
// Set header so the called script knows that it's an XMLHttpRequest
|
| 3531 |
+
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
| 3532 |
+
|
| 3533 |
+
// Set the Accepts header for the server, depending on the dataType
|
| 3534 |
+
xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
|
| 3535 |
+
s.accepts[ s.dataType ] + ", */*" :
|
| 3536 |
+
s.accepts._default );
|
| 3537 |
+
} catch(e){}
|
| 3538 |
+
|
| 3539 |
+
// Allow custom headers/mimetypes and early abort
|
| 3540 |
+
if ( s.beforeSend && s.beforeSend(xhr, s) === false ) {
|
| 3541 |
+
// Handle the global AJAX counter
|
| 3542 |
+
if ( s.global && ! --jQuery.active )
|
| 3543 |
+
jQuery.event.trigger( "ajaxStop" );
|
| 3544 |
+
// close opended socket
|
| 3545 |
+
xhr.abort();
|
| 3546 |
+
return false;
|
| 3547 |
+
}
|
| 3548 |
+
|
| 3549 |
+
if ( s.global )
|
| 3550 |
+
jQuery.event.trigger("ajaxSend", [xhr, s]);
|
| 3551 |
+
|
| 3552 |
+
// Wait for a response to come back
|
| 3553 |
+
var onreadystatechange = function(isTimeout){
|
| 3554 |
+
// The request was aborted, clear the interval and decrement jQuery.active
|
| 3555 |
+
if (xhr.readyState == 0) {
|
| 3556 |
+
if (ival) {
|
| 3557 |
+
// clear poll interval
|
| 3558 |
+
clearInterval(ival);
|
| 3559 |
+
ival = null;
|
| 3560 |
+
// Handle the global AJAX counter
|
| 3561 |
+
if ( s.global && ! --jQuery.active )
|
| 3562 |
+
jQuery.event.trigger( "ajaxStop" );
|
| 3563 |
+
}
|
| 3564 |
+
// The transfer is complete and the data is available, or the request timed out
|
| 3565 |
+
} else if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) {
|
| 3566 |
+
requestDone = true;
|
| 3567 |
+
|
| 3568 |
+
// clear poll interval
|
| 3569 |
+
if (ival) {
|
| 3570 |
+
clearInterval(ival);
|
| 3571 |
+
ival = null;
|
| 3572 |
+
}
|
| 3573 |
+
|
| 3574 |
+
status = isTimeout == "timeout" ? "timeout" :
|
| 3575 |
+
!jQuery.httpSuccess( xhr ) ? "error" :
|
| 3576 |
+
s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
|
| 3577 |
+
"success";
|
| 3578 |
+
|
| 3579 |
+
if ( status == "success" ) {
|
| 3580 |
+
// Watch for, and catch, XML document parse errors
|
| 3581 |
+
try {
|
| 3582 |
+
// process the data (runs the xml through httpData regardless of callback)
|
| 3583 |
+
data = jQuery.httpData( xhr, s.dataType, s );
|
| 3584 |
+
} catch(e) {
|
| 3585 |
+
status = "parsererror";
|
| 3586 |
+
}
|
| 3587 |
+
}
|
| 3588 |
+
|
| 3589 |
+
// Make sure that the request was successful or notmodified
|
| 3590 |
+
if ( status == "success" ) {
|
| 3591 |
+
// Cache Last-Modified header, if ifModified mode.
|
| 3592 |
+
var modRes;
|
| 3593 |
+
try {
|
| 3594 |
+
modRes = xhr.getResponseHeader("Last-Modified");
|
| 3595 |
+
} catch(e) {} // swallow exception thrown by FF if header is not available
|
| 3596 |
+
|
| 3597 |
+
if ( s.ifModified && modRes )
|
| 3598 |
+
jQuery.lastModified[s.url] = modRes;
|
| 3599 |
+
|
| 3600 |
+
// JSONP handles its own success callback
|
| 3601 |
+
if ( !jsonp )
|
| 3602 |
+
success();
|
| 3603 |
+
} else
|
| 3604 |
+
jQuery.handleError(s, xhr, status);
|
| 3605 |
+
|
| 3606 |
+
// Fire the complete handlers
|
| 3607 |
+
complete();
|
| 3608 |
+
|
| 3609 |
+
if ( isTimeout )
|
| 3610 |
+
xhr.abort();
|
| 3611 |
+
|
| 3612 |
+
// Stop memory leaks
|
| 3613 |
+
if ( s.async )
|
| 3614 |
+
xhr = null;
|
| 3615 |
+
}
|
| 3616 |
+
};
|
| 3617 |
+
|
| 3618 |
+
if ( s.async ) {
|
| 3619 |
+
// don't attach the handler to the request, just poll it instead
|
| 3620 |
+
var ival = setInterval(onreadystatechange, 13);
|
| 3621 |
+
|
| 3622 |
+
// Timeout checker
|
| 3623 |
+
if ( s.timeout > 0 )
|
| 3624 |
+
setTimeout(function(){
|
| 3625 |
+
// Check to see if the request is still happening
|
| 3626 |
+
if ( xhr && !requestDone )
|
| 3627 |
+
onreadystatechange( "timeout" );
|
| 3628 |
+
}, s.timeout);
|
| 3629 |
+
}
|
| 3630 |
+
|
| 3631 |
+
// Send the data
|
| 3632 |
+
try {
|
| 3633 |
+
xhr.send(s.data);
|
| 3634 |
+
} catch(e) {
|
| 3635 |
+
jQuery.handleError(s, xhr, null, e);
|
| 3636 |
+
}
|
| 3637 |
+
|
| 3638 |
+
// firefox 1.5 doesn't fire statechange for sync requests
|
| 3639 |
+
if ( !s.async )
|
| 3640 |
+
onreadystatechange();
|
| 3641 |
+
|
| 3642 |
+
function success(){
|
| 3643 |
+
// If a local callback was specified, fire it and pass it the data
|
| 3644 |
+
if ( s.success )
|
| 3645 |
+
s.success( data, status );
|
| 3646 |
+
|
| 3647 |
+
// Fire the global callback
|
| 3648 |
+
if ( s.global )
|
| 3649 |
+
jQuery.event.trigger( "ajaxSuccess", [xhr, s] );
|
| 3650 |
+
}
|
| 3651 |
+
|
| 3652 |
+
function complete(){
|
| 3653 |
+
// Process result
|
| 3654 |
+
if ( s.complete )
|
| 3655 |
+
s.complete(xhr, status);
|
| 3656 |
+
|
| 3657 |
+
// The request was completed
|
| 3658 |
+
if ( s.global )
|
| 3659 |
+
jQuery.event.trigger( "ajaxComplete", [xhr, s] );
|
| 3660 |
+
|
| 3661 |
+
// Handle the global AJAX counter
|
| 3662 |
+
if ( s.global && ! --jQuery.active )
|
| 3663 |
+
jQuery.event.trigger( "ajaxStop" );
|
| 3664 |
+
}
|
| 3665 |
+
|
| 3666 |
+
// return XMLHttpRequest to allow aborting the request etc.
|
| 3667 |
+
return xhr;
|
| 3668 |
+
},
|
| 3669 |
+
|
| 3670 |
+
handleError: function( s, xhr, status, e ) {
|
| 3671 |
+
// If a local callback was specified, fire it
|
| 3672 |
+
if ( s.error ) s.error( xhr, status, e );
|
| 3673 |
+
|
| 3674 |
+
// Fire the global callback
|
| 3675 |
+
if ( s.global )
|
| 3676 |
+
jQuery.event.trigger( "ajaxError", [xhr, s, e] );
|
| 3677 |
+
},
|
| 3678 |
+
|
| 3679 |
+
// Counter for holding the number of active queries
|
| 3680 |
+
active: 0,
|
| 3681 |
+
|
| 3682 |
+
// Determines if an XMLHttpRequest was successful or not
|
| 3683 |
+
httpSuccess: function( xhr ) {
|
| 3684 |
+
try {
|
| 3685 |
+
// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
|
| 3686 |
+
return !xhr.status && location.protocol == "file:" ||
|
| 3687 |
+
( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223;
|
| 3688 |
+
} catch(e){}
|
| 3689 |
+
return false;
|
| 3690 |
+
},
|
| 3691 |
+
|
| 3692 |
+
// Determines if an XMLHttpRequest returns NotModified
|
| 3693 |
+
httpNotModified: function( xhr, url ) {
|
| 3694 |
+
try {
|
| 3695 |
+
var xhrRes = xhr.getResponseHeader("Last-Modified");
|
| 3696 |
+
|
| 3697 |
+
// Firefox always returns 200. check Last-Modified date
|
| 3698 |
+
return xhr.status == 304 || xhrRes == jQuery.lastModified[url];
|
| 3699 |
+
} catch(e){}
|
| 3700 |
+
return false;
|
| 3701 |
+
},
|
| 3702 |
+
|
| 3703 |
+
httpData: function( xhr, type, s ) {
|
| 3704 |
+
var ct = xhr.getResponseHeader("content-type"),
|
| 3705 |
+
xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
|
| 3706 |
+
data = xml ? xhr.responseXML : xhr.responseText;
|
| 3707 |
+
|
| 3708 |
+
if ( xml && data.documentElement.tagName == "parsererror" )
|
| 3709 |
+
throw "parsererror";
|
| 3710 |
+
|
| 3711 |
+
// Allow a pre-filtering function to sanitize the response
|
| 3712 |
+
// s != null is checked to keep backwards compatibility
|
| 3713 |
+
if( s && s.dataFilter )
|
| 3714 |
+
data = s.dataFilter( data, type );
|
| 3715 |
+
|
| 3716 |
+
// The filter can actually parse the response
|
| 3717 |
+
if( typeof data === "string" ){
|
| 3718 |
+
|
| 3719 |
+
// If the type is "script", eval it in global context
|
| 3720 |
+
if ( type == "script" )
|
| 3721 |
+
jQuery.globalEval( data );
|
| 3722 |
+
|
| 3723 |
+
// Get the JavaScript object, if JSON is used.
|
| 3724 |
+
if ( type == "json" )
|
| 3725 |
+
data = window["eval"]("(" + data + ")");
|
| 3726 |
+
}
|
| 3727 |
+
|
| 3728 |
+
return data;
|
| 3729 |
+
},
|
| 3730 |
+
|
| 3731 |
+
// Serialize an array of form elements or a set of
|
| 3732 |
+
// key/values into a query string
|
| 3733 |
+
param: function( a ) {
|
| 3734 |
+
var s = [ ];
|
| 3735 |
+
|
| 3736 |
+
function add( key, value ){
|
| 3737 |
+
s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value);
|
| 3738 |
+
};
|
| 3739 |
+
|
| 3740 |
+
// If an array was passed in, assume that it is an array
|
| 3741 |
+
// of form elements
|
| 3742 |
+
if ( jQuery.isArray(a) || a.jquery )
|
| 3743 |
+
// Serialize the form elements
|
| 3744 |
+
jQuery.each( a, function(){
|
| 3745 |
+
add( this.name, this.value );
|
| 3746 |
+
});
|
| 3747 |
+
|
| 3748 |
+
// Otherwise, assume that it's an object of key/value pairs
|
| 3749 |
+
else
|
| 3750 |
+
// Serialize the key/values
|
| 3751 |
+
for ( var j in a )
|
| 3752 |
+
// If the value is an array then the key names need to be repeated
|
| 3753 |
+
if ( jQuery.isArray(a[j]) )
|
| 3754 |
+
jQuery.each( a[j], function(){
|
| 3755 |
+
add( j, this );
|
| 3756 |
+
});
|
| 3757 |
+
else
|
| 3758 |
+
add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] );
|
| 3759 |
+
|
| 3760 |
+
// Return the resulting serialization
|
| 3761 |
+
return s.join("&").replace(/%20/g, "+");
|
| 3762 |
+
}
|
| 3763 |
+
|
| 3764 |
+
});
|
| 3765 |
+
var elemdisplay = {},
|
| 3766 |
+
timerId,
|
| 3767 |
+
fxAttrs = [
|
| 3768 |
+
// height animations
|
| 3769 |
+
[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
|
| 3770 |
+
// width animations
|
| 3771 |
+
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
|
| 3772 |
+
// opacity animations
|
| 3773 |
+
[ "opacity" ]
|
| 3774 |
+
];
|
| 3775 |
+
|
| 3776 |
+
function genFx( type, num ){
|
| 3777 |
+
var obj = {};
|
| 3778 |
+
jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function(){
|
| 3779 |
+
obj[ this ] = type;
|
| 3780 |
+
});
|
| 3781 |
+
return obj;
|
| 3782 |
+
}
|
| 3783 |
+
|
| 3784 |
+
jQuery.fn.extend({
|
| 3785 |
+
show: function(speed,callback){
|
| 3786 |
+
if ( speed ) {
|
| 3787 |
+
return this.animate( genFx("show", 3), speed, callback);
|
| 3788 |
+
} else {
|
| 3789 |
+
for ( var i = 0, l = this.length; i < l; i++ ){
|
| 3790 |
+
var old = jQuery.data(this[i], "olddisplay");
|
| 3791 |
+
|
| 3792 |
+
this[i].style.display = old || "";
|
| 3793 |
+
|
| 3794 |
+
if ( jQuery.css(this[i], "display") === "none" ) {
|
| 3795 |
+
var tagName = this[i].tagName, display;
|
| 3796 |
+
|
| 3797 |
+
if ( elemdisplay[ tagName ] ) {
|
| 3798 |
+
display = elemdisplay[ tagName ];
|
| 3799 |
+
} else {
|
| 3800 |
+
var elem = jQuery("<" + tagName + " />").appendTo("body");
|
| 3801 |
+
|
| 3802 |
+
display = elem.css("display");
|
| 3803 |
+
if ( display === "none" )
|
| 3804 |
+
display = "block";
|
| 3805 |
+
|
| 3806 |
+
elem.remove();
|
| 3807 |
+
|
| 3808 |
+
elemdisplay[ tagName ] = display;
|
| 3809 |
+
}
|
| 3810 |
+
|
| 3811 |
+
jQuery.data(this[i], "olddisplay", display);
|
| 3812 |
+
}
|
| 3813 |
+
}
|
| 3814 |
+
|
| 3815 |
+
// Set the display of the elements in a second loop
|
| 3816 |
+
// to avoid the constant reflow
|
| 3817 |
+
for ( var i = 0, l = this.length; i < l; i++ ){
|
| 3818 |
+
this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
|
| 3819 |
+
}
|
| 3820 |
+
|
| 3821 |
+
return this;
|
| 3822 |
+
}
|
| 3823 |
+
},
|
| 3824 |
+
|
| 3825 |
+
hide: function(speed,callback){
|
| 3826 |
+
if ( speed ) {
|
| 3827 |
+
return this.animate( genFx("hide", 3), speed, callback);
|
| 3828 |
+
} else {
|
| 3829 |
+
for ( var i = 0, l = this.length; i < l; i++ ){
|
| 3830 |
+
var old = jQuery.data(this[i], "olddisplay");
|
| 3831 |
+
if ( !old && old !== "none" )
|
| 3832 |
+
jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
|
| 3833 |
+
}
|
| 3834 |
+
|
| 3835 |
+
// Set the display of the elements in a second loop
|
| 3836 |
+
// to avoid the constant reflow
|
| 3837 |
+
for ( var i = 0, l = this.length; i < l; i++ ){
|
| 3838 |
+
this[i].style.display = "none";
|
| 3839 |
+
}
|
| 3840 |
+
|
| 3841 |
+
return this;
|
| 3842 |
+
}
|
| 3843 |
+
},
|
| 3844 |
+
|
| 3845 |
+
// Save the old toggle function
|
| 3846 |
+
_toggle: jQuery.fn.toggle,
|
| 3847 |
+
|
| 3848 |
+
toggle: function( fn, fn2 ){
|
| 3849 |
+
var bool = typeof fn === "boolean";
|
| 3850 |
+
|
| 3851 |
+
return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
|
| 3852 |
+
this._toggle.apply( this, arguments ) :
|
| 3853 |
+
fn == null || bool ?
|
| 3854 |
+
this.each(function(){
|
| 3855 |
+
var state = bool ? fn : jQuery(this).is(":hidden");
|
| 3856 |
+
jQuery(this)[ state ? "show" : "hide" ]();
|
| 3857 |
+
}) :
|
| 3858 |
+
this.animate(genFx("toggle", 3), fn, fn2);
|
| 3859 |
+
},
|
| 3860 |
+
|
| 3861 |
+
fadeTo: function(speed,to,callback){
|
| 3862 |
+
return this.animate({opacity: to}, speed, callback);
|
| 3863 |
+
},
|
| 3864 |
+
|
| 3865 |
+
animate: function( prop, speed, easing, callback ) {
|
| 3866 |
+
var optall = jQuery.speed(speed, easing, callback);
|
| 3867 |
+
|
| 3868 |
+
return this[ optall.queue === false ? "each" : "queue" ](function(){
|
| 3869 |
+
|
| 3870 |
+
var opt = jQuery.extend({}, optall), p,
|
| 3871 |
+
hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
|
| 3872 |
+
self = this;
|
| 3873 |
+
|
| 3874 |
+
for ( p in prop ) {
|
| 3875 |
+
if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
|
| 3876 |
+
return opt.complete.call(this);
|
| 3877 |
+
|
| 3878 |
+
if ( ( p == "height" || p == "width" ) && this.style ) {
|
| 3879 |
+
// Store display property
|
| 3880 |
+
opt.display = jQuery.css(this, "display");
|
| 3881 |
+
|
| 3882 |
+
// Make sure that nothing sneaks out
|
| 3883 |
+
opt.overflow = this.style.overflow;
|
| 3884 |
+
}
|
| 3885 |
+
}
|
| 3886 |
+
|
| 3887 |
+
if ( opt.overflow != null )
|
| 3888 |
+
this.style.overflow = "hidden";
|
| 3889 |
+
|
| 3890 |
+
opt.curAnim = jQuery.extend({}, prop);
|
| 3891 |
+
|
| 3892 |
+
jQuery.each( prop, function(name, val){
|
| 3893 |
+
var e = new jQuery.fx( self, opt, name );
|
| 3894 |
+
|
| 3895 |
+
if ( /toggle|show|hide/.test(val) )
|
| 3896 |
+
e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
|
| 3897 |
+
else {
|
| 3898 |
+
var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
|
| 3899 |
+
start = e.cur(true) || 0;
|
| 3900 |
+
|
| 3901 |
+
if ( parts ) {
|
| 3902 |
+
var end = parseFloat(parts[2]),
|
| 3903 |
+
unit = parts[3] || "px";
|
| 3904 |
+
|
| 3905 |
+
// We need to compute starting value
|
| 3906 |
+
if ( unit != "px" ) {
|
| 3907 |
+
self.style[ name ] = (end || 1) + unit;
|
| 3908 |
+
start = ((end || 1) / e.cur(true)) * start;
|
| 3909 |
+
self.style[ name ] = start + unit;
|
| 3910 |
+
}
|
| 3911 |
+
|
| 3912 |
+
// If a +=/-= token was provided, we're doing a relative animation
|
| 3913 |
+
if ( parts[1] )
|
| 3914 |
+
end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
|
| 3915 |
+
|
| 3916 |
+
e.custom( start, end, unit );
|
| 3917 |
+
} else
|
| 3918 |
+
e.custom( start, val, "" );
|
| 3919 |
+
}
|
| 3920 |
+
});
|
| 3921 |
+
|
| 3922 |
+
// For JS strict compliance
|
| 3923 |
+
return true;
|
| 3924 |
+
});
|
| 3925 |
+
},
|
| 3926 |
+
|
| 3927 |
+
stop: function(clearQueue, gotoEnd){
|
| 3928 |
+
var timers = jQuery.timers;
|
| 3929 |
+
|
| 3930 |
+
if (clearQueue)
|
| 3931 |
+
this.queue([]);
|
| 3932 |
+
|
| 3933 |
+
this.each(function(){
|
| 3934 |
+
// go in reverse order so anything added to the queue during the loop is ignored
|
| 3935 |
+
for ( var i = timers.length - 1; i >= 0; i-- )
|
| 3936 |
+
if ( timers[i].elem == this ) {
|
| 3937 |
+
if (gotoEnd)
|
| 3938 |
+
// force the next step to be the last
|
| 3939 |
+
timers[i](true);
|
| 3940 |
+
timers.splice(i, 1);
|
| 3941 |
+
}
|
| 3942 |
+
});
|
| 3943 |
+
|
| 3944 |
+
// start the next in the queue if the last step wasn't forced
|
| 3945 |
+
if (!gotoEnd)
|
| 3946 |
+
this.dequeue();
|
| 3947 |
+
|
| 3948 |
+
return this;
|
| 3949 |
+
}
|
| 3950 |
+
|
| 3951 |
+
});
|
| 3952 |
+
|
| 3953 |
+
// Generate shortcuts for custom animations
|
| 3954 |
+
jQuery.each({
|
| 3955 |
+
slideDown: genFx("show", 1),
|
| 3956 |
+
slideUp: genFx("hide", 1),
|
| 3957 |
+
slideToggle: genFx("toggle", 1),
|
| 3958 |
+
fadeIn: { opacity: "show" },
|
| 3959 |
+
fadeOut: { opacity: "hide" }
|
| 3960 |
+
}, function( name, props ){
|
| 3961 |
+
jQuery.fn[ name ] = function( speed, callback ){
|
| 3962 |
+
return this.animate( props, speed, callback );
|
| 3963 |
+
};
|
| 3964 |
+
});
|
| 3965 |
+
|
| 3966 |
+
jQuery.extend({
|
| 3967 |
+
|
| 3968 |
+
speed: function(speed, easing, fn) {
|
| 3969 |
+
var opt = typeof speed === "object" ? speed : {
|
| 3970 |
+
complete: fn || !fn && easing ||
|
| 3971 |
+
jQuery.isFunction( speed ) && speed,
|
| 3972 |
+
duration: speed,
|
| 3973 |
+
easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
|
| 3974 |
+
};
|
| 3975 |
+
|
| 3976 |
+
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
|
| 3977 |
+
jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
|
| 3978 |
+
|
| 3979 |
+
// Queueing
|
| 3980 |
+
opt.old = opt.complete;
|
| 3981 |
+
opt.complete = function(){
|
| 3982 |
+
if ( opt.queue !== false )
|
| 3983 |
+
jQuery(this).dequeue();
|
| 3984 |
+
if ( jQuery.isFunction( opt.old ) )
|
| 3985 |
+
opt.old.call( this );
|
| 3986 |
+
};
|
| 3987 |
+
|
| 3988 |
+
return opt;
|
| 3989 |
+
},
|
| 3990 |
+
|
| 3991 |
+
easing: {
|
| 3992 |
+
linear: function( p, n, firstNum, diff ) {
|
| 3993 |
+
return firstNum + diff * p;
|
| 3994 |
+
},
|
| 3995 |
+
swing: function( p, n, firstNum, diff ) {
|
| 3996 |
+
return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
|
| 3997 |
+
}
|
| 3998 |
+
},
|
| 3999 |
+
|
| 4000 |
+
timers: [],
|
| 4001 |
+
|
| 4002 |
+
fx: function( elem, options, prop ){
|
| 4003 |
+
this.options = options;
|
| 4004 |
+
this.elem = elem;
|
| 4005 |
+
this.prop = prop;
|
| 4006 |
+
|
| 4007 |
+
if ( !options.orig )
|
| 4008 |
+
options.orig = {};
|
| 4009 |
+
}
|
| 4010 |
+
|
| 4011 |
+
});
|
| 4012 |
+
|
| 4013 |
+
jQuery.fx.prototype = {
|
| 4014 |
+
|
| 4015 |
+
// Simple function for setting a style value
|
| 4016 |
+
update: function(){
|
| 4017 |
+
if ( this.options.step )
|
| 4018 |
+
this.options.step.call( this.elem, this.now, this );
|
| 4019 |
+
|
| 4020 |
+
(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
|
| 4021 |
+
|
| 4022 |
+
// Set display property to block for height/width animations
|
| 4023 |
+
if ( ( this.prop == "height" || this.prop == "width" ) && this.elem.style )
|
| 4024 |
+
this.elem.style.display = "block";
|
| 4025 |
+
},
|
| 4026 |
+
|
| 4027 |
+
// Get the current size
|
| 4028 |
+
cur: function(force){
|
| 4029 |
+
if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) )
|
| 4030 |
+
return this.elem[ this.prop ];
|
| 4031 |
+
|
| 4032 |
+
var r = parseFloat(jQuery.css(this.elem, this.prop, force));
|
| 4033 |
+
return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
|
| 4034 |
+
},
|
| 4035 |
+
|
| 4036 |
+
// Start an animation from one number to another
|
| 4037 |
+
custom: function(from, to, unit){
|
| 4038 |
+
this.startTime = now();
|
| 4039 |
+
this.start = from;
|
| 4040 |
+
this.end = to;
|
| 4041 |
+
this.unit = unit || this.unit || "px";
|
| 4042 |
+
this.now = this.start;
|
| 4043 |
+
this.pos = this.state = 0;
|
| 4044 |
+
|
| 4045 |
+
var self = this;
|
| 4046 |
+
function t(gotoEnd){
|
| 4047 |
+
return self.step(gotoEnd);
|
| 4048 |
+
}
|
| 4049 |
+
|
| 4050 |
+
t.elem = this.elem;
|
| 4051 |
+
|
| 4052 |
+
if ( t() && jQuery.timers.push(t) && !timerId ) {
|
| 4053 |
+
timerId = setInterval(function(){
|
| 4054 |
+
var timers = jQuery.timers;
|
| 4055 |
+
|
| 4056 |
+
for ( var i = 0; i < timers.length; i++ )
|
| 4057 |
+
if ( !timers[i]() )
|
| 4058 |
+
timers.splice(i--, 1);
|
| 4059 |
+
|
| 4060 |
+
if ( !timers.length ) {
|
| 4061 |
+
clearInterval( timerId );
|
| 4062 |
+
timerId = undefined;
|
| 4063 |
+
}
|
| 4064 |
+
}, 13);
|
| 4065 |
+
}
|
| 4066 |
+
},
|
| 4067 |
+
|
| 4068 |
+
// Simple 'show' function
|
| 4069 |
+
show: function(){
|
| 4070 |
+
// Remember where we started, so that we can go back to it later
|
| 4071 |
+
this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
|
| 4072 |
+
this.options.show = true;
|
| 4073 |
+
|
| 4074 |
+
// Begin the animation
|
| 4075 |
+
// Make sure that we start at a small width/height to avoid any
|
| 4076 |
+
// flash of content
|
| 4077 |
+
this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur());
|
| 4078 |
+
|
| 4079 |
+
// Start by showing the element
|
| 4080 |
+
jQuery(this.elem).show();
|
| 4081 |
+
},
|
| 4082 |
+
|
| 4083 |
+
// Simple 'hide' function
|
| 4084 |
+
hide: function(){
|
| 4085 |
+
// Remember where we started, so that we can go back to it later
|
| 4086 |
+
this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
|
| 4087 |
+
this.options.hide = true;
|
| 4088 |
+
|
| 4089 |
+
// Begin the animation
|
| 4090 |
+
this.custom(this.cur(), 0);
|
| 4091 |
+
},
|
| 4092 |
+
|
| 4093 |
+
// Each step of an animation
|
| 4094 |
+
step: function(gotoEnd){
|
| 4095 |
+
var t = now();
|
| 4096 |
+
|
| 4097 |
+
if ( gotoEnd || t >= this.options.duration + this.startTime ) {
|
| 4098 |
+
this.now = this.end;
|
| 4099 |
+
this.pos = this.state = 1;
|
| 4100 |
+
this.update();
|
| 4101 |
+
|
| 4102 |
+
this.options.curAnim[ this.prop ] = true;
|
| 4103 |
+
|
| 4104 |
+
var done = true;
|
| 4105 |
+
for ( var i in this.options.curAnim )
|
| 4106 |
+
if ( this.options.curAnim[i] !== true )
|
| 4107 |
+
done = false;
|
| 4108 |
+
|
| 4109 |
+
if ( done ) {
|
| 4110 |
+
if ( this.options.display != null ) {
|
| 4111 |
+
// Reset the overflow
|
| 4112 |
+
this.elem.style.overflow = this.options.overflow;
|
| 4113 |
+
|
| 4114 |
+
// Reset the display
|
| 4115 |
+
this.elem.style.display = this.options.display;
|
| 4116 |
+
if ( jQuery.css(this.elem, "display") == "none" )
|
| 4117 |
+
this.elem.style.display = "block";
|
| 4118 |
+
}
|
| 4119 |
+
|
| 4120 |
+
// Hide the element if the "hide" operation was done
|
| 4121 |
+
if ( this.options.hide )
|
| 4122 |
+
jQuery(this.elem).hide();
|
| 4123 |
+
|
| 4124 |
+
// Reset the properties, if the item has been hidden or shown
|
| 4125 |
+
if ( this.options.hide || this.options.show )
|
| 4126 |
+
for ( var p in this.options.curAnim )
|
| 4127 |
+
jQuery.attr(this.elem.style, p, this.options.orig[p]);
|
| 4128 |
+
|
| 4129 |
+
// Execute the complete function
|
| 4130 |
+
this.options.complete.call( this.elem );
|
| 4131 |
+
}
|
| 4132 |
+
|
| 4133 |
+
return false;
|
| 4134 |
+
} else {
|
| 4135 |
+
var n = t - this.startTime;
|
| 4136 |
+
this.state = n / this.options.duration;
|
| 4137 |
+
|
| 4138 |
+
// Perform the easing function, defaults to swing
|
| 4139 |
+
this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
|
| 4140 |
+
this.now = this.start + ((this.end - this.start) * this.pos);
|
| 4141 |
+
|
| 4142 |
+
// Perform the next step of the animation
|
| 4143 |
+
this.update();
|
| 4144 |
+
}
|
| 4145 |
+
|
| 4146 |
+
return true;
|
| 4147 |
+
}
|
| 4148 |
+
|
| 4149 |
+
};
|
| 4150 |
+
|
| 4151 |
+
jQuery.extend( jQuery.fx, {
|
| 4152 |
+
speeds:{
|
| 4153 |
+
slow: 600,
|
| 4154 |
+
fast: 200,
|
| 4155 |
+
// Default speed
|
| 4156 |
+
_default: 400
|
| 4157 |
+
},
|
| 4158 |
+
step: {
|
| 4159 |
+
|
| 4160 |
+
opacity: function(fx){
|
| 4161 |
+
jQuery.attr(fx.elem.style, "opacity", fx.now);
|
| 4162 |
+
},
|
| 4163 |
+
|
| 4164 |
+
_default: function(fx){
|
| 4165 |
+
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
|
| 4166 |
+
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
|
| 4167 |
+
else
|
| 4168 |
+
fx.elem[ fx.prop ] = fx.now;
|
| 4169 |
+
}
|
| 4170 |
+
}
|
| 4171 |
+
});
|
| 4172 |
+
if ( document.documentElement["getBoundingClientRect"] )
|
| 4173 |
+
jQuery.fn.offset = function() {
|
| 4174 |
+
if ( !this[0] ) return { top: 0, left: 0 };
|
| 4175 |
+
if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
|
| 4176 |
+
var box = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement,
|
| 4177 |
+
clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
|
| 4178 |
+
top = box.top + (self.pageYOffset || jQuery.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop,
|
| 4179 |
+
left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
|
| 4180 |
+
return { top: top, left: left };
|
| 4181 |
+
};
|
| 4182 |
+
else
|
| 4183 |
+
jQuery.fn.offset = function() {
|
| 4184 |
+
if ( !this[0] ) return { top: 0, left: 0 };
|
| 4185 |
+
if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
|
| 4186 |
+
jQuery.offset.initialized || jQuery.offset.initialize();
|
| 4187 |
+
|
| 4188 |
+
var elem = this[0], offsetParent = elem.offsetParent, prevOffsetParent = elem,
|
| 4189 |
+
doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
|
| 4190 |
+
body = doc.body, defaultView = doc.defaultView,
|
| 4191 |
+
prevComputedStyle = defaultView.getComputedStyle(elem, null),
|
| 4192 |
+
top = elem.offsetTop, left = elem.offsetLeft;
|
| 4193 |
+
|
| 4194 |
+
while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
|
| 4195 |
+
computedStyle = defaultView.getComputedStyle(elem, null);
|
| 4196 |
+
top -= elem.scrollTop, left -= elem.scrollLeft;
|
| 4197 |
+
if ( elem === offsetParent ) {
|
| 4198 |
+
top += elem.offsetTop, left += elem.offsetLeft;
|
| 4199 |
+
if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.tagName)) )
|
| 4200 |
+
top += parseInt( computedStyle.borderTopWidth, 10) || 0,
|
| 4201 |
+
left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
|
| 4202 |
+
prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
|
| 4203 |
+
}
|
| 4204 |
+
if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" )
|
| 4205 |
+
top += parseInt( computedStyle.borderTopWidth, 10) || 0,
|
| 4206 |
+
left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
|
| 4207 |
+
prevComputedStyle = computedStyle;
|
| 4208 |
+
}
|
| 4209 |
+
|
| 4210 |
+
if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" )
|
| 4211 |
+
top += body.offsetTop,
|
| 4212 |
+
left += body.offsetLeft;
|
| 4213 |
+
|
| 4214 |
+
if ( prevComputedStyle.position === "fixed" )
|
| 4215 |
+
top += Math.max(docElem.scrollTop, body.scrollTop),
|
| 4216 |
+
left += Math.max(docElem.scrollLeft, body.scrollLeft);
|
| 4217 |
+
|
| 4218 |
+
return { top: top, left: left };
|
| 4219 |
+
};
|
| 4220 |
+
|
| 4221 |
+
jQuery.offset = {
|
| 4222 |
+
initialize: function() {
|
| 4223 |
+
if ( this.initialized ) return;
|
| 4224 |
+
var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
|
| 4225 |
+
html = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';
|
| 4226 |
+
|
| 4227 |
+
rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' };
|
| 4228 |
+
for ( prop in rules ) container.style[prop] = rules[prop];
|
| 4229 |
+
|
| 4230 |
+
container.innerHTML = html;
|
| 4231 |
+
body.insertBefore(container, body.firstChild);
|
| 4232 |
+
innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild;
|
| 4233 |
+
|
| 4234 |
+
this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
|
| 4235 |
+
this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
|
| 4236 |
+
|
| 4237 |
+
innerDiv.style.overflow = 'hidden', innerDiv.style.position = 'relative';
|
| 4238 |
+
this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
|
| 4239 |
+
|
| 4240 |
+
body.style.marginTop = '1px';
|
| 4241 |
+
this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0);
|
| 4242 |
+
body.style.marginTop = bodyMarginTop;
|
| 4243 |
+
|
| 4244 |
+
body.removeChild(container);
|
| 4245 |
+
this.initialized = true;
|
| 4246 |
+
},
|
| 4247 |
+
|
| 4248 |
+
bodyOffset: function(body) {
|
| 4249 |
+
jQuery.offset.initialized || jQuery.offset.initialize();
|
| 4250 |
+
var top = body.offsetTop, left = body.offsetLeft;
|
| 4251 |
+
if ( jQuery.offset.doesNotIncludeMarginInBodyOffset )
|
| 4252 |
+
top += parseInt( jQuery.curCSS(body, 'marginTop', true), 10 ) || 0,
|
| 4253 |
+
left += parseInt( jQuery.curCSS(body, 'marginLeft', true), 10 ) || 0;
|
| 4254 |
+
return { top: top, left: left };
|
| 4255 |
+
}
|
| 4256 |
+
};
|
| 4257 |
+
|
| 4258 |
+
|
| 4259 |
+
jQuery.fn.extend({
|
| 4260 |
+
position: function() {
|
| 4261 |
+
var left = 0, top = 0, results;
|
| 4262 |
+
|
| 4263 |
+
if ( this[0] ) {
|
| 4264 |
+
// Get *real* offsetParent
|
| 4265 |
+
var offsetParent = this.offsetParent(),
|
| 4266 |
+
|
| 4267 |
+
// Get correct offsets
|
| 4268 |
+
offset = this.offset(),
|
| 4269 |
+
parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();
|
| 4270 |
+
|
| 4271 |
+
// Subtract element margins
|
| 4272 |
+
// note: when an element has margin: auto the offsetLeft and marginLeft
|
| 4273 |
+
// are the same in Safari causing offset.left to incorrectly be 0
|
| 4274 |
+
offset.top -= num( this, 'marginTop' );
|
| 4275 |
+
offset.left -= num( this, 'marginLeft' );
|
| 4276 |
+
|
| 4277 |
+
// Add offsetParent borders
|
| 4278 |
+
parentOffset.top += num( offsetParent, 'borderTopWidth' );
|
| 4279 |
+
parentOffset.left += num( offsetParent, 'borderLeftWidth' );
|
| 4280 |
+
|
| 4281 |
+
// Subtract the two offsets
|
| 4282 |
+
results = {
|
| 4283 |
+
top: offset.top - parentOffset.top,
|
| 4284 |
+
left: offset.left - parentOffset.left
|
| 4285 |
+
};
|
| 4286 |
+
}
|
| 4287 |
+
|
| 4288 |
+
return results;
|
| 4289 |
+
},
|
| 4290 |
+
|
| 4291 |
+
offsetParent: function() {
|
| 4292 |
+
var offsetParent = this[0].offsetParent || document.body;
|
| 4293 |
+
while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )
|
| 4294 |
+
offsetParent = offsetParent.offsetParent;
|
| 4295 |
+
return jQuery(offsetParent);
|
| 4296 |
+
}
|
| 4297 |
+
});
|
| 4298 |
+
|
| 4299 |
+
|
| 4300 |
+
// Create scrollLeft and scrollTop methods
|
| 4301 |
+
jQuery.each( ['Left', 'Top'], function(i, name) {
|
| 4302 |
+
var method = 'scroll' + name;
|
| 4303 |
+
|
| 4304 |
+
jQuery.fn[ method ] = function(val) {
|
| 4305 |
+
if (!this[0]) return null;
|
| 4306 |
+
|
| 4307 |
+
return val !== undefined ?
|
| 4308 |
+
|
| 4309 |
+
// Set the scroll offset
|
| 4310 |
+
this.each(function() {
|
| 4311 |
+
this == window || this == document ?
|
| 4312 |
+
window.scrollTo(
|
| 4313 |
+
!i ? val : jQuery(window).scrollLeft(),
|
| 4314 |
+
i ? val : jQuery(window).scrollTop()
|
| 4315 |
+
) :
|
| 4316 |
+
this[ method ] = val;
|
| 4317 |
+
}) :
|
| 4318 |
+
|
| 4319 |
+
// Return the scroll offset
|
| 4320 |
+
this[0] == window || this[0] == document ?
|
| 4321 |
+
self[ i ? 'pageYOffset' : 'pageXOffset' ] ||
|
| 4322 |
+
jQuery.boxModel && document.documentElement[ method ] ||
|
| 4323 |
+
document.body[ method ] :
|
| 4324 |
+
this[0][ method ];
|
| 4325 |
+
};
|
| 4326 |
+
});
|
| 4327 |
+
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
|
| 4328 |
+
jQuery.each([ "Height", "Width" ], function(i, name){
|
| 4329 |
+
|
| 4330 |
+
var tl = i ? "Left" : "Top", // top or left
|
| 4331 |
+
br = i ? "Right" : "Bottom", // bottom or right
|
| 4332 |
+
lower = name.toLowerCase();
|
| 4333 |
+
|
| 4334 |
+
// innerHeight and innerWidth
|
| 4335 |
+
jQuery.fn["inner" + name] = function(){
|
| 4336 |
+
return this[0] ?
|
| 4337 |
+
jQuery.css( this[0], lower, false, "padding" ) :
|
| 4338 |
+
null;
|
| 4339 |
+
};
|
| 4340 |
+
|
| 4341 |
+
// outerHeight and outerWidth
|
| 4342 |
+
jQuery.fn["outer" + name] = function(margin) {
|
| 4343 |
+
return this[0] ?
|
| 4344 |
+
jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) :
|
| 4345 |
+
null;
|
| 4346 |
+
};
|
| 4347 |
+
|
| 4348 |
+
var type = name.toLowerCase();
|
| 4349 |
+
|
| 4350 |
+
jQuery.fn[ type ] = function( size ) {
|
| 4351 |
+
// Get window width or height
|
| 4352 |
+
return this[0] == window ?
|
| 4353 |
+
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
|
| 4354 |
+
document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] ||
|
| 4355 |
+
document.body[ "client" + name ] :
|
| 4356 |
+
|
| 4357 |
+
// Get document width or height
|
| 4358 |
+
this[0] == document ?
|
| 4359 |
+
// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
|
| 4360 |
+
Math.max(
|
| 4361 |
+
document.documentElement["client" + name],
|
| 4362 |
+
document.body["scroll" + name], document.documentElement["scroll" + name],
|
| 4363 |
+
document.body["offset" + name], document.documentElement["offset" + name]
|
| 4364 |
+
) :
|
| 4365 |
+
|
| 4366 |
+
// Get or set width or height on the element
|
| 4367 |
+
size === undefined ?
|
| 4368 |
+
// Get width or height on the element
|
| 4369 |
+
(this.length ? jQuery.css( this[0], type ) : null) :
|
| 4370 |
+
|
| 4371 |
+
// Set the width or height on the element (default to pixels if value is unitless)
|
| 4372 |
+
this.css( type, typeof size === "string" ? size : size + "px" );
|
| 4373 |
+
};
|
| 4374 |
+
|
| 4375 |
+
});
|
| 4376 |
+
})();
|
skin/adminhtml/default/default/harpreet/colorpicker/js/layout.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
(function($){
|
| 2 |
+
var initLayout = function() {
|
| 3 |
+
var hash = window.location.hash.replace('#', '');
|
| 4 |
+
var currentTab = $('ul.navigationTabs a')
|
| 5 |
+
.bind('click', showTab)
|
| 6 |
+
.filter('a[rel=' + hash + ']');
|
| 7 |
+
if (currentTab.size() == 0) {
|
| 8 |
+
currentTab = $('ul.navigationTabs a:first');
|
| 9 |
+
}
|
| 10 |
+
showTab.apply(currentTab.get(0));
|
| 11 |
+
$('#colorpickerHolder').ColorPicker({flat: true});
|
| 12 |
+
$('#colorpickerHolder2').ColorPicker({
|
| 13 |
+
flat: true,
|
| 14 |
+
color: '#00ff00',
|
| 15 |
+
onSubmit: function(hsb, hex, rgb) {
|
| 16 |
+
$('#colorSelector2 div').css('backgroundColor', '#' + hex);
|
| 17 |
+
}
|
| 18 |
+
});
|
| 19 |
+
$('#colorpickerHolder2>div').css('position', 'absolute');
|
| 20 |
+
var widt = false;
|
| 21 |
+
$('#colorSelector2').bind('click', function() {
|
| 22 |
+
$('#colorpickerHolder2').stop().animate({height: widt ? 0 : 173}, 500);
|
| 23 |
+
widt = !widt;
|
| 24 |
+
});
|
| 25 |
+
$('#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({
|
| 26 |
+
onSubmit: function(hsb, hex, rgb, el) {
|
| 27 |
+
$(el).val(hex);
|
| 28 |
+
$(el).ColorPickerHide();
|
| 29 |
+
},
|
| 30 |
+
onBeforeShow: function () {
|
| 31 |
+
$(this).ColorPickerSetColor(this.value);
|
| 32 |
+
}
|
| 33 |
+
})
|
| 34 |
+
.bind('keyup', function(){
|
| 35 |
+
$(this).ColorPickerSetColor(this.value);
|
| 36 |
+
});
|
| 37 |
+
$('#colorSelector').ColorPicker({
|
| 38 |
+
color: '#0000ff',
|
| 39 |
+
onShow: function (colpkr) {
|
| 40 |
+
$(colpkr).fadeIn(500);
|
| 41 |
+
return false;
|
| 42 |
+
},
|
| 43 |
+
onHide: function (colpkr) {
|
| 44 |
+
$(colpkr).fadeOut(500);
|
| 45 |
+
return false;
|
| 46 |
+
},
|
| 47 |
+
onChange: function (hsb, hex, rgb) {
|
| 48 |
+
$('#colorSelector div').css('backgroundColor', '#' + hex);
|
| 49 |
+
}
|
| 50 |
+
});
|
| 51 |
+
};
|
| 52 |
+
|
| 53 |
+
var showTab = function(e) {
|
| 54 |
+
var tabIndex = $('ul.navigationTabs a')
|
| 55 |
+
.removeClass('active')
|
| 56 |
+
.index(this);
|
| 57 |
+
$(this)
|
| 58 |
+
.addClass('active')
|
| 59 |
+
.blur();
|
| 60 |
+
$('div.tab')
|
| 61 |
+
.hide()
|
| 62 |
+
.eq(tabIndex)
|
| 63 |
+
.show();
|
| 64 |
+
};
|
| 65 |
+
|
| 66 |
+
EYE.register(initLayout, 'init');
|
| 67 |
+
})(jQuery)
|
skin/adminhtml/default/default/harpreet/colorpicker/js/utils.js
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|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)
|
| 10 |
+
{
|
| 11 |
+
var x = 0;
|
| 12 |
+
var y = 0;
|
| 13 |
+
var es = e.style;
|
| 14 |
+
var restoreStyles = false;
|
| 15 |
+
if (forceIt && jQuery.curCSS(e,'display') == 'none') {
|
| 16 |
+
var oldVisibility = es.visibility;
|
| 17 |
+
var oldPosition = es.position;
|
| 18 |
+
restoreStyles = true;
|
| 19 |
+
es.visibility = 'hidden';
|
| 20 |
+
es.display = 'block';
|
| 21 |
+
es.position = 'absolute';
|
| 22 |
+
}
|
| 23 |
+
var el = e;
|
| 24 |
+
if (el.getBoundingClientRect) { // IE
|
| 25 |
+
var box = el.getBoundingClientRect();
|
| 26 |
+
x = box.left + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) - 2;
|
| 27 |
+
y = box.top + Math.max(document.documentElement.scrollTop, document.body.scrollTop) - 2;
|
| 28 |
+
} else {
|
| 29 |
+
x = el.offsetLeft;
|
| 30 |
+
y = el.offsetTop;
|
| 31 |
+
el = el.offsetParent;
|
| 32 |
+
if (e != el) {
|
| 33 |
+
while (el) {
|
| 34 |
+
x += el.offsetLeft;
|
| 35 |
+
y += el.offsetTop;
|
| 36 |
+
el = el.offsetParent;
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
if (jQuery.browser.safari && jQuery.curCSS(e, 'position') == 'absolute' ) {
|
| 40 |
+
x -= document.body.offsetLeft;
|
| 41 |
+
y -= document.body.offsetTop;
|
| 42 |
+
}
|
| 43 |
+
el = e.parentNode;
|
| 44 |
+
while (el && el.tagName.toUpperCase() != 'BODY' && el.tagName.toUpperCase() != 'HTML')
|
| 45 |
+
{
|
| 46 |
+
if (jQuery.curCSS(el, 'display') != 'inline') {
|
| 47 |
+
x -= el.scrollLeft;
|
| 48 |
+
y -= el.scrollTop;
|
| 49 |
+
}
|
| 50 |
+
el = el.parentNode;
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
if (restoreStyles == true) {
|
| 54 |
+
es.display = 'none';
|
| 55 |
+
es.position = oldPosition;
|
| 56 |
+
es.visibility = oldVisibility;
|
| 57 |
+
}
|
| 58 |
+
return {x:x, y:y};
|
| 59 |
+
},
|
| 60 |
+
getSize : function(e)
|
| 61 |
+
{
|
| 62 |
+
var w = parseInt(jQuery.curCSS(e,'width'), 10);
|
| 63 |
+
var h = parseInt(jQuery.curCSS(e,'height'), 10);
|
| 64 |
+
var wb = 0;
|
| 65 |
+
var hb = 0;
|
| 66 |
+
if (jQuery.curCSS(e, 'display') != 'none') {
|
| 67 |
+
wb = e.offsetWidth;
|
| 68 |
+
hb = e.offsetHeight;
|
| 69 |
+
} else {
|
| 70 |
+
var es = e.style;
|
| 71 |
+
var oldVisibility = es.visibility;
|
| 72 |
+
var oldPosition = es.position;
|
| 73 |
+
es.visibility = 'hidden';
|
| 74 |
+
es.display = 'block';
|
| 75 |
+
es.position = 'absolute';
|
| 76 |
+
wb = e.offsetWidth;
|
| 77 |
+
hb = e.offsetHeight;
|
| 78 |
+
es.display = 'none';
|
| 79 |
+
es.position = oldPosition;
|
| 80 |
+
es.visibility = oldVisibility;
|
| 81 |
+
}
|
| 82 |
+
return {w:w, h:h, wb:wb, hb:hb};
|
| 83 |
+
},
|
| 84 |
+
getClient : function(e)
|
| 85 |
+
{
|
| 86 |
+
var h, w;
|
| 87 |
+
if (e) {
|
| 88 |
+
w = e.clientWidth;
|
| 89 |
+
h = e.clientHeight;
|
| 90 |
+
} else {
|
| 91 |
+
var de = document.documentElement;
|
| 92 |
+
w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
|
| 93 |
+
h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
|
| 94 |
+
}
|
| 95 |
+
return {w:w,h:h};
|
| 96 |
+
},
|
| 97 |
+
getScroll : function (e)
|
| 98 |
+
{
|
| 99 |
+
var t=0, l=0, w=0, h=0, iw=0, ih=0;
|
| 100 |
+
if (e && e.nodeName.toLowerCase() != 'body') {
|
| 101 |
+
t = e.scrollTop;
|
| 102 |
+
l = e.scrollLeft;
|
| 103 |
+
w = e.scrollWidth;
|
| 104 |
+
h = e.scrollHeight;
|
| 105 |
+
} else {
|
| 106 |
+
if (document.documentElement) {
|
| 107 |
+
t = document.documentElement.scrollTop;
|
| 108 |
+
l = document.documentElement.scrollLeft;
|
| 109 |
+
w = document.documentElement.scrollWidth;
|
| 110 |
+
h = document.documentElement.scrollHeight;
|
| 111 |
+
} else if (document.body) {
|
| 112 |
+
t = document.body.scrollTop;
|
| 113 |
+
l = document.body.scrollLeft;
|
| 114 |
+
w = document.body.scrollWidth;
|
| 115 |
+
h = document.body.scrollHeight;
|
| 116 |
+
}
|
| 117 |
+
if (typeof pageYOffset != 'undefined') {
|
| 118 |
+
t = pageYOffset;
|
| 119 |
+
l = pageXOffset;
|
| 120 |
+
}
|
| 121 |
+
iw = self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;
|
| 122 |
+
ih = self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;
|
| 123 |
+
}
|
| 124 |
+
return { t: t, l: l, w: w, h: h, iw: iw, ih: ih };
|
| 125 |
+
},
|
| 126 |
+
getMargins : function(e, toInteger)
|
| 127 |
+
{
|
| 128 |
+
var t = jQuery.curCSS(e,'marginTop') || '';
|
| 129 |
+
var r = jQuery.curCSS(e,'marginRight') || '';
|
| 130 |
+
var b = jQuery.curCSS(e,'marginBottom') || '';
|
| 131 |
+
var l = jQuery.curCSS(e,'marginLeft') || '';
|
| 132 |
+
if (toInteger)
|
| 133 |
+
return {
|
| 134 |
+
t: parseInt(t, 10)||0,
|
| 135 |
+
r: parseInt(r, 10)||0,
|
| 136 |
+
b: parseInt(b, 10)||0,
|
| 137 |
+
l: parseInt(l, 10)
|
| 138 |
+
};
|
| 139 |
+
else
|
| 140 |
+
return {t: t, r: r, b: b, l: l};
|
| 141 |
+
},
|
| 142 |
+
getPadding : function(e, toInteger)
|
| 143 |
+
{
|
| 144 |
+
var t = jQuery.curCSS(e,'paddingTop') || '';
|
| 145 |
+
var r = jQuery.curCSS(e,'paddingRight') || '';
|
| 146 |
+
var b = jQuery.curCSS(e,'paddingBottom') || '';
|
| 147 |
+
var l = jQuery.curCSS(e,'paddingLeft') || '';
|
| 148 |
+
if (toInteger)
|
| 149 |
+
return {
|
| 150 |
+
t: parseInt(t, 10)||0,
|
| 151 |
+
r: parseInt(r, 10)||0,
|
| 152 |
+
b: parseInt(b, 10)||0,
|
| 153 |
+
l: parseInt(l, 10)
|
| 154 |
+
};
|
| 155 |
+
else
|
| 156 |
+
return {t: t, r: r, b: b, l: l};
|
| 157 |
+
},
|
| 158 |
+
getBorder : function(e, toInteger)
|
| 159 |
+
{
|
| 160 |
+
var t = jQuery.curCSS(e,'borderTopWidth') || '';
|
| 161 |
+
var r = jQuery.curCSS(e,'borderRightWidth') || '';
|
| 162 |
+
var b = jQuery.curCSS(e,'borderBottomWidth') || '';
|
| 163 |
+
var l = jQuery.curCSS(e,'borderLeftWidth') || '';
|
| 164 |
+
if (toInteger)
|
| 165 |
+
return {
|
| 166 |
+
t: parseInt(t, 10)||0,
|
| 167 |
+
r: parseInt(r, 10)||0,
|
| 168 |
+
b: parseInt(b, 10)||0,
|
| 169 |
+
l: parseInt(l, 10)||0
|
| 170 |
+
};
|
| 171 |
+
else
|
| 172 |
+
return {t: t, r: r, b: b, l: l};
|
| 173 |
+
},
|
| 174 |
+
traverseDOM : function(nodeEl, func)
|
| 175 |
+
{
|
| 176 |
+
func(nodeEl);
|
| 177 |
+
nodeEl = nodeEl.firstChild;
|
| 178 |
+
while(nodeEl){
|
| 179 |
+
EYE.traverseDOM(nodeEl, func);
|
| 180 |
+
nodeEl = nodeEl.nextSibling;
|
| 181 |
+
}
|
| 182 |
+
},
|
| 183 |
+
getInnerWidth : function(el, scroll) {
|
| 184 |
+
var offsetW = el.offsetWidth;
|
| 185 |
+
return scroll ? Math.max(el.scrollWidth,offsetW) - offsetW + el.clientWidth:el.clientWidth;
|
| 186 |
+
},
|
| 187 |
+
getInnerHeight : function(el, scroll) {
|
| 188 |
+
var offsetH = el.offsetHeight;
|
| 189 |
+
return scroll ? Math.max(el.scrollHeight,offsetH) - offsetH + el.clientHeight:el.clientHeight;
|
| 190 |
+
},
|
| 191 |
+
getExtraWidth : function(el) {
|
| 192 |
+
if($.boxModel)
|
| 193 |
+
return (parseInt($.curCSS(el, 'paddingLeft'))||0)
|
| 194 |
+
+ (parseInt($.curCSS(el, 'paddingRight'))||0)
|
| 195 |
+
+ (parseInt($.curCSS(el, 'borderLeftWidth'))||0)
|
| 196 |
+
+ (parseInt($.curCSS(el, 'borderRightWidth'))||0);
|
| 197 |
+
return 0;
|
| 198 |
+
},
|
| 199 |
+
getExtraHeight : function(el) {
|
| 200 |
+
if($.boxModel)
|
| 201 |
+
return (parseInt($.curCSS(el, 'paddingTop'))||0)
|
| 202 |
+
+ (parseInt($.curCSS(el, 'paddingBottom'))||0)
|
| 203 |
+
+ (parseInt($.curCSS(el, 'borderTopWidth'))||0)
|
| 204 |
+
+ (parseInt($.curCSS(el, 'borderBottomWidth'))||0);
|
| 205 |
+
return 0;
|
| 206 |
+
},
|
| 207 |
+
isChildOf: function(parentEl, el, container) {
|
| 208 |
+
if (parentEl == el) {
|
| 209 |
+
return true;
|
| 210 |
+
}
|
| 211 |
+
if (!el || !el.nodeType || el.nodeType != 1) {
|
| 212 |
+
return false;
|
| 213 |
+
}
|
| 214 |
+
if (parentEl.contains && !$.browser.safari) {
|
| 215 |
+
return parentEl.contains(el);
|
| 216 |
+
}
|
| 217 |
+
if ( parentEl.compareDocumentPosition ) {
|
| 218 |
+
return !!(parentEl.compareDocumentPosition(el) & 16);
|
| 219 |
+
}
|
| 220 |
+
var prEl = el.parentNode;
|
| 221 |
+
while(prEl && prEl != container) {
|
| 222 |
+
if (prEl == parentEl)
|
| 223 |
+
return true;
|
| 224 |
+
prEl = prEl.parentNode;
|
| 225 |
+
}
|
| 226 |
+
return false;
|
| 227 |
+
},
|
| 228 |
+
centerEl : function(el, axis)
|
| 229 |
+
{
|
| 230 |
+
var clientScroll = EYE.getScroll();
|
| 231 |
+
var size = EYE.getSize(el);
|
| 232 |
+
if (!axis || axis == 'vertically')
|
| 233 |
+
$(el).css(
|
| 234 |
+
{
|
| 235 |
+
top: clientScroll.t + ((Math.min(clientScroll.h,clientScroll.ih) - size.hb)/2) + 'px'
|
| 236 |
+
}
|
| 237 |
+
);
|
| 238 |
+
if (!axis || axis == 'horizontally')
|
| 239 |
+
$(el).css(
|
| 240 |
+
{
|
| 241 |
+
left: clientScroll.l + ((Math.min(clientScroll.w,clientScroll.iw) - size.wb)/2) + 'px'
|
| 242 |
+
}
|
| 243 |
+
);
|
| 244 |
+
}
|
| 245 |
+
});
|
| 246 |
+
if (!$.easing.easeout) {
|
| 247 |
+
$.easing.easeout = function(p, n, firstNum, delta, duration) {
|
| 248 |
+
return -delta * ((n=n/duration-1)*n*n*n - 1) + firstNum;
|
| 249 |
+
};
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
})(jQuery);
|
skin/adminhtml/default/default/harpreet/colorpicker/start.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
/**
|
| 2 |
+
* YouAMA.com
|
| 3 |
+
*
|
| 4 |
+
* NOTICE OF LICENSE
|
| 5 |
+
*
|
| 6 |
+
* This source file is subject to the EULA that is bundled with this package
|
| 7 |
+
* in the file license.txt.
|
| 8 |
+
*
|
| 9 |
+
/****************************************************************************
|
| 10 |
+
* MAGENTO EDITION USAGE NOTICE *
|
| 11 |
+
****************************************************************************/
|
| 12 |
+
/* This package designed for Magento Community edition YouAMA.com does not
|
| 13 |
+
* guarantee correct work of this extension on any other Magento edition
|
| 14 |
+
* except Magento Community edition. YouAMA.com does not provide extension
|
| 15 |
+
* support in case of incorrect edition usage.
|
| 16 |
+
/****************************************************************************
|
| 17 |
+
* DISCLAIMER *
|
| 18 |
+
****************************************************************************/
|
| 19 |
+
/* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 20 |
+
* versions in the future.
|
| 21 |
+
*****************************************************
|
| 22 |
+
* @category Harpreet
|
| 23 |
+
* @package Harpreet_Slider
|
| 24 |
+
* @copyright Copyright (c) 2012 YouAMA.com (http://www.harpreet.com/)
|
| 25 |
+
* @license http://harpreet.com/freemodule-license.txt
|
| 26 |
+
*/
|
| 27 |
+
|
| 28 |
+
jQuery(document).ready(function(){
|
| 29 |
+
jQuery('#harpreetslider_design_buttonscolor, #harpreetslider_design_buttonscolorup, #harpreetslider_design_textscolor, #harpreetslider_design_bgscolor').ColorPicker({
|
| 30 |
+
onSubmit: function(hsb, hex, rgb, el) {
|
| 31 |
+
jQuery(el).val(hex);
|
| 32 |
+
jQuery(el).ColorPickerHide();
|
| 33 |
+
},
|
| 34 |
+
onBeforeShow: function () {
|
| 35 |
+
jQuery(this).ColorPickerSetColor(this.value);
|
| 36 |
+
}
|
| 37 |
+
})
|
| 38 |
+
.bind('keyup', function(){
|
| 39 |
+
jQuery(this).ColorPickerSetColor(this.value);
|
| 40 |
+
});
|
| 41 |
+
});
|
skin/frontend/base/default/css/harpreet/slider/slider.css
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
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
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
|
| 2 |
+
.slider-wrapper{
|
| 3 |
+
position:relative;
|
| 4 |
+
}
|
| 5 |
+
.nivoSlider {
|
| 6 |
+
position:relative;
|
| 7 |
+
width:100%;
|
| 8 |
+
height:auto;
|
| 9 |
+
overflow: hidden;
|
| 10 |
+
}
|
| 11 |
+
.nivoSlider img {
|
| 12 |
+
position:absolute;
|
| 13 |
+
top:0px;
|
| 14 |
+
left:0px;
|
| 15 |
+
max-width: none;
|
| 16 |
+
}
|
| 17 |
+
.nivo-main-image {
|
| 18 |
+
display: block !important;
|
| 19 |
+
position: relative !important;
|
| 20 |
+
width: 100% !important;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
/* If an image is wrapped in a link */
|
| 24 |
+
.nivoSlider a.nivo-imageLink {
|
| 25 |
+
position:absolute;
|
| 26 |
+
top:0px;
|
| 27 |
+
left:0px;
|
| 28 |
+
width:100%;
|
| 29 |
+
height:100%;
|
| 30 |
+
border:0;
|
| 31 |
+
padding:0;
|
| 32 |
+
margin:0;
|
| 33 |
+
z-index:6;
|
| 34 |
+
display:none;
|
| 35 |
+
}
|
| 36 |
+
/* The slices and boxes in the Slider */
|
| 37 |
+
.nivo-slice {
|
| 38 |
+
display:block;
|
| 39 |
+
position:absolute;
|
| 40 |
+
z-index:5;
|
| 41 |
+
height:100%;
|
| 42 |
+
top:0;
|
| 43 |
+
}
|
| 44 |
+
.nivo-box {
|
| 45 |
+
display:block;
|
| 46 |
+
position:absolute;
|
| 47 |
+
z-index:5;
|
| 48 |
+
overflow:hidden;
|
| 49 |
+
}
|
| 50 |
+
.nivo-box img { display:block; }
|
| 51 |
+
|
| 52 |
+
/* Caption styles */
|
| 53 |
+
.nivo-caption {
|
| 54 |
+
position:absolute;
|
| 55 |
+
line-height:1.2;
|
| 56 |
+
z-index:8;
|
| 57 |
+
padding: 10px 15px;
|
| 58 |
+
overflow: hidden;
|
| 59 |
+
display: none;
|
| 60 |
+
-webkit-box-sizing: border-box;
|
| 61 |
+
-moz-box-sizing: border-box;
|
| 62 |
+
box-sizing: border-box;
|
| 63 |
+
}
|
| 64 |
+
.nivo-caption p {
|
| 65 |
+
padding:5px;
|
| 66 |
+
margin:0;
|
| 67 |
+
}
|
| 68 |
+
.nivo-caption a {
|
| 69 |
+
display:inline !important;
|
| 70 |
+
}
|
| 71 |
+
.nivo-html-caption {
|
| 72 |
+
display:none;
|
| 73 |
+
}
|
| 74 |
+
/* Direction nav styles (e.g. Next & Prev) */
|
| 75 |
+
.nivo-directionNav a {
|
| 76 |
+
position:absolute;
|
| 77 |
+
top:50%;
|
| 78 |
+
margin-top:-26px;
|
| 79 |
+
z-index:9;
|
| 80 |
+
cursor:pointer;
|
| 81 |
+
opacity:0;
|
| 82 |
+
-moz-opacity:0;
|
| 83 |
+
filter:alpha(opacity=0);
|
| 84 |
+
-webkit-transition: opacity 300ms ease-in-out;
|
| 85 |
+
-moz-transition: opacity 300ms ease-in-out;
|
| 86 |
+
-ms-transition: opacity 300ms ease-in-out;
|
| 87 |
+
-o-transition: opacity 300ms ease-in-out;
|
| 88 |
+
transition: opacity 300ms ease-in-out;
|
| 89 |
+
}
|
| 90 |
+
#slider:hover .nivo-directionNav a{
|
| 91 |
+
opacity:1;
|
| 92 |
+
-moz-opacity:1;
|
| 93 |
+
filter:alpha(opacity=10);
|
| 94 |
+
}
|
| 95 |
+
.nivo-prevNav {
|
| 96 |
+
left:10px;
|
| 97 |
+
background-image:url('../../../images/harpreet/slider/slider-left.png');
|
| 98 |
+
height:52px;
|
| 99 |
+
width:32px;
|
| 100 |
+
text-indent:-9999px;
|
| 101 |
+
}
|
| 102 |
+
.nivo-nextNav {
|
| 103 |
+
right:10px;
|
| 104 |
+
background-image:url('../../../images/harpreet/slider/slider.png');
|
| 105 |
+
height:52px;
|
| 106 |
+
width:32px;
|
| 107 |
+
text-indent:-9999px;
|
| 108 |
+
}
|
| 109 |
+
/* Control nav styles (e.g. 1,2,3...) */
|
| 110 |
+
.nivo-controlNav {
|
| 111 |
+
text-align:center;
|
| 112 |
+
padding: 10px 0;
|
| 113 |
+
position:absolute;
|
| 114 |
+
z-index:9;
|
| 115 |
+
}
|
| 116 |
+
.nivo-controlNav a {
|
| 117 |
+
cursor:pointer;
|
| 118 |
+
display:inline-block;
|
| 119 |
+
width:12px;
|
| 120 |
+
height:12px;
|
| 121 |
+
text-indent:-9999px;
|
| 122 |
+
border:2px solid #fff;
|
| 123 |
+
margin: 0 5px;
|
| 124 |
+
-webkit-touch-callout: none;
|
| 125 |
+
-webkit-user-select: none;
|
| 126 |
+
-khtml-user-select: none;
|
| 127 |
+
-moz-user-select: none;
|
| 128 |
+
-ms-user-select: none;
|
| 129 |
+
user-select: none;
|
| 130 |
+
-webkit-border-radius:15px;
|
| 131 |
+
-moz-border-radius:15px;
|
| 132 |
+
border-radius:15px;
|
| 133 |
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
|
| 134 |
+
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
|
| 135 |
+
-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
| 136 |
+
-ms-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
| 137 |
+
-o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
| 138 |
+
}
|
| 139 |
+
.nivo-controlNav a.active {
|
| 140 |
+
font-weight:bold;
|
| 141 |
+
}
|
skin/frontend/base/default/images/harpreet/slider/slider-left.png
ADDED
|
Binary file
|
skin/frontend/base/default/images/harpreet/slider/slider.png
ADDED
|
Binary file
|
skin/frontend/base/default/js/harpreet/slider/slider.js
ADDED
|
@@ -0,0 +1,654 @@
|
|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|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
|
|
Â
|
| 1 |
+
|
| 2 |
+
(function($) {
|
| 3 |
+
var NivoSlider = function(element, options){
|
| 4 |
+
// Defaults are below
|
| 5 |
+
var settings = $.extend({}, $.fn.nivoSlider.defaults, options);
|
| 6 |
+
|
| 7 |
+
// Useful variables. Play carefully.
|
| 8 |
+
var vars = {
|
| 9 |
+
currentSlide: 0,
|
| 10 |
+
currentImage: '',
|
| 11 |
+
totalSlides: 0,
|
| 12 |
+
running: false,
|
| 13 |
+
paused: false,
|
| 14 |
+
stop: false,
|
| 15 |
+
controlNavEl: false
|
| 16 |
+
};
|
| 17 |
+
|
| 18 |
+
// Get this slider
|
| 19 |
+
var slider = $(element);
|
| 20 |
+
slider.data('nivo:vars', vars).addClass('nivoSlider');
|
| 21 |
+
|
| 22 |
+
// Find our slider children
|
| 23 |
+
var kids = slider.children();
|
| 24 |
+
kids.each(function() {
|
| 25 |
+
var child = $(this);
|
| 26 |
+
var link = '';
|
| 27 |
+
if(!child.is('img')){
|
| 28 |
+
if(child.is('a')){
|
| 29 |
+
child.addClass('nivo-imageLink');
|
| 30 |
+
link = child;
|
| 31 |
+
}
|
| 32 |
+
child = child.find('img:first');
|
| 33 |
+
}
|
| 34 |
+
// Get img width & height
|
| 35 |
+
var childWidth = (childWidth === 0) ? child.attr('width') : child.width(),
|
| 36 |
+
childHeight = (childHeight === 0) ? child.attr('height') : child.height();
|
| 37 |
+
|
| 38 |
+
if(link !== ''){
|
| 39 |
+
link.css('display','none');
|
| 40 |
+
}
|
| 41 |
+
child.css('display','none');
|
| 42 |
+
vars.totalSlides++;
|
| 43 |
+
});
|
| 44 |
+
|
| 45 |
+
// If randomStart
|
| 46 |
+
if(settings.randomStart){
|
| 47 |
+
settings.startSlide = Math.floor(Math.random() * vars.totalSlides);
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
// Set startSlide
|
| 51 |
+
if(settings.startSlide > 0){
|
| 52 |
+
if(settings.startSlide >= vars.totalSlides) { settings.startSlide = vars.totalSlides - 1; }
|
| 53 |
+
vars.currentSlide = settings.startSlide;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
// Get initial image
|
| 57 |
+
if($(kids[vars.currentSlide]).is('img')){
|
| 58 |
+
vars.currentImage = $(kids[vars.currentSlide]);
|
| 59 |
+
} else {
|
| 60 |
+
vars.currentImage = $(kids[vars.currentSlide]).find('img:first');
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
// Show initial link
|
| 64 |
+
if($(kids[vars.currentSlide]).is('a')){
|
| 65 |
+
$(kids[vars.currentSlide]).css('display','block');
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
// Set first background
|
| 69 |
+
var sliderImg = $('<img class="nivo-main-image" src="#" />');
|
| 70 |
+
sliderImg.attr('src', vars.currentImage.attr('src')).show();
|
| 71 |
+
slider.append(sliderImg);
|
| 72 |
+
|
| 73 |
+
// Detect Window Resize
|
| 74 |
+
$(window).resize(function() {
|
| 75 |
+
slider.children('img').width(slider.width());
|
| 76 |
+
sliderImg.attr('src', vars.currentImage.attr('src'));
|
| 77 |
+
sliderImg.stop().height('auto');
|
| 78 |
+
$('.nivo-slice').remove();
|
| 79 |
+
$('.nivo-box').remove();
|
| 80 |
+
});
|
| 81 |
+
|
| 82 |
+
//Create caption
|
| 83 |
+
slider.append($('<div class="nivo-caption"></div>'));
|
| 84 |
+
|
| 85 |
+
// Process caption function
|
| 86 |
+
var processCaption = function(settings){
|
| 87 |
+
var nivoCaption = $('.nivo-caption', slider);
|
| 88 |
+
if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){
|
| 89 |
+
var title = vars.currentImage.attr('title');
|
| 90 |
+
if(title.substr(0,1) == '#') title = $(title).html();
|
| 91 |
+
|
| 92 |
+
if(nivoCaption.css('display') == 'block'){
|
| 93 |
+
setTimeout(function(){
|
| 94 |
+
nivoCaption.html(title);
|
| 95 |
+
}, settings.animSpeed);
|
| 96 |
+
} else {
|
| 97 |
+
nivoCaption.html(title);
|
| 98 |
+
nivoCaption.stop().fadeIn(settings.animSpeed);
|
| 99 |
+
}
|
| 100 |
+
} else {
|
| 101 |
+
nivoCaption.stop().fadeOut(settings.animSpeed);
|
| 102 |
+
}
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
//Process initial caption
|
| 106 |
+
processCaption(settings);
|
| 107 |
+
|
| 108 |
+
// In the words of Super Mario "let's a go!"
|
| 109 |
+
var timer = 0;
|
| 110 |
+
if(!settings.manualAdvance && kids.length > 1){
|
| 111 |
+
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
// Add Direction nav
|
| 115 |
+
if(settings.directionNav){
|
| 116 |
+
slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+ settings.prevText +'</a><a class="nivo-nextNav">'+ settings.nextText +'</a></div>');
|
| 117 |
+
|
| 118 |
+
$('a.nivo-prevNav', slider).live('click', function(){
|
| 119 |
+
if(vars.running) { return false; }
|
| 120 |
+
clearInterval(timer);
|
| 121 |
+
timer = '';
|
| 122 |
+
vars.currentSlide -= 2;
|
| 123 |
+
nivoRun(slider, kids, settings, 'prev');
|
| 124 |
+
});
|
| 125 |
+
|
| 126 |
+
$('a.nivo-nextNav', slider).live('click', function(){
|
| 127 |
+
if(vars.running) { return false; }
|
| 128 |
+
clearInterval(timer);
|
| 129 |
+
timer = '';
|
| 130 |
+
nivoRun(slider, kids, settings, 'next');
|
| 131 |
+
});
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
// Add Control nav
|
| 135 |
+
if(settings.controlNav){
|
| 136 |
+
vars.controlNavEl = $('<div class="nivo-controlNav"></div>');
|
| 137 |
+
slider.after(vars.controlNavEl);
|
| 138 |
+
for(var i = 0; i < kids.length; i++){
|
| 139 |
+
if(settings.controlNavThumbs){
|
| 140 |
+
vars.controlNavEl.addClass('nivo-thumbs-enabled');
|
| 141 |
+
var child = kids.eq(i);
|
| 142 |
+
if(!child.is('img')){
|
| 143 |
+
child = child.find('img:first');
|
| 144 |
+
}
|
| 145 |
+
if(child.attr('data-thumb')) vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'"><img src="'+ child.attr('data-thumb') +'" alt="" /></a>');
|
| 146 |
+
} else {
|
| 147 |
+
vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'">'+ (i + 1) +'</a>');
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
//Set initial active link
|
| 152 |
+
$('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active');
|
| 153 |
+
|
| 154 |
+
$('a', vars.controlNavEl).bind('click', function(){
|
| 155 |
+
if(vars.running) return false;
|
| 156 |
+
if($(this).hasClass('active')) return false;
|
| 157 |
+
clearInterval(timer);
|
| 158 |
+
timer = '';
|
| 159 |
+
sliderImg.attr('src', vars.currentImage.attr('src'));
|
| 160 |
+
vars.currentSlide = $(this).attr('rel') - 1;
|
| 161 |
+
nivoRun(slider, kids, settings, 'control');
|
| 162 |
+
});
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
//For pauseOnHover setting
|
| 166 |
+
if(settings.pauseOnHover){
|
| 167 |
+
slider.hover(function(){
|
| 168 |
+
vars.paused = true;
|
| 169 |
+
clearInterval(timer);
|
| 170 |
+
timer = '';
|
| 171 |
+
}, function(){
|
| 172 |
+
vars.paused = false;
|
| 173 |
+
// Restart the timer
|
| 174 |
+
if(timer === '' && !settings.manualAdvance){
|
| 175 |
+
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
|
| 176 |
+
}
|
| 177 |
+
});
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
// Event when Animation finishes
|
| 181 |
+
slider.bind('nivo:animFinished', function(){
|
| 182 |
+
sliderImg.attr('src', vars.currentImage.attr('src'));
|
| 183 |
+
vars.running = false;
|
| 184 |
+
// Hide child links
|
| 185 |
+
$(kids).each(function(){
|
| 186 |
+
if($(this).is('a')){
|
| 187 |
+
$(this).css('display','none');
|
| 188 |
+
}
|
| 189 |
+
});
|
| 190 |
+
// Show current link
|
| 191 |
+
if($(kids[vars.currentSlide]).is('a')){
|
| 192 |
+
$(kids[vars.currentSlide]).css('display','block');
|
| 193 |
+
}
|
| 194 |
+
// Restart the timer
|
| 195 |
+
if(timer === '' && !vars.paused && !settings.manualAdvance){
|
| 196 |
+
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
|
| 197 |
+
}
|
| 198 |
+
// Trigger the afterChange callback
|
| 199 |
+
settings.afterChange.call(this);
|
| 200 |
+
});
|
| 201 |
+
|
| 202 |
+
// Add slices for slice animations
|
| 203 |
+
var createSlices = function(slider, settings, vars) {
|
| 204 |
+
if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block');
|
| 205 |
+
$('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show();
|
| 206 |
+
var sliceHeight = ($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().is('a')) ? $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().height() : $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height();
|
| 207 |
+
|
| 208 |
+
for(var i = 0; i < settings.slices; i++){
|
| 209 |
+
var sliceWidth = Math.round(slider.width()/settings.slices);
|
| 210 |
+
|
| 211 |
+
if(i === settings.slices-1){
|
| 212 |
+
slider.append(
|
| 213 |
+
$('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({
|
| 214 |
+
left:(sliceWidth*i)+'px',
|
| 215 |
+
width:(slider.width()-(sliceWidth*i))+'px',
|
| 216 |
+
height:sliceHeight+'px',
|
| 217 |
+
opacity:'0',
|
| 218 |
+
overflow:'hidden'
|
| 219 |
+
})
|
| 220 |
+
);
|
| 221 |
+
} else {
|
| 222 |
+
slider.append(
|
| 223 |
+
$('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({
|
| 224 |
+
left:(sliceWidth*i)+'px',
|
| 225 |
+
width:sliceWidth+'px',
|
| 226 |
+
height:sliceHeight+'px',
|
| 227 |
+
opacity:'0',
|
| 228 |
+
overflow:'hidden'
|
| 229 |
+
})
|
| 230 |
+
);
|
| 231 |
+
}
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
$('.nivo-slice', slider).height(sliceHeight);
|
| 235 |
+
sliderImg.stop().animate({
|
| 236 |
+
height: $(vars.currentImage).height()
|
| 237 |
+
}, settings.animSpeed);
|
| 238 |
+
};
|
| 239 |
+
|
| 240 |
+
// Add boxes for box animations
|
| 241 |
+
var createBoxes = function(slider, settings, vars){
|
| 242 |
+
if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block');
|
| 243 |
+
$('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show();
|
| 244 |
+
var boxWidth = Math.round(slider.width()/settings.boxCols),
|
| 245 |
+
boxHeight = Math.round($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height() / settings.boxRows);
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
for(var rows = 0; rows < settings.boxRows; rows++){
|
| 249 |
+
for(var cols = 0; cols < settings.boxCols; cols++){
|
| 250 |
+
if(cols === settings.boxCols-1){
|
| 251 |
+
slider.append(
|
| 252 |
+
$('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({
|
| 253 |
+
opacity:0,
|
| 254 |
+
left:(boxWidth*cols)+'px',
|
| 255 |
+
top:(boxHeight*rows)+'px',
|
| 256 |
+
width:(slider.width()-(boxWidth*cols))+'px'
|
| 257 |
+
|
| 258 |
+
})
|
| 259 |
+
);
|
| 260 |
+
$('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px');
|
| 261 |
+
} else {
|
| 262 |
+
slider.append(
|
| 263 |
+
$('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({
|
| 264 |
+
opacity:0,
|
| 265 |
+
left:(boxWidth*cols)+'px',
|
| 266 |
+
top:(boxHeight*rows)+'px',
|
| 267 |
+
width:boxWidth+'px'
|
| 268 |
+
})
|
| 269 |
+
);
|
| 270 |
+
$('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px');
|
| 271 |
+
}
|
| 272 |
+
}
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
sliderImg.stop().animate({
|
| 276 |
+
height: $(vars.currentImage).height()
|
| 277 |
+
}, settings.animSpeed);
|
| 278 |
+
};
|
| 279 |
+
|
| 280 |
+
// Private run method
|
| 281 |
+
var nivoRun = function(slider, kids, settings, nudge){
|
| 282 |
+
// Get our vars
|
| 283 |
+
var vars = slider.data('nivo:vars');
|
| 284 |
+
|
| 285 |
+
// Trigger the lastSlide callback
|
| 286 |
+
if(vars && (vars.currentSlide === vars.totalSlides - 1)){
|
| 287 |
+
settings.lastSlide.call(this);
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
// Stop
|
| 291 |
+
if((!vars || vars.stop) && !nudge) { return false; }
|
| 292 |
+
|
| 293 |
+
// Trigger the beforeChange callback
|
| 294 |
+
settings.beforeChange.call(this);
|
| 295 |
+
|
| 296 |
+
// Set current background before change
|
| 297 |
+
if(!nudge){
|
| 298 |
+
sliderImg.attr('src', vars.currentImage.attr('src'));
|
| 299 |
+
} else {
|
| 300 |
+
if(nudge === 'prev'){
|
| 301 |
+
sliderImg.attr('src', vars.currentImage.attr('src'));
|
| 302 |
+
}
|
| 303 |
+
if(nudge === 'next'){
|
| 304 |
+
sliderImg.attr('src', vars.currentImage.attr('src'));
|
| 305 |
+
}
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
vars.currentSlide++;
|
| 309 |
+
// Trigger the slideshowEnd callback
|
| 310 |
+
if(vars.currentSlide === vars.totalSlides){
|
| 311 |
+
vars.currentSlide = 0;
|
| 312 |
+
settings.slideshowEnd.call(this);
|
| 313 |
+
}
|
| 314 |
+
if(vars.currentSlide < 0) { vars.currentSlide = (vars.totalSlides - 1); }
|
| 315 |
+
// Set vars.currentImage
|
| 316 |
+
if($(kids[vars.currentSlide]).is('img')){
|
| 317 |
+
vars.currentImage = $(kids[vars.currentSlide]);
|
| 318 |
+
} else {
|
| 319 |
+
vars.currentImage = $(kids[vars.currentSlide]).find('img:first');
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
// Set active links
|
| 323 |
+
if(settings.controlNav){
|
| 324 |
+
$('a', vars.controlNavEl).removeClass('active');
|
| 325 |
+
$('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active');
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
// Process caption
|
| 329 |
+
processCaption(settings);
|
| 330 |
+
|
| 331 |
+
// Remove any slices from last transition
|
| 332 |
+
$('.nivo-slice', slider).remove();
|
| 333 |
+
|
| 334 |
+
// Remove any boxes from last transition
|
| 335 |
+
$('.nivo-box', slider).remove();
|
| 336 |
+
|
| 337 |
+
var currentEffect = settings.effect,
|
| 338 |
+
anims = '';
|
| 339 |
+
|
| 340 |
+
// Generate random effect
|
| 341 |
+
if(settings.effect === 'random'){
|
| 342 |
+
anims = new Array('sliceDownRight','sliceDownLeft','sliceUpRight','sliceUpLeft','sliceUpDown','sliceUpDownLeft','fold','fade',
|
| 343 |
+
'boxRandom','boxRain','boxRainReverse','boxRainGrow','boxRainGrowReverse');
|
| 344 |
+
currentEffect = anims[Math.floor(Math.random()*(anims.length + 1))];
|
| 345 |
+
if(currentEffect === undefined) { currentEffect = 'fade'; }
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
// Run random effect from specified set (eg: effect:'fold,fade')
|
| 349 |
+
if(settings.effect.indexOf(',') !== -1){
|
| 350 |
+
anims = settings.effect.split(',');
|
| 351 |
+
currentEffect = anims[Math.floor(Math.random()*(anims.length))];
|
| 352 |
+
if(currentEffect === undefined) { currentEffect = 'fade'; }
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
// Custom transition as defined by "data-transition" attribute
|
| 356 |
+
if(vars.currentImage.attr('data-transition')){
|
| 357 |
+
currentEffect = vars.currentImage.attr('data-transition');
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
// Run effects
|
| 361 |
+
vars.running = true;
|
| 362 |
+
var timeBuff = 0,
|
| 363 |
+
i = 0,
|
| 364 |
+
slices = '',
|
| 365 |
+
firstSlice = '',
|
| 366 |
+
totalBoxes = '',
|
| 367 |
+
boxes = '';
|
| 368 |
+
|
| 369 |
+
if(currentEffect === 'sliceDown' || currentEffect === 'sliceDownRight' || currentEffect === 'sliceDownLeft'){
|
| 370 |
+
createSlices(slider, settings, vars);
|
| 371 |
+
timeBuff = 0;
|
| 372 |
+
i = 0;
|
| 373 |
+
slices = $('.nivo-slice', slider);
|
| 374 |
+
if(currentEffect === 'sliceDownLeft') { slices = $('.nivo-slice', slider)._reverse(); }
|
| 375 |
+
|
| 376 |
+
slices.each(function(){
|
| 377 |
+
var slice = $(this);
|
| 378 |
+
slice.css({ 'top': '0px' });
|
| 379 |
+
if(i === settings.slices-1){
|
| 380 |
+
setTimeout(function(){
|
| 381 |
+
slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
| 382 |
+
}, (100 + timeBuff));
|
| 383 |
+
} else {
|
| 384 |
+
setTimeout(function(){
|
| 385 |
+
slice.animate({opacity:'1.0' }, settings.animSpeed);
|
| 386 |
+
}, (100 + timeBuff));
|
| 387 |
+
}
|
| 388 |
+
timeBuff += 50;
|
| 389 |
+
i++;
|
| 390 |
+
});
|
| 391 |
+
} else if(currentEffect === 'sliceUp' || currentEffect === 'sliceUpRight' || currentEffect === 'sliceUpLeft'){
|
| 392 |
+
createSlices(slider, settings, vars);
|
| 393 |
+
timeBuff = 0;
|
| 394 |
+
i = 0;
|
| 395 |
+
slices = $('.nivo-slice', slider);
|
| 396 |
+
if(currentEffect === 'sliceUpLeft') { slices = $('.nivo-slice', slider)._reverse(); }
|
| 397 |
+
|
| 398 |
+
slices.each(function(){
|
| 399 |
+
var slice = $(this);
|
| 400 |
+
slice.css({ 'bottom': '0px' });
|
| 401 |
+
if(i === settings.slices-1){
|
| 402 |
+
setTimeout(function(){
|
| 403 |
+
slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
| 404 |
+
}, (100 + timeBuff));
|
| 405 |
+
} else {
|
| 406 |
+
setTimeout(function(){
|
| 407 |
+
slice.animate({opacity:'1.0' }, settings.animSpeed);
|
| 408 |
+
}, (100 + timeBuff));
|
| 409 |
+
}
|
| 410 |
+
timeBuff += 50;
|
| 411 |
+
i++;
|
| 412 |
+
});
|
| 413 |
+
} else if(currentEffect === 'sliceUpDown' || currentEffect === 'sliceUpDownRight' || currentEffect === 'sliceUpDownLeft'){
|
| 414 |
+
createSlices(slider, settings, vars);
|
| 415 |
+
timeBuff = 0;
|
| 416 |
+
i = 0;
|
| 417 |
+
var v = 0;
|
| 418 |
+
slices = $('.nivo-slice', slider);
|
| 419 |
+
if(currentEffect === 'sliceUpDownLeft') { slices = $('.nivo-slice', slider)._reverse(); }
|
| 420 |
+
|
| 421 |
+
slices.each(function(){
|
| 422 |
+
var slice = $(this);
|
| 423 |
+
if(i === 0){
|
| 424 |
+
slice.css('top','0px');
|
| 425 |
+
i++;
|
| 426 |
+
} else {
|
| 427 |
+
slice.css('bottom','0px');
|
| 428 |
+
i = 0;
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
if(v === settings.slices-1){
|
| 432 |
+
setTimeout(function(){
|
| 433 |
+
slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
| 434 |
+
}, (100 + timeBuff));
|
| 435 |
+
} else {
|
| 436 |
+
setTimeout(function(){
|
| 437 |
+
slice.animate({opacity:'1.0' }, settings.animSpeed);
|
| 438 |
+
}, (100 + timeBuff));
|
| 439 |
+
}
|
| 440 |
+
timeBuff += 50;
|
| 441 |
+
v++;
|
| 442 |
+
});
|
| 443 |
+
} else if(currentEffect === 'fold'){
|
| 444 |
+
createSlices(slider, settings, vars);
|
| 445 |
+
timeBuff = 0;
|
| 446 |
+
i = 0;
|
| 447 |
+
|
| 448 |
+
$('.nivo-slice', slider).each(function(){
|
| 449 |
+
var slice = $(this);
|
| 450 |
+
var origWidth = slice.width();
|
| 451 |
+
slice.css({ top:'0px', width:'0px' });
|
| 452 |
+
if(i === settings.slices-1){
|
| 453 |
+
setTimeout(function(){
|
| 454 |
+
slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
| 455 |
+
}, (100 + timeBuff));
|
| 456 |
+
} else {
|
| 457 |
+
setTimeout(function(){
|
| 458 |
+
slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed);
|
| 459 |
+
}, (100 + timeBuff));
|
| 460 |
+
}
|
| 461 |
+
timeBuff += 50;
|
| 462 |
+
i++;
|
| 463 |
+
});
|
| 464 |
+
} else if(currentEffect === 'fade'){
|
| 465 |
+
createSlices(slider, settings, vars);
|
| 466 |
+
|
| 467 |
+
firstSlice = $('.nivo-slice:first', slider);
|
| 468 |
+
firstSlice.css({
|
| 469 |
+
'width': slider.width() + 'px'
|
| 470 |
+
});
|
| 471 |
+
|
| 472 |
+
firstSlice.animate({ opacity:'1.0' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); });
|
| 473 |
+
} else if(currentEffect === 'slideInRight'){
|
| 474 |
+
createSlices(slider, settings, vars);
|
| 475 |
+
|
| 476 |
+
firstSlice = $('.nivo-slice:first', slider);
|
| 477 |
+
firstSlice.css({
|
| 478 |
+
'width': '0px',
|
| 479 |
+
'opacity': '1'
|
| 480 |
+
});
|
| 481 |
+
|
| 482 |
+
firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); });
|
| 483 |
+
} else if(currentEffect === 'slideInLeft'){
|
| 484 |
+
createSlices(slider, settings, vars);
|
| 485 |
+
|
| 486 |
+
firstSlice = $('.nivo-slice:first', slider);
|
| 487 |
+
firstSlice.css({
|
| 488 |
+
'width': '0px',
|
| 489 |
+
'opacity': '1',
|
| 490 |
+
'left': '',
|
| 491 |
+
'right': '0px'
|
| 492 |
+
});
|
| 493 |
+
|
| 494 |
+
firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){
|
| 495 |
+
// Reset positioning
|
| 496 |
+
firstSlice.css({
|
| 497 |
+
'left': '0px',
|
| 498 |
+
'right': ''
|
| 499 |
+
});
|
| 500 |
+
slider.trigger('nivo:animFinished');
|
| 501 |
+
});
|
| 502 |
+
} else if(currentEffect === 'boxRandom'){
|
| 503 |
+
createBoxes(slider, settings, vars);
|
| 504 |
+
|
| 505 |
+
totalBoxes = settings.boxCols * settings.boxRows;
|
| 506 |
+
i = 0;
|
| 507 |
+
timeBuff = 0;
|
| 508 |
+
|
| 509 |
+
boxes = shuffle($('.nivo-box', slider));
|
| 510 |
+
boxes.each(function(){
|
| 511 |
+
var box = $(this);
|
| 512 |
+
if(i === totalBoxes-1){
|
| 513 |
+
setTimeout(function(){
|
| 514 |
+
box.animate({ opacity:'1' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
| 515 |
+
}, (100 + timeBuff));
|
| 516 |
+
} else {
|
| 517 |
+
setTimeout(function(){
|
| 518 |
+
box.animate({ opacity:'1' }, settings.animSpeed);
|
| 519 |
+
}, (100 + timeBuff));
|
| 520 |
+
}
|
| 521 |
+
timeBuff += 20;
|
| 522 |
+
i++;
|
| 523 |
+
});
|
| 524 |
+
} else if(currentEffect === 'boxRain' || currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){
|
| 525 |
+
createBoxes(slider, settings, vars);
|
| 526 |
+
|
| 527 |
+
totalBoxes = settings.boxCols * settings.boxRows;
|
| 528 |
+
i = 0;
|
| 529 |
+
timeBuff = 0;
|
| 530 |
+
|
| 531 |
+
// Split boxes into 2D array
|
| 532 |
+
var rowIndex = 0;
|
| 533 |
+
var colIndex = 0;
|
| 534 |
+
var box2Darr = [];
|
| 535 |
+
box2Darr[rowIndex] = [];
|
| 536 |
+
boxes = $('.nivo-box', slider);
|
| 537 |
+
if(currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrowReverse'){
|
| 538 |
+
boxes = $('.nivo-box', slider)._reverse();
|
| 539 |
+
}
|
| 540 |
+
boxes.each(function(){
|
| 541 |
+
box2Darr[rowIndex][colIndex] = $(this);
|
| 542 |
+
colIndex++;
|
| 543 |
+
if(colIndex === settings.boxCols){
|
| 544 |
+
rowIndex++;
|
| 545 |
+
colIndex = 0;
|
| 546 |
+
box2Darr[rowIndex] = [];
|
| 547 |
+
}
|
| 548 |
+
});
|
| 549 |
+
|
| 550 |
+
// Run animation
|
| 551 |
+
for(var cols = 0; cols < (settings.boxCols * 2); cols++){
|
| 552 |
+
var prevCol = cols;
|
| 553 |
+
for(var rows = 0; rows < settings.boxRows; rows++){
|
| 554 |
+
if(prevCol >= 0 && prevCol < settings.boxCols){
|
| 555 |
+
/* Due to some weird JS bug with loop vars
|
| 556 |
+
being used in setTimeout, this is wrapped
|
| 557 |
+
with an anonymous function call */
|
| 558 |
+
(function(row, col, time, i, totalBoxes) {
|
| 559 |
+
var box = $(box2Darr[row][col]);
|
| 560 |
+
var w = box.width();
|
| 561 |
+
var h = box.height();
|
| 562 |
+
if(currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){
|
| 563 |
+
box.width(0).height(0);
|
| 564 |
+
}
|
| 565 |
+
if(i === totalBoxes-1){
|
| 566 |
+
setTimeout(function(){
|
| 567 |
+
box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3, '', function(){ slider.trigger('nivo:animFinished'); });
|
| 568 |
+
}, (100 + time));
|
| 569 |
+
} else {
|
| 570 |
+
setTimeout(function(){
|
| 571 |
+
box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3);
|
| 572 |
+
}, (100 + time));
|
| 573 |
+
}
|
| 574 |
+
})(rows, prevCol, timeBuff, i, totalBoxes);
|
| 575 |
+
i++;
|
| 576 |
+
}
|
| 577 |
+
prevCol--;
|
| 578 |
+
}
|
| 579 |
+
timeBuff += 100;
|
| 580 |
+
}
|
| 581 |
+
}
|
| 582 |
+
};
|
| 583 |
+
|
| 584 |
+
// Shuffle an array
|
| 585 |
+
var shuffle = function(arr){
|
| 586 |
+
for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i, 10), x = arr[--i], arr[i] = arr[j], arr[j] = x);
|
| 587 |
+
return arr;
|
| 588 |
+
};
|
| 589 |
+
|
| 590 |
+
// For debugging
|
| 591 |
+
var trace = function(msg){
|
| 592 |
+
if(this.console && typeof console.log !== 'undefined') { console.log(msg); }
|
| 593 |
+
};
|
| 594 |
+
|
| 595 |
+
// Start / Stop
|
| 596 |
+
this.stop = function(){
|
| 597 |
+
if(!$(element).data('nivo:vars').stop){
|
| 598 |
+
$(element).data('nivo:vars').stop = true;
|
| 599 |
+
trace('Stop Slider');
|
| 600 |
+
}
|
| 601 |
+
};
|
| 602 |
+
|
| 603 |
+
this.start = function(){
|
| 604 |
+
if($(element).data('nivo:vars').stop){
|
| 605 |
+
$(element).data('nivo:vars').stop = false;
|
| 606 |
+
trace('Start Slider');
|
| 607 |
+
}
|
| 608 |
+
};
|
| 609 |
+
|
| 610 |
+
// Trigger the afterLoad callback
|
| 611 |
+
settings.afterLoad.call(this);
|
| 612 |
+
|
| 613 |
+
return this;
|
| 614 |
+
};
|
| 615 |
+
|
| 616 |
+
$.fn.nivoSlider = function(options) {
|
| 617 |
+
return this.each(function(key, value){
|
| 618 |
+
var element = $(this);
|
| 619 |
+
// Return early if this element already has a plugin instance
|
| 620 |
+
if (element.data('nivoslider')) { return element.data('nivoslider'); }
|
| 621 |
+
// Pass options to plugin constructor
|
| 622 |
+
var nivoslider = new NivoSlider(this, options);
|
| 623 |
+
// Store plugin object in this element's data
|
| 624 |
+
element.data('nivoslider', nivoslider);
|
| 625 |
+
});
|
| 626 |
+
};
|
| 627 |
+
|
| 628 |
+
//Default settings
|
| 629 |
+
$.fn.nivoSlider.defaults = {
|
| 630 |
+
effect: 'random',
|
| 631 |
+
slices: 15,
|
| 632 |
+
boxCols: 8,
|
| 633 |
+
boxRows: 4,
|
| 634 |
+
animSpeed: 500,
|
| 635 |
+
pauseTime: 3000,
|
| 636 |
+
startSlide: 0,
|
| 637 |
+
directionNav: true,
|
| 638 |
+
controlNav: true,
|
| 639 |
+
controlNavThumbs: false,
|
| 640 |
+
pauseOnHover: true,
|
| 641 |
+
manualAdvance: false,
|
| 642 |
+
prevText: 'Prev',
|
| 643 |
+
nextText: 'Next',
|
| 644 |
+
randomStart: false,
|
| 645 |
+
beforeChange: function(){},
|
| 646 |
+
afterChange: function(){},
|
| 647 |
+
slideshowEnd: function(){},
|
| 648 |
+
lastSlide: function(){},
|
| 649 |
+
afterLoad: function(){}
|
| 650 |
+
};
|
| 651 |
+
|
| 652 |
+
$.fn._reverse = []._reverse;
|
| 653 |
+
|
| 654 |
+
})(jQuery);
|
