├── README.md ├── colorpicker ├── css │ ├── colorpicker.css │ └── layout.css ├── images │ ├── Thumbs.db │ ├── blank.gif │ ├── colorpicker_background.png │ ├── colorpicker_hex.png │ ├── colorpicker_hsb_a.png │ ├── colorpicker_hsb_b.png │ ├── colorpicker_hsb_h.png │ ├── colorpicker_hsb_s.png │ ├── colorpicker_indic.gif │ ├── colorpicker_indic_h.gif │ ├── colorpicker_overlay.png │ ├── colorpicker_rgb_a.png │ ├── colorpicker_rgb_b.png │ ├── colorpicker_rgb_g.png │ ├── colorpicker_rgb_r.png │ ├── colorpicker_select.gif │ ├── colorpicker_submit.png │ ├── custom_background.png │ ├── custom_hex.png │ ├── custom_hsb_b.png │ ├── custom_hsb_h.png │ ├── custom_hsb_s.png │ ├── custom_indic.gif │ ├── custom_rgb_b.png │ ├── custom_rgb_g.png │ ├── custom_rgb_r.png │ ├── custom_submit.png │ ├── select.png │ ├── select2.png │ └── slider.png ├── index.html └── js │ ├── colorpicker.js │ ├── eye.js │ ├── jquery.js │ ├── layout.js │ └── utils.js ├── gradient-editor ├── gradient-editor.css ├── gradient-editor.html └── gradient-editor.js └── jquery-ui-1.8.2.custom ├── css └── ui-lightness │ ├── images │ ├── ui-anim_basic_16x16.gif │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ ├── ui-bg_flat_10_000000_40x100.png │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ ├── ui-bg_glass_65_ffffff_1x400.png │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png │ ├── ui-icons_222222_256x240.png │ ├── ui-icons_228ef1_256x240.png │ ├── ui-icons_ef8c08_256x240.png │ ├── ui-icons_ffd27a_256x240.png │ └── ui-icons_ffffff_256x240.png │ └── jquery-ui-1.8.2.custom.css ├── index.html └── js ├── jquery-1.4.2.min.js └── jquery-ui-1.8.2.custom.min.js /README.md: -------------------------------------------------------------------------------- 1 | Gradient Editor 2 | =============== 3 | 4 | A gradient editor in jQuery 5 | 6 | PLEASE CONTRIBUTE!!! 7 | 8 | I don't know jQuery and my CSS skills suck so I could 9 | really use some help / advice on best practices. 10 | 11 | 12 | Demo 13 | ---- 14 | 15 | [http://greggman.github.com/gradient-editor/](http://greggman.github.com/gradient-editor/) 16 | 17 | Goals 18 | ----- 19 | 20 | The goal here is to make a gradient editor that can be used to edit both CSS gradients 21 | and more importantly for me, give me data that I can use to generate gradients using 22 | canvas 2d. 23 | 24 | See [issue tracker](https://github.com/greggman/gradient-editor/issues). 25 | 26 | Why? 27 | ---- 28 | 29 | For me the biggest reason is because ramp textures are super important for 3D graphics 30 | and now that WebGL makes them accessible to anyone we need a ramp editor to let people 31 | play with ramp textures. 32 | 33 | Examples: 34 | 35 | * Typical lighting comes up with a multiplier from 0.0 to 1.0 usually based on the 36 | angle of the viewer to the surface vs the angle light to the surface. Instead of 37 | using that number directly, use it as a lookup into a ramp texture for much finer 38 | control. From just adjusting how the lighting looks in general to making interesting 39 | toon shaders you can do it all with a ramp texture. 40 | [See this work-in-progress demo](http://webglsamples.googlecode.com/hg/toon-shading/toon-shading.html) 41 | 42 | * Similarly, instead of having light color be a constant use another ramp texture 43 | to have things in the back lit differently than things in the front. 44 | 45 | * Ramp textures can be used to color particles over time. Pass in the time, use 46 | the time to lookup a color in the ramp texture. 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /colorpicker/css/colorpicker.css: -------------------------------------------------------------------------------- 1 | .colorpicker { 2 | width: 356px; 3 | height: 206px; 4 | overflow: hidden; 5 | position: absolute; 6 | background: url(../images/colorpicker_background.png); 7 | font-family: Arial, Helvetica, sans-serif; 8 | display: none; 9 | } 10 | .colorpicker_color { 11 | width: 150px; 12 | height: 150px; 13 | left: 14px; 14 | top: 13px; 15 | position: absolute; 16 | background: #f00; 17 | overflow: hidden; 18 | cursor: crosshair; 19 | } 20 | .colorpicker_color div { 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | width: 150px; 25 | height: 150px; 26 | background: url(../images/colorpicker_overlay.png); 27 | } 28 | .colorpicker_color div div { 29 | position: absolute; 30 | top: 0; 31 | left: 0; 32 | width: 11px; 33 | height: 11px; 34 | overflow: hidden; 35 | background: url(../images/colorpicker_select.gif); 36 | margin: -5px 0 0 -5px; 37 | } 38 | .colorpicker_hue { 39 | position: absolute; 40 | top: 13px; 41 | left: 171px; 42 | width: 35px; 43 | height: 150px; 44 | cursor: n-resize; 45 | } 46 | .colorpicker_hue div { 47 | position: absolute; 48 | width: 35px; 49 | height: 9px; 50 | overflow: hidden; 51 | background: url(../images/colorpicker_indic.gif) left top; 52 | margin: -4px 0 0 0; 53 | left: 0px; 54 | } 55 | .colorpicker_alpha { 56 | position: absolute; 57 | left: 10px; 58 | top: 167px; 59 | width: 150px; 60 | height: 35px; 61 | cursor: e-resize; 62 | } 63 | .colorpicker_alpha div { 64 | position: absolute; 65 | width: 9px; 66 | height: 35px; 67 | overflow: hidden; 68 | background: url(../images/colorpicker_indic_h.gif) left top; 69 | margin: 0 -4px 0 0; 70 | top: 0px; 71 | } 72 | .colorpicker_alpha canvas { 73 | position: absolute; 74 | left: 4px; 75 | top: 9px; 76 | width: 150px; 77 | height: 17px; 78 | background-color: rgba(0,0,0,0); 79 | } 80 | .colorpicker_new_color { 81 | position: absolute; 82 | width: 60px; 83 | height: 30px; 84 | left: 213px; 85 | top: 13px; 86 | background: #f00; 87 | } 88 | .colorpicker_current_color { 89 | position: absolute; 90 | width: 60px; 91 | height: 30px; 92 | left: 283px; 93 | top: 13px; 94 | background: #f00; 95 | } 96 | .colorpicker input { 97 | background-color: transparent; 98 | border: 1px solid transparent; 99 | position: absolute; 100 | font-size: 10px; 101 | font-family: Arial, Helvetica, sans-serif; 102 | color: #898989; 103 | top: 4px; 104 | right: 11px; 105 | text-align: right; 106 | margin: 0; 107 | padding: 0; 108 | height: 11px; 109 | } 110 | .colorpicker_hex { 111 | position: absolute; 112 | width: 72px; 113 | height: 22px; 114 | background: url(../images/colorpicker_hex.png) top; 115 | left: 212px; 116 | top: 172px; 117 | } 118 | .colorpicker_hex input { 119 | right: 6px; 120 | } 121 | .colorpicker_field { 122 | height: 22px; 123 | width: 62px; 124 | background-position: top; 125 | position: absolute; 126 | } 127 | .colorpicker_field span { 128 | position: absolute; 129 | width: 12px; 130 | height: 22px; 131 | overflow: hidden; 132 | top: 0; 133 | right: 0; 134 | cursor: n-resize; 135 | } 136 | .colorpicker_rgba_r { 137 | background-image: url(../images/colorpicker_rgb_r.png); 138 | top: 52px; 139 | left: 212px; 140 | } 141 | .colorpicker_rgba_g { 142 | background-image: url(../images/colorpicker_rgb_g.png); 143 | top: 82px; 144 | left: 212px; 145 | } 146 | .colorpicker_rgba_b { 147 | background-image: url(../images/colorpicker_rgb_b.png); 148 | top: 112px; 149 | left: 212px; 150 | } 151 | .colorpicker_rgba_a { 152 | background-image: url(../images/colorpicker_rgb_a.png); 153 | top: 142px; 154 | left: 212px; 155 | } 156 | .colorpicker_hsba_h { 157 | background-image: url(../images/colorpicker_hsb_h.png); 158 | top: 52px; 159 | left: 282px; 160 | } 161 | .colorpicker_hsba_s { 162 | background-image: url(../images/colorpicker_hsb_s.png); 163 | top: 82px; 164 | left: 282px; 165 | } 166 | .colorpicker_hsba_b { 167 | background-image: url(../images/colorpicker_hsb_b.png); 168 | top: 112px; 169 | left: 282px; 170 | } 171 | .colorpicker_hsba_a { 172 | background-image: url(../images/colorpicker_hsb_a.png); 173 | top: 142px; 174 | left: 282px; 175 | } 176 | .colorpicker_submit { 177 | position: absolute; 178 | width: 22px; 179 | height: 22px; 180 | background: url(../images/colorpicker_submit.png) top; 181 | left: 322px; 182 | top: 172px; 183 | overflow: hidden; 184 | } 185 | .colorpicker_focus { 186 | background-position: center; 187 | } 188 | .colorpicker_hex.colorpicker_focus { 189 | background-position: bottom; 190 | } 191 | .colorpicker_submit.colorpicker_focus { 192 | background-position: bottom; 193 | } 194 | .colorpicker_slider { 195 | background-position: bottom; 196 | } 197 | -------------------------------------------------------------------------------- /colorpicker/css/layout.css: -------------------------------------------------------------------------------- 1 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { 2 | margin:0; 3 | padding:0; 4 | } 5 | table { 6 | border-collapse:collapse; 7 | border-spacing:0; 8 | } 9 | fieldset,img { 10 | border:0; 11 | } 12 | address,caption,cite,code,dfn,em,strong,th,var { 13 | font-style:normal; 14 | font-weight:normal; 15 | } 16 | ol,ul { 17 | list-style:none; 18 | } 19 | caption,th { 20 | text-align:left; 21 | } 22 | h1,h2,h3,h4,h5,h6 { 23 | font-size:100%; 24 | font-weight:normal; 25 | } 26 | q:before,q:after { 27 | content:''; 28 | } 29 | abbr,acronym { border:0; 30 | } 31 | html, body { 32 | background-color: #fff; 33 | font-family: Arial, Helvetica, sans-serif; 34 | font-size: 12px; 35 | line-height: 18px; 36 | color: #52697E; 37 | } 38 | body { 39 | text-align: center; 40 | overflow: auto; 41 | } 42 | .wrapper { 43 | width: 700px; 44 | margin: 0 auto; 45 | text-align: left; 46 | } 47 | h1 { 48 | font-size: 21px; 49 | height: 47px; 50 | line-height: 47px; 51 | text-transform: uppercase; 52 | } 53 | .navigationTabs { 54 | height: 23px; 55 | line-height: 23px; 56 | border-bottom: 1px solid #ccc; 57 | } 58 | .navigationTabs li { 59 | float: left; 60 | height: 23px; 61 | line-height: 23px; 62 | padding-right: 3px; 63 | } 64 | .navigationTabs li a{ 65 | float: left; 66 | dispaly: block; 67 | height: 23px; 68 | line-height: 23px; 69 | padding: 0 10px; 70 | overflow: hidden; 71 | color: #52697E; 72 | background-color: #eee; 73 | position: relative; 74 | text-decoration: none; 75 | } 76 | .navigationTabs li a:hover { 77 | background-color: #f0f0f0; 78 | } 79 | .navigationTabs li a.active { 80 | background-color: #fff; 81 | border: 1px solid #ccc; 82 | border-bottom: 0px solid; 83 | } 84 | .tabsContent { 85 | border: 1px solid #ccc; 86 | border-top: 0px solid; 87 | width: 698px; 88 | overflow: hidden; 89 | } 90 | .tab { 91 | padding: 16px; 92 | display: none; 93 | } 94 | .tab h2 { 95 | font-weight: bold; 96 | font-size: 16px; 97 | } 98 | .tab h3 { 99 | font-weight: bold; 100 | font-size: 14px; 101 | margin-top: 20px; 102 | } 103 | .tab p { 104 | margin-top: 16px; 105 | clear: both; 106 | } 107 | .tab ul { 108 | margin-top: 16px; 109 | list-style: disc; 110 | } 111 | .tab li { 112 | margin: 10px 0 0 35px; 113 | } 114 | .tab a { 115 | color: #8FB0CF; 116 | } 117 | .tab strong { 118 | font-weight: bold; 119 | } 120 | .tab pre { 121 | font-size: 11px; 122 | margin-top: 20px; 123 | width: 668px; 124 | overflow: auto; 125 | clear: both; 126 | } 127 | .tab table { 128 | width: 100%; 129 | } 130 | .tab table td { 131 | padding: 6px 10px 6px 0; 132 | vertical-align: top; 133 | } 134 | .tab dt { 135 | margin-top: 16px; 136 | } 137 | 138 | #colorSelector { 139 | position: relative; 140 | width: 36px; 141 | height: 36px; 142 | background: url(../images/select.png); 143 | } 144 | #colorSelector div { 145 | position: absolute; 146 | top: 3px; 147 | left: 3px; 148 | width: 30px; 149 | height: 30px; 150 | background: url(../images/select.png) center; 151 | } 152 | #colorSelector2 { 153 | position: absolute; 154 | top: 0; 155 | left: 0; 156 | width: 36px; 157 | height: 36px; 158 | background: url(../images/select2.png); 159 | } 160 | #colorSelector2 div { 161 | position: absolute; 162 | top: 4px; 163 | left: 4px; 164 | width: 28px; 165 | height: 28px; 166 | background: url(../images/select2.png) center; 167 | } 168 | #colorpickerHolder2 { 169 | top: 32px; 170 | left: 0; 171 | width: 356px; 172 | height: 0; 173 | overflow: hidden; 174 | position: absolute; 175 | } 176 | #colorpickerHolder2 .colorpicker { 177 | background-image: url(../images/custom_background.png); 178 | position: absolute; 179 | bottom: 0; 180 | left: 0; 181 | } 182 | #colorpickerHolder2 .colorpicker_hue div { 183 | background-image: url(../images/custom_indic.gif); 184 | } 185 | #colorpickerHolder2 .colorpicker_hex { 186 | background-image: url(../images/custom_hex.png); 187 | } 188 | #colorpickerHolder2 .colorpicker_rgb_r { 189 | background-image: url(../images/custom_rgb_r.png); 190 | } 191 | #colorpickerHolder2 .colorpicker_rgb_g { 192 | background-image: url(../images/custom_rgb_g.png); 193 | } 194 | #colorpickerHolder2 .colorpicker_rgb_b { 195 | background-image: url(../images/custom_rgb_b.png); 196 | } 197 | #colorpickerHolder2 .colorpicker_hsb_s { 198 | background-image: url(../images/custom_hsb_s.png); 199 | display: none; 200 | } 201 | #colorpickerHolder2 .colorpicker_hsb_h { 202 | background-image: url(../images/custom_hsb_h.png); 203 | display: none; 204 | } 205 | #colorpickerHolder2 .colorpicker_hsb_b { 206 | background-image: url(../images/custom_hsb_b.png); 207 | display: none; 208 | } 209 | #colorpickerHolder2 .colorpicker_submit { 210 | background-image: url(../images/custom_submit.png); 211 | } 212 | #colorpickerHolder2 .colorpicker input { 213 | color: #778398; 214 | } 215 | #customWidget { 216 | position: relative; 217 | height: 36px; 218 | } 219 | -------------------------------------------------------------------------------- /colorpicker/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/Thumbs.db -------------------------------------------------------------------------------- /colorpicker/images/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/blank.gif -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_background.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_hex.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_hsb_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_hsb_a.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_hsb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_hsb_b.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_hsb_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_hsb_h.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_hsb_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_hsb_s.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_indic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_indic.gif -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_indic_h.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_indic_h.gif -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_overlay.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_rgb_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_rgb_a.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_rgb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_rgb_b.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_rgb_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_rgb_g.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_rgb_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_rgb_r.png -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_select.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_select.gif -------------------------------------------------------------------------------- /colorpicker/images/colorpicker_submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/colorpicker_submit.png -------------------------------------------------------------------------------- /colorpicker/images/custom_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/custom_background.png -------------------------------------------------------------------------------- /colorpicker/images/custom_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/custom_hex.png -------------------------------------------------------------------------------- /colorpicker/images/custom_hsb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/custom_hsb_b.png -------------------------------------------------------------------------------- /colorpicker/images/custom_hsb_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/custom_hsb_h.png -------------------------------------------------------------------------------- /colorpicker/images/custom_hsb_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/custom_hsb_s.png -------------------------------------------------------------------------------- /colorpicker/images/custom_indic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/custom_indic.gif -------------------------------------------------------------------------------- /colorpicker/images/custom_rgb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/custom_rgb_b.png -------------------------------------------------------------------------------- /colorpicker/images/custom_rgb_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/custom_rgb_g.png -------------------------------------------------------------------------------- /colorpicker/images/custom_rgb_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/custom_rgb_r.png -------------------------------------------------------------------------------- /colorpicker/images/custom_submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/custom_submit.png -------------------------------------------------------------------------------- /colorpicker/images/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/select.png -------------------------------------------------------------------------------- /colorpicker/images/select2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/select2.png -------------------------------------------------------------------------------- /colorpicker/images/slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/colorpicker/images/slider.png -------------------------------------------------------------------------------- /colorpicker/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ColorPicker - jQuery plugin 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

Color Picker - jQuery plugin

16 | 21 |
22 |
23 |

About

24 |

A simple component to select color in the same way you select color in Adobe Photoshop

25 |

Last update

26 |

23.05.2009 - Check Download tab

27 |

Features

28 |
    29 |
  • Flat mode - as element in page
  • 30 |
  • Powerful controls for color selection
  • 31 |
  • Easy to customize the look by changing some images
  • 32 |
  • Fits into the viewport
  • 33 |
34 |

License

35 |

Dual licensed under the MIT and GPL licenses.

36 |

Examples

37 |

Flat mode.

38 |

39 |

40 |
 41 | $('#colorpickerHolder').ColorPicker({flat: true});
 42 |                 
43 |

Custom skin and using flat mode to display the color picker in a custom widget.

44 |
45 |
46 |
47 |
48 |
49 | 50 |

Attached to an text field and using callback functions to update the color with field's value and set the value back in the field by submiting the color.

51 |

52 |

53 |

54 |
$('#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({
 55 | 	onSubmit: function(hsb, hex, rgb, el) {
 56 | 		$(el).val(hex);
 57 | 		$(el).ColorPickerHide();
 58 | 	},
 59 | 	onBeforeShow: function () {
 60 | 		$(this).ColorPickerSetColor(this.value);
 61 | 	}
 62 | })
 63 | .bind('keyup', function(){
 64 | 	$(this).ColorPickerSetColor(this.value);
 65 | });
 66 | 
67 |

Attached to DOMElement and using callbacks to live preview the color and adding animation.

68 |

69 |

70 |

71 |
 72 | $('#colorSelector').ColorPicker({
 73 | 	color: '#0000ff',
 74 | 	onShow: function (colpkr) {
 75 | 		$(colpkr).fadeIn(500);
 76 | 		return false;
 77 | 	},
 78 | 	onHide: function (colpkr) {
 79 | 		$(colpkr).fadeOut(500);
 80 | 		return false;
 81 | 	},
 82 | 	onChange: function (hsb, hex, rgb) {
 83 | 		$('#colorSelector div').css('backgroundColor', '#' + hex);
 84 | 	}
 85 | });
 86 | 
87 |
88 |
89 |

Download

90 |

colorpicker.zip (73 kb): jQuery, Javscript files, CSS files, images, examples and instructions.

91 |

Changelog

92 |
93 |
23.05.2009
94 |
Added: close on color selection example
95 |
Added: restore original color option
96 |
Changed: color update on key up event
97 |
Fixed: colorpicker hide and show methods
98 |
Fixed: reference to options. Multiple fields with colorpickers is possible now.
99 |
Fixed: RGB to HSB convertion
100 |
22.08.2008
101 |
Fixed bug: where some events were not canceled right on Safari
102 |
Fixed bug: where teh view port was not detected right on Safari
103 |
16-07-2008
104 |
Fixed bug where the letter 'F' could not be typed in the Hex field
105 |
Fixed bug where the changes on Hex field where not parsed
106 |
Added new option 'livePreview'
107 |
08-07-2008
108 |
Fixed typo in the code, both JavaScript and CSS
109 |
Changed the cursor for some elements
110 |
Added new demo explaining how to implement custom skin
111 |
07.07.2008
112 |
The first release.
113 |
114 |
115 |
116 |

Implement

117 |

Attach the Javascript and CSS files to your document. Edit CSS file and fix the paths to images and change colors to fit your site theme.

118 |
119 | <link rel="stylesheet" media="screen" type="text/css" href="css/colorpicker.css" />
120 | <script type="text/javascript" src="js/colorpicker.js"></script>
121 |                 
122 |

Invocation code

123 |

All you have to do is to select the elements in a jQuery way and call the plugin.

124 |
125 |  $('input').ColorPicker(options);
126 |                 
127 |

Options

128 |

A hash of parameters. All parameters are optional.

129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 |
eventNamestringThe desired event to trigger the colorpicker. Default: 'click'
colorstring or hashThe default color. String for hex color or hash for RGB and HSB ({r:255, r:0, b:0}) . Default: 'ff0000'
flatbooleanWhatever if the color picker is appended to the element or triggered by an event. Default false
livePreviewbooleanWhatever if the color values are filled in the fields while changing values on selector or a field. If false it may improve speed. Default true
onShowfunctionCallback function triggered when the color picker is shown
onBeforeShowfunctionCallback function triggered before the color picker is shown
onHidefunctionCallback function triggered when the color picker is hidden
onChangefunctionCallback function triggered when the color is changed
onSubmitfunctionCallback function triggered when the color it is chosen
176 |

Set color

177 |

If you want to set a new color.

178 |
$('input').ColorPickerSetColor(color);
179 |

The 'color' argument is the same format as the option color, string for hex color or hash for RGB and HSB ({r:255, r:0, b:0}).

180 |
181 |
182 |
183 | 184 | 185 | -------------------------------------------------------------------------------- /colorpicker/js/colorpicker.js: -------------------------------------------------------------------------------- 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 = '
', 17 | defaults = { 18 | eventName: 'click', 19 | onShow: function () {}, 20 | onBeforeShow: function(){}, 21 | onHide: function () {}, 22 | onChange: function () {}, 23 | onSubmit: function () {}, 24 | color: 'ff0000ff', 25 | livePreview: true, 26 | flat: false 27 | }, 28 | fillRGBAFields = function (hsba, cal) { 29 | var rgba = HSBAToRGBA(hsba); 30 | $(cal).data('colorpicker').fields 31 | .eq(1).val(Math.round(rgba.r)).end() 32 | .eq(2).val(Math.round(rgba.g)).end() 33 | .eq(3).val(Math.round(rgba.b)).end() 34 | .eq(4).val(Math.round(rgba.a)).end(); 35 | }, 36 | fillHSBAFields = function (hsba, cal) { 37 | $(cal).data('colorpicker').fields 38 | .eq(5).val(Math.round(hsba.h)).end() 39 | .eq(6).val(Math.round(hsba.s)).end() 40 | .eq(7).val(Math.round(hsba.b)).end() 41 | .eq(8).val(Math.round(hsba.a)).end(); 42 | }, 43 | fillHexFields = function (hsba, cal) { 44 | $(cal).data('colorpicker').fields 45 | .eq(0).val(HSBAToHex(hsba)).end(); 46 | }, 47 | setSelector = function (hsba, cal) { 48 | $(cal).data('colorpicker').selector.css('backgroundColor', HSBAToCSSRGBA({h: hsba.h, s: 100, b: 100, a: 255})); 49 | $(cal).data('colorpicker').selectorIndic.css({ 50 | left: parseInt(150 * hsba.s/100, 10), 51 | top: parseInt(150 * (100-hsba.b)/100, 10) 52 | }); 53 | }, 54 | setHue = function (hsba, cal) { 55 | $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsba.h/360, 10)); 56 | var ctx = $(cal).data('colorpicker').alphaCtx; 57 | var grad = ctx.createLinearGradient(0,0,150,0); 58 | grad.addColorStop(0, HSBAToCSSRGBA({h: hsba.h, s: hsba.s, b: hsba.b, a: 0})) 59 | grad.addColorStop(1, HSBAToCSSRGBA({h: hsba.h, s: hsba.s, b: hsba.b, a: 100})) 60 | ctx.clearRect(0, 0, 150, 17); 61 | ctx.fillStyle = grad; 62 | ctx.fillRect(0, 0, 150, 17); 63 | }, 64 | setAlpha = function (hsba, cal) { 65 | $(cal).data('colorpicker').alpha.css('left', parseInt(150 * hsba.a/100, 10)); 66 | }, 67 | setCurrentColor = function (hsba, cal) { 68 | $(cal).data('colorpicker').currentColor.css('backgroundColor', HSBAToCSSRGBA(hsba)); 69 | }, 70 | setNewColor = function (hsba, cal) { 71 | $(cal).data('colorpicker').newColor.css('backgroundColor', HSBAToCSSRGBA(hsba)); 72 | }, 73 | keyDown = function (ev) { 74 | var pressedKey = ev.charCode || ev.keyCode || -1; 75 | if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) { 76 | return false; 77 | } 78 | var cal = $(this).parent().parent(); 79 | if (cal.data('colorpicker').livePreview === true) { 80 | change.apply(this); 81 | } 82 | }, 83 | change = function (ev) { 84 | var cal = $(this).parent().parent(), col; 85 | if (this.parentNode.className.indexOf('_hex') > 0) { 86 | cal.data('colorpicker').color = col = HexToHSBA(fixHex(this.value)); 87 | } else if (this.parentNode.className.indexOf('_hsba') > 0) { 88 | cal.data('colorpicker').color = col = fixHSBA({ 89 | h: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), 90 | s: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10), 91 | b: parseInt(cal.data('colorpicker').fields.eq(7).val(), 10), 92 | a: parseInt(cal.data('colorpicker').fields.eq(8).val(), 10) 93 | }); 94 | } else { 95 | cal.data('colorpicker').color = col = RGBAToHSBA(fixRGBA({ 96 | r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), 97 | g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), 98 | b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10), 99 | a: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10) 100 | })); 101 | } 102 | if (ev) { 103 | fillRGBAFields(col, cal.get(0)); 104 | fillHexFields(col, cal.get(0)); 105 | fillHSBAFields(col, cal.get(0)); 106 | } 107 | setSelector(col, cal.get(0)); 108 | setHue(col, cal.get(0)); 109 | setAlpha(col, cal.get(0)); 110 | setNewColor(col, cal.get(0)); 111 | cal.data('colorpicker').onChange.apply(cal, [col, HSBAToHex(col), HSBAToRGBA(col)]); 112 | }, 113 | blur = function (ev) { 114 | var cal = $(this).parent().parent(); 115 | cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus'); 116 | }, 117 | focus = function () { 118 | charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; 119 | $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); 120 | $(this).parent().addClass('colorpicker_focus'); 121 | }, 122 | downIncrement = function (ev) { 123 | var field = $(this).parent().find('input').focus(); 124 | var current = { 125 | el: $(this).parent().addClass('colorpicker_slider'), 126 | max: this.parentNode.className.indexOf('_hsba_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsba') > 0 ? 100 : 255), 127 | y: ev.pageY, 128 | field: field, 129 | val: parseInt(field.val(), 10), 130 | preview: $(this).parent().parent().data('colorpicker').livePreview 131 | }; 132 | $(document).bind('mouseup', current, upIncrement); 133 | $(document).bind('mousemove', current, moveIncrement); 134 | return false; 135 | }, 136 | moveIncrement = function (ev) { 137 | ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); 138 | if (ev.data.preview) { 139 | change.apply(ev.data.field.get(0), [true]); 140 | } 141 | return false; 142 | }, 143 | upIncrement = function (ev) { 144 | change.apply(ev.data.field.get(0), [true]); 145 | ev.data.el.removeClass('colorpicker_slider').find('input').focus(); 146 | $(document).unbind('mouseup', upIncrement); 147 | $(document).unbind('mousemove', moveIncrement); 148 | return false; 149 | }, 150 | downHue = function (ev) { 151 | var current = { 152 | cal: $(this).parent(), 153 | y: $(this).offset().top 154 | }; 155 | current.preview = current.cal.data('colorpicker').livePreview; 156 | $(document).bind('mouseup', current, upHue); 157 | $(document).bind('mousemove', current, moveHue); 158 | ev.data = current; 159 | moveHue(ev); 160 | return false; 161 | }, 162 | moveHue = function (ev) { 163 | change.apply( 164 | ev.data.cal.data('colorpicker') 165 | .fields 166 | .eq(5) 167 | .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) 168 | .get(0), 169 | [ev.data.preview] 170 | ); 171 | return false; 172 | }, 173 | upHue = function (ev) { 174 | fillRGBAFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); 175 | fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); 176 | $(document).unbind('mouseup', upHue); 177 | $(document).unbind('mousemove', moveHue); 178 | return false; 179 | }, 180 | downAlpha = function (ev) { 181 | var current = { 182 | cal: $(this).parent(), 183 | x: $(this).offset().left 184 | }; 185 | current.preview = current.cal.data('colorpicker').livePreview; 186 | $(document).bind('mouseup', current, upAlpha); 187 | $(document).bind('mousemove', current, moveAlpha); 188 | ev.data = current; 189 | moveAlpha(ev); 190 | return false; 191 | }, 192 | moveAlpha = function (ev) { 193 | change.apply( 194 | ev.data.cal.data('colorpicker') 195 | .fields 196 | .eq(8) 197 | .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.x))))/150, 10)) 198 | .get(0), 199 | [ev.data.preview] 200 | ); 201 | return false; 202 | }, 203 | upAlpha = function (ev) { 204 | fillRGBAFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); 205 | fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); 206 | $(document).unbind('mouseup', upAlpha); 207 | $(document).unbind('mousemove', moveAlpha); 208 | return false; 209 | }, 210 | downSelector = function (ev) { 211 | var current = { 212 | cal: $(this).parent(), 213 | pos: $(this).offset() 214 | }; 215 | current.preview = current.cal.data('colorpicker').livePreview; 216 | $(document).bind('mouseup', current, upSelector); 217 | $(document).bind('mousemove', current, moveSelector); 218 | ev.data = current; 219 | moveSelector(ev); 220 | return false; 221 | }, 222 | moveSelector = function (ev) { 223 | change.apply( 224 | ev.data.cal.data('colorpicker') 225 | .fields 226 | .eq(7) 227 | .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) 228 | .end() 229 | .eq(6) 230 | .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) 231 | .get(0), 232 | [ev.data.preview] 233 | ); 234 | return false; 235 | }, 236 | upSelector = function (ev) { 237 | fillRGBAFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); 238 | fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); 239 | $(document).unbind('mouseup', upSelector); 240 | $(document).unbind('mousemove', moveSelector); 241 | return false; 242 | }, 243 | enterSubmit = function (ev) { 244 | $(this).addClass('colorpicker_focus'); 245 | }, 246 | leaveSubmit = function (ev) { 247 | $(this).removeClass('colorpicker_focus'); 248 | }, 249 | clickSubmit = function (ev) { 250 | var cal = $(this).parent(); 251 | var col = cal.data('colorpicker').color; 252 | cal.data('colorpicker').origColor = col; 253 | setCurrentColor(col, cal.get(0)); 254 | cal.data('colorpicker').onSubmit(col, HSBAToHex(col), HSBAToRGBA(col), cal.data('colorpicker').el); 255 | }, 256 | show = function (ev) { 257 | var cal = $('#' + $(this).data('colorpickerId')); 258 | cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); 259 | var pos = $(this).offset(); 260 | var viewPort = getViewport(); 261 | var top = pos.top + this.offsetHeight; 262 | var left = pos.left; 263 | if (top + 176 > viewPort.t + viewPort.h) { 264 | top -= this.offsetHeight + 176; 265 | } 266 | if (left + 356 > viewPort.l + viewPort.w) { 267 | left -= 356; 268 | } 269 | cal.css({left: left + 'px', top: top + 'px'}); 270 | if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { 271 | cal.show(); 272 | } 273 | $(document).bind('mousedown', {cal: cal}, hide); 274 | return false; 275 | }, 276 | hide = function (ev) { 277 | if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { 278 | if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { 279 | ev.data.cal.hide(); 280 | } 281 | $(document).unbind('mousedown', hide); 282 | } 283 | }, 284 | isChildOf = function(parentEl, el, container) { 285 | if (parentEl == el) { 286 | return true; 287 | } 288 | if (parentEl.contains) { 289 | return parentEl.contains(el); 290 | } 291 | if ( parentEl.compareDocumentPosition ) { 292 | return !!(parentEl.compareDocumentPosition(el) & 16); 293 | } 294 | var prEl = el.parentNode; 295 | while(prEl && prEl != container) { 296 | if (prEl == parentEl) 297 | return true; 298 | prEl = prEl.parentNode; 299 | } 300 | return false; 301 | }, 302 | getViewport = function () { 303 | var m = document.compatMode == 'CSS1Compat'; 304 | return { 305 | l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), 306 | t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), 307 | w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), 308 | h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) 309 | }; 310 | }, 311 | fixHSBA = function (hsba) { 312 | return { 313 | h: Math.min(360, Math.max(0, hsba.h)), 314 | s: Math.min(100, Math.max(0, hsba.s)), 315 | b: Math.min(100, Math.max(0, hsba.b)), 316 | a: Math.min(100, Math.max(0, hsba.a)) 317 | }; 318 | }, 319 | fixRGBA = function (rgba) { 320 | return { 321 | r: Math.min(255, Math.max(0, rgba.r)), 322 | g: Math.min(255, Math.max(0, rgba.g)), 323 | b: Math.min(255, Math.max(0, rgba.b)), 324 | a: Math.min(255, Math.max(0, rgba.a)) 325 | }; 326 | }, 327 | fixHex = function (hex) { 328 | var len = 8 - hex.length; 329 | if (len > 0) { 330 | var o = []; 331 | for (var i=0; i -1) ? hex.substring(1) : hex), 16); 341 | return {r: hex >> 24, g: (hex & 0xFF0000) >> 16, b: (hex & 0x00FF) >> 8, a: (hex & 0xFF)}; 342 | }, 343 | HexToHSBA = function (hex) { 344 | return RGBAToHSBA(HexToRGBA(hex)); 345 | }, 346 | RGBAToHSBA = function (rgba) { 347 | var hsba = { 348 | h: 0, 349 | s: 0, 350 | b: 0, 351 | a: 0 352 | }; 353 | var min = Math.min(rgba.r, rgba.g, rgba.b); 354 | var max = Math.max(rgba.r, rgba.g, rgba.b); 355 | var delta = max - min; 356 | hsba.b = max; 357 | if (max != 0) { 358 | 359 | } 360 | hsba.s = max != 0 ? 255 * delta / max : 0; 361 | if (hsba.s != 0) { 362 | if (rgba.r == max) { 363 | hsba.h = (rgba.g - rgba.b) / delta; 364 | } else if (rgba.g == max) { 365 | hsba.h = 2 + (rgba.b - rgba.r) / delta; 366 | } else { 367 | hsba.h = 4 + (rgba.r - rgba.g) / delta; 368 | } 369 | } else { 370 | hsba.h = -1; 371 | } 372 | hsba.h *= 60; 373 | if (hsba.h < 0) { 374 | hsba.h += 360; 375 | } 376 | hsba.s *= 100/255; 377 | hsba.b *= 100/255; 378 | hsba.a = rgba.a * 100 / 255; 379 | return hsba; 380 | }, 381 | HSBAToRGBA = function (hsba) { 382 | var rgba = {}; 383 | var h = Math.round(hsba.h); 384 | var s = Math.round(hsba.s*255/100); 385 | var v = Math.round(hsba.b*255/100); 386 | var a = Math.round(hsba.a*255/100) 387 | rgba.a = a; 388 | if(s == 0) { 389 | rgba.r = rgba.g = rgba.b = v; 390 | } else { 391 | var t1 = v; 392 | var t2 = (255-s)*v/255; 393 | var t3 = (t1-t2)*(h%60)/60; 394 | if(h==360) h = 0; 395 | if(h<60) {rgba.r=t1; rgba.b=t2; rgba.g=t2+t3} 396 | else if(h<120) {rgba.g=t1; rgba.b=t2; rgba.r=t1-t3} 397 | else if(h<180) {rgba.g=t1; rgba.r=t2; rgba.b=t2+t3} 398 | else if(h<240) {rgba.b=t1; rgba.r=t2; rgba.g=t1-t3} 399 | else if(h<300) {rgba.b=t1; rgba.g=t2; rgba.r=t2+t3} 400 | else if(h<360) {rgba.r=t1; rgba.g=t2; rgba.b=t1-t3} 401 | else {rgba.r=0; rgba.g=0; rgba.b=0} 402 | } 403 | return {r:Math.round(rgba.r), g:Math.round(rgba.g), b:Math.round(rgba.b), a:Math.round(rgba.a)}; 404 | }, 405 | RGBAToHex = function (rgba) { 406 | var hex = [ 407 | rgba.r.toString(16), 408 | rgba.g.toString(16), 409 | rgba.b.toString(16), 410 | rgba.a.toString(16) 411 | ]; 412 | $.each(hex, function (nr, val) { 413 | if (val.length == 1) { 414 | hex[nr] = '0' + val; 415 | } 416 | }); 417 | return hex.join(''); 418 | }, 419 | HSBAToHex = function (hsba) { 420 | return RGBAToHex(HSBAToRGBA(hsba)); 421 | }, 422 | HSBAToCSSRGBA = function (hsba) { 423 | var rgba = HSBAToRGBA(hsba); 424 | var css = 'rgba(' + Math.round(rgba.r) + ',' + Math.round(rgba.g) + ',' + Math.round(rgba.b) + ',' + Math.round(rgba.a / 255) + ')'; 425 | return css; 426 | }, 427 | restoreOriginal = function () { 428 | var cal = $(this).parent(); 429 | var col = cal.data('colorpicker').origColor; 430 | cal.data('colorpicker').color = col; 431 | fillRGBAFields(col, cal.get(0)); 432 | fillHexFields(col, cal.get(0)); 433 | fillHSBAFields(col, cal.get(0)); 434 | setSelector(col, cal.get(0)); 435 | setHue(col, cal.get(0)); 436 | setAlpha(col, cal.get(0)); 437 | setNewColor(col, cal.get(0)); 438 | }; 439 | return { 440 | init: function (opt) { 441 | opt = $.extend({}, defaults, opt||{}); 442 | if (typeof opt.color == 'string') { 443 | opt.color = HexToHSBA(opt.color); 444 | } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined && opt.color.a != undefined) { 445 | opt.color = RGBAToHSBA(opt.color); 446 | } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined && opt.color.a != undefined) { 447 | opt.color = fixHSBA(opt.color); 448 | } else { 449 | return this; 450 | } 451 | return this.each(function () { 452 | if (!$(this).data('colorpickerId')) { 453 | var options = $.extend({}, opt); 454 | options.origColor = opt.color; 455 | var id = 'collorpicker_' + parseInt(Math.random() * 1000); 456 | $(this).data('colorpickerId', id); 457 | var cal = $(tpl).attr('id', id); 458 | if (options.flat) { 459 | cal.appendTo(this).show(); 460 | } else { 461 | cal.appendTo(document.body); 462 | } 463 | options.fields = cal 464 | .find('input') 465 | .bind('keyup', keyDown) 466 | .bind('change', change) 467 | .bind('blur', blur) 468 | .bind('focus', focus); 469 | cal 470 | .find('span').bind('mousedown', downIncrement).end() 471 | .find('>div.colorpicker_current_color').bind('click', restoreOriginal); 472 | options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); 473 | options.selectorIndic = options.selector.find('div div'); 474 | options.el = this; 475 | options.hue = cal.find('div.colorpicker_hue div'); 476 | cal.find('div.colorpicker_hue').bind('mousedown', downHue); 477 | options.alpha = cal.find('div.colorpicker_alpha div'); 478 | cal.find('div.colorpicker_alpha').bind('mousedown', downAlpha); 479 | options.alphaCanvas = cal.find('div.colorpicker_alpha canvas').get()[0]; 480 | options.alphaCtx = options.alphaCanvas.getContext("2d"); 481 | options.newColor = cal.find('div.colorpicker_new_color'); 482 | options.currentColor = cal.find('div.colorpicker_current_color'); 483 | cal.data('colorpicker', options); 484 | cal.find('div.colorpicker_submit') 485 | .bind('mouseenter', enterSubmit) 486 | .bind('mouseleave', leaveSubmit) 487 | .bind('click', clickSubmit); 488 | fillRGBAFields(options.color, cal.get(0)); 489 | fillHSBAFields(options.color, cal.get(0)); 490 | fillHexFields(options.color, cal.get(0)); 491 | setHue(options.color, cal.get(0)); 492 | setAlpha(options.color, cal.get(0)); 493 | setSelector(options.color, cal.get(0)); 494 | setCurrentColor(options.color, cal.get(0)); 495 | setNewColor(options.color, cal.get(0)); 496 | if (options.flat) { 497 | cal.css({ 498 | position: 'relative', 499 | display: 'block' 500 | }); 501 | } else { 502 | $(this).bind(options.eventName, show); 503 | } 504 | } 505 | }); 506 | }, 507 | showPicker: function() { 508 | return this.each( function () { 509 | if ($(this).data('colorpickerId')) { 510 | show.apply(this); 511 | } 512 | }); 513 | }, 514 | hidePicker: function() { 515 | return this.each( function () { 516 | if ($(this).data('colorpickerId')) { 517 | $('#' + $(this).data('colorpickerId')).hide(); 518 | } 519 | }); 520 | }, 521 | setColor: function(col) { 522 | if (typeof col == 'string') { 523 | col = HexToHSBA(col); 524 | } else if (col.r != undefined && col.g != undefined && col.b != undefined && col.a != undefined) { 525 | col = RGBAToHSBA(col); 526 | } else if (col.h != undefined && col.s != undefined && col.b != undefined && col.a != undefined) { 527 | col = fixHSBA(col); 528 | } else { 529 | return this; 530 | } 531 | return this.each(function(){ 532 | if ($(this).data('colorpickerId')) { 533 | var cal = $('#' + $(this).data('colorpickerId')); 534 | cal.data('colorpicker').color = col; 535 | cal.data('colorpicker').origColor = col; 536 | fillRGBAFields(col, cal.get(0)); 537 | fillHSBAFields(col, cal.get(0)); 538 | fillHexFields(col, cal.get(0)); 539 | setHue(col, cal.get(0)); 540 | setAlpha(col, cal.get(0)); 541 | setSelector(col, cal.get(0)); 542 | setCurrentColor(col, cal.get(0)); 543 | setNewColor(col, cal.get(0)); 544 | } 545 | }); 546 | } 547 | }; 548 | }(); 549 | $.fn.extend({ 550 | ColorPicker: ColorPicker.init, 551 | ColorPickerHide: ColorPicker.hidePicker, 552 | ColorPickerShow: ColorPicker.showPicker, 553 | ColorPickerSetColor: ColorPicker.setColor 554 | }); 555 | })(jQuery) -------------------------------------------------------------------------------- /colorpicker/js/eye.js: -------------------------------------------------------------------------------- 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); 35 | -------------------------------------------------------------------------------- /colorpicker/js/layout.js: -------------------------------------------------------------------------------- 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) -------------------------------------------------------------------------------- /colorpicker/js/utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Utilities 4 | * Author: Stefan Petre www.eyecon.ro 5 | * 6 | */ 7 | (function($) { 8 | EYE.extend({ 9 | getPosition : function(e, forceIt) 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); -------------------------------------------------------------------------------- /gradient-editor/gradient-editor.css: -------------------------------------------------------------------------------- 1 | /* the container for the entire editor */ 2 | .gradient-editor-container { 3 | background-color: #666; 4 | } 5 | 6 | /* the area that contains the gradient */ 7 | .gradient-editor-gradient { 8 | -webkit-user-select: none; 9 | -moz-user-select: none; 10 | user-select: none; 11 | } 12 | 13 | /* the color stop draggable area. Should not by styled */ 14 | .gradient-editor-color-stop { 15 | } 16 | 17 | /* the color inside a color stop */ 18 | .gradient-editor-color { 19 | border: 1px solid hsla(0, 0%, 30%, 0.8); 20 | border-top: 0; 21 | } 22 | .gradient-editor-color::before { 23 | border-color: transparent transparent hsla(0,0%, 100%, 0.8) transparent; 24 | border-style: solid; 25 | border-width: 6px; 26 | width: 0; 27 | height: 0; 28 | position: absolute; 29 | top: -12px; 30 | left: 1px; 31 | content: ''; 32 | } 33 | 34 | /* the area the contains the color stops */ 35 | .gradient-editor-colors { 36 | background: gray; 37 | -webkit-user-select: none; 38 | -moz-user-select: none; 39 | user-select: none; 40 | } 41 | 42 | /* the instruction area */ 43 | .gradient-editor-instructions { 44 | font-size: x-small; 45 | color: #aaa; 46 | } 47 | 48 | -------------------------------------------------------------------------------- /gradient-editor/gradient-editor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 33 | 34 | 35 | 36 | 37 | JQuery Gradient Editor 38 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 55 | 56 | 57 |
58 |
Some text
59 |
60 |
61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /gradient-editor/gradient-editor.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2011, Google Inc. 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | // 31 | (function($) { 32 | $.fn.gradientEditor = function(options) { 33 | 34 | var defaults = { 35 | width: 512, 36 | height: 40, 37 | stopWidth: 12, 38 | stopHeight: 10, 39 | initialColor: "#ff00ff", 40 | onChange: function() {}, 41 | colors: [ 42 | {position: 0.0, color: "#000000"}, 43 | {position: 1.0, color: "#ffffff"} 44 | ] 45 | }; 46 | 47 | var options = $.extend(defaults, options); 48 | 49 | function addGradientStops(gradient, stops) { 50 | for (var ii = 0; ii < stops.length; ++ii) { 51 | var stop = stops[ii]; 52 | gradient.addColorStop(stop.position, stop.color); 53 | } 54 | } 55 | 56 | function makeCanvasGradient(ctx, stops) { 57 | var gradient = ctx.createLinearGradient(0, 0, options.width, 0); 58 | addGradientStops(gradient, stops); 59 | return gradient; 60 | } 61 | 62 | function makeCSSGradient(stops) { 63 | return '-webkit-linear-gradient(left, red, green, blue);'; 64 | 65 | var css = []; 66 | for (var ii = 0; ii < stops.length; ++ii) { 67 | var stop = stops[ii]; 68 | css.push('' + stop.color + ' ' + stop.position + '%'); 69 | } 70 | var colors = css.join(", "); 71 | return '' + 72 | '-webkit-linear-gradient(left, ' + colors + ') ' + 73 | '-o-linear-gradient(left, ' + colors + ') ' + 74 | '-ms-linear-gradient(left, ' + colors + ') ' + 75 | '-moz-linear-gradient(left, ' + colors + ')'; 76 | } 77 | 78 | function rgbHexToColorObj(color) { 79 | var hex = parseInt( 80 | ((color.indexOf('#') > -1) ? color.substring(1) : color), 16); 81 | return { 82 | r: (hex & 0xFF0000) >> 16, 83 | g: (hex & 0x00FF00) >> 8, 84 | b: (hex & 0x0000FF) >> 0, 85 | a: 255 86 | }; 87 | } 88 | 89 | return this.each(function() { 90 | var half = Math.floor(options.stopWidth / 2); 91 | var lastColor = options.initialColor; 92 | var copyable = false; 93 | 94 | var obj = $(this); 95 | obj.html( 96 | '
' + 97 | '
' + 98 | '' + 99 | '
' + 100 | '
' + 101 | '
' + 102 | '
' + 103 | '
double click to add stop
' + 104 | '
drag stop down to remove
' + 105 | '
alt-drag to duplicate
' + 106 | '
' + 107 | '
' 108 | ); 109 | var outer = $('.gradient-editor-container', obj); 110 | var gradient = $('.gradient-editor-gradient', obj); 111 | var canvasObj = $('.gradient-editor-gradient canvas', obj); 112 | var canvas = canvasObj[0]; 113 | var colors = $('.gradient-editor-colors', obj); 114 | var colorEditor = $('.gradient-editor-color-editor', obj); 115 | var instructions = $('.gradient-editor-instructions', obj); 116 | var currentStop; 117 | 118 | colorEditor.css("position", "absolute"); 119 | colorEditor.ColorPicker({ 120 | color: rgbHexToColorObj(lastColor), 121 | flat: true, 122 | onChange: function(hsb, hex, rgb) { 123 | lastColor = '#' + hex.substr(0, 6); 124 | if (currentStop) { 125 | currentStop.setColor(lastColor); 126 | updateGradient(true); 127 | } 128 | } 129 | }); 130 | 131 | colorEditor.css({ "left" : half, 132 | "top" : 5 + options.height + options.stopHeight + "px" }); 133 | 134 | outer.css({ "position": "relative", 135 | "width" : options.width + 5 + options.stopWidth + "px", 136 | "height" : colorEditor[0].clientHeight + 10 + 137 | options.height + options.stopHeight + "px" }); 138 | 139 | instructions.css({ "position": "absolute", 140 | "left" : colorEditor[0].clientWidth + 10 + "px", 141 | "top" : options.height + 5 + options.stopHeight + "px"}); 142 | 143 | gradient.css({"width" : options.width, 144 | "height" : options.height, 145 | "position": "absolute", 146 | "left" : half + "px"}); 147 | 148 | colors.css({"width" : options.width + options.stopWidth + 2, 149 | "height" : options.stopHeight, 150 | "position": "absolute", 151 | "top" : options.height + "px"}); 152 | 153 | var stops = [] 154 | var css = makeCSSGradient(stops); 155 | canvas.width = options.width; 156 | canvas.height = options.height; 157 | var ctx = canvas.getContext("2d"); 158 | 159 | 160 | 161 | function addStop(position, color) { 162 | var stop = { 163 | color: color, 164 | position: position, 165 | inside: true 166 | }; 167 | stops.push(stop); 168 | currentStop = stop; 169 | 170 | var stopObj = $( 171 | '
' + 172 | '
' + 173 | '
'); 174 | var colorObj = $('.gradient-editor-color', stopObj); 175 | 176 | 177 | stopObj.css({ "width" : options.stopWidth, 178 | "height": options.stopHeight}); 179 | colorObj.css({"width" : options.stopWidth, 180 | "height" : options.stopHeight, 181 | "backgroundColor" : color}); 182 | 183 | 184 | stop.setColor = function(color) { 185 | stop.color = color; 186 | colorObj.css("backgroundColor", color); 187 | }; 188 | stopObj.draggable({ 189 | axis: 'x', 190 | containment: 'parent', 191 | cursor: 'pointer', 192 | drag: function(event, ui) { 193 | var update = false; 194 | var parentOffset = $(event.target).parent().offset(); 195 | var y = event.pageY - parentOffset.top; 196 | var newPosition = Math.min( 197 | 1, 198 | Math.max(0, ui.position.left / options.width)); 199 | if (!event.altKey) { 200 | copyable = true; 201 | } 202 | if (y < 20) { 203 | if (!stop.inside) { 204 | stop.inside = true; 205 | stops.push(stop); 206 | colorObj.show(); 207 | update = true; 208 | } else { 209 | if (event.altKey && copyable) { 210 | copyable = false; 211 | addStop(newPosition, lastColor); 212 | } 213 | } 214 | } else if (y >= 20) { 215 | if (stop.inside) { 216 | stops.splice(stops.indexOf(stop), 1); 217 | stop.inside = false; 218 | colorObj.hide(); 219 | update = true; 220 | } 221 | } 222 | if (newPosition != stop.position) { 223 | stop.position = newPosition; 224 | update = true; 225 | } 226 | if (update) { 227 | updateGradient(true); 228 | } 229 | }, 230 | start: function(event, ui) { 231 | currentStop = stop; 232 | colorEditor.ColorPickerSetColor(rgbHexToColorObj(stop.color)); 233 | copyable = true; 234 | }, 235 | stop: function(event, ui) { 236 | if (!stop.inside) { 237 | currentStop = null; 238 | stopObj.draggable('destroy'); 239 | colors.remove(stopObj); 240 | } 241 | } 242 | }); 243 | stopObj.mousedown(function(event) { 244 | currentStop = stop; 245 | lastColor = stop.color; 246 | colorEditor.ColorPickerSetColor(rgbHexToColorObj(stop.color)); 247 | }); 248 | //stopObj.data('draggable').offset.click.left 249 | colors.append(stopObj); 250 | var p = "" + Math.floor(position * options.width) + " 0"; 251 | stopObj.position({ 252 | my: "left", 253 | at: "left", 254 | of: colors, 255 | offset: p 256 | }); 257 | } 258 | 259 | for (var ii = 0; ii < options.colors.length; ++ii) { 260 | var stop = options.colors[ii]; 261 | addStop(stop.position, stop.color); 262 | } 263 | 264 | colors.dblclick(function(event) { 265 | var parentOffset = $(event.target).parent().offset(); 266 | var x = event.pageX - parentOffset.left - options.stopWidth / 2; 267 | addStop(Math.max(0, Math.min(1, x / options.width)), lastColor); 268 | updateGradient(true); 269 | }); 270 | 271 | function copyStops(stops) { 272 | var newStops = []; 273 | for (var ii = 0; ii < stops.length; ++ii) { 274 | var stop = stops[ii]; 275 | newStops.push({ 276 | position: stop.position, 277 | color: stop.color 278 | }); 279 | } 280 | return newStops; 281 | } 282 | 283 | function updateGradient(callback) { 284 | ctx.fillStyle = makeCanvasGradient(ctx, stops); 285 | ctx.fillRect(0, 0, options.width, options.height); 286 | if (callback) { 287 | options.onChange(copyStops(stops)); 288 | } 289 | } 290 | 291 | updateGradient(); 292 | }); 293 | } 294 | 295 | })(jQuery); 296 | -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-anim_basic_16x16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-anim_basic_16x16.gif -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/gradient-editor/267320cecebabdb401545c2ed2934c83fe231ece/jquery-ui-1.8.2.custom/css/ui-lightness/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/css/ui-lightness/jquery-ui-1.8.2.custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI CSS Framework 3 | * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) 4 | * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. 5 | */ 6 | 7 | /* Layout helpers 8 | ----------------------------------*/ 9 | .ui-helper-hidden { display: none; } 10 | .ui-helper-hidden-accessible { position: absolute; left: -99999999px; } 11 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 12 | .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 13 | .ui-helper-clearfix { display: inline-block; } 14 | /* required comment for clearfix to work in Opera \*/ 15 | * html .ui-helper-clearfix { height:1%; } 16 | .ui-helper-clearfix { display:block; } 17 | /* end clearfix */ 18 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 19 | 20 | 21 | /* Interaction Cues 22 | ----------------------------------*/ 23 | .ui-state-disabled { cursor: default !important; } 24 | 25 | 26 | /* Icons 27 | ----------------------------------*/ 28 | 29 | /* states and images */ 30 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 31 | 32 | 33 | /* Misc visuals 34 | ----------------------------------*/ 35 | 36 | /* Overlays */ 37 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 38 | 39 | 40 | /* 41 | * jQuery UI CSS Framework 42 | * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) 43 | * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. 44 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px 45 | */ 46 | 47 | 48 | /* Component containers 49 | ----------------------------------*/ 50 | .ui-widget { font-family: gTrebuchet MS, gTahoma, gVerdana, gArial, sans-serif; font-size: 1.1em; } 51 | .ui-widget .ui-widget { font-size: 1em; } 52 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: gTrebuchet MS, gTahoma, gVerdana, gArial, sans-serif; font-size: 1em; } 53 | .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } 54 | .ui-widget-content a { color: #333333; } 55 | .ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } 56 | .ui-widget-header a { color: #ffffff; } 57 | 58 | /* Interaction states 59 | ----------------------------------*/ 60 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } 61 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } 62 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } 63 | .ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } 64 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } 65 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } 66 | .ui-widget :active { outline: none; } 67 | 68 | /* Interaction Cues 69 | ----------------------------------*/ 70 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } 71 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } 72 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } 73 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } 74 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } 75 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } 76 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } 77 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } 78 | 79 | /* Icons 80 | ----------------------------------*/ 81 | 82 | /* states and images */ 83 | .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } 84 | .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } 85 | .ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } 86 | .ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } 87 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } 88 | .ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } 89 | .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } 90 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } 91 | 92 | /* positioning */ 93 | .ui-icon-carat-1-n { background-position: 0 0; } 94 | .ui-icon-carat-1-ne { background-position: -16px 0; } 95 | .ui-icon-carat-1-e { background-position: -32px 0; } 96 | .ui-icon-carat-1-se { background-position: -48px 0; } 97 | .ui-icon-carat-1-s { background-position: -64px 0; } 98 | .ui-icon-carat-1-sw { background-position: -80px 0; } 99 | .ui-icon-carat-1-w { background-position: -96px 0; } 100 | .ui-icon-carat-1-nw { background-position: -112px 0; } 101 | .ui-icon-carat-2-n-s { background-position: -128px 0; } 102 | .ui-icon-carat-2-e-w { background-position: -144px 0; } 103 | .ui-icon-triangle-1-n { background-position: 0 -16px; } 104 | .ui-icon-triangle-1-ne { background-position: -16px -16px; } 105 | .ui-icon-triangle-1-e { background-position: -32px -16px; } 106 | .ui-icon-triangle-1-se { background-position: -48px -16px; } 107 | .ui-icon-triangle-1-s { background-position: -64px -16px; } 108 | .ui-icon-triangle-1-sw { background-position: -80px -16px; } 109 | .ui-icon-triangle-1-w { background-position: -96px -16px; } 110 | .ui-icon-triangle-1-nw { background-position: -112px -16px; } 111 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; } 112 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; } 113 | .ui-icon-arrow-1-n { background-position: 0 -32px; } 114 | .ui-icon-arrow-1-ne { background-position: -16px -32px; } 115 | .ui-icon-arrow-1-e { background-position: -32px -32px; } 116 | .ui-icon-arrow-1-se { background-position: -48px -32px; } 117 | .ui-icon-arrow-1-s { background-position: -64px -32px; } 118 | .ui-icon-arrow-1-sw { background-position: -80px -32px; } 119 | .ui-icon-arrow-1-w { background-position: -96px -32px; } 120 | .ui-icon-arrow-1-nw { background-position: -112px -32px; } 121 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; } 122 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } 123 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; } 124 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } 125 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; } 126 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; } 127 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; } 128 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; } 129 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; } 130 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } 131 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; } 132 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; } 133 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; } 134 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } 135 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; } 136 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } 137 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } 138 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } 139 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } 140 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } 141 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } 142 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } 143 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } 144 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } 145 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } 146 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } 147 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } 148 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } 149 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } 150 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } 151 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } 152 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } 153 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } 154 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } 155 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } 156 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } 157 | .ui-icon-arrow-4 { background-position: 0 -80px; } 158 | .ui-icon-arrow-4-diag { background-position: -16px -80px; } 159 | .ui-icon-extlink { background-position: -32px -80px; } 160 | .ui-icon-newwin { background-position: -48px -80px; } 161 | .ui-icon-refresh { background-position: -64px -80px; } 162 | .ui-icon-shuffle { background-position: -80px -80px; } 163 | .ui-icon-transfer-e-w { background-position: -96px -80px; } 164 | .ui-icon-transferthick-e-w { background-position: -112px -80px; } 165 | .ui-icon-folder-collapsed { background-position: 0 -96px; } 166 | .ui-icon-folder-open { background-position: -16px -96px; } 167 | .ui-icon-document { background-position: -32px -96px; } 168 | .ui-icon-document-b { background-position: -48px -96px; } 169 | .ui-icon-note { background-position: -64px -96px; } 170 | .ui-icon-mail-closed { background-position: -80px -96px; } 171 | .ui-icon-mail-open { background-position: -96px -96px; } 172 | .ui-icon-suitcase { background-position: -112px -96px; } 173 | .ui-icon-comment { background-position: -128px -96px; } 174 | .ui-icon-person { background-position: -144px -96px; } 175 | .ui-icon-print { background-position: -160px -96px; } 176 | .ui-icon-trash { background-position: -176px -96px; } 177 | .ui-icon-locked { background-position: -192px -96px; } 178 | .ui-icon-unlocked { background-position: -208px -96px; } 179 | .ui-icon-bookmark { background-position: -224px -96px; } 180 | .ui-icon-tag { background-position: -240px -96px; } 181 | .ui-icon-home { background-position: 0 -112px; } 182 | .ui-icon-flag { background-position: -16px -112px; } 183 | .ui-icon-calendar { background-position: -32px -112px; } 184 | .ui-icon-cart { background-position: -48px -112px; } 185 | .ui-icon-pencil { background-position: -64px -112px; } 186 | .ui-icon-clock { background-position: -80px -112px; } 187 | .ui-icon-disk { background-position: -96px -112px; } 188 | .ui-icon-calculator { background-position: -112px -112px; } 189 | .ui-icon-zoomin { background-position: -128px -112px; } 190 | .ui-icon-zoomout { background-position: -144px -112px; } 191 | .ui-icon-search { background-position: -160px -112px; } 192 | .ui-icon-wrench { background-position: -176px -112px; } 193 | .ui-icon-gear { background-position: -192px -112px; } 194 | .ui-icon-heart { background-position: -208px -112px; } 195 | .ui-icon-star { background-position: -224px -112px; } 196 | .ui-icon-link { background-position: -240px -112px; } 197 | .ui-icon-cancel { background-position: 0 -128px; } 198 | .ui-icon-plus { background-position: -16px -128px; } 199 | .ui-icon-plusthick { background-position: -32px -128px; } 200 | .ui-icon-minus { background-position: -48px -128px; } 201 | .ui-icon-minusthick { background-position: -64px -128px; } 202 | .ui-icon-close { background-position: -80px -128px; } 203 | .ui-icon-closethick { background-position: -96px -128px; } 204 | .ui-icon-key { background-position: -112px -128px; } 205 | .ui-icon-lightbulb { background-position: -128px -128px; } 206 | .ui-icon-scissors { background-position: -144px -128px; } 207 | .ui-icon-clipboard { background-position: -160px -128px; } 208 | .ui-icon-copy { background-position: -176px -128px; } 209 | .ui-icon-contact { background-position: -192px -128px; } 210 | .ui-icon-image { background-position: -208px -128px; } 211 | .ui-icon-video { background-position: -224px -128px; } 212 | .ui-icon-script { background-position: -240px -128px; } 213 | .ui-icon-alert { background-position: 0 -144px; } 214 | .ui-icon-info { background-position: -16px -144px; } 215 | .ui-icon-notice { background-position: -32px -144px; } 216 | .ui-icon-help { background-position: -48px -144px; } 217 | .ui-icon-check { background-position: -64px -144px; } 218 | .ui-icon-bullet { background-position: -80px -144px; } 219 | .ui-icon-radio-off { background-position: -96px -144px; } 220 | .ui-icon-radio-on { background-position: -112px -144px; } 221 | .ui-icon-pin-w { background-position: -128px -144px; } 222 | .ui-icon-pin-s { background-position: -144px -144px; } 223 | .ui-icon-play { background-position: 0 -160px; } 224 | .ui-icon-pause { background-position: -16px -160px; } 225 | .ui-icon-seek-next { background-position: -32px -160px; } 226 | .ui-icon-seek-prev { background-position: -48px -160px; } 227 | .ui-icon-seek-end { background-position: -64px -160px; } 228 | .ui-icon-seek-start { background-position: -80px -160px; } 229 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ 230 | .ui-icon-seek-first { background-position: -80px -160px; } 231 | .ui-icon-stop { background-position: -96px -160px; } 232 | .ui-icon-eject { background-position: -112px -160px; } 233 | .ui-icon-volume-off { background-position: -128px -160px; } 234 | .ui-icon-volume-on { background-position: -144px -160px; } 235 | .ui-icon-power { background-position: 0 -176px; } 236 | .ui-icon-signal-diag { background-position: -16px -176px; } 237 | .ui-icon-signal { background-position: -32px -176px; } 238 | .ui-icon-battery-0 { background-position: -48px -176px; } 239 | .ui-icon-battery-1 { background-position: -64px -176px; } 240 | .ui-icon-battery-2 { background-position: -80px -176px; } 241 | .ui-icon-battery-3 { background-position: -96px -176px; } 242 | .ui-icon-circle-plus { background-position: 0 -192px; } 243 | .ui-icon-circle-minus { background-position: -16px -192px; } 244 | .ui-icon-circle-close { background-position: -32px -192px; } 245 | .ui-icon-circle-triangle-e { background-position: -48px -192px; } 246 | .ui-icon-circle-triangle-s { background-position: -64px -192px; } 247 | .ui-icon-circle-triangle-w { background-position: -80px -192px; } 248 | .ui-icon-circle-triangle-n { background-position: -96px -192px; } 249 | .ui-icon-circle-arrow-e { background-position: -112px -192px; } 250 | .ui-icon-circle-arrow-s { background-position: -128px -192px; } 251 | .ui-icon-circle-arrow-w { background-position: -144px -192px; } 252 | .ui-icon-circle-arrow-n { background-position: -160px -192px; } 253 | .ui-icon-circle-zoomin { background-position: -176px -192px; } 254 | .ui-icon-circle-zoomout { background-position: -192px -192px; } 255 | .ui-icon-circle-check { background-position: -208px -192px; } 256 | .ui-icon-circlesmall-plus { background-position: 0 -208px; } 257 | .ui-icon-circlesmall-minus { background-position: -16px -208px; } 258 | .ui-icon-circlesmall-close { background-position: -32px -208px; } 259 | .ui-icon-squaresmall-plus { background-position: -48px -208px; } 260 | .ui-icon-squaresmall-minus { background-position: -64px -208px; } 261 | .ui-icon-squaresmall-close { background-position: -80px -208px; } 262 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } 263 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } 264 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; } 265 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } 266 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } 267 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; } 268 | 269 | 270 | /* Misc visuals 271 | ----------------------------------*/ 272 | 273 | /* Corner radius */ 274 | .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } 275 | .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } 276 | .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } 277 | .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 278 | .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } 279 | .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 280 | .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 281 | .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } 282 | .ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } 283 | 284 | /* Overlays */ 285 | .ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } 286 | .ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* Resizable 287 | ----------------------------------*/ 288 | .ui-resizable { position: relative;} 289 | .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} 290 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 291 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 292 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 293 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 294 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 295 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 296 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 297 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 298 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Selectable 299 | ----------------------------------*/ 300 | .ui-selectable-helper { border:1px dotted black } 301 | /* Accordion 302 | ----------------------------------*/ 303 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 304 | .ui-accordion .ui-accordion-li-fix { display: inline; } 305 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 306 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } 307 | /* IE7-/Win - Fix extra vertical space in lists */ 308 | .ui-accordion a { zoom: 1; } 309 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 310 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 311 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } 312 | .ui-accordion .ui-accordion-content-active { display: block; }/* Autocomplete 313 | ----------------------------------*/ 314 | .ui-autocomplete { position: absolute; cursor: default; } 315 | .ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; } 316 | 317 | /* workarounds */ 318 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 319 | 320 | /* Menu 321 | ----------------------------------*/ 322 | .ui-menu { 323 | list-style:none; 324 | padding: 2px; 325 | margin: 0; 326 | display:block; 327 | } 328 | .ui-menu .ui-menu { 329 | margin-top: -3px; 330 | } 331 | .ui-menu .ui-menu-item { 332 | margin:0; 333 | padding: 0; 334 | zoom: 1; 335 | float: left; 336 | clear: left; 337 | width: 100%; 338 | } 339 | .ui-menu .ui-menu-item a { 340 | text-decoration:none; 341 | display:block; 342 | padding:.2em .4em; 343 | line-height:1.5; 344 | zoom:1; 345 | } 346 | .ui-menu .ui-menu-item a.ui-state-hover, 347 | .ui-menu .ui-menu-item a.ui-state-active { 348 | font-weight: normal; 349 | margin: -1px; 350 | } 351 | /* Button 352 | ----------------------------------*/ 353 | 354 | .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ 355 | .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ 356 | button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ 357 | .ui-button-icons-only { width: 3.4em; } 358 | button.ui-button-icons-only { width: 3.7em; } 359 | 360 | /*button text element */ 361 | .ui-button .ui-button-text { display: block; line-height: 1.4; } 362 | .ui-button-text-only .ui-button-text { padding: .4em 1em; } 363 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } 364 | .ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } 365 | .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } 366 | /* no icon support for input elements, provide padding by default */ 367 | input.ui-button { padding: .4em 1em; } 368 | 369 | /*button icon element(s) */ 370 | .ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } 371 | .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } 372 | .ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } 373 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 374 | 375 | /*button sets*/ 376 | .ui-buttonset { margin-right: 7px; } 377 | .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } 378 | 379 | /* workarounds */ 380 | button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ 381 | 382 | 383 | 384 | 385 | 386 | /* Dialog 387 | ----------------------------------*/ 388 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } 389 | .ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; } 390 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; } 391 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 392 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 393 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 394 | .ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } 395 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 396 | .ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } 397 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 398 | .ui-draggable .ui-dialog-titlebar { cursor: move; } 399 | /* Slider 400 | ----------------------------------*/ 401 | .ui-slider { position: relative; text-align: left; } 402 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 403 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 404 | 405 | .ui-slider-horizontal { height: .8em; } 406 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 407 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 408 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 409 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 410 | 411 | .ui-slider-vertical { width: .8em; height: 100px; } 412 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 413 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 414 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 415 | .ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs 416 | ----------------------------------*/ 417 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 418 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } 419 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } 420 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } 421 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } 422 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } 423 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 424 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } 425 | .ui-tabs .ui-tabs-hide { display: none !important; } 426 | /* Datepicker 427 | ----------------------------------*/ 428 | .ui-datepicker { width: 17em; padding: .2em .2em 0; } 429 | .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } 430 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } 431 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } 432 | .ui-datepicker .ui-datepicker-prev { left:2px; } 433 | .ui-datepicker .ui-datepicker-next { right:2px; } 434 | .ui-datepicker .ui-datepicker-prev-hover { left:1px; } 435 | .ui-datepicker .ui-datepicker-next-hover { right:1px; } 436 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } 437 | .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } 438 | .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } 439 | .ui-datepicker select.ui-datepicker-month-year {width: 100%;} 440 | .ui-datepicker select.ui-datepicker-month, 441 | .ui-datepicker select.ui-datepicker-year { width: 49%;} 442 | .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } 443 | .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } 444 | .ui-datepicker td { border: 0; padding: 1px; } 445 | .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } 446 | .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } 447 | .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } 448 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } 449 | 450 | /* with multiple calendars */ 451 | .ui-datepicker.ui-datepicker-multi { width:auto; } 452 | .ui-datepicker-multi .ui-datepicker-group { float:left; } 453 | .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } 454 | .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } 455 | .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } 456 | .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } 457 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } 458 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } 459 | .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } 460 | .ui-datepicker-row-break { clear:both; width:100%; } 461 | 462 | /* RTL support */ 463 | .ui-datepicker-rtl { direction: rtl; } 464 | .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } 465 | .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } 466 | .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } 467 | .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } 468 | .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } 469 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } 470 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } 471 | .ui-datepicker-rtl .ui-datepicker-group { float:right; } 472 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 473 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 474 | 475 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ 476 | .ui-datepicker-cover { 477 | display: none; /*sorry for IE5*/ 478 | display/**/: block; /*sorry for IE5*/ 479 | position: absolute; /*must have*/ 480 | z-index: -1; /*must have*/ 481 | filter: mask(); /*must have*/ 482 | top: -4px; /*must have*/ 483 | left: -4px; /*must have*/ 484 | width: 200px; /*must have*/ 485 | height: 200px; /*must have*/ 486 | }/* Progressbar 487 | ----------------------------------*/ 488 | .ui-progressbar { height:2em; text-align: left; } 489 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery UI Example Page 6 | 7 | 8 | 9 | 63 | 73 | 74 | 75 |

Welcome to jQuery UI!

76 |

This page demonstrates the widgets you downloaded using the theme you selected in the download builder. We've included and linked to minified versions of jQuery, your personalized copy of jQuery UI (js/jquery-ui-1.8.2.custom.min.js), and css/ui-lightness/jquery-ui-1.8.2.custom.css which imports the entire jQuery UI CSS Framework. You can choose to link a subset of the CSS Framework depending on your needs.

77 |

You've downloaded components and a theme that are compatible with jQuery 1.3+. Please make sure you are using jQuery 1.3+ in your production environment.

78 | 79 |

YOUR COMPONENTS:

80 | 81 | 82 |

Accordion

83 |
84 |
85 |

First

86 |
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
87 |
88 |
89 |

Second

90 |
Phasellus mattis tincidunt nibh.
91 |
92 |
93 |

Third

94 |
Nam dui erat, auctor a, dignissim quis.
95 |
96 |
97 | 98 | 99 |

Tabs

100 |
101 | 106 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
107 |
Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.
108 |
Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.
109 |
110 | 111 | 112 |

Dialog

113 |

Open Dialog

114 | 115 | 116 |

Overlay and Shadow Classes (not currently used in UI widgets)

117 |
118 |

Lorem ipsum dolor sit amet, Nulla nec tortor. Donec id elit quis purus consectetur consequat.

Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci.

Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat.

Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam.

Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante.

Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi.

119 | 120 | 121 |
122 |
123 |
124 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

125 |
126 |
127 | 128 |
129 | 130 | 131 | 132 |
133 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

134 |
135 | 136 | 137 | 138 |

Framework Icons (content color preview)

139 | 334 | 335 | 336 | 337 |

Slider

338 |
339 | 340 | 341 |

Datepicker

342 |
343 | 344 | 345 |

Progressbar

346 |
347 | 348 | 349 |

Highlight / Error

350 |
351 |
352 |

353 | Hey! Sample ui-state-highlight style.

354 |
355 |
356 |
357 |
358 |
359 |

360 | Alert: Sample ui-state-error style.

361 |
362 |
363 | 364 | 365 | 366 | 367 | 368 | -------------------------------------------------------------------------------- /jquery-ui-1.8.2.custom/js/jquery-1.4.2.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery JavaScript Library v1.4.2 3 | * http://jquery.com/ 4 | * 5 | * Copyright 2010, John Resig 6 | * Dual licensed under the MIT or GPL Version 2 licenses. 7 | * http://jquery.org/license 8 | * 9 | * Includes Sizzle.js 10 | * http://sizzlejs.com/ 11 | * Copyright 2010, The Dojo Foundation 12 | * Released under the MIT, BSD, and GPL Licenses. 13 | * 14 | * Date: Sat Feb 13 22:33:48 2010 -0500 15 | */ 16 | (function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, 21 | Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& 22 | (d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, 23 | a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== 24 | "find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(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(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, 25 | function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a"; 34 | var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, 35 | parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= 36 | false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= 37 | s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, 38 | applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; 39 | else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, 40 | a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== 41 | w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, 42 | cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= 47 | c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); 48 | a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, 49 | function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); 50 | k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), 51 | C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= 53 | e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& 54 | f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; 55 | if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", 63 | e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, 64 | "_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, 65 | d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, 71 | e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); 72 | t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| 73 | g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, 80 | CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, 81 | g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, 82 | text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, 83 | setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= 84 | h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== 86 | "="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, 87 | h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& 90 | q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; 91 | if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); 92 | (function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: 93 | function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= 96 | {},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== 97 | "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", 98 | d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? 99 | a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== 100 | 1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= 102 | c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, 103 | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, 104 | prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, 105 | this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); 106 | return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, 107 | ""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); 111 | return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", 112 | ""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= 113 | c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? 114 | c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= 115 | function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= 116 | Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, 117 | "border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= 118 | a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= 119 | a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== 120 | "string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, 121 | serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), 122 | function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, 123 | global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& 124 | e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? 125 | "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== 126 | false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= 127 | false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", 128 | c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| 129 | d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); 130 | g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== 131 | 1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== 132 | "json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; 133 | if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== 139 | "number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| 140 | c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; 141 | this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= 142 | this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, 143 | e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; 149 | a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); 150 | c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, 151 | d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- 152 | f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": 153 | "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in 154 | e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); 155 | --------------------------------------------------------------------------------