├── img
├── triumph_big1.jpg
├── triumph_big2.jpg
├── triumph_big3.jpg
└── triumph_thumb1.jpg
├── js
├── page.css
├── jquery.jqzoom.css
├── jquery.easing.1.3.js
├── jquery.lazyload.js
├── jquery.stellar.min.js
├── common.js
├── circlr.js
├── jquery.color.js
├── layer.js
├── jquery.jqzoom-core.js
└── jquery-ui.css
└── jquery插件 - 放大镜.html
/img/triumph_big1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/charmlng/magnifier/HEAD/img/triumph_big1.jpg
--------------------------------------------------------------------------------
/img/triumph_big2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/charmlng/magnifier/HEAD/img/triumph_big2.jpg
--------------------------------------------------------------------------------
/img/triumph_big3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/charmlng/magnifier/HEAD/img/triumph_big3.jpg
--------------------------------------------------------------------------------
/img/triumph_thumb1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/charmlng/magnifier/HEAD/img/triumph_thumb1.jpg
--------------------------------------------------------------------------------
/js/page.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #fff;
3 | padding-top: 50px;
4 | padding-bottom: 50px;
5 | }
6 |
7 | #circlr {
8 | cursor: move;
9 | margin: 0 auto;
10 | min-height: 100px;
11 | position: relative;
12 | }
13 |
14 | #circlr #loader {
15 | background: url(../images/loader.gif) center center no-repeat;
16 | bottom: 0;
17 | display: none;
18 | left: 0;
19 | position: absolute;
20 | right: 0;
21 | top: 0;
22 | }
23 |
--------------------------------------------------------------------------------
/jquery插件 - 放大镜.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | jquery插件 - 放大镜
6 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
32 |
33 |
--------------------------------------------------------------------------------
/js/jquery.jqzoom.css:
--------------------------------------------------------------------------------
1 | .zoomPad{
2 | position:relative;
3 | float:left;
4 | z-index:99;
5 | cursor:crosshair;
6 | }
7 |
8 |
9 | .zoomPreload{
10 | -moz-opacity:0.8;
11 | opacity: 0.8;
12 | filter: alpha(opacity = 80);
13 | color: #333;
14 | font-size: 12px;
15 | font-family: Tahoma;
16 | text-decoration: none;
17 | border: 1px solid #CCC;
18 | background-color: white;
19 | padding: 8px;
20 | text-align:center;
21 | background-image: url(../images/zoomloader.gif);
22 | background-repeat: no-repeat;
23 | background-position: 43px 30px;
24 | z-index:110;
25 | width:90px;
26 | height:43px;
27 | position:absolute;
28 | top:0px;
29 | left:0px;
30 | * width:100px;
31 | * height:49px;
32 | }
33 |
34 |
35 | .zoomPup{
36 | overflow:hidden;
37 | background-color: #FFF;
38 | -moz-opacity:0.6;
39 | opacity: 0.6;
40 | filter: alpha(opacity = 60);
41 | z-index:120;
42 | position:absolute;
43 | border:1px solid #CCC;
44 | z-index:101;
45 | cursor:crosshair;
46 | }
47 |
48 | .zoomOverlay{
49 | position:absolute;
50 | left:0px;
51 | top:0px;
52 | background:#FFF;
53 | /*opacity:0.5;*/
54 | z-index:5000;
55 | width:100%;
56 | height:100%;
57 | display:none;
58 | z-index:101;
59 | }
60 |
61 | .zoomWindow{
62 | position:absolute;
63 | left:110%;
64 | top:40px;
65 | background:#FFF;
66 | z-index:6000;
67 | height:auto;
68 | z-index:10000;
69 | z-index:110;
70 | }
71 | .zoomWrapper{
72 | position:relative;
73 | border:1px solid #999;
74 | z-index:110;
75 | }
76 | .zoomWrapperTitle{
77 | /*display:block;
78 | background:#999;
79 | color:#FFF;
80 | height:18px;
81 | line-height:18px;
82 | width:100%;
83 | overflow:hidden;
84 | text-align:center;
85 | font-size:10px;
86 | position:absolute;
87 | top:0px;
88 | left:0px;
89 | z-index:120;
90 | -moz-opacity:0.6;
91 | opacity: 0.6;
92 | filter: alpha(opacity = 60);*/
93 | }
94 | .zoomWrapperImage{
95 | display:block;
96 | position:relative;
97 | overflow:hidden;
98 | z-index:110;
99 |
100 | }
101 | .zoomWrapperImage img{
102 | border:0px;
103 | display:block;
104 | position:absolute;
105 | z-index:101;
106 | }
107 |
108 | .zoomIframe{
109 | z-index: -1;
110 | filter:alpha(opacity=0);
111 | -moz-opacity: 0.80;
112 | opacity: 0.80;
113 | position:absolute;
114 | display:block;
115 | }
116 |
117 | /*********************************************************
118 | / When clicking on thumbs jqzoom will add the class
119 | / "zoomThumbActive" on the anchor selected
120 | /*********************************************************/
--------------------------------------------------------------------------------
/js/jquery.easing.1.3.js:
--------------------------------------------------------------------------------
1 | /*
2 | * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3 | * Download by http://www.codefans.net
4 | * Uses the built in easing capabilities added In jQuery 1.1
5 | * to offer multiple easing options
6 | *
7 | * TERMS OF USE - jQuery Easing
8 | *
9 | * Open source under the BSD License.
10 | *
11 | * Copyright © 2008 George McGinley Smith
12 | * All rights reserved.
13 | *
14 | * Redistribution and use in source and binary forms, with or without modification,
15 | * are permitted provided that the following conditions are met:
16 | *
17 | * Redistributions of source code must retain the above copyright notice, this list of
18 | * conditions and the following disclaimer.
19 | * Redistributions in binary form must reproduce the above copyright notice, this list
20 | * of conditions and the following disclaimer in the documentation and/or other materials
21 | * provided with the distribution.
22 | *
23 | * Neither the name of the author nor the names of contributors may be used to endorse
24 | * or promote products derived from this software without specific prior written permission.
25 | * download by http://www.codefans.net
26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
27 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34 | * OF THE POSSIBILITY OF SUCH DAMAGE.
35 | *
36 | */
37 |
38 | // t: current time, b: begInnIng value, c: change In value, d: duration
39 | jQuery.easing['jswing'] = jQuery.easing['swing'];
40 |
41 | jQuery.extend( jQuery.easing,
42 | {
43 | def: 'easeOutQuad',
44 | swing: function (x, t, b, c, d) {
45 | //alert(jQuery.easing.default);
46 | return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
47 | },
48 | easeInQuad: function (x, t, b, c, d) {
49 | return c*(t/=d)*t + b;
50 | },
51 | easeOutQuad: function (x, t, b, c, d) {
52 | return -c *(t/=d)*(t-2) + b;
53 | },
54 | easeInOutQuad: function (x, t, b, c, d) {
55 | if ((t/=d/2) < 1) return c/2*t*t + b;
56 | return -c/2 * ((--t)*(t-2) - 1) + b;
57 | },
58 | easeInCubic: function (x, t, b, c, d) {
59 | return c*(t/=d)*t*t + b;
60 | },
61 | easeOutCubic: function (x, t, b, c, d) {
62 | return c*((t=t/d-1)*t*t + 1) + b;
63 | },
64 | easeInOutCubic: function (x, t, b, c, d) {
65 | if ((t/=d/2) < 1) return c/2*t*t*t + b;
66 | return c/2*((t-=2)*t*t + 2) + b;
67 | },
68 | easeInQuart: function (x, t, b, c, d) {
69 | return c*(t/=d)*t*t*t + b;
70 | },
71 | easeOutQuart: function (x, t, b, c, d) {
72 | return -c * ((t=t/d-1)*t*t*t - 1) + b;
73 | },
74 | easeInOutQuart: function (x, t, b, c, d) {
75 | if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
76 | return -c/2 * ((t-=2)*t*t*t - 2) + b;
77 | },
78 | easeInQuint: function (x, t, b, c, d) {
79 | return c*(t/=d)*t*t*t*t + b;
80 | },
81 | easeOutQuint: function (x, t, b, c, d) {
82 | return c*((t=t/d-1)*t*t*t*t + 1) + b;
83 | },
84 | easeInOutQuint: function (x, t, b, c, d) {
85 | if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
86 | return c/2*((t-=2)*t*t*t*t + 2) + b;
87 | },
88 | easeInSine: function (x, t, b, c, d) {
89 | return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
90 | },
91 | easeOutSine: function (x, t, b, c, d) {
92 | return c * Math.sin(t/d * (Math.PI/2)) + b;
93 | },
94 | easeInOutSine: function (x, t, b, c, d) {
95 | return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
96 | },
97 | easeInExpo: function (x, t, b, c, d) {
98 | return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
99 | },
100 | easeOutExpo: function (x, t, b, c, d) {
101 | return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
102 | },
103 | easeInOutExpo: function (x, t, b, c, d) {
104 | if (t==0) return b;
105 | if (t==d) return b+c;
106 | if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
107 | return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
108 | },
109 | easeInCirc: function (x, t, b, c, d) {
110 | return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
111 | },
112 | easeOutCirc: function (x, t, b, c, d) {
113 | return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
114 | },
115 | easeInOutCirc: function (x, t, b, c, d) {
116 | if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
117 | return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
118 | },
119 | easeInElastic: function (x, t, b, c, d) {
120 | var s=1.70158;var p=0;var a=c;
121 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
122 | if (a < Math.abs(c)) { a=c; var s=p/4; }
123 | else var s = p/(2*Math.PI) * Math.asin (c/a);
124 | return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
125 | },
126 | easeOutElastic: function (x, t, b, c, d) {
127 | var s=1.70158;var p=0;var a=c;
128 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
129 | if (a < Math.abs(c)) { a=c; var s=p/4; }
130 | else var s = p/(2*Math.PI) * Math.asin (c/a);
131 | return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
132 | },
133 | easeInOutElastic: function (x, t, b, c, d) {
134 | var s=1.70158;var p=0;var a=c;
135 | if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
136 | if (a < Math.abs(c)) { a=c; var s=p/4; }
137 | else var s = p/(2*Math.PI) * Math.asin (c/a);
138 | if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
139 | return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
140 | },
141 | easeInBack: function (x, t, b, c, d, s) {
142 | if (s == undefined) s = 1.70158;
143 | return c*(t/=d)*t*((s+1)*t - s) + b;
144 | },
145 | easeOutBack: function (x, t, b, c, d, s) {
146 | if (s == undefined) s = 1.70158;
147 | return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
148 | },
149 | easeInOutBack: function (x, t, b, c, d, s) {
150 | if (s == undefined) s = 1.70158;
151 | if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
152 | return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
153 | },
154 | easeInBounce: function (x, t, b, c, d) {
155 | return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
156 | },
157 | easeOutBounce: function (x, t, b, c, d) {
158 | if ((t/=d) < (1/2.75)) {
159 | return c*(7.5625*t*t) + b;
160 | } else if (t < (2/2.75)) {
161 | return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
162 | } else if (t < (2.5/2.75)) {
163 | return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
164 | } else {
165 | return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
166 | }
167 | },
168 | easeInOutBounce: function (x, t, b, c, d) {
169 | if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
170 | return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
171 | }
172 | });
173 |
174 | /*
175 | *
176 | * TERMS OF USE - EASING EQUATIONS
177 | *
178 | * Open source under the BSD License.
179 | *
180 | * Copyright © 2001 Robert Penner
181 | * All rights reserved.
182 | *
183 | * Redistribution and use in source and binary forms, with or without modification,
184 | * are permitted provided that the following conditions are met:
185 | *
186 | * Redistributions of source code must retain the above copyright notice, this list of
187 | * conditions and the following disclaimer.
188 | * Redistributions in binary form must reproduce the above copyright notice, this list
189 | * of conditions and the following disclaimer in the documentation and/or other materials
190 | * provided with the distribution.
191 | *
192 | * Neither the name of the author nor the names of contributors may be used to endorse
193 | * or promote products derived from this software without specific prior written permission.
194 | *
195 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
196 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
197 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
198 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
199 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
200 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
201 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
202 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
203 | * OF THE POSSIBILITY OF SUCH DAMAGE.
204 | *
205 | */
--------------------------------------------------------------------------------
/js/jquery.lazyload.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Lazy Load - jQuery plugin for lazy loading images
3 | *
4 | * Copyright (c) 2007-2015 Mika Tuupola
5 | *
6 | * Licensed under the MIT license:
7 | * http://www.opensource.org/licenses/mit-license.php
8 | *
9 | * Project home:
10 | * http://www.appelsiini.net/projects/lazyload
11 | *
12 | * Version: 1.9.5
13 | *
14 | */
15 |
16 | (function($, window, document, undefined) {
17 | var $window = $(window);
18 |
19 | $.fn.lazyload = function(options) {
20 | var elements = this;
21 | var $container;
22 | var settings = {
23 | threshold : 0,
24 | failure_limit : 0,
25 | event : "scroll",
26 | effect : "show",
27 | container : window,
28 | data_attribute : "original",
29 | skip_invisible : false,
30 | appear : null,
31 | load : null,
32 | placeholder : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"
33 | };
34 |
35 | function update() {
36 | var counter = 0;
37 |
38 | elements.each(function() {
39 | var $this = $(this);
40 | if (settings.skip_invisible && !$this.is(":visible")) {
41 | return;
42 | }
43 | if ($.abovethetop(this, settings) ||
44 | $.leftofbegin(this, settings)) {
45 | /* Nothing. */
46 | } else if (!$.belowthefold(this, settings) &&
47 | !$.rightoffold(this, settings)) {
48 | $this.trigger("appear");
49 | /* if we found an image we'll load, reset the counter */
50 | counter = 0;
51 | } else {
52 | if (++counter > settings.failure_limit) {
53 | return false;
54 | }
55 | }
56 | });
57 |
58 | }
59 |
60 | if(options) {
61 | /* Maintain BC for a couple of versions. */
62 | if (undefined !== options.failurelimit) {
63 | options.failure_limit = options.failurelimit;
64 | delete options.failurelimit;
65 | }
66 | if (undefined !== options.effectspeed) {
67 | options.effect_speed = options.effectspeed;
68 | delete options.effectspeed;
69 | }
70 |
71 | $.extend(settings, options);
72 | }
73 |
74 | /* Cache container as jQuery as object. */
75 | $container = (settings.container === undefined ||
76 | settings.container === window) ? $window : $(settings.container);
77 |
78 | /* Fire one scroll event per scroll. Not one scroll event per image. */
79 | if (0 === settings.event.indexOf("scroll")) {
80 | $container.bind(settings.event, function() {
81 | return update();
82 | });
83 | }
84 |
85 | this.each(function() {
86 | var self = this;
87 | var $self = $(self);
88 |
89 | self.loaded = false;
90 |
91 | /* If no src attribute given use data:uri. */
92 | if ($self.attr("src") === undefined || $self.attr("src") === false) {
93 | if ($self.is("img")) {
94 | $self.attr("src", settings.placeholder);
95 | }
96 | }
97 |
98 | /* When appear is triggered load original image. */
99 | $self.one("appear", function() {
100 | if (!this.loaded) {
101 | if (settings.appear) {
102 | var elements_left = elements.length;
103 | settings.appear.call(self, elements_left, settings);
104 | }
105 | $("
")
106 | .bind("load", function() {
107 |
108 | var original = $self.attr("data-" + settings.data_attribute);
109 | $self.hide();
110 | if ($self.is("img")) {
111 | $self.attr("src", original);
112 | } else {
113 | $self.css("background-image", "url('" + original + "')");
114 | }
115 | $self[settings.effect](settings.effect_speed);
116 |
117 | self.loaded = true;
118 |
119 | /* Remove image from array so it is not looped next time. */
120 | var temp = $.grep(elements, function(element) {
121 | return !element.loaded;
122 | });
123 | elements = $(temp);
124 |
125 | if (settings.load) {
126 | var elements_left = elements.length;
127 | settings.load.call(self, elements_left, settings);
128 | }
129 | })
130 | .attr("src", $self.attr("data-" + settings.data_attribute));
131 | }
132 | });
133 |
134 | /* When wanted event is triggered load original image */
135 | /* by triggering appear. */
136 | if (0 !== settings.event.indexOf("scroll")) {
137 | $self.bind(settings.event, function() {
138 | if (!self.loaded) {
139 | $self.trigger("appear");
140 | }
141 | });
142 | }
143 | });
144 |
145 | /* Check if something appears when window is resized. */
146 | $window.bind("resize", function() {
147 | update();
148 | });
149 |
150 | /* With IOS5 force loading images when navigating with back button. */
151 | /* Non optimal workaround. */
152 | if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) {
153 | $window.bind("pageshow", function(event) {
154 | if (event.originalEvent && event.originalEvent.persisted) {
155 | elements.each(function() {
156 | $(this).trigger("appear");
157 | });
158 | }
159 | });
160 | }
161 |
162 | /* Force initial check if images should appear. */
163 | $(document).ready(function() {
164 | update();
165 | });
166 |
167 | return this;
168 | };
169 |
170 | /* Convenience methods in jQuery namespace. */
171 | /* Use as $.belowthefold(element, {threshold : 100, container : window}) */
172 |
173 | $.belowthefold = function(element, settings) {
174 | var fold;
175 |
176 | if (settings.container === undefined || settings.container === window) {
177 | fold = (window.innerHeight ? window.innerHeight : $window.height()) + $window.scrollTop();
178 | } else {
179 | fold = $(settings.container).offset().top + $(settings.container).height();
180 | }
181 |
182 | return fold <= $(element).offset().top - settings.threshold;
183 | };
184 |
185 | $.rightoffold = function(element, settings) {
186 | var fold;
187 |
188 | if (settings.container === undefined || settings.container === window) {
189 | fold = $window.width() + $window.scrollLeft();
190 | } else {
191 | fold = $(settings.container).offset().left + $(settings.container).width();
192 | }
193 |
194 | return fold <= $(element).offset().left - settings.threshold;
195 | };
196 |
197 | $.abovethetop = function(element, settings) {
198 | var fold;
199 |
200 | if (settings.container === undefined || settings.container === window) {
201 | fold = $window.scrollTop();
202 | } else {
203 | fold = $(settings.container).offset().top;
204 | }
205 |
206 | return fold >= $(element).offset().top + settings.threshold + $(element).height();
207 | };
208 |
209 | $.leftofbegin = function(element, settings) {
210 | var fold;
211 |
212 | if (settings.container === undefined || settings.container === window) {
213 | fold = $window.scrollLeft();
214 | } else {
215 | fold = $(settings.container).offset().left;
216 | }
217 |
218 | return fold >= $(element).offset().left + settings.threshold + $(element).width();
219 | };
220 |
221 | $.inviewport = function(element, settings) {
222 | return !$.rightoffold(element, settings) && !$.leftofbegin(element, settings) &&
223 | !$.belowthefold(element, settings) && !$.abovethetop(element, settings);
224 | };
225 |
226 | /* Custom selectors for your convenience. */
227 | /* Use as $("img:below-the-fold").something() or */
228 | /* $("img").filter(":below-the-fold").something() which is faster */
229 |
230 | $.extend($.expr[":"], {
231 | "below-the-fold" : function(a) { return $.belowthefold(a, {threshold : 0}); },
232 | "above-the-top" : function(a) { return !$.belowthefold(a, {threshold : 0}); },
233 | "right-of-screen": function(a) { return $.rightoffold(a, {threshold : 0}); },
234 | "left-of-screen" : function(a) { return !$.rightoffold(a, {threshold : 0}); },
235 | "in-viewport" : function(a) { return $.inviewport(a, {threshold : 0}); },
236 | /* Maintain BC for couple of versions. */
237 | "above-the-fold" : function(a) { return !$.belowthefold(a, {threshold : 0}); },
238 | "right-of-fold" : function(a) { return $.rightoffold(a, {threshold : 0}); },
239 | "left-of-fold" : function(a) { return !$.rightoffold(a, {threshold : 0}); }
240 | });
241 |
242 | })(jQuery, window, document);
243 |
--------------------------------------------------------------------------------
/js/jquery.stellar.min.js:
--------------------------------------------------------------------------------
1 | /*! Stellar.js v0.6.2 | Copyright 2014, Mark Dalgleish | http://markdalgleish.com/projects/stellar.js | http://markdalgleish.mit-license.org */
2 | !function(a,b,c,d){function e(b,c){this.element=b,this.options=a.extend({},g,c),this._defaults=g,this._name=f,this.init()}var f="stellar",g={scrollProperty:"scroll",positionProperty:"position",horizontalScrolling:!0,verticalScrolling:!0,horizontalOffset:0,verticalOffset:0,responsive:!1,parallaxBackgrounds:!0,parallaxElements:!0,hideDistantElements:!0,hideElement:function(a){a.hide()},showElement:function(a){a.show()}},h={scroll:{getLeft:function(a){return a.scrollLeft()},setLeft:function(a,b){a.scrollLeft(b)},getTop:function(a){return a.scrollTop()},setTop:function(a,b){a.scrollTop(b)}},position:{getLeft:function(a){return-1*parseInt(a.css("left"),10)},getTop:function(a){return-1*parseInt(a.css("top"),10)}},margin:{getLeft:function(a){return-1*parseInt(a.css("margin-left"),10)},getTop:function(a){return-1*parseInt(a.css("margin-top"),10)}},transform:{getLeft:function(a){var b=getComputedStyle(a[0])[k];return"none"!==b?-1*parseInt(b.match(/(-?[0-9]+)/g)[4],10):0},getTop:function(a){var b=getComputedStyle(a[0])[k];return"none"!==b?-1*parseInt(b.match(/(-?[0-9]+)/g)[5],10):0}}},i={position:{setLeft:function(a,b){a.css("left",b)},setTop:function(a,b){a.css("top",b)}},transform:{setPosition:function(a,b,c,d,e){a[0].style[k]="translate3d("+(b-c)+"px, "+(d-e)+"px, 0)"}}},j=function(){var b,c=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,d=a("script")[0].style,e="";for(b in d)if(c.test(b)){e=b.match(c)[0];break}return"WebkitOpacity"in d&&(e="Webkit"),"KhtmlOpacity"in d&&(e="Khtml"),function(a){return e+(e.length>0?a.charAt(0).toUpperCase()+a.slice(1):a)}}(),k=j("transform"),l=a("",{style:"background:#fff"}).css("background-position-x")!==d,m=l?function(a,b,c){a.css({"background-position-x":b,"background-position-y":c})}:function(a,b,c){a.css("background-position",b+" "+c)},n=l?function(a){return[a.css("background-position-x"),a.css("background-position-y")]}:function(a){return a.css("background-position").split(" ")},o=b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.oRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,1e3/60)};e.prototype={init:function(){this.options.name=f+"_"+Math.floor(1e9*Math.random()),this._defineElements(),this._defineGetters(),this._defineSetters(),this._handleWindowLoadAndResize(),this._detectViewport(),this.refresh({firstLoad:!0}),"scroll"===this.options.scrollProperty?this._handleScrollEvent():this._startAnimationLoop()},_defineElements:function(){this.element===c.body&&(this.element=b),this.$scrollElement=a(this.element),this.$element=this.element===b?a("body"):this.$scrollElement,this.$viewportElement=this.options.viewportElement!==d?a(this.options.viewportElement):this.$scrollElement[0]===b||"scroll"===this.options.scrollProperty?this.$scrollElement:this.$scrollElement.parent()},_defineGetters:function(){var a=this,b=h[a.options.scrollProperty];this._getScrollLeft=function(){return b.getLeft(a.$scrollElement)},this._getScrollTop=function(){return b.getTop(a.$scrollElement)}},_defineSetters:function(){var b=this,c=h[b.options.scrollProperty],d=i[b.options.positionProperty],e=c.setLeft,f=c.setTop;this._setScrollLeft="function"==typeof e?function(a){e(b.$scrollElement,a)}:a.noop,this._setScrollTop="function"==typeof f?function(a){f(b.$scrollElement,a)}:a.noop,this._setPosition=d.setPosition||function(a,c,e,f,g){b.options.horizontalScrolling&&d.setLeft(a,c,e),b.options.verticalScrolling&&d.setTop(a,f,g)}},_handleWindowLoadAndResize:function(){var c=this,d=a(b);c.options.responsive&&d.bind("load."+this.name,function(){c.refresh()}),d.bind("resize."+this.name,function(){c._detectViewport(),c.options.responsive&&c.refresh()})},refresh:function(c){var d=this,e=d._getScrollLeft(),f=d._getScrollTop();c&&c.firstLoad||this._reset(),this._setScrollLeft(0),this._setScrollTop(0),this._setOffsets(),this._findParticles(),this._findBackgrounds(),c&&c.firstLoad&&/WebKit/.test(navigator.userAgent)&&a(b).load(function(){var a=d._getScrollLeft(),b=d._getScrollTop();d._setScrollLeft(a+1),d._setScrollTop(b+1),d._setScrollLeft(a),d._setScrollTop(b)}),this._setScrollLeft(e),this._setScrollTop(f)},_detectViewport:function(){var a=this.$viewportElement.offset(),b=null!==a&&a!==d;this.viewportWidth=this.$viewportElement.width(),this.viewportHeight=this.$viewportElement.height(),this.viewportOffsetTop=b?a.top:0,this.viewportOffsetLeft=b?a.left:0},_findParticles:function(){{var b=this;this._getScrollLeft(),this._getScrollTop()}if(this.particles!==d)for(var c=this.particles.length-1;c>=0;c--)this.particles[c].$element.data("stellar-elementIsActive",d);this.particles=[],this.options.parallaxElements&&this.$element.find("[data-stellar-ratio]").each(function(){var c,e,f,g,h,i,j,k,l,m=a(this),n=0,o=0,p=0,q=0;if(m.data("stellar-elementIsActive")){if(m.data("stellar-elementIsActive")!==this)return}else m.data("stellar-elementIsActive",this);b.options.showElement(m),m.data("stellar-startingLeft")?(m.css("left",m.data("stellar-startingLeft")),m.css("top",m.data("stellar-startingTop"))):(m.data("stellar-startingLeft",m.css("left")),m.data("stellar-startingTop",m.css("top"))),f=m.position().left,g=m.position().top,h="auto"===m.css("margin-left")?0:parseInt(m.css("margin-left"),10),i="auto"===m.css("margin-top")?0:parseInt(m.css("margin-top"),10),k=m.offset().left-h,l=m.offset().top-i,m.parents().each(function(){var b=a(this);return b.data("stellar-offset-parent")===!0?(n=p,o=q,j=b,!1):(p+=b.position().left,void(q+=b.position().top))}),c=m.data("stellar-horizontal-offset")!==d?m.data("stellar-horizontal-offset"):j!==d&&j.data("stellar-horizontal-offset")!==d?j.data("stellar-horizontal-offset"):b.horizontalOffset,e=m.data("stellar-vertical-offset")!==d?m.data("stellar-vertical-offset"):j!==d&&j.data("stellar-vertical-offset")!==d?j.data("stellar-vertical-offset"):b.verticalOffset,b.particles.push({$element:m,$offsetParent:j,isFixed:"fixed"===m.css("position"),horizontalOffset:c,verticalOffset:e,startingPositionLeft:f,startingPositionTop:g,startingOffsetLeft:k,startingOffsetTop:l,parentOffsetLeft:n,parentOffsetTop:o,stellarRatio:m.data("stellar-ratio")!==d?m.data("stellar-ratio"):1,width:m.outerWidth(!0),height:m.outerHeight(!0),isHidden:!1})})},_findBackgrounds:function(){var b,c=this,e=this._getScrollLeft(),f=this._getScrollTop();this.backgrounds=[],this.options.parallaxBackgrounds&&(b=this.$element.find("[data-stellar-background-ratio]"),this.$element.data("stellar-background-ratio")&&(b=b.add(this.$element)),b.each(function(){var b,g,h,i,j,k,l,o=a(this),p=n(o),q=0,r=0,s=0,t=0;if(o.data("stellar-backgroundIsActive")){if(o.data("stellar-backgroundIsActive")!==this)return}else o.data("stellar-backgroundIsActive",this);o.data("stellar-backgroundStartingLeft")?m(o,o.data("stellar-backgroundStartingLeft"),o.data("stellar-backgroundStartingTop")):(o.data("stellar-backgroundStartingLeft",p[0]),o.data("stellar-backgroundStartingTop",p[1])),h="auto"===o.css("margin-left")?0:parseInt(o.css("margin-left"),10),i="auto"===o.css("margin-top")?0:parseInt(o.css("margin-top"),10),j=o.offset().left-h-e,k=o.offset().top-i-f,o.parents().each(function(){var b=a(this);return b.data("stellar-offset-parent")===!0?(q=s,r=t,l=b,!1):(s+=b.position().left,void(t+=b.position().top))}),b=o.data("stellar-horizontal-offset")!==d?o.data("stellar-horizontal-offset"):l!==d&&l.data("stellar-horizontal-offset")!==d?l.data("stellar-horizontal-offset"):c.horizontalOffset,g=o.data("stellar-vertical-offset")!==d?o.data("stellar-vertical-offset"):l!==d&&l.data("stellar-vertical-offset")!==d?l.data("stellar-vertical-offset"):c.verticalOffset,c.backgrounds.push({$element:o,$offsetParent:l,isFixed:"fixed"===o.css("background-attachment"),horizontalOffset:b,verticalOffset:g,startingValueLeft:p[0],startingValueTop:p[1],startingBackgroundPositionLeft:isNaN(parseInt(p[0],10))?0:parseInt(p[0],10),startingBackgroundPositionTop:isNaN(parseInt(p[1],10))?0:parseInt(p[1],10),startingPositionLeft:o.position().left,startingPositionTop:o.position().top,startingOffsetLeft:j,startingOffsetTop:k,parentOffsetLeft:q,parentOffsetTop:r,stellarRatio:o.data("stellar-background-ratio")===d?1:o.data("stellar-background-ratio")})}))},_reset:function(){var a,b,c,d,e;for(e=this.particles.length-1;e>=0;e--)a=this.particles[e],b=a.$element.data("stellar-startingLeft"),c=a.$element.data("stellar-startingTop"),this._setPosition(a.$element,b,b,c,c),this.options.showElement(a.$element),a.$element.data("stellar-startingLeft",null).data("stellar-elementIsActive",null).data("stellar-backgroundIsActive",null);for(e=this.backgrounds.length-1;e>=0;e--)d=this.backgrounds[e],d.$element.data("stellar-backgroundStartingLeft",null).data("stellar-backgroundStartingTop",null),m(d.$element,d.startingValueLeft,d.startingValueTop)},destroy:function(){this._reset(),this.$scrollElement.unbind("resize."+this.name).unbind("scroll."+this.name),this._animationLoop=a.noop,a(b).unbind("load."+this.name).unbind("resize."+this.name)},_setOffsets:function(){var c=this,d=a(b);d.unbind("resize.horizontal-"+this.name).unbind("resize.vertical-"+this.name),"function"==typeof this.options.horizontalOffset?(this.horizontalOffset=this.options.horizontalOffset(),d.bind("resize.horizontal-"+this.name,function(){c.horizontalOffset=c.options.horizontalOffset()})):this.horizontalOffset=this.options.horizontalOffset,"function"==typeof this.options.verticalOffset?(this.verticalOffset=this.options.verticalOffset(),d.bind("resize.vertical-"+this.name,function(){c.verticalOffset=c.options.verticalOffset()})):this.verticalOffset=this.options.verticalOffset},_repositionElements:function(){var a,b,c,d,e,f,g,h,i,j,k=this._getScrollLeft(),l=this._getScrollTop(),n=!0,o=!0;if(this.currentScrollLeft!==k||this.currentScrollTop!==l||this.currentWidth!==this.viewportWidth||this.currentHeight!==this.viewportHeight){for(this.currentScrollLeft=k,this.currentScrollTop=l,this.currentWidth=this.viewportWidth,this.currentHeight=this.viewportHeight,j=this.particles.length-1;j>=0;j--)a=this.particles[j],b=a.isFixed?1:0,this.options.horizontalScrolling?(f=(k+a.horizontalOffset+this.viewportOffsetLeft+a.startingPositionLeft-a.startingOffsetLeft+a.parentOffsetLeft)*-(a.stellarRatio+b-1)+a.startingPositionLeft,h=f-a.startingPositionLeft+a.startingOffsetLeft):(f=a.startingPositionLeft,h=a.startingOffsetLeft),this.options.verticalScrolling?(g=(l+a.verticalOffset+this.viewportOffsetTop+a.startingPositionTop-a.startingOffsetTop+a.parentOffsetTop)*-(a.stellarRatio+b-1)+a.startingPositionTop,i=g-a.startingPositionTop+a.startingOffsetTop):(g=a.startingPositionTop,i=a.startingOffsetTop),this.options.hideDistantElements&&(o=!this.options.horizontalScrolling||h+a.width>(a.isFixed?0:k)&&h<(a.isFixed?0:k)+this.viewportWidth+this.viewportOffsetLeft,n=!this.options.verticalScrolling||i+a.height>(a.isFixed?0:l)&&i<(a.isFixed?0:l)+this.viewportHeight+this.viewportOffsetTop),o&&n?(a.isHidden&&(this.options.showElement(a.$element),a.isHidden=!1),this._setPosition(a.$element,f,a.startingPositionLeft,g,a.startingPositionTop)):a.isHidden||(this.options.hideElement(a.$element),a.isHidden=!0);for(j=this.backgrounds.length-1;j>=0;j--)c=this.backgrounds[j],b=c.isFixed?0:1,d=this.options.horizontalScrolling?(k+c.horizontalOffset-this.viewportOffsetLeft-c.startingOffsetLeft+c.parentOffsetLeft-c.startingBackgroundPositionLeft)*(b-c.stellarRatio)+"px":c.startingValueLeft,e=this.options.verticalScrolling?(l+c.verticalOffset-this.viewportOffsetTop-c.startingOffsetTop+c.parentOffsetTop-c.startingBackgroundPositionTop)*(b-c.stellarRatio)+"px":c.startingValueTop,m(c.$element,d,e)}},_handleScrollEvent:function(){var a=this,b=!1,c=function(){a._repositionElements(),b=!1},d=function(){b||(o(c),b=!0)};this.$scrollElement.bind("scroll."+this.name,d),d()},_startAnimationLoop:function(){var a=this;this._animationLoop=function(){o(a._animationLoop),a._repositionElements()},this._animationLoop()}},a.fn[f]=function(b){var c=arguments;return b===d||"object"==typeof b?this.each(function(){a.data(this,"plugin_"+f)||a.data(this,"plugin_"+f,new e(this,b))}):"string"==typeof b&&"_"!==b[0]&&"init"!==b?this.each(function(){var d=a.data(this,"plugin_"+f);d instanceof e&&"function"==typeof d[b]&&d[b].apply(d,Array.prototype.slice.call(c,1)),"destroy"===b&&a.data(this,"plugin_"+f,null)}):void 0},a[f]=function(){var c=a(b);return c.stellar.apply(c,Array.prototype.slice.call(arguments,0))},a[f].scrollProperty=h,a[f].positionProperty=i,b.Stellar=e}(jQuery,this,document);
--------------------------------------------------------------------------------
/js/common.js:
--------------------------------------------------------------------------------
1 | function my$(id){
2 | return document.getElementById(id);
3 | }
4 |
5 | function my$byTagName(tagname){
6 | return document.getElementsByTagName(tagname);
7 | }
8 |
9 | //设置文本内容
10 | function setInnerText(element,text){
11 | //判断element.textContent属性是否存在,如果不存在,说明我们的浏览器不是ie8,我们就使用innerText属性
12 | if(element.textContent == "undefined") {
13 | element.innerText = text;
14 | }
15 | //如果element.textContent存在,说明是ie8,就用textContent属性
16 | else{
17 | element.textContent = text;
18 | }
19 | }
20 |
21 | function getInnerText(element){
22 | //判断element.textContent属性是否存在,如果不存在,说明我们的浏览器不是ie8,我们就使用innerText属性
23 | if(element.textContent == "undefined") {
24 | return element.innerText;
25 | }
26 | //如果element.textContent存在,说明是ie8,就用textContent属性
27 | else{
28 | return element.textContent;
29 | }
30 | }
31 |
32 | //获取样式的兼容性的写法
33 | function getStyle(obj,attr){
34 | //IE
35 | if(obj.currentStyle) {
36 | return obj.currentStyle[attr];
37 | }
38 | //谷歌火狐
39 | else{
40 | return getComputedStyle(obj,false)[attr];
41 | }
42 | }
43 |
44 | //设置样式
45 | function css(obj,attr,value){
46 | if(arguments.length == 2){
47 | return getStyle(obj,attr);
48 | }
49 | else if(arguments.length == 3){
50 | obj.style[attr] = value;
51 | }
52 | }
53 |
54 | //获取第一个元素节点
55 | function getFirstElementChild(element){
56 | //如果是火狐谷歌
57 | if(element.firstElementChild){
58 | return element.firstElementChild;
59 | }
60 | //ie 8
61 | else{
62 | var node = element.firstChild;
63 | while(node && node.nodeType!=1){
64 | node = node.nextSibling;
65 | }
66 | return node;
67 | }
68 | }
69 |
70 | //获取最后一个元素
71 | function getLastElementChild(element) {
72 | if(element.lastElementChild){//true--->支持
73 | return element.lastElementChild;
74 | }else{
75 | var node=element.lastChild;//第一个节点
76 | while (node&&node.nodeType!=1){
77 | node=node.previousSibling;
78 | }
79 | return node;
80 | }
81 | }
82 |
83 |
84 | //绑定事件的代码封装
85 | function addEventListener(element,type,fn){
86 | //如果有addEventListener这个方法,说明是谷歌、火狐、ie11
87 | if(element.addEventListener){
88 | element.addEventListener(type,fn,false);
89 | }
90 | //IE 8
91 | else if(element.attachEvent){
92 | element.attachEvent("on"+type,fn);
93 | }
94 | //正常情况
95 | else {
96 | element["on" + type] = fn;
97 | }
98 | }
99 |
100 | function removeEventListener(element,type,fn){
101 | //如果是火狐、谷歌、IE11
102 | if(element.removeEventListener){
103 | element.removeEventListener(type,fn,false);
104 | }
105 | else if(element.detachEvent){
106 | element.detachEvent("on"+type,fn);
107 | }
108 | else{
109 | element["on" + type] = null;
110 | }
111 | }
112 |
113 | //得到滚动出去的位置
114 | function getScroll(){
115 | var scrollTop = document.body.scrollTop||document.documentElement.scrollTop;
116 | var scrollLeft = document.body.scrollLeft||document.documentElement.scrollLeft;
117 | return {
118 | scrollTop:scrollTop,
119 | scrollLeft:scrollLeft
120 | }
121 | }
122 |
123 | //得到鼠标在页面中的位置
124 | function getPage(e){
125 | var oev = e||window.event;
126 | //pageX = 可视区的位置 + 左边滚动出去的位置
127 | var pageX = oev.clientX + getScroll().scrollLeft;
128 | var pageY = oev.clientY + getScroll().scrollTop;
129 | return {
130 | pageX:pageX,
131 | pageY:pageY
132 | }
133 | }
134 |
135 | //获取到url中的参数信息
136 | function getQuery(queryStr) {
137 | var query = {};
138 | if (queryStr.indexOf('?') > -1) {
139 | var index = queryStr.indexOf('?');
140 | queryStr = queryStr.substr(index + 1);
141 | var array = queryStr.split('&');
142 | for (var i = 0; i < array.length; i++) {
143 | var tmpArr = array[i].split('=');
144 | if (tmpArr.length === 2) {
145 | query[tmpArr[0]] = tmpArr[1];
146 | }
147 | }
148 | }
149 | return query;
150 | }
151 |
152 |
153 | //动画函数的初步封装
154 | function animate(element,target){
155 | //1.先获取原来的值
156 | var current = element.offsetLeft;
157 |
158 | //2.先判断定时器有没有,如果有了就先终止定时器,再去开定时器
159 | if(element.timeid){
160 | clearInterval(element.timeid);
161 | element.timeid = null;
162 | }
163 | //3.开启定时器
164 | element.timeid = setInterval(function(){
165 | var step = 10;
166 | //目标值是 10
167 | //当前值是 390
168 | if(target - current < 0){
169 | step = -step;
170 | }
171 |
172 | if(Math.abs(target - current) < Math.abs(step)){
173 | element.style.left = target + "px";
174 | clearInterval(element.timeid);
175 | return;
176 | }
177 |
178 | current += step;
179 | element.style.left = current + "px";
180 | },10);
181 | }
182 |
183 | // element 哪个元素需要动画
184 | // json 包含所有需要进行动画的属性 {"width": 400, "height": 500, "left": 500, "top": 80, "opacity": 0.2};
185 | // fn 动画完成之后回调函数
186 | function animate(element, json, fn) {
187 | clearInterval(element.timeId);//清理定时器
188 | //定时器,返回的是定时器的id
189 | element.timeId = setInterval(function () {
190 | var flag = true;//默认,假设,全部到达目标
191 | //遍历json对象中的每个属性还有属性对应的目标值
192 | for (var attr in json) {
193 | //判断这个属性attr中是不是opacity
194 | if (attr == "opacity") {
195 | //获取元素的当前的透明度,当前的透明度放大100倍
196 | var current = getStyle(element, attr) * 100;
197 | //目标的透明度放大100倍
198 | var target = json[attr] * 100;
199 | var step = (target - current) / 10;
200 |
201 | //8.5 ---> 9
202 | //-8.5 ---> -9
203 | step = step > 0 ? Math.ceil(step) : Math.floor(step);
204 | if (Math.abs(current - target) <= Math.abs(step)){
205 | // 让定时器停止
206 | // 让盒子到target的位置
207 | element.style[attr] = target / 100;
208 | }
209 | else{
210 | current += step;//移动后的值
211 | element.style[attr] = current / 100;
212 | }
213 | } else if (attr == "zIndex") { //判断这个属性attr中是不是zIndex
214 | //层级改变就是直接改变这个属性的值
215 | element.style[attr] = json[attr];
216 | } else {
217 | //普通的属性
218 | //获取元素这个属性的当前的值
219 | var current = Math.ceil(parseFloat(getStyle(element, attr)));
220 | //var current = parseInt(getStyle(element, attr));
221 | //当前的属性对应的目标值
222 | var target = json[attr];
223 | //移动的步数
224 | var step = (target - current) / 10;
225 | step = step > 0 ? Math.ceil(step) : Math.floor(step);
226 | if (Math.abs(current - target) <= Math.abs(step)){
227 | // 让定时器停止
228 | // 让盒子到target的位置
229 | element.style[attr] = target + 'px';
230 | }
231 | else{
232 | current += step;//移动后的值
233 | element.style[attr] = current + "px";
234 | }
235 | }
236 | //测试代码
237 | //console.log("目标:" + target + ",当前:" + current + ",每次的移动步数:" + step);
238 | //是否到达目标
239 | if (current != target) {
240 | flag = false;
241 | }
242 | }
243 | if (flag) {
244 | //清理定时器
245 | clearInterval(element.timeId);
246 | //所有的属性到达目标才能使用这个函数,前提是用户传入了这个函数
247 | if (fn) {
248 | fn();
249 | }
250 | }
251 | }, 20);
252 | }
253 |
254 |
255 | //得到浏览器的若干信息
256 | function getUserAgent(){
257 | var browser = {
258 | versions: function() {
259 | var u = navigator.userAgent, app = navigator.appVersion;
260 | return { //移动终端浏览器版本信息
261 | trident: u.indexOf('Trident') > -1, //IE内核
262 | presto: u.indexOf('Presto') > -1, //opera内核
263 | webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
264 | gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
265 | mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
266 | ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
267 | android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
268 | iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
269 | iPad: u.indexOf('iPad') > -1, //是否iPad
270 | webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
271 | };
272 | } (),
273 | language: (navigator.browserLanguage || navigator.language).toLowerCase()
274 | }
275 | return browser;
276 | }
277 |
278 | function getDates(dt) {
279 | var str = "";//存储时间的字符串
280 | //获取年
281 | var year = dt.getFullYear();
282 | //获取月
283 | var month = dt.getMonth() + 1;
284 | //获取日
285 | var day = dt.getDate();
286 | //获取小时
287 | var hour = dt.getHours();
288 | //获取分钟
289 | var min = dt.getMinutes();
290 | //获取秒
291 | var sec = dt.getSeconds();
292 | month = month < 10 ? "0" + month : month;
293 | day = day < 10 ? "0" + day : day;
294 | hour = hour < 10 ? "0" + hour : hour;
295 | min = min < 10 ? "0" + min : min;
296 | sec = sec < 10 ? "0" + sec : sec;
297 | str = year + "年" + month + "月" + day + "日 " + hour + ":" + min + ":" + sec;
298 | return str;
299 | }
300 |
301 |
302 | /**
303 | * 获取父级元素中的第一个子元素
304 | * @param element 父级元素
305 | * @returns {*} 父级元素中的子级元素
306 | */
307 | function getFirstElement(element) {
308 | if (element.firstElementChild) {
309 | return element.firstElementChild;
310 | } else {
311 | var node = element.firstChild;
312 | while (node && node.nodeType != 1) {
313 | node = node.nextSibling;
314 | }
315 | return node;
316 | }
317 | }
318 | /**
319 | * 获取父级元素中的最后一个子元素
320 | * @param element 父级元素
321 | * @returns {*} 最后一个子元素
322 | */
323 | function getLastElement(element) {
324 | if (element.lastElementChild) {
325 | return element.lastElementChild;
326 | } else {
327 | var node = element.lastChild;
328 | while (node && node.nodeType != 1) {
329 | node = node.previousSibling;
330 | }
331 | return node;
332 | }
333 | }
334 | /**
335 | * 获取某个元素的前一个兄弟元素
336 | * @param element 某个元素
337 | * @returns {*} 前一个兄弟元素
338 | */
339 | function getPreviousElement(element) {
340 | if (element.previousElementSibling) {
341 | return element.previousElementSibling
342 | } else {
343 | var node = element.previousSibling;
344 | while (node && node.nodeType != 1) {
345 | node = node.previousSibling;
346 | }
347 | return node;
348 | }
349 | }
350 | /**
351 | * 获取某个元素的后一个兄弟元素
352 | * @param element 某个元素
353 | * @returns {*} 后一个兄弟元素
354 | */
355 | function getNextElement(element) {
356 | if (element.nextElementSibling) {
357 | return element.nextElementSibling
358 | } else {
359 | var node = element.nextSibling;
360 | while (node && node.nodeType != 1) {
361 | node = node.nextSibling;
362 | }
363 | return node;
364 | }
365 | }
366 |
367 | /**
368 | * 获取某个元素的所有兄弟元素
369 | * @param element 某个元素
370 | * @returns {Array} 兄弟元素
371 | */
372 | function getSiblings(element) {
373 | if (!element)return;
374 | var elements = [];
375 | var ele = element.previousSibling;
376 | while (ele) {
377 | if (ele.nodeType === 1) {
378 | elements.push(ele);
379 | }
380 | ele = ele.previousSibling;
381 | }
382 | ele = element.nextSibling;
383 | while (ele) {
384 | if (ele.nodeType === 1) {
385 | elements.push(ele);
386 |
387 | }
388 | ele = ele.nextSibling;
389 | }
390 | return elements;
391 | }
--------------------------------------------------------------------------------
/js/circlr.js:
--------------------------------------------------------------------------------
1 | // Circlr © 2014-2015 Andrey Polischuk
2 | // github.com/andrepolischuk/circlr
3 |
4 | !function() {
5 |
6 | 'use strict';
7 |
8 | /**
9 | * Mutable parameters
10 | */
11 |
12 | var mutable = [
13 | 'vertical',
14 | 'reverse',
15 | 'cycle',
16 | 'speed',
17 | 'playSpeed'
18 | ];
19 |
20 | /**
21 | * Initialize module
22 | * @param {Object} el
23 | * @param {Object} options
24 | */
25 |
26 | function Circlr(options) {
27 |
28 | /**
29 | * Mouse events enabled
30 | */
31 |
32 | options.mouse = options.mouse || true;
33 |
34 | /**
35 | * Scroll events enabled
36 | */
37 |
38 | options.scroll = options.scroll || false;
39 |
40 | /**
41 | * Orientation
42 | */
43 |
44 | options.vertical = options.vertical || false;
45 |
46 | /**
47 | * Turning reverse
48 | */
49 |
50 | options.reverse = options.reverse || false;
51 |
52 | /**
53 | * Turning cycle
54 | */
55 |
56 | options.cycle = options.cycle || true;
57 |
58 | /**
59 | * Start frame
60 | */
61 |
62 | options.start = options.start || 0;
63 |
64 | /**
65 | * Turn speed (ms)
66 | */
67 |
68 | options.speed = options.speed || 50;
69 |
70 | /**
71 | * Autoplay
72 | */
73 |
74 | var autoplay = options.autoplay || false;
75 |
76 | /**
77 | * Play speed (ms)
78 | */
79 |
80 | options.playSpeed = options.playSpeed || 100;
81 |
82 | /**
83 | * DOM element
84 | */
85 |
86 | var el = this.el = options.element;
87 |
88 | /**
89 | * Exclude duplication
90 | */
91 |
92 | el.setAttribute('data-circlr', true);
93 |
94 | /**
95 | * DOM loader
96 | */
97 |
98 | var loader = options.loader ? document.getElementById(options.loader) : undefined;
99 |
100 | /**
101 | * Frames length
102 | */
103 |
104 | var length = this.length = el.getElementsByTagName('img').length;
105 |
106 | /**
107 | * Frames area height
108 | */
109 |
110 | var height = options.height || undefined;
111 |
112 | /**
113 | * Frames area width
114 | */
115 |
116 | var width = options.width || undefined;
117 |
118 | /**
119 | * Move enable
120 | */
121 |
122 | var movable = false;
123 |
124 | /**
125 | * Loaded images length
126 | */
127 |
128 | var loaded = [];
129 |
130 | /**
131 | * Not loaded length
132 | */
133 |
134 | var errored = [];
135 |
136 | /**
137 | * Current frame
138 | */
139 |
140 | var current;
141 |
142 | /**
143 | * Prevous options
144 | */
145 |
146 | var pre = {};
147 |
148 | pre.Y = null;
149 | pre.X = null;
150 | pre.frame = 0;
151 |
152 | /**
153 | * Callbacks
154 | */
155 |
156 | var callbacks = {};
157 |
158 | // all images loaded callback
159 | callbacks.ready = options.ready || undefined;
160 |
161 | // turn callback
162 | callbacks.change = options.change || undefined;
163 |
164 | /**
165 | * Scroll events
166 | */
167 |
168 | var scrollEvents = [
169 | 'wheel',
170 | 'mousewheel',
171 | 'scroll',
172 | 'DOMMouseScroll'
173 | ];
174 |
175 | /**
176 | * Add event listener
177 | * @param {Object} target
178 | * @param {String} event
179 | * @param {Function} fn
180 | * @api private
181 | */
182 |
183 | function onEventListener(target, event, fn) {
184 |
185 | if (target.addEventListener) {
186 | target.addEventListener(event, fn, false);
187 | } else {
188 | target.attachEvent('on' + event, function() {
189 | fn.call(target, window.event);
190 | });
191 | }
192 |
193 | }
194 |
195 | /**
196 | * Prevent default
197 | * @param {Object} e
198 | */
199 |
200 | function preventDefault(e) {
201 |
202 | if (e.preventDefault) {
203 | e.preventDefault();
204 | } else {
205 | e.returnValue = false;
206 | }
207 |
208 | }
209 |
210 | /**
211 | * Pre moving event
212 | * @param {Object} e
213 | * @api private
214 | */
215 |
216 | function preMove(e) {
217 |
218 | autoplay = false;
219 |
220 | preventDefault(e);
221 | e = e.type === 'touchstart' ? e.changedTouches[0] : e;
222 |
223 | movable = true;
224 |
225 | if (options.vertical) {
226 | pre.Y = e.clientY - el.offsetTop;
227 | } else {
228 | pre.X = e.clientX - el.offsetLeft;
229 | }
230 |
231 | }
232 |
233 | /**
234 | * Normalize current frame
235 | * @param {Number} cur
236 | * @return {Number}
237 | * @api private
238 | */
239 |
240 | function normalize(cur) {
241 |
242 | if (cur < 0) {
243 | cur = options.cycle ? cur + length : 0;
244 | } else if (cur > length - 1) {
245 | cur = options.cycle ? cur - length : length - 1;
246 | }
247 |
248 | return cur;
249 |
250 | }
251 |
252 | /**
253 | * Moving event
254 | * @param {Object} e
255 | * @api private
256 | */
257 |
258 | function isMove(e) {
259 |
260 | if (movable) {
261 |
262 | preventDefault(e);
263 | e = e.type === 'touchmove' ? e.changedTouches[0] : e;
264 |
265 | // current offset (px)
266 | var offset = (options.vertical) ? ((e.clientY - el.offsetTop) - pre.Y) : ((e.clientX - el.offsetLeft) - pre.X);
267 | offset = options.reverse ? -offset : offset;
268 |
269 | // frame step (px)
270 | var step = width / length;
271 |
272 | // prevous frame
273 | var previous = current;
274 |
275 | // current offset (frame)
276 | offset = Math.floor(offset / step);
277 |
278 | if (offset !== current) {
279 |
280 | current = normalize(pre.frame + offset);
281 |
282 | if (previous !== current) {
283 |
284 | // show current frame
285 | el.getElementsByTagName('img')[previous].style.display = 'none';
286 | el.getElementsByTagName('img')[current].style.display = 'block';
287 |
288 | if (typeof callbacks.change === 'function') {
289 | callbacks.change(current, length);
290 | }
291 |
292 | }
293 |
294 | }
295 |
296 | }
297 |
298 | }
299 |
300 | /**
301 | * Post moving event
302 | * @param {Object} e
303 | * @api private
304 | */
305 |
306 | function stopMove(e) {
307 |
308 | preventDefault(e);
309 |
310 | movable = false;
311 | pre.frame = current;
312 |
313 | }
314 |
315 | /**
316 | * Moving via scroll
317 | * @param {Object} e
318 | * @api private
319 | */
320 |
321 | function scrollMove(e) {
322 |
323 | autoplay = false;
324 |
325 | preventDefault(e);
326 |
327 | // scroll delta
328 | var delta = e.deltaY || e.detail || (-e.wheelDelta);
329 | delta = delta / Math.abs(delta);
330 | delta = options.reverse ? -delta : delta;
331 |
332 | current = normalize(current + delta);
333 |
334 | // show current frame
335 | el.getElementsByTagName('img')[pre.frame].style.display = 'none';
336 | el.getElementsByTagName('img')[current].style.display = 'block';
337 |
338 | pre.frame = current;
339 |
340 | if (typeof callbacks.change === 'function') {
341 | callbacks.change(current, length);
342 | }
343 |
344 | }
345 |
346 | /**
347 | * Initialize events after success images loading
348 | * @api private
349 | */
350 |
351 | function initEvents() {
352 |
353 | // loader hide
354 | if (loader) {
355 | loader.style.display = 'none';
356 | }
357 |
358 | if (errored.length === 0) {
359 |
360 | var start = normalize(options.start);
361 |
362 | // all images loaded
363 | el.getElementsByTagName('img')[start].style.display = 'block';
364 | current = start;
365 |
366 | el.style.position = 'relative';
367 | el.style.width = '100%';
368 |
369 | if ('ontouchstart' in window || 'onmsgesturechange' in window) {
370 |
371 | if (options.mouse || options.scroll) {
372 | onEventListener(el, 'touchstart', preMove);
373 | onEventListener(el, 'touchmove', isMove);
374 | onEventListener(el, 'touchend', stopMove);
375 | }
376 |
377 | } else {
378 |
379 | if (options.mouse) {
380 | onEventListener(el, 'mousedown', preMove);
381 | onEventListener(el, 'mousemove', isMove);
382 | onEventListener(document, 'mouseup', stopMove);
383 | }
384 |
385 | if (options.scroll) {
386 | for (var e = 0; e < scrollEvents.length; e++) {
387 | if ('on' + scrollEvents[e] in window) {
388 | onEventListener(el, scrollEvents[e], scrollMove);
389 | break;
390 | }
391 | }
392 | }
393 |
394 | }
395 |
396 | if (autoplay) {
397 | play();
398 | }
399 |
400 | }
401 |
402 | if (typeof callbacks.ready === 'function') {
403 | callbacks.ready(errored);
404 | }
405 |
406 | }
407 |
408 | /**
409 | * Initialize images events
410 | * @param {Object} img
411 | */
412 |
413 | function loadImagesEvents(img) {
414 |
415 | img.onload = function() {
416 |
417 | loaded.push(this.src);
418 |
419 | // show first frame when all images loaded
420 | if (loaded.length + errored.length === length) {
421 | initEvents();
422 | }
423 |
424 | };
425 |
426 | img.onerror = function() {
427 |
428 | errored.push(this.src);
429 |
430 | // show first frame when images loaded
431 | if (loaded.length + errored.length === length) {
432 | initEvents();
433 | }
434 |
435 | };
436 |
437 | img.onreadystatechange = function() {
438 | this.onload();
439 | };
440 |
441 | }
442 |
443 | /**
444 | * Load Object images
445 | * @api private
446 | */
447 |
448 | function loadImages() {
449 |
450 | // adding elements
451 | var img;
452 |
453 | // show loader
454 | if (loader) {
455 | loader.style.display = 'block';
456 | }
457 |
458 | for (var i = 0; i < length; i++) {
459 |
460 | // get object
461 | img = el.getElementsByTagName('img')[i];
462 |
463 | // set object style
464 | img.style.display = 'none';
465 | img.style.width = '100%';
466 |
467 | // set object options
468 | img.setAttribute('src', img.getAttribute('data-src'));
469 | img.setAttribute('data-index', i);
470 | img.removeAttribute('data-src');
471 |
472 | loadImagesEvents(img);
473 |
474 | }
475 |
476 | // check elements sizes
477 | height = height || el.clientHeight;
478 | width = width || el.clientWidth;
479 |
480 | }
481 |
482 | /**
483 | * Initialize loading
484 | */
485 |
486 | loadImages();
487 |
488 | /**
489 | * Change current frame
490 | * @param {Number} i
491 | * @api private
492 | */
493 |
494 | function setFrame(i) {
495 |
496 | el.getElementsByTagName('img')[current].style.display = 'none';
497 | el.getElementsByTagName('img')[i].style.display = 'block';
498 |
499 | pre.frame = current = i;
500 |
501 | }
502 |
503 | /**
504 | * Turn to specific frame
505 | * @param {Number} i
506 | * @api public
507 | */
508 |
509 | var turn = this.turn = function(i) {
510 |
511 | i = normalize(i);
512 | autoplay = true;
513 |
514 | (function turnInterval() {
515 |
516 | if (i !== current && autoplay) {
517 |
518 | setFrame(normalize(i < current ? current - 1 : current + 1));
519 | setTimeout(turnInterval, typeof i === 'undefined' ? options.playSpeed : options.speed);
520 |
521 | } else if (i === current) {
522 |
523 | pre.frame = current = i;
524 | autoplay = false;
525 |
526 | if (typeof callbacks.change === 'function') {
527 | callbacks.change(current, length);
528 | }
529 |
530 | }
531 |
532 | })();
533 |
534 | };
535 |
536 | /**
537 | * Go to specific frame
538 | * @param {Number} i
539 | * @api public
540 | */
541 |
542 | this.go = function(i) {
543 |
544 | if (i !== current) {
545 |
546 | setFrame(i);
547 |
548 | if (typeof callbacks.change === 'function') {
549 | callbacks.change(current, length);
550 | }
551 |
552 | }
553 |
554 | };
555 |
556 | /**
557 | * Play sequence
558 | * @api public
559 | */
560 |
561 | var play = this.play = function() {
562 | autoplay = true;
563 | turn();
564 | };
565 |
566 | /**
567 | * Stop sequence playng
568 | * @api public
569 | */
570 |
571 | this.stop = function() {
572 | autoplay = false;
573 | };
574 |
575 | /**
576 | * Show object
577 | * @api public
578 | */
579 |
580 | this.show = function() {
581 | el.style.display = 'block';
582 | };
583 |
584 | /**
585 | * Hide object
586 | * @api public
587 | */
588 |
589 | this.hide = function() {
590 | el.style.display = 'none';
591 | };
592 |
593 | /**
594 | * Change Object options
595 | * @param {Object} options
596 | * @api public
597 | */
598 |
599 | this.set = function(set) {
600 | for (var i = 0, key; i < mutable.length; i++) {
601 | key = mutable[i];
602 | options[key] = typeof set[key] !== 'undefined' ? set[key] : options[key];
603 | }
604 | };
605 |
606 | }
607 |
608 | /**
609 | * Example creator
610 | */
611 |
612 | function Creator(element, options) {
613 |
614 | element = document.getElementById(element);
615 |
616 | if (element.getAttribute('data-circlr')) {
617 | return;
618 | }
619 |
620 | options = options || {};
621 | options.element = element;
622 |
623 | return new Circlr(options);
624 |
625 | }
626 |
627 | /**
628 | * Module exports
629 | */
630 |
631 | if (typeof define === 'function' && define.amd) {
632 |
633 | define([], function() {
634 | return Creator;
635 | });
636 |
637 | } else if (typeof module !== 'undefined' && module.exports) {
638 |
639 | module.exports = Creator;
640 |
641 | } else {
642 |
643 | this.circlr = Creator;
644 |
645 | }
646 |
647 | }.call(this);
648 |
--------------------------------------------------------------------------------
/js/jquery.color.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery Color Animations v@VERSION
3 | * https://github.com/jquery/jquery-color
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * Date: @DATE
10 | */
11 | (function( jQuery, undefined ) {
12 |
13 | var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
14 |
15 | // plusequals test for += 100 -= 100
16 | rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
17 | // a set of RE's that can match strings and generate color tuples.
18 | stringParsers = [{
19 | re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
20 | parse: function( execResult ) {
21 | return [
22 | execResult[ 1 ],
23 | execResult[ 2 ],
24 | execResult[ 3 ],
25 | execResult[ 4 ]
26 | ];
27 | }
28 | }, {
29 | re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
30 | parse: function( execResult ) {
31 | return [
32 | execResult[ 1 ] * 2.55,
33 | execResult[ 2 ] * 2.55,
34 | execResult[ 3 ] * 2.55,
35 | execResult[ 4 ]
36 | ];
37 | }
38 | }, {
39 | // this regex ignores A-F because it's compared against an already lowercased string
40 | re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
41 | parse: function( execResult ) {
42 | return [
43 | parseInt( execResult[ 1 ], 16 ),
44 | parseInt( execResult[ 2 ], 16 ),
45 | parseInt( execResult[ 3 ], 16 )
46 | ];
47 | }
48 | }, {
49 | // this regex ignores A-F because it's compared against an already lowercased string
50 | re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
51 | parse: function( execResult ) {
52 | return [
53 | parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
54 | parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
55 | parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
56 | ];
57 | }
58 | }, {
59 | re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
60 | space: "hsla",
61 | parse: function( execResult ) {
62 | return [
63 | execResult[ 1 ],
64 | execResult[ 2 ] / 100,
65 | execResult[ 3 ] / 100,
66 | execResult[ 4 ]
67 | ];
68 | }
69 | }],
70 |
71 | // jQuery.Color( )
72 | color = jQuery.Color = function( color, green, blue, alpha ) {
73 | return new jQuery.Color.fn.parse( color, green, blue, alpha );
74 | },
75 | spaces = {
76 | rgba: {
77 | props: {
78 | red: {
79 | idx: 0,
80 | type: "byte"
81 | },
82 | green: {
83 | idx: 1,
84 | type: "byte"
85 | },
86 | blue: {
87 | idx: 2,
88 | type: "byte"
89 | }
90 | }
91 | },
92 |
93 | hsla: {
94 | props: {
95 | hue: {
96 | idx: 0,
97 | type: "degrees"
98 | },
99 | saturation: {
100 | idx: 1,
101 | type: "percent"
102 | },
103 | lightness: {
104 | idx: 2,
105 | type: "percent"
106 | }
107 | }
108 | }
109 | },
110 | propTypes = {
111 | "byte": {
112 | floor: true,
113 | max: 255
114 | },
115 | "percent": {
116 | max: 1
117 | },
118 | "degrees": {
119 | mod: 360,
120 | floor: true
121 | }
122 | },
123 | support = color.support = {},
124 |
125 | // element for support tests
126 | supportElem = jQuery( "" )[ 0 ],
127 |
128 | // colors = jQuery.Color.names
129 | colors,
130 |
131 | // local aliases of functions called often
132 | each = jQuery.each;
133 |
134 | // determine rgba support immediately
135 | supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
136 | support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
137 |
138 | // define cache name and alpha properties
139 | // for rgba and hsla spaces
140 | each( spaces, function( spaceName, space ) {
141 | space.cache = "_" + spaceName;
142 | space.props.alpha = {
143 | idx: 3,
144 | type: "percent",
145 | def: 1
146 | };
147 | });
148 |
149 | function clamp( value, prop, allowEmpty ) {
150 | var type = propTypes[ prop.type ] || {};
151 |
152 | if ( value == null ) {
153 | return (allowEmpty || !prop.def) ? null : prop.def;
154 | }
155 |
156 | // ~~ is an short way of doing floor for positive numbers
157 | value = type.floor ? ~~value : parseFloat( value );
158 |
159 | // IE will pass in empty strings as value for alpha,
160 | // which will hit this case
161 | if ( isNaN( value ) ) {
162 | return prop.def;
163 | }
164 |
165 | if ( type.mod ) {
166 | // we add mod before modding to make sure that negatives values
167 | // get converted properly: -10 -> 350
168 | return (value + type.mod) % type.mod;
169 | }
170 |
171 | // for now all property types without mod have min and max
172 | return 0 > value ? 0 : type.max < value ? type.max : value;
173 | }
174 |
175 | function stringParse( string ) {
176 | var inst = color(),
177 | rgba = inst._rgba = [];
178 |
179 | string = string.toLowerCase();
180 |
181 | each( stringParsers, function( i, parser ) {
182 | var parsed,
183 | match = parser.re.exec( string ),
184 | values = match && parser.parse( match ),
185 | spaceName = parser.space || "rgba";
186 |
187 | if ( values ) {
188 | parsed = inst[ spaceName ]( values );
189 |
190 | // if this was an rgba parse the assignment might happen twice
191 | // oh well....
192 | inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
193 | rgba = inst._rgba = parsed._rgba;
194 |
195 | // exit each( stringParsers ) here because we matched
196 | return false;
197 | }
198 | });
199 |
200 | // Found a stringParser that handled it
201 | if ( rgba.length ) {
202 |
203 | // if this came from a parsed string, force "transparent" when alpha is 0
204 | // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
205 | if ( rgba.join() === "0,0,0,0" ) {
206 | jQuery.extend( rgba, colors.transparent );
207 | }
208 | return inst;
209 | }
210 |
211 | // named colors
212 | return colors[ string ];
213 | }
214 |
215 | color.fn = jQuery.extend( color.prototype, {
216 | parse: function( red, green, blue, alpha ) {
217 | if ( red === undefined ) {
218 | this._rgba = [ null, null, null, null ];
219 | return this;
220 | }
221 | if ( red.jquery || red.nodeType ) {
222 | red = jQuery( red ).css( green );
223 | green = undefined;
224 | }
225 |
226 | var inst = this,
227 | type = jQuery.type( red ),
228 | rgba = this._rgba = [];
229 |
230 | // more than 1 argument specified - assume ( red, green, blue, alpha )
231 | if ( green !== undefined ) {
232 | red = [ red, green, blue, alpha ];
233 | type = "array";
234 | }
235 |
236 | if ( type === "string" ) {
237 | return this.parse( stringParse( red ) || colors._default );
238 | }
239 |
240 | if ( type === "array" ) {
241 | each( spaces.rgba.props, function( key, prop ) {
242 | rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
243 | });
244 | return this;
245 | }
246 |
247 | if ( type === "object" ) {
248 | if ( red instanceof color ) {
249 | each( spaces, function( spaceName, space ) {
250 | if ( red[ space.cache ] ) {
251 | inst[ space.cache ] = red[ space.cache ].slice();
252 | }
253 | });
254 | } else {
255 | each( spaces, function( spaceName, space ) {
256 | var cache = space.cache;
257 | each( space.props, function( key, prop ) {
258 |
259 | // if the cache doesn't exist, and we know how to convert
260 | if ( !inst[ cache ] && space.to ) {
261 |
262 | // if the value was null, we don't need to copy it
263 | // if the key was alpha, we don't need to copy it either
264 | if ( key === "alpha" || red[ key ] == null ) {
265 | return;
266 | }
267 | inst[ cache ] = space.to( inst._rgba );
268 | }
269 |
270 | // this is the only case where we allow nulls for ALL properties.
271 | // call clamp with alwaysAllowEmpty
272 | inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
273 | });
274 |
275 | // everything defined but alpha?
276 | if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
277 | // use the default of 1
278 | inst[ cache ][ 3 ] = 1;
279 | if ( space.from ) {
280 | inst._rgba = space.from( inst[ cache ] );
281 | }
282 | }
283 | });
284 | }
285 | return this;
286 | }
287 | },
288 | is: function( compare ) {
289 | var is = color( compare ),
290 | same = true,
291 | inst = this;
292 |
293 | each( spaces, function( _, space ) {
294 | var localCache,
295 | isCache = is[ space.cache ];
296 | if (isCache) {
297 | localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
298 | each( space.props, function( _, prop ) {
299 | if ( isCache[ prop.idx ] != null ) {
300 | same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
301 | return same;
302 | }
303 | });
304 | }
305 | return same;
306 | });
307 | return same;
308 | },
309 | _space: function() {
310 | var used = [],
311 | inst = this;
312 | each( spaces, function( spaceName, space ) {
313 | if ( inst[ space.cache ] ) {
314 | used.push( spaceName );
315 | }
316 | });
317 | return used.pop();
318 | },
319 | transition: function( other, distance ) {
320 | var end = color( other ),
321 | spaceName = end._space(),
322 | space = spaces[ spaceName ],
323 | startColor = this.alpha() === 0 ? color( "transparent" ) : this,
324 | start = startColor[ space.cache ] || space.to( startColor._rgba ),
325 | result = start.slice();
326 |
327 | end = end[ space.cache ];
328 | each( space.props, function( key, prop ) {
329 | var index = prop.idx,
330 | startValue = start[ index ],
331 | endValue = end[ index ],
332 | type = propTypes[ prop.type ] || {};
333 |
334 | // if null, don't override start value
335 | if ( endValue === null ) {
336 | return;
337 | }
338 | // if null - use end
339 | if ( startValue === null ) {
340 | result[ index ] = endValue;
341 | } else {
342 | if ( type.mod ) {
343 | if ( endValue - startValue > type.mod / 2 ) {
344 | startValue += type.mod;
345 | } else if ( startValue - endValue > type.mod / 2 ) {
346 | startValue -= type.mod;
347 | }
348 | }
349 | result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
350 | }
351 | });
352 | return this[ spaceName ]( result );
353 | },
354 | blend: function( opaque ) {
355 | // if we are already opaque - return ourself
356 | if ( this._rgba[ 3 ] === 1 ) {
357 | return this;
358 | }
359 |
360 | var rgb = this._rgba.slice(),
361 | a = rgb.pop(),
362 | blend = color( opaque )._rgba;
363 |
364 | return color( jQuery.map( rgb, function( v, i ) {
365 | return ( 1 - a ) * blend[ i ] + a * v;
366 | }));
367 | },
368 | toRgbaString: function() {
369 | var prefix = "rgba(",
370 | rgba = jQuery.map( this._rgba, function( v, i ) {
371 | return v == null ? ( i > 2 ? 1 : 0 ) : v;
372 | });
373 |
374 | if ( rgba[ 3 ] === 1 ) {
375 | rgba.pop();
376 | prefix = "rgb(";
377 | }
378 |
379 | return prefix + rgba.join() + ")";
380 | },
381 | toHslaString: function() {
382 | var prefix = "hsla(",
383 | hsla = jQuery.map( this.hsla(), function( v, i ) {
384 | if ( v == null ) {
385 | v = i > 2 ? 1 : 0;
386 | }
387 |
388 | // catch 1 and 2
389 | if ( i && i < 3 ) {
390 | v = Math.round( v * 100 ) + "%";
391 | }
392 | return v;
393 | });
394 |
395 | if ( hsla[ 3 ] === 1 ) {
396 | hsla.pop();
397 | prefix = "hsl(";
398 | }
399 | return prefix + hsla.join() + ")";
400 | },
401 | toHexString: function( includeAlpha ) {
402 | var rgba = this._rgba.slice(),
403 | alpha = rgba.pop();
404 |
405 | if ( includeAlpha ) {
406 | rgba.push( ~~( alpha * 255 ) );
407 | }
408 |
409 | return "#" + jQuery.map( rgba, function( v ) {
410 |
411 | // default to 0 when nulls exist
412 | v = ( v || 0 ).toString( 16 );
413 | return v.length === 1 ? "0" + v : v;
414 | }).join("");
415 | },
416 | toString: function() {
417 | return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
418 | }
419 | });
420 | color.fn.parse.prototype = color.fn;
421 |
422 | // hsla conversions adapted from:
423 | // https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
424 |
425 | function hue2rgb( p, q, h ) {
426 | h = ( h + 1 ) % 1;
427 | if ( h * 6 < 1 ) {
428 | return p + (q - p) * h * 6;
429 | }
430 | if ( h * 2 < 1) {
431 | return q;
432 | }
433 | if ( h * 3 < 2 ) {
434 | return p + (q - p) * ((2/3) - h) * 6;
435 | }
436 | return p;
437 | }
438 |
439 | spaces.hsla.to = function ( rgba ) {
440 | if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
441 | return [ null, null, null, rgba[ 3 ] ];
442 | }
443 | var r = rgba[ 0 ] / 255,
444 | g = rgba[ 1 ] / 255,
445 | b = rgba[ 2 ] / 255,
446 | a = rgba[ 3 ],
447 | max = Math.max( r, g, b ),
448 | min = Math.min( r, g, b ),
449 | diff = max - min,
450 | add = max + min,
451 | l = add * 0.5,
452 | h, s;
453 |
454 | if ( min === max ) {
455 | h = 0;
456 | } else if ( r === max ) {
457 | h = ( 60 * ( g - b ) / diff ) + 360;
458 | } else if ( g === max ) {
459 | h = ( 60 * ( b - r ) / diff ) + 120;
460 | } else {
461 | h = ( 60 * ( r - g ) / diff ) + 240;
462 | }
463 |
464 | // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
465 | // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
466 | if ( diff === 0 ) {
467 | s = 0;
468 | } else if ( l <= 0.5 ) {
469 | s = diff / add;
470 | } else {
471 | s = diff / ( 2 - add );
472 | }
473 | return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
474 | };
475 |
476 | spaces.hsla.from = function ( hsla ) {
477 | if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
478 | return [ null, null, null, hsla[ 3 ] ];
479 | }
480 | var h = hsla[ 0 ] / 360,
481 | s = hsla[ 1 ],
482 | l = hsla[ 2 ],
483 | a = hsla[ 3 ],
484 | q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
485 | p = 2 * l - q;
486 |
487 | return [
488 | Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
489 | Math.round( hue2rgb( p, q, h ) * 255 ),
490 | Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
491 | a
492 | ];
493 | };
494 |
495 |
496 | each( spaces, function( spaceName, space ) {
497 | var props = space.props,
498 | cache = space.cache,
499 | to = space.to,
500 | from = space.from;
501 |
502 | // makes rgba() and hsla()
503 | color.fn[ spaceName ] = function( value ) {
504 |
505 | // generate a cache for this space if it doesn't exist
506 | if ( to && !this[ cache ] ) {
507 | this[ cache ] = to( this._rgba );
508 | }
509 | if ( value === undefined ) {
510 | return this[ cache ].slice();
511 | }
512 |
513 | var ret,
514 | type = jQuery.type( value ),
515 | arr = ( type === "array" || type === "object" ) ? value : arguments,
516 | local = this[ cache ].slice();
517 |
518 | each( props, function( key, prop ) {
519 | var val = arr[ type === "object" ? key : prop.idx ];
520 | if ( val == null ) {
521 | val = local[ prop.idx ];
522 | }
523 | local[ prop.idx ] = clamp( val, prop );
524 | });
525 |
526 | if ( from ) {
527 | ret = color( from( local ) );
528 | ret[ cache ] = local;
529 | return ret;
530 | } else {
531 | return color( local );
532 | }
533 | };
534 |
535 | // makes red() green() blue() alpha() hue() saturation() lightness()
536 | each( props, function( key, prop ) {
537 | // alpha is included in more than one space
538 | if ( color.fn[ key ] ) {
539 | return;
540 | }
541 | color.fn[ key ] = function( value ) {
542 | var vtype = jQuery.type( value ),
543 | fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
544 | local = this[ fn ](),
545 | cur = local[ prop.idx ],
546 | match;
547 |
548 | if ( vtype === "undefined" ) {
549 | return cur;
550 | }
551 |
552 | if ( vtype === "function" ) {
553 | value = value.call( this, cur );
554 | vtype = jQuery.type( value );
555 | }
556 | if ( value == null && prop.empty ) {
557 | return this;
558 | }
559 | if ( vtype === "string" ) {
560 | match = rplusequals.exec( value );
561 | if ( match ) {
562 | value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
563 | }
564 | }
565 | local[ prop.idx ] = value;
566 | return this[ fn ]( local );
567 | };
568 | });
569 | });
570 |
571 | // add cssHook and .fx.step function for each named hook.
572 | // accept a space separated string of properties
573 | color.hook = function( hook ) {
574 | var hooks = hook.split( " " );
575 | each( hooks, function( i, hook ) {
576 | jQuery.cssHooks[ hook ] = {
577 | set: function( elem, value ) {
578 | var parsed, curElem,
579 | backgroundColor = "";
580 |
581 | if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
582 | value = color( parsed || value );
583 | if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
584 | curElem = hook === "backgroundColor" ? elem.parentNode : elem;
585 | while (
586 | (backgroundColor === "" || backgroundColor === "transparent") &&
587 | curElem && curElem.style
588 | ) {
589 | try {
590 | backgroundColor = jQuery.css( curElem, "backgroundColor" );
591 | curElem = curElem.parentNode;
592 | } catch ( e ) {
593 | }
594 | }
595 |
596 | value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
597 | backgroundColor :
598 | "_default" );
599 | }
600 |
601 | value = value.toRgbaString();
602 | }
603 | try {
604 | elem.style[ hook ] = value;
605 | } catch( e ) {
606 | // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
607 | }
608 | }
609 | };
610 | jQuery.fx.step[ hook ] = function( fx ) {
611 | if ( !fx.colorInit ) {
612 | fx.start = color( fx.elem, hook );
613 | fx.end = color( fx.end );
614 | fx.colorInit = true;
615 | }
616 | jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
617 | };
618 | });
619 |
620 | };
621 |
622 | color.hook( stepHooks );
623 |
624 | jQuery.cssHooks.borderColor = {
625 | expand: function( value ) {
626 | var expanded = {};
627 |
628 | each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
629 | expanded[ "border" + part + "Color" ] = value;
630 | });
631 | return expanded;
632 | }
633 | };
634 |
635 | // Basic color names only.
636 | // Usage of any of the other color names requires adding yourself or including
637 | // jquery.color.svg-names.js.
638 | colors = jQuery.Color.names = {
639 | // 4.1. Basic color keywords
640 | aqua: "#00ffff",
641 | black: "#000000",
642 | blue: "#0000ff",
643 | fuchsia: "#ff00ff",
644 | gray: "#808080",
645 | green: "#008000",
646 | lime: "#00ff00",
647 | maroon: "#800000",
648 | navy: "#000080",
649 | olive: "#808000",
650 | purple: "#800080",
651 | red: "#ff0000",
652 | silver: "#c0c0c0",
653 | teal: "#008080",
654 | white: "#ffffff",
655 | yellow: "#ffff00",
656 |
657 | // 4.2.3. "transparent" color keyword
658 | transparent: [ null, null, null, 0 ],
659 |
660 | _default: "#ffffff"
661 | };
662 |
663 | }( jQuery ));
664 |
--------------------------------------------------------------------------------
/js/layer.js:
--------------------------------------------------------------------------------
1 | /*! layer-v3.1.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
2 | ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
'+(f?r.title[0]:r.title)+"
":"";return r.zIndex=s,t([r.shade?'':"",''+(e&&2!=r.type?"":u)+'
'+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
'+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t
'+r.btn[t]+"";return''+e+"
"}():"")+(r.resize?'':"")+" "],u,i('')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:''+function(){var e=t.length,i=1,a="";if(e>0)for(a='- '+(t[0].content||"no content")+"
";i'+(t[i].content||"no content")+"";return a}()+"
",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]
",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);
--------------------------------------------------------------------------------
/js/jquery.jqzoom-core.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQzoom Evolution Library v2.3 - Javascript Image magnifier
3 | * http://www.mind-projects.it
4 | *
5 | * Copyright 2011, Engineer Marco Renzi
6 | * Licensed under the BSD license.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions are met:
10 | * * Redistributions of source code must retain the above copyright
11 | * notice, this list of conditions and the following disclaimer.
12 | * * Redistributions in binary form must reproduce the above copyright
13 | * notice, this list of conditions and the following disclaimer in the
14 | * documentation and/or other materials provided with the distribution.
15 | * * Neither the name of the organization nor the
16 | * names of its contributors may be used to endorse or promote products
17 | * derived from this software without specific prior written permission.
18 | *
19 | * Date: 03 May 2011 22:16:00
20 | */
21 | (function ($) {
22 | //GLOBAL VARIABLES
23 | var isIE6 = ($.browser.msie && $.browser.version < 7);
24 | var body = $(document.body);
25 | var window = $(window);
26 | var jqzoompluging_disabled = false; //disabilita globalmente il plugin
27 | $.fn.jqzoom = function (options) {
28 | return this.each(function () {
29 | var node = this.nodeName.toLowerCase();
30 | if (node == 'a') {
31 | new jqzoom(this, options);
32 | }
33 | });
34 | };
35 | jqzoom = function (el, options) {
36 | var api = null;
37 | api = $(el).data("jqzoom");
38 | if (api) return api;
39 | var obj = this;
40 | var settings = $.extend({}, $.jqzoom.defaults, options || {});
41 | obj.el = el;
42 | el.rel = $(el).attr('rel');
43 | //ANCHOR ELEMENT
44 | el.zoom_active = false;
45 | el.zoom_disabled = false; //to disable single zoom instance
46 | el.largeimageloading = false; //tell us if large image is loading
47 | el.largeimageloaded = false; //tell us if large image is loaded
48 | el.scale = {};
49 | el.timer = null;
50 | el.mousepos = {};
51 | el.mouseDown = false;
52 | $(el).css({
53 | 'outline-style': 'none',
54 | 'text-decoration': 'none'
55 | });
56 | //BASE IMAGE
57 | var img = $("img:eq(0)", el);
58 | el.title = $(el).attr('title');
59 | el.imagetitle = img.attr('title');
60 | var zoomtitle = ($.trim(el.title).length > 0) ? el.title : el.imagetitle;
61 | var smallimage = new Smallimage(img);
62 | var lens = new Lens();
63 | var stage = new Stage();
64 | var largeimage = new Largeimage();
65 | var loader = new Loader();
66 | //preventing default click,allowing the onclick event [exmple: lightbox]
67 | $(el).bind('click', function (e) {
68 | e.preventDefault();
69 | return false;
70 | });
71 | //setting the default zoomType if not in settings
72 | var zoomtypes = ['standard', 'drag', 'innerzoom', 'reverse'];
73 | if ($.inArray($.trim(settings.zoomType), zoomtypes) < 0) {
74 | settings.zoomType = 'standard';
75 | }
76 | $.extend(obj, {
77 | create: function () { //create the main objects
78 | //create ZoomPad
79 | if ($(".zoomPad", el).length == 0) {
80 | el.zoomPad = $('').addClass('zoomPad');
81 | img.wrap(el.zoomPad);
82 | }
83 | if(settings.zoomType == 'innerzoom'){
84 | settings.zoomWidth = smallimage.w;
85 | settings.zoomHeight = smallimage.h;
86 | }
87 | //creating ZoomPup
88 | if ($(".zoomPup", el).length == 0) {
89 | lens.append();
90 | }
91 | //creating zoomWindow
92 | if ($(".zoomWindow", el).length == 0) {
93 | stage.append();
94 | }
95 | //creating Preload
96 | if ($(".zoomPreload", el).length == 0) {
97 | loader.append();
98 | }
99 | //preloading images
100 | if (settings.preloadImages || settings.zoomType == 'drag' || settings.alwaysOn) {
101 | obj.load();
102 | }
103 | obj.init();
104 | },
105 | init: function () {
106 | //drag option
107 | if (settings.zoomType == 'drag') {
108 | $(".zoomPad", el).mousedown(function () {
109 | el.mouseDown = true;
110 | });
111 | $(".zoomPad", el).mouseup(function () {
112 | el.mouseDown = false;
113 | });
114 | document.body.ondragstart = function () {
115 | return false;
116 | };
117 | $(".zoomPad", el).css({
118 | cursor: 'default'
119 | });
120 | $(".zoomPup", el).css({
121 | cursor: 'move'
122 | });
123 | }
124 | if (settings.zoomType == 'innerzoom') {
125 | $(".zoomWrapper", el).css({
126 | cursor: 'crosshair'
127 | });
128 | }
129 | $(".zoomPad", el).bind('mouseenter mouseover', function (event) {
130 | img.attr('title', '');
131 | $(el).attr('title', '');
132 | el.zoom_active = true;
133 | //if loaded then activate else load large image
134 | smallimage.fetchdata();
135 | if (el.largeimageloaded) {
136 | obj.activate(event);
137 | } else {
138 | obj.load();
139 | }
140 | });
141 | $(".zoomPad", el).bind('mouseleave', function (event) {
142 | obj.deactivate();
143 | });
144 | $(".zoomPad", el).bind('mousemove', function (e) {
145 |
146 | //prevent fast mouse mevements not to fire the mouseout event
147 | if (e.pageX > smallimage.pos.r || e.pageX < smallimage.pos.l || e.pageY < smallimage.pos.t || e.pageY > smallimage.pos.b) {
148 | lens.setcenter();
149 | return false;
150 | }
151 | el.zoom_active = true;
152 | if (el.largeimageloaded && !$('.zoomWindow', el).is(':visible')) {
153 | obj.activate(e);
154 | }
155 | if (el.largeimageloaded && (settings.zoomType != 'drag' || (settings.zoomType == 'drag' && el.mouseDown))) {
156 | lens.setposition(e);
157 | }
158 | });
159 | var thumb_preload = new Array();
160 | var i = 0;
161 | //binding click event on thumbnails
162 | var thumblist = new Array();
163 | thumblist = $('a').filter(function () {
164 | var regex = new RegExp("gallery[\\s]*:[\\s]*'" + $.trim(el.rel) + "'", "i");
165 | var rel = $(this).attr('rel');
166 | if (regex.test(rel)) {
167 | return this;
168 | }
169 | });
170 | if (thumblist.length > 0) {
171 | //getting the first to the last
172 | var first = thumblist.splice(0, 1);
173 | thumblist.push(first);
174 | }
175 | thumblist.each(function () {
176 | //preloading thumbs
177 | if (settings.preloadImages) {
178 | var thumb_options = $.extend({}, eval("(" + $.trim($(this).attr('rel')) + ")"));
179 | thumb_preload[i] = new Image();
180 | thumb_preload[i].src = thumb_options.largeimage;
181 | i++;
182 | }
183 | $(this).click(function (e) {
184 | if($(this).hasClass('zoomThumbActive')){
185 | return false;
186 | }
187 | thumblist.each(function () {
188 | $(this).removeClass('zoomThumbActive');
189 | });
190 | e.preventDefault();
191 | obj.swapimage(this);
192 | return false;
193 | });
194 | });
195 | },
196 | load: function () {
197 | if (el.largeimageloaded == false && el.largeimageloading == false) {
198 | var url = $(el).attr('href');
199 | el.largeimageloading = true;
200 | largeimage.loadimage(url);
201 | }
202 | },
203 | activate: function (e) {
204 | clearTimeout(el.timer);
205 | //show lens and zoomWindow
206 | lens.show();
207 | stage.show();
208 | },
209 | deactivate: function (e) {
210 | switch (settings.zoomType) {
211 | case 'drag':
212 | //nothing or lens.setcenter();
213 | break;
214 | default:
215 | img.attr('title', el.imagetitle);
216 | $(el).attr('title', el.title);
217 | if (settings.alwaysOn) {
218 | lens.setcenter();
219 | } else {
220 | stage.hide();
221 | lens.hide();
222 | }
223 | break;
224 | }
225 | el.zoom_active = false;
226 | },
227 | swapimage: function (link) {
228 | el.largeimageloading = false;
229 | el.largeimageloaded = false;
230 | var options = new Object();
231 | options = $.extend({}, eval("(" + $.trim($(link).attr('rel')) + ")"));
232 | if (options.smallimage && options.largeimage) {
233 | var smallimage = options.smallimage;
234 | var largeimage = options.largeimage;
235 | $(link).addClass('zoomThumbActive');
236 | $(el).attr('href', largeimage);
237 | img.attr('src', smallimage);
238 | lens.hide();
239 | stage.hide();
240 | obj.load();
241 | } else {
242 | alert('ERROR :: Missing parameter for largeimage or smallimage.');
243 | throw 'ERROR :: Missing parameter for largeimage or smallimage.';
244 | }
245 | return false;
246 | }
247 | });
248 | //sometimes image is already loaded and onload will not fire
249 | if (img[0].complete) {
250 | //fetching data from sallimage if was previously loaded
251 | smallimage.fetchdata();
252 | if ($(".zoomPad", el).length == 0) obj.create();
253 | }
254 | /*========================================================,
255 | | Smallimage
256 | |---------------------------------------------------------:
257 | | Base image into the anchor element
258 | `========================================================*/
259 |
260 | function Smallimage(image) {
261 | var $obj = this;
262 | this.node = image[0];
263 | this.findborder = function () {
264 | var bordertop = 0;
265 | bordertop = image.css('border-top-width');
266 | btop = '';
267 | var borderleft = 0;
268 | borderleft = image.css('border-left-width');
269 | bleft = '';
270 | if (bordertop) {
271 | for (i = 0; i < 3; i++) {
272 | var x = [];
273 | x = bordertop.substr(i, 1);
274 | if (isNaN(x) == false) {
275 | btop = btop + '' + bordertop.substr(i, 1);
276 | } else {
277 | break;
278 | }
279 | }
280 | }
281 | if (borderleft) {
282 | for (i = 0; i < 3; i++) {
283 | if (!isNaN(borderleft.substr(i, 1))) {
284 | bleft = bleft + borderleft.substr(i, 1)
285 | } else {
286 | break;
287 | }
288 | }
289 | }
290 | $obj.btop = (btop.length > 0) ? eval(btop) : 0;
291 | $obj.bleft = (bleft.length > 0) ? eval(bleft) : 0;
292 | };
293 | this.fetchdata = function () {
294 | $obj.findborder();
295 | $obj.w = image.width();
296 | $obj.h = image.height();
297 | $obj.ow = image.outerWidth();
298 | $obj.oh = image.outerHeight();
299 | $obj.pos = image.offset();
300 | $obj.pos.l = image.offset().left + $obj.bleft;
301 | $obj.pos.t = image.offset().top + $obj.btop;
302 | $obj.pos.r = $obj.w + $obj.pos.l;
303 | $obj.pos.b = $obj.h + $obj.pos.t;
304 | $obj.rightlimit = image.offset().left + $obj.ow;
305 | $obj.bottomlimit = image.offset().top + $obj.oh;
306 |
307 | };
308 | this.node.onerror = function () {
309 | alert('Problems while loading image.');
310 | throw 'Problems while loading image.';
311 | };
312 | this.node.onload = function () {
313 | $obj.fetchdata();
314 | if ($(".zoomPad", el).length == 0) obj.create();
315 | };
316 | return $obj;
317 | };
318 | /*========================================================,
319 | | Loader
320 | |---------------------------------------------------------:
321 | | Show that the large image is loading
322 | `========================================================*/
323 |
324 | function Loader() {
325 | var $obj = this;
326 | this.append = function () {
327 | this.node = $('').addClass('zoomPreload').css('visibility', 'hidden').html(settings.preloadText);
328 | $('.zoomPad', el).append(this.node);
329 | };
330 | this.show = function () {
331 | this.node.top = (smallimage.oh - this.node.height()) / 2;
332 | this.node.left = (smallimage.ow - this.node.width()) / 2;
333 | //setting position
334 | this.node.css({
335 | top: this.node.top,
336 | left: this.node.left,
337 | position: 'absolute',
338 | visibility: 'visible'
339 | });
340 | };
341 | this.hide = function () {
342 | this.node.css('visibility', 'hidden');
343 | };
344 | return this;
345 | }
346 | /*========================================================,
347 | | Lens
348 | |---------------------------------------------------------:
349 | | Lens over the image
350 | `========================================================*/
351 |
352 | function Lens() {
353 | var $obj = this;
354 | this.node = $('').addClass('zoomPup');
355 | //this.nodeimgwrapper = $("").addClass('zoomPupImgWrapper');
356 | this.append = function () {
357 | $('.zoomPad', el).append($(this.node).hide());
358 | if (settings.zoomType == 'reverse') {
359 | this.image = new Image();
360 | this.image.src = smallimage.node.src; // fires off async
361 | $(this.node).empty().append(this.image);
362 | }
363 | };
364 | this.setdimensions = function () {
365 | this.node.w = (parseInt((settings.zoomWidth) / el.scale.x) > smallimage.w ) ? smallimage.w : (parseInt(settings.zoomWidth / el.scale.x));
366 | this.node.h = (parseInt((settings.zoomHeight) / el.scale.y) > smallimage.h ) ? smallimage.h : (parseInt(settings.zoomHeight / el.scale.y));
367 | this.node.top = (smallimage.oh - this.node.h - 2) / 2;
368 | this.node.left = (smallimage.ow - this.node.w - 2) / 2;
369 | //centering lens
370 | this.node.css({
371 | top: 0,
372 | left: 0,
373 | width: this.node.w + 'px',
374 | height: this.node.h + 'px',
375 | position: 'absolute',
376 | display: 'none',
377 | borderWidth: 1 + 'px'
378 | });
379 |
380 |
381 |
382 | if (settings.zoomType == 'reverse') {
383 | this.image.src = smallimage.node.src;
384 | $(this.node).css({
385 | 'opacity': 1
386 | });
387 |
388 | $(this.image).css({
389 | position: 'absolute',
390 | display: 'block',
391 | left: -(this.node.left + 1 - smallimage.bleft) + 'px',
392 | top: -(this.node.top + 1 - smallimage.btop) + 'px'
393 | });
394 |
395 | }
396 | };
397 | this.setcenter = function () {
398 | //calculating center position
399 | this.node.top = (smallimage.oh - this.node.h - 2) / 2;
400 | this.node.left = (smallimage.ow - this.node.w - 2) / 2;
401 | //centering lens
402 | this.node.css({
403 | top: this.node.top,
404 | left: this.node.left
405 | });
406 | if (settings.zoomType == 'reverse') {
407 | $(this.image).css({
408 | position: 'absolute',
409 | display: 'block',
410 | left: -(this.node.left + 1 - smallimage.bleft) + 'px',
411 | top: -(this.node.top + 1 - smallimage.btop) + 'px'
412 | });
413 |
414 | }
415 | //centering large image
416 | largeimage.setposition();
417 | };
418 | this.setposition = function (e) {
419 | el.mousepos.x = e.pageX;
420 | el.mousepos.y = e.pageY;
421 | var lensleft = 0;
422 | var lenstop = 0;
423 |
424 | function overleft(lens) {
425 | return el.mousepos.x - (lens.w) / 2 < smallimage.pos.l;
426 | }
427 |
428 | function overright(lens) {
429 | return el.mousepos.x + (lens.w) / 2 > smallimage.pos.r;
430 |
431 | }
432 |
433 | function overtop(lens) {
434 | return el.mousepos.y - (lens.h) / 2 < smallimage.pos.t;
435 | }
436 |
437 | function overbottom(lens) {
438 | return el.mousepos.y + (lens.h) / 2 > smallimage.pos.b;
439 | }
440 |
441 | lensleft = el.mousepos.x + smallimage.bleft - smallimage.pos.l - (this.node.w + 2) / 2;
442 | lenstop = el.mousepos.y + smallimage.btop - smallimage.pos.t - (this.node.h + 2) / 2;
443 | if (overleft(this.node)) {
444 | lensleft = smallimage.bleft - 1;
445 | } else if (overright(this.node)) {
446 | lensleft = smallimage.w + smallimage.bleft - this.node.w - 1;
447 | }
448 | if (overtop(this.node)) {
449 | lenstop = smallimage.btop - 1;
450 | } else if (overbottom(this.node)) {
451 | lenstop = smallimage.h + smallimage.btop - this.node.h - 1;
452 | }
453 |
454 | this.node.left = lensleft;
455 | this.node.top = lenstop;
456 | this.node.css({
457 | 'left': lensleft + 'px',
458 | 'top': lenstop + 'px'
459 | });
460 | if (settings.zoomType == 'reverse') {
461 | if ($.browser.msie && $.browser.version > 7) {
462 | $(this.node).empty().append(this.image);
463 | }
464 |
465 | $(this.image).css({
466 | position: 'absolute',
467 | display: 'block',
468 | left: -(this.node.left + 1 - smallimage.bleft) + 'px',
469 | top: -(this.node.top + 1 - smallimage.btop) + 'px'
470 | });
471 | }
472 |
473 | largeimage.setposition();
474 | };
475 | this.hide = function () {
476 | img.css({
477 | 'opacity': 1
478 | });
479 | this.node.hide();
480 | };
481 | this.show = function () {
482 |
483 | if (settings.zoomType != 'innerzoom' && (settings.lens || settings.zoomType == 'drag')) {
484 | this.node.show();
485 | }
486 |
487 | if (settings.zoomType == 'reverse') {
488 | img.css({
489 | 'opacity': settings.imageOpacity
490 | });
491 | }
492 | };
493 | this.getoffset = function () {
494 | var o = {};
495 | o.left = $obj.node.left;
496 | o.top = $obj.node.top;
497 | return o;
498 | };
499 | return this;
500 | };
501 | /*========================================================,
502 | | Stage
503 | |---------------------------------------------------------:
504 | | Window area that contains the large image
505 | `========================================================*/
506 |
507 | function Stage() {
508 | var $obj = this;
509 | this.node = $("");
510 | this.ieframe = $('');
511 | this.setposition = function () {
512 | this.node.leftpos = 0;
513 | this.node.toppos = 0;
514 | if (settings.zoomType != 'innerzoom') {
515 | //positioning
516 | switch (settings.position) {
517 | case "left":
518 | this.node.leftpos = (smallimage.pos.l - smallimage.bleft - Math.abs(settings.xOffset) - settings.zoomWidth > 0) ? (0 - settings.zoomWidth - Math.abs(settings.xOffset)) : (smallimage.ow + Math.abs(settings.xOffset));
519 | this.node.toppos = Math.abs(settings.yOffset);
520 | break;
521 | case "top":
522 | this.node.leftpos = Math.abs(settings.xOffset);
523 | this.node.toppos = (smallimage.pos.t - smallimage.btop - Math.abs(settings.yOffset) - settings.zoomHeight > 0) ? (0 - settings.zoomHeight - Math.abs(settings.yOffset)) : (smallimage.oh + Math.abs(settings.yOffset));
524 | break;
525 | case "bottom":
526 | this.node.leftpos = Math.abs(settings.xOffset);
527 | this.node.toppos = (smallimage.pos.t - smallimage.btop + smallimage.oh + Math.abs(settings.yOffset) + settings.zoomHeight < screen.height) ? (smallimage.oh + Math.abs(settings.yOffset)) : (0 - settings.zoomHeight - Math.abs(settings.yOffset));
528 | break;
529 | default:
530 | this.node.leftpos = (smallimage.rightlimit + Math.abs(settings.xOffset) + settings.zoomWidth < screen.width) ? (smallimage.ow + Math.abs(settings.xOffset)) : (0 - settings.zoomWidth - Math.abs(settings.xOffset));
531 | this.node.toppos = Math.abs(settings.yOffset);
532 | break;
533 | }
534 | }
535 | this.node.css({
536 | 'left': this.node.leftpos + 'px',
537 | 'top': this.node.toppos + 'px'
538 | });
539 | return this;
540 | };
541 | this.append = function () {
542 | $('.zoomPad', el).append(this.node);
543 | this.node.css({
544 | position: 'absolute',
545 | display: 'none',
546 | zIndex: 5001
547 | });
548 | if (settings.zoomType == 'innerzoom') {
549 | this.node.css({
550 | cursor: 'default'
551 | });
552 | var thickness = (smallimage.bleft == 0) ? 1 : smallimage.bleft;
553 | $('.zoomWrapper', this.node).css({
554 | borderWidth: thickness + 'px'
555 | });
556 | }
557 |
558 | $('.zoomWrapper', this.node).css({
559 | width: Math.round(settings.zoomWidth) + 'px' ,
560 | borderWidth: thickness + 'px'
561 | });
562 | $('.zoomWrapperImage', this.node).css({
563 | width: '100%',
564 | height: Math.round(settings.zoomHeight) + 'px'
565 | });
566 | //zoom title
567 | $('.zoomWrapperTitle', this.node).css({
568 | width: '100%',
569 | position: 'absolute'
570 | });
571 |
572 | $('.zoomWrapperTitle', this.node).hide();
573 | if (settings.title && zoomtitle.length > 0) {
574 | $('.zoomWrapperTitle', this.node).html(zoomtitle).show();
575 | }
576 | $obj.setposition();
577 | };
578 | this.hide = function () {
579 | switch (settings.hideEffect) {
580 | case 'fadeout':
581 | this.node.fadeOut(settings.fadeoutSpeed, function () {});
582 | break;
583 | default:
584 | this.node.hide();
585 | break;
586 | }
587 | this.ieframe.hide();
588 | };
589 | this.show = function () {
590 | switch (settings.showEffect) {
591 | case 'fadein':
592 | this.node.fadeIn();
593 | this.node.fadeIn(settings.fadeinSpeed, function () {});
594 | break;
595 | default:
596 | this.node.show();
597 | break;
598 | }
599 | if (isIE6 && settings.zoomType != 'innerzoom') {
600 | this.ieframe.width = this.node.width();
601 | this.ieframe.height = this.node.height();
602 | this.ieframe.left = this.node.leftpos;
603 | this.ieframe.top = this.node.toppos;
604 | this.ieframe.css({
605 | display: 'block',
606 | position: "absolute",
607 | left: this.ieframe.left,
608 | top: this.ieframe.top,
609 | zIndex: 99,
610 | width: this.ieframe.width + 'px',
611 | height: this.ieframe.height + 'px'
612 | });
613 | $('.zoomPad', el).append(this.ieframe);
614 | this.ieframe.show();
615 | };
616 | };
617 | };
618 | /*========================================================,
619 | | LargeImage
620 | |---------------------------------------------------------:
621 | | The large detailed image
622 | `========================================================*/
623 |
624 | function Largeimage() {
625 | var $obj = this;
626 | this.node = new Image();
627 | this.loadimage = function (url) {
628 | //showing preload
629 | loader.show();
630 | this.url = url;
631 | this.node.style.position = 'absolute';
632 | this.node.style.border = '0px';
633 | this.node.style.display = 'none';
634 | this.node.style.left = '-5000px';
635 | this.node.style.top = '0px';
636 | document.body.appendChild(this.node);
637 | this.node.src = url; // fires off async
638 | };
639 | this.fetchdata = function () {
640 | var image = $(this.node);
641 | var scale = {};
642 | this.node.style.display = 'block';
643 | $obj.w = image.width();
644 | $obj.h = image.height();
645 | $obj.pos = image.offset();
646 | $obj.pos.l = image.offset().left;
647 | $obj.pos.t = image.offset().top;
648 | $obj.pos.r = $obj.w + $obj.pos.l;
649 | $obj.pos.b = $obj.h + $obj.pos.t;
650 | scale.x = ($obj.w / smallimage.w);
651 | scale.y = ($obj.h / smallimage.h);
652 | el.scale = scale;
653 | document.body.removeChild(this.node);
654 | $('.zoomWrapperImage', el).empty().append(this.node);
655 | //setting lens dimensions;
656 | lens.setdimensions();
657 | };
658 | this.node.onerror = function () {
659 | alert('Problems while loading the big image.');
660 | throw 'Problems while loading the big image.';
661 | };
662 | this.node.onload = function () {
663 | //fetching data
664 | $obj.fetchdata();
665 | loader.hide();
666 | el.largeimageloading = false;
667 | el.largeimageloaded = true;
668 | if (settings.zoomType == 'drag' || settings.alwaysOn) {
669 | lens.show();
670 | stage.show();
671 | lens.setcenter();
672 | }
673 | };
674 | this.setposition = function () {
675 | var left = -el.scale.x * (lens.getoffset().left - smallimage.bleft + 1);
676 | var top = -el.scale.y * (lens.getoffset().top - smallimage.btop + 1);
677 | $(this.node).css({
678 | 'left': left + 'px',
679 | 'top': top + 'px'
680 | });
681 | };
682 | return this;
683 | };
684 | $(el).data("jqzoom", obj);
685 | };
686 | //es. $.jqzoom.disable('#jqzoom1');
687 | $.jqzoom = {
688 | defaults: {
689 | zoomType: 'standard',
690 | //innerzoom/standard/reverse/drag
691 | zoomWidth: 300,
692 | //zoomWindow default width
693 | zoomHeight: 300,
694 | //zoomWindow default height
695 | xOffset: 10,
696 | //zoomWindow x offset, can be negative(more on the left) or positive(more on the right)
697 | yOffset: 0,
698 | //zoomWindow y offset, can be negative(more on the left) or positive(more on the right)
699 | position: "right",
700 | //zoomWindow default position
701 | preloadImages: true,
702 | //image preload
703 | preloadText: 'Loading zoom',
704 | title: true,
705 | lens: true,
706 | imageOpacity: 0.4,
707 | alwaysOn: false,
708 | showEffect: 'show',
709 | //show/fadein
710 | hideEffect: 'hide',
711 | //hide/fadeout
712 | fadeinSpeed: 'slow',
713 | //fast/slow/number
714 | fadeoutSpeed: '2000' //fast/slow/number
715 | },
716 | disable: function (el) {
717 | var api = $(el).data('jqzoom');
718 | api.disable();
719 | return false;
720 | },
721 | enable: function (el) {
722 | var api = $(el).data('jqzoom');
723 | api.enable();
724 | return false;
725 | },
726 | disableAll: function (el) {
727 | jqzoompluging_disabled = true;
728 | },
729 | enableAll: function (el) {
730 | jqzoompluging_disabled = false;
731 | }
732 | };
733 | })(jQuery);
--------------------------------------------------------------------------------
/js/jquery-ui.css:
--------------------------------------------------------------------------------
1 | /*! jQuery UI - v1.12.1 - 2017-10-08
2 | * http://jqueryui.com
3 | * Includes: draggable.css, core.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css
4 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=base&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cc0000&fcError=5f3f3f&borderColorError=f1a899&bgTextureError=flat&bgColorError=fddfdf&iconColorHighlight=777620&fcHighlight=777620&borderColorHighlight=dad55e&bgTextureHighlight=flat&bgColorHighlight=fffa90&iconColorActive=ffffff&fcActive=ffffff&borderColorActive=003eff&bgTextureActive=flat&bgColorActive=007fff&iconColorHover=555555&fcHover=2b2b2b&borderColorHover=cccccc&bgTextureHover=flat&bgColorHover=ededed&iconColorDefault=777777&fcDefault=454545&borderColorDefault=c5c5c5&bgTextureDefault=flat&bgColorDefault=f6f6f6&iconColorContent=444444&fcContent=333333&borderColorContent=dddddd&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=444444&fcHeader=333333&borderColorHeader=dddddd&bgTextureHeader=flat&bgColorHeader=e9e9e9&cornerRadius=3px&fwDefault=normal&fsDefault=1em&ffDefault=Arial%2CHelvetica%2Csans-serif
5 | * Copyright jQuery Foundation and other contributors; Licensed MIT */
6 |
7 | .ui-draggable-handle {
8 | -ms-touch-action: none;
9 | touch-action: none;
10 | }
11 | /* Layout helpers
12 | ----------------------------------*/
13 | .ui-helper-hidden {
14 | display: none;
15 | }
16 | .ui-helper-hidden-accessible {
17 | border: 0;
18 | clip: rect(0 0 0 0);
19 | height: 1px;
20 | margin: -1px;
21 | overflow: hidden;
22 | padding: 0;
23 | position: absolute;
24 | width: 1px;
25 | }
26 | .ui-helper-reset {
27 | margin: 0;
28 | padding: 0;
29 | border: 0;
30 | outline: 0;
31 | line-height: 1.3;
32 | text-decoration: none;
33 | font-size: 100%;
34 | list-style: none;
35 | }
36 | .ui-helper-clearfix:before,
37 | .ui-helper-clearfix:after {
38 | content: "";
39 | display: table;
40 | border-collapse: collapse;
41 | }
42 | .ui-helper-clearfix:after {
43 | clear: both;
44 | }
45 | .ui-helper-zfix {
46 | width: 100%;
47 | height: 100%;
48 | top: 0;
49 | left: 0;
50 | position: absolute;
51 | opacity: 0;
52 | filter:Alpha(Opacity=0); /* support: IE8 */
53 | }
54 |
55 | .ui-front {
56 | z-index: 100;
57 | }
58 |
59 |
60 | /* Interaction Cues
61 | ----------------------------------*/
62 | .ui-state-disabled {
63 | cursor: default !important;
64 | pointer-events: none;
65 | }
66 |
67 |
68 | /* Icons
69 | ----------------------------------*/
70 | .ui-icon {
71 | display: inline-block;
72 | vertical-align: middle;
73 | margin-top: -.25em;
74 | position: relative;
75 | text-indent: -99999px;
76 | overflow: hidden;
77 | background-repeat: no-repeat;
78 | }
79 |
80 | .ui-widget-icon-block {
81 | left: 50%;
82 | margin-left: -8px;
83 | display: block;
84 | }
85 |
86 | /* Misc visuals
87 | ----------------------------------*/
88 |
89 | /* Overlays */
90 | .ui-widget-overlay {
91 | position: fixed;
92 | top: 0;
93 | left: 0;
94 | width: 100%;
95 | height: 100%;
96 | }
97 | .ui-resizable {
98 | position: relative;
99 | }
100 | .ui-resizable-handle {
101 | position: absolute;
102 | font-size: 0.1px;
103 | display: block;
104 | -ms-touch-action: none;
105 | touch-action: none;
106 | }
107 | .ui-resizable-disabled .ui-resizable-handle,
108 | .ui-resizable-autohide .ui-resizable-handle {
109 | display: none;
110 | }
111 | .ui-resizable-n {
112 | cursor: n-resize;
113 | height: 7px;
114 | width: 100%;
115 | top: -5px;
116 | left: 0;
117 | }
118 | .ui-resizable-s {
119 | cursor: s-resize;
120 | height: 7px;
121 | width: 100%;
122 | bottom: -5px;
123 | left: 0;
124 | }
125 | .ui-resizable-e {
126 | cursor: e-resize;
127 | width: 7px;
128 | right: -5px;
129 | top: 0;
130 | height: 100%;
131 | }
132 | .ui-resizable-w {
133 | cursor: w-resize;
134 | width: 7px;
135 | left: -5px;
136 | top: 0;
137 | height: 100%;
138 | }
139 | .ui-resizable-se {
140 | cursor: se-resize;
141 | width: 12px;
142 | height: 12px;
143 | right: 1px;
144 | bottom: 1px;
145 | }
146 | .ui-resizable-sw {
147 | cursor: sw-resize;
148 | width: 9px;
149 | height: 9px;
150 | left: -5px;
151 | bottom: -5px;
152 | }
153 | .ui-resizable-nw {
154 | cursor: nw-resize;
155 | width: 9px;
156 | height: 9px;
157 | left: -5px;
158 | top: -5px;
159 | }
160 | .ui-resizable-ne {
161 | cursor: ne-resize;
162 | width: 9px;
163 | height: 9px;
164 | right: -5px;
165 | top: -5px;
166 | }
167 | .ui-selectable {
168 | -ms-touch-action: none;
169 | touch-action: none;
170 | }
171 | .ui-selectable-helper {
172 | position: absolute;
173 | z-index: 100;
174 | border: 1px dotted black;
175 | }
176 | .ui-sortable-handle {
177 | -ms-touch-action: none;
178 | touch-action: none;
179 | }
180 | .ui-accordion .ui-accordion-header {
181 | display: block;
182 | cursor: pointer;
183 | position: relative;
184 | margin: 2px 0 0 0;
185 | padding: .5em .5em .5em .7em;
186 | font-size: 100%;
187 | }
188 | .ui-accordion .ui-accordion-content {
189 | padding: 1em 2.2em;
190 | border-top: 0;
191 | overflow: auto;
192 | }
193 | .ui-autocomplete {
194 | position: absolute;
195 | top: 0;
196 | left: 0;
197 | cursor: default;
198 | }
199 | .ui-menu {
200 | list-style: none;
201 | padding: 0;
202 | margin: 0;
203 | display: block;
204 | outline: 0;
205 | }
206 | .ui-menu .ui-menu {
207 | position: absolute;
208 | }
209 | .ui-menu .ui-menu-item {
210 | margin: 0;
211 | cursor: pointer;
212 | /* support: IE10, see #8844 */
213 | list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
214 | }
215 | .ui-menu .ui-menu-item-wrapper {
216 | position: relative;
217 | padding: 3px 1em 3px .4em;
218 | }
219 | .ui-menu .ui-menu-divider {
220 | margin: 5px 0;
221 | height: 0;
222 | font-size: 0;
223 | line-height: 0;
224 | border-width: 1px 0 0 0;
225 | }
226 | .ui-menu .ui-state-focus,
227 | .ui-menu .ui-state-active {
228 | margin: -1px;
229 | }
230 |
231 | /* icon support */
232 | .ui-menu-icons {
233 | position: relative;
234 | }
235 | .ui-menu-icons .ui-menu-item-wrapper {
236 | padding-left: 2em;
237 | }
238 |
239 | /* left-aligned */
240 | .ui-menu .ui-icon {
241 | position: absolute;
242 | top: 0;
243 | bottom: 0;
244 | left: .2em;
245 | margin: auto 0;
246 | }
247 |
248 | /* right-aligned */
249 | .ui-menu .ui-menu-icon {
250 | left: auto;
251 | right: 0;
252 | }
253 | .ui-button {
254 | padding: .4em 1em;
255 | display: inline-block;
256 | position: relative;
257 | line-height: normal;
258 | margin-right: .1em;
259 | cursor: pointer;
260 | vertical-align: middle;
261 | text-align: center;
262 | -webkit-user-select: none;
263 | -moz-user-select: none;
264 | -ms-user-select: none;
265 | user-select: none;
266 |
267 | /* Support: IE <= 11 */
268 | overflow: visible;
269 | }
270 |
271 | .ui-button,
272 | .ui-button:link,
273 | .ui-button:visited,
274 | .ui-button:hover,
275 | .ui-button:active {
276 | text-decoration: none;
277 | }
278 |
279 | /* to make room for the icon, a width needs to be set here */
280 | .ui-button-icon-only {
281 | width: 2em;
282 | box-sizing: border-box;
283 | text-indent: -9999px;
284 | white-space: nowrap;
285 | }
286 |
287 | /* no icon support for input elements */
288 | input.ui-button.ui-button-icon-only {
289 | text-indent: 0;
290 | }
291 |
292 | /* button icon element(s) */
293 | .ui-button-icon-only .ui-icon {
294 | position: absolute;
295 | top: 50%;
296 | left: 50%;
297 | margin-top: -8px;
298 | margin-left: -8px;
299 | }
300 |
301 | .ui-button.ui-icon-notext .ui-icon {
302 | padding: 0;
303 | width: 2.1em;
304 | height: 2.1em;
305 | text-indent: -9999px;
306 | white-space: nowrap;
307 |
308 | }
309 |
310 | input.ui-button.ui-icon-notext .ui-icon {
311 | width: auto;
312 | height: auto;
313 | text-indent: 0;
314 | white-space: normal;
315 | padding: .4em 1em;
316 | }
317 |
318 | /* workarounds */
319 | /* Support: Firefox 5 - 40 */
320 | input.ui-button::-moz-focus-inner,
321 | button.ui-button::-moz-focus-inner {
322 | border: 0;
323 | padding: 0;
324 | }
325 | .ui-controlgroup {
326 | vertical-align: middle;
327 | display: inline-block;
328 | }
329 | .ui-controlgroup > .ui-controlgroup-item {
330 | float: left;
331 | margin-left: 0;
332 | margin-right: 0;
333 | }
334 | .ui-controlgroup > .ui-controlgroup-item:focus,
335 | .ui-controlgroup > .ui-controlgroup-item.ui-visual-focus {
336 | z-index: 9999;
337 | }
338 | .ui-controlgroup-vertical > .ui-controlgroup-item {
339 | display: block;
340 | float: none;
341 | width: 100%;
342 | margin-top: 0;
343 | margin-bottom: 0;
344 | text-align: left;
345 | }
346 | .ui-controlgroup-vertical .ui-controlgroup-item {
347 | box-sizing: border-box;
348 | }
349 | .ui-controlgroup .ui-controlgroup-label {
350 | padding: .4em 1em;
351 | }
352 | .ui-controlgroup .ui-controlgroup-label span {
353 | font-size: 80%;
354 | }
355 | .ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item {
356 | border-left: none;
357 | }
358 | .ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item {
359 | border-top: none;
360 | }
361 | .ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content {
362 | border-right: none;
363 | }
364 | .ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content {
365 | border-bottom: none;
366 | }
367 |
368 | /* Spinner specific style fixes */
369 | .ui-controlgroup-vertical .ui-spinner-input {
370 |
371 | /* Support: IE8 only, Android < 4.4 only */
372 | width: 75%;
373 | width: calc( 100% - 2.4em );
374 | }
375 | .ui-controlgroup-vertical .ui-spinner .ui-spinner-up {
376 | border-top-style: solid;
377 | }
378 |
379 | .ui-checkboxradio-label .ui-icon-background {
380 | box-shadow: inset 1px 1px 1px #ccc;
381 | border-radius: .12em;
382 | border: none;
383 | }
384 | .ui-checkboxradio-radio-label .ui-icon-background {
385 | width: 16px;
386 | height: 16px;
387 | border-radius: 1em;
388 | overflow: visible;
389 | border: none;
390 | }
391 | .ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,
392 | .ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon {
393 | background-image: none;
394 | width: 8px;
395 | height: 8px;
396 | border-width: 4px;
397 | border-style: solid;
398 | }
399 | .ui-checkboxradio-disabled {
400 | pointer-events: none;
401 | }
402 | .ui-datepicker {
403 | width: 17em;
404 | padding: .2em .2em 0;
405 | display: none;
406 | }
407 | .ui-datepicker .ui-datepicker-header {
408 | position: relative;
409 | padding: .2em 0;
410 | }
411 | .ui-datepicker .ui-datepicker-prev,
412 | .ui-datepicker .ui-datepicker-next {
413 | position: absolute;
414 | top: 2px;
415 | width: 1.8em;
416 | height: 1.8em;
417 | }
418 | .ui-datepicker .ui-datepicker-prev-hover,
419 | .ui-datepicker .ui-datepicker-next-hover {
420 | top: 1px;
421 | }
422 | .ui-datepicker .ui-datepicker-prev {
423 | left: 2px;
424 | }
425 | .ui-datepicker .ui-datepicker-next {
426 | right: 2px;
427 | }
428 | .ui-datepicker .ui-datepicker-prev-hover {
429 | left: 1px;
430 | }
431 | .ui-datepicker .ui-datepicker-next-hover {
432 | right: 1px;
433 | }
434 | .ui-datepicker .ui-datepicker-prev span,
435 | .ui-datepicker .ui-datepicker-next span {
436 | display: block;
437 | position: absolute;
438 | left: 50%;
439 | margin-left: -8px;
440 | top: 50%;
441 | margin-top: -8px;
442 | }
443 | .ui-datepicker .ui-datepicker-title {
444 | margin: 0 2.3em;
445 | line-height: 1.8em;
446 | text-align: center;
447 | }
448 | .ui-datepicker .ui-datepicker-title select {
449 | font-size: 1em;
450 | margin: 1px 0;
451 | }
452 | .ui-datepicker select.ui-datepicker-month,
453 | .ui-datepicker select.ui-datepicker-year {
454 | width: 45%;
455 | }
456 | .ui-datepicker table {
457 | width: 100%;
458 | font-size: .9em;
459 | border-collapse: collapse;
460 | margin: 0 0 .4em;
461 | }
462 | .ui-datepicker th {
463 | padding: .7em .3em;
464 | text-align: center;
465 | font-weight: bold;
466 | border: 0;
467 | }
468 | .ui-datepicker td {
469 | border: 0;
470 | padding: 1px;
471 | }
472 | .ui-datepicker td span,
473 | .ui-datepicker td a {
474 | display: block;
475 | padding: .2em;
476 | text-align: right;
477 | text-decoration: none;
478 | }
479 | .ui-datepicker .ui-datepicker-buttonpane {
480 | background-image: none;
481 | margin: .7em 0 0 0;
482 | padding: 0 .2em;
483 | border-left: 0;
484 | border-right: 0;
485 | border-bottom: 0;
486 | }
487 | .ui-datepicker .ui-datepicker-buttonpane button {
488 | float: right;
489 | margin: .5em .2em .4em;
490 | cursor: pointer;
491 | padding: .2em .6em .3em .6em;
492 | width: auto;
493 | overflow: visible;
494 | }
495 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
496 | float: left;
497 | }
498 |
499 | /* with multiple calendars */
500 | .ui-datepicker.ui-datepicker-multi {
501 | width: auto;
502 | }
503 | .ui-datepicker-multi .ui-datepicker-group {
504 | float: left;
505 | }
506 | .ui-datepicker-multi .ui-datepicker-group table {
507 | width: 95%;
508 | margin: 0 auto .4em;
509 | }
510 | .ui-datepicker-multi-2 .ui-datepicker-group {
511 | width: 50%;
512 | }
513 | .ui-datepicker-multi-3 .ui-datepicker-group {
514 | width: 33.3%;
515 | }
516 | .ui-datepicker-multi-4 .ui-datepicker-group {
517 | width: 25%;
518 | }
519 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
520 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
521 | border-left-width: 0;
522 | }
523 | .ui-datepicker-multi .ui-datepicker-buttonpane {
524 | clear: left;
525 | }
526 | .ui-datepicker-row-break {
527 | clear: both;
528 | width: 100%;
529 | font-size: 0;
530 | }
531 |
532 | /* RTL support */
533 | .ui-datepicker-rtl {
534 | direction: rtl;
535 | }
536 | .ui-datepicker-rtl .ui-datepicker-prev {
537 | right: 2px;
538 | left: auto;
539 | }
540 | .ui-datepicker-rtl .ui-datepicker-next {
541 | left: 2px;
542 | right: auto;
543 | }
544 | .ui-datepicker-rtl .ui-datepicker-prev:hover {
545 | right: 1px;
546 | left: auto;
547 | }
548 | .ui-datepicker-rtl .ui-datepicker-next:hover {
549 | left: 1px;
550 | right: auto;
551 | }
552 | .ui-datepicker-rtl .ui-datepicker-buttonpane {
553 | clear: right;
554 | }
555 | .ui-datepicker-rtl .ui-datepicker-buttonpane button {
556 | float: left;
557 | }
558 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
559 | .ui-datepicker-rtl .ui-datepicker-group {
560 | float: right;
561 | }
562 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
563 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
564 | border-right-width: 0;
565 | border-left-width: 1px;
566 | }
567 |
568 | /* Icons */
569 | .ui-datepicker .ui-icon {
570 | display: block;
571 | text-indent: -99999px;
572 | overflow: hidden;
573 | background-repeat: no-repeat;
574 | left: .5em;
575 | top: .3em;
576 | }
577 | .ui-dialog {
578 | position: absolute;
579 | top: 0;
580 | left: 0;
581 | padding: .2em;
582 | outline: 0;
583 | }
584 | .ui-dialog .ui-dialog-titlebar {
585 | padding: .4em 1em;
586 | position: relative;
587 | }
588 | .ui-dialog .ui-dialog-title {
589 | float: left;
590 | margin: .1em 0;
591 | white-space: nowrap;
592 | width: 90%;
593 | overflow: hidden;
594 | text-overflow: ellipsis;
595 | }
596 | .ui-dialog .ui-dialog-titlebar-close {
597 | position: absolute;
598 | right: .3em;
599 | top: 50%;
600 | width: 20px;
601 | margin: -10px 0 0 0;
602 | padding: 1px;
603 | height: 20px;
604 | }
605 | .ui-dialog .ui-dialog-content {
606 | position: relative;
607 | border: 0;
608 | padding: .5em 1em;
609 | background: none;
610 | overflow: auto;
611 | }
612 | .ui-dialog .ui-dialog-buttonpane {
613 | text-align: left;
614 | border-width: 1px 0 0 0;
615 | background-image: none;
616 | margin-top: .5em;
617 | padding: .3em 1em .5em .4em;
618 | }
619 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
620 | float: right;
621 | }
622 | .ui-dialog .ui-dialog-buttonpane button {
623 | margin: .5em .4em .5em 0;
624 | cursor: pointer;
625 | }
626 | .ui-dialog .ui-resizable-n {
627 | height: 2px;
628 | top: 0;
629 | }
630 | .ui-dialog .ui-resizable-e {
631 | width: 2px;
632 | right: 0;
633 | }
634 | .ui-dialog .ui-resizable-s {
635 | height: 2px;
636 | bottom: 0;
637 | }
638 | .ui-dialog .ui-resizable-w {
639 | width: 2px;
640 | left: 0;
641 | }
642 | .ui-dialog .ui-resizable-se,
643 | .ui-dialog .ui-resizable-sw,
644 | .ui-dialog .ui-resizable-ne,
645 | .ui-dialog .ui-resizable-nw {
646 | width: 7px;
647 | height: 7px;
648 | }
649 | .ui-dialog .ui-resizable-se {
650 | right: 0;
651 | bottom: 0;
652 | }
653 | .ui-dialog .ui-resizable-sw {
654 | left: 0;
655 | bottom: 0;
656 | }
657 | .ui-dialog .ui-resizable-ne {
658 | right: 0;
659 | top: 0;
660 | }
661 | .ui-dialog .ui-resizable-nw {
662 | left: 0;
663 | top: 0;
664 | }
665 | .ui-draggable .ui-dialog-titlebar {
666 | cursor: move;
667 | }
668 | .ui-progressbar {
669 | height: 2em;
670 | text-align: left;
671 | overflow: hidden;
672 | }
673 | .ui-progressbar .ui-progressbar-value {
674 | margin: -1px;
675 | height: 100%;
676 | }
677 | .ui-progressbar .ui-progressbar-overlay {
678 | background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
679 | height: 100%;
680 | filter: alpha(opacity=25); /* support: IE8 */
681 | opacity: 0.25;
682 | }
683 | .ui-progressbar-indeterminate .ui-progressbar-value {
684 | background-image: none;
685 | }
686 | .ui-selectmenu-menu {
687 | padding: 0;
688 | margin: 0;
689 | position: absolute;
690 | top: 0;
691 | left: 0;
692 | display: none;
693 | }
694 | .ui-selectmenu-menu .ui-menu {
695 | overflow: auto;
696 | overflow-x: hidden;
697 | padding-bottom: 1px;
698 | }
699 | .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
700 | font-size: 1em;
701 | font-weight: bold;
702 | line-height: 1.5;
703 | padding: 2px 0.4em;
704 | margin: 0.5em 0 0 0;
705 | height: auto;
706 | border: 0;
707 | }
708 | .ui-selectmenu-open {
709 | display: block;
710 | }
711 | .ui-selectmenu-text {
712 | display: block;
713 | margin-right: 20px;
714 | overflow: hidden;
715 | text-overflow: ellipsis;
716 | }
717 | .ui-selectmenu-button.ui-button {
718 | text-align: left;
719 | white-space: nowrap;
720 | width: 14em;
721 | }
722 | .ui-selectmenu-icon.ui-icon {
723 | float: right;
724 | margin-top: 0;
725 | }
726 | .ui-slider {
727 | position: relative;
728 | text-align: left;
729 | }
730 | .ui-slider .ui-slider-handle {
731 | position: absolute;
732 | z-index: 2;
733 | width: 1.2em;
734 | height: 1.2em;
735 | cursor: default;
736 | -ms-touch-action: none;
737 | touch-action: none;
738 | }
739 | .ui-slider .ui-slider-range {
740 | position: absolute;
741 | z-index: 1;
742 | font-size: .7em;
743 | display: block;
744 | border: 0;
745 | background-position: 0 0;
746 | }
747 |
748 | /* support: IE8 - See #6727 */
749 | .ui-slider.ui-state-disabled .ui-slider-handle,
750 | .ui-slider.ui-state-disabled .ui-slider-range {
751 | filter: inherit;
752 | }
753 |
754 | .ui-slider-horizontal {
755 | height: .8em;
756 | }
757 | .ui-slider-horizontal .ui-slider-handle {
758 | top: -.3em;
759 | margin-left: -.6em;
760 | }
761 | .ui-slider-horizontal .ui-slider-range {
762 | top: 0;
763 | height: 100%;
764 | }
765 | .ui-slider-horizontal .ui-slider-range-min {
766 | left: 0;
767 | }
768 | .ui-slider-horizontal .ui-slider-range-max {
769 | right: 0;
770 | }
771 |
772 | .ui-slider-vertical {
773 | width: .8em;
774 | height: 100px;
775 | }
776 | .ui-slider-vertical .ui-slider-handle {
777 | left: -.3em;
778 | margin-left: 0;
779 | margin-bottom: -.6em;
780 | }
781 | .ui-slider-vertical .ui-slider-range {
782 | left: 0;
783 | width: 100%;
784 | }
785 | .ui-slider-vertical .ui-slider-range-min {
786 | bottom: 0;
787 | }
788 | .ui-slider-vertical .ui-slider-range-max {
789 | top: 0;
790 | }
791 | .ui-spinner {
792 | position: relative;
793 | display: inline-block;
794 | overflow: hidden;
795 | padding: 0;
796 | vertical-align: middle;
797 | }
798 | .ui-spinner-input {
799 | border: none;
800 | background: none;
801 | color: inherit;
802 | padding: .222em 0;
803 | margin: .2em 0;
804 | vertical-align: middle;
805 | margin-left: .4em;
806 | margin-right: 2em;
807 | }
808 | .ui-spinner-button {
809 | width: 1.6em;
810 | height: 50%;
811 | font-size: .5em;
812 | padding: 0;
813 | margin: 0;
814 | text-align: center;
815 | position: absolute;
816 | cursor: default;
817 | display: block;
818 | overflow: hidden;
819 | right: 0;
820 | }
821 | /* more specificity required here to override default borders */
822 | .ui-spinner a.ui-spinner-button {
823 | border-top-style: none;
824 | border-bottom-style: none;
825 | border-right-style: none;
826 | }
827 | .ui-spinner-up {
828 | top: 0;
829 | }
830 | .ui-spinner-down {
831 | bottom: 0;
832 | }
833 | .ui-tabs {
834 | position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
835 | padding: .2em;
836 | }
837 | .ui-tabs .ui-tabs-nav {
838 | margin: 0;
839 | padding: .2em .2em 0;
840 | }
841 | .ui-tabs .ui-tabs-nav li {
842 | list-style: none;
843 | float: left;
844 | position: relative;
845 | top: 0;
846 | margin: 1px .2em 0 0;
847 | border-bottom-width: 0;
848 | padding: 0;
849 | white-space: nowrap;
850 | }
851 | .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
852 | float: left;
853 | padding: .5em 1em;
854 | text-decoration: none;
855 | }
856 | .ui-tabs .ui-tabs-nav li.ui-tabs-active {
857 | margin-bottom: -1px;
858 | padding-bottom: 1px;
859 | }
860 | .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
861 | .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
862 | .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
863 | cursor: text;
864 | }
865 | .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
866 | cursor: pointer;
867 | }
868 | .ui-tabs .ui-tabs-panel {
869 | display: block;
870 | border-width: 0;
871 | padding: 1em 1.4em;
872 | background: none;
873 | }
874 | .ui-tooltip {
875 | padding: 8px;
876 | position: absolute;
877 | z-index: 9999;
878 | max-width: 300px;
879 | }
880 | body .ui-tooltip {
881 | border-width: 2px;
882 | }
883 |
884 | /* Component containers
885 | ----------------------------------*/
886 | .ui-widget {
887 | font-family: Arial,Helvetica,sans-serif;
888 | font-size: 1em;
889 | }
890 | .ui-widget .ui-widget {
891 | font-size: 1em;
892 | }
893 | .ui-widget input,
894 | .ui-widget select,
895 | .ui-widget textarea,
896 | .ui-widget button {
897 | font-family: Arial,Helvetica,sans-serif;
898 | font-size: 1em;
899 | }
900 | .ui-widget.ui-widget-content {
901 | border: 1px solid #c5c5c5;
902 | }
903 | .ui-widget-content {
904 | border: 1px solid #dddddd;
905 | background: #ffffff;
906 | color: #333333;
907 | }
908 | .ui-widget-content a {
909 | color: #333333;
910 | }
911 | .ui-widget-header {
912 | border: 1px solid #dddddd;
913 | background: #e9e9e9;
914 | color: #333333;
915 | font-weight: bold;
916 | }
917 | .ui-widget-header a {
918 | color: #333333;
919 | }
920 |
921 | /* Interaction states
922 | ----------------------------------*/
923 | .ui-state-default,
924 | .ui-widget-content .ui-state-default,
925 | .ui-widget-header .ui-state-default,
926 | .ui-button,
927 |
928 | /* We use html here because we need a greater specificity to make sure disabled
929 | works properly when clicked or hovered */
930 | html .ui-button.ui-state-disabled:hover,
931 | html .ui-button.ui-state-disabled:active {
932 | border: 1px solid #c5c5c5;
933 | background: #f6f6f6;
934 | font-weight: normal;
935 | color: #454545;
936 | }
937 | .ui-state-default a,
938 | .ui-state-default a:link,
939 | .ui-state-default a:visited,
940 | a.ui-button,
941 | a:link.ui-button,
942 | a:visited.ui-button,
943 | .ui-button {
944 | color: #454545;
945 | text-decoration: none;
946 | }
947 | .ui-state-hover,
948 | .ui-widget-content .ui-state-hover,
949 | .ui-widget-header .ui-state-hover,
950 | .ui-state-focus,
951 | .ui-widget-content .ui-state-focus,
952 | .ui-widget-header .ui-state-focus,
953 | .ui-button:hover,
954 | .ui-button:focus {
955 | border: 1px solid #cccccc;
956 | background: #ededed;
957 | font-weight: normal;
958 | color: #2b2b2b;
959 | }
960 | .ui-state-hover a,
961 | .ui-state-hover a:hover,
962 | .ui-state-hover a:link,
963 | .ui-state-hover a:visited,
964 | .ui-state-focus a,
965 | .ui-state-focus a:hover,
966 | .ui-state-focus a:link,
967 | .ui-state-focus a:visited,
968 | a.ui-button:hover,
969 | a.ui-button:focus {
970 | color: #2b2b2b;
971 | text-decoration: none;
972 | }
973 |
974 | .ui-visual-focus {
975 | box-shadow: 0 0 3px 1px rgb(94, 158, 214);
976 | }
977 | .ui-state-active,
978 | .ui-widget-content .ui-state-active,
979 | .ui-widget-header .ui-state-active,
980 | a.ui-button:active,
981 | .ui-button:active,
982 | .ui-button.ui-state-active:hover {
983 | border: 1px solid #003eff;
984 | background: #007fff;
985 | font-weight: normal;
986 | color: #ffffff;
987 | }
988 | .ui-icon-background,
989 | .ui-state-active .ui-icon-background {
990 | border: #003eff;
991 | background-color: #ffffff;
992 | }
993 | .ui-state-active a,
994 | .ui-state-active a:link,
995 | .ui-state-active a:visited {
996 | color: #ffffff;
997 | text-decoration: none;
998 | }
999 |
1000 | /* Interaction Cues
1001 | ----------------------------------*/
1002 | .ui-state-highlight,
1003 | .ui-widget-content .ui-state-highlight,
1004 | .ui-widget-header .ui-state-highlight {
1005 | border: 1px solid #dad55e;
1006 | background: #fffa90;
1007 | color: #777620;
1008 | }
1009 | .ui-state-checked {
1010 | border: 1px solid #dad55e;
1011 | background: #fffa90;
1012 | }
1013 | .ui-state-highlight a,
1014 | .ui-widget-content .ui-state-highlight a,
1015 | .ui-widget-header .ui-state-highlight a {
1016 | color: #777620;
1017 | }
1018 | .ui-state-error,
1019 | .ui-widget-content .ui-state-error,
1020 | .ui-widget-header .ui-state-error {
1021 | border: 1px solid #f1a899;
1022 | background: #fddfdf;
1023 | color: #5f3f3f;
1024 | }
1025 | .ui-state-error a,
1026 | .ui-widget-content .ui-state-error a,
1027 | .ui-widget-header .ui-state-error a {
1028 | color: #5f3f3f;
1029 | }
1030 | .ui-state-error-text,
1031 | .ui-widget-content .ui-state-error-text,
1032 | .ui-widget-header .ui-state-error-text {
1033 | color: #5f3f3f;
1034 | }
1035 | .ui-priority-primary,
1036 | .ui-widget-content .ui-priority-primary,
1037 | .ui-widget-header .ui-priority-primary {
1038 | font-weight: bold;
1039 | }
1040 | .ui-priority-secondary,
1041 | .ui-widget-content .ui-priority-secondary,
1042 | .ui-widget-header .ui-priority-secondary {
1043 | opacity: .7;
1044 | filter:Alpha(Opacity=70); /* support: IE8 */
1045 | font-weight: normal;
1046 | }
1047 | .ui-state-disabled,
1048 | .ui-widget-content .ui-state-disabled,
1049 | .ui-widget-header .ui-state-disabled {
1050 | opacity: .35;
1051 | filter:Alpha(Opacity=35); /* support: IE8 */
1052 | background-image: none;
1053 | }
1054 | .ui-state-disabled .ui-icon {
1055 | filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
1056 | }
1057 |
1058 | /* Icons
1059 | ----------------------------------*/
1060 |
1061 | /* states and images */
1062 | .ui-icon {
1063 | width: 16px;
1064 | height: 16px;
1065 | }
1066 | .ui-icon,
1067 | .ui-widget-content .ui-icon {
1068 | background-image: url("images/ui-icons_444444_256x240.png");
1069 | }
1070 | .ui-widget-header .ui-icon {
1071 | background-image: url("images/ui-icons_444444_256x240.png");
1072 | }
1073 | .ui-state-hover .ui-icon,
1074 | .ui-state-focus .ui-icon,
1075 | .ui-button:hover .ui-icon,
1076 | .ui-button:focus .ui-icon {
1077 | background-image: url("images/ui-icons_555555_256x240.png");
1078 | }
1079 | .ui-state-active .ui-icon,
1080 | .ui-button:active .ui-icon {
1081 | background-image: url("images/ui-icons_ffffff_256x240.png");
1082 | }
1083 | .ui-state-highlight .ui-icon,
1084 | .ui-button .ui-state-highlight.ui-icon {
1085 | background-image: url("images/ui-icons_777620_256x240.png");
1086 | }
1087 | .ui-state-error .ui-icon,
1088 | .ui-state-error-text .ui-icon {
1089 | background-image: url("images/ui-icons_cc0000_256x240.png");
1090 | }
1091 | .ui-button .ui-icon {
1092 | background-image: url("images/ui-icons_777777_256x240.png");
1093 | }
1094 |
1095 | /* positioning */
1096 | .ui-icon-blank { background-position: 16px 16px; }
1097 | .ui-icon-caret-1-n { background-position: 0 0; }
1098 | .ui-icon-caret-1-ne { background-position: -16px 0; }
1099 | .ui-icon-caret-1-e { background-position: -32px 0; }
1100 | .ui-icon-caret-1-se { background-position: -48px 0; }
1101 | .ui-icon-caret-1-s { background-position: -65px 0; }
1102 | .ui-icon-caret-1-sw { background-position: -80px 0; }
1103 | .ui-icon-caret-1-w { background-position: -96px 0; }
1104 | .ui-icon-caret-1-nw { background-position: -112px 0; }
1105 | .ui-icon-caret-2-n-s { background-position: -128px 0; }
1106 | .ui-icon-caret-2-e-w { background-position: -144px 0; }
1107 | .ui-icon-triangle-1-n { background-position: 0 -16px; }
1108 | .ui-icon-triangle-1-ne { background-position: -16px -16px; }
1109 | .ui-icon-triangle-1-e { background-position: -32px -16px; }
1110 | .ui-icon-triangle-1-se { background-position: -48px -16px; }
1111 | .ui-icon-triangle-1-s { background-position: -65px -16px; }
1112 | .ui-icon-triangle-1-sw { background-position: -80px -16px; }
1113 | .ui-icon-triangle-1-w { background-position: -96px -16px; }
1114 | .ui-icon-triangle-1-nw { background-position: -112px -16px; }
1115 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
1116 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
1117 | .ui-icon-arrow-1-n { background-position: 0 -32px; }
1118 | .ui-icon-arrow-1-ne { background-position: -16px -32px; }
1119 | .ui-icon-arrow-1-e { background-position: -32px -32px; }
1120 | .ui-icon-arrow-1-se { background-position: -48px -32px; }
1121 | .ui-icon-arrow-1-s { background-position: -65px -32px; }
1122 | .ui-icon-arrow-1-sw { background-position: -80px -32px; }
1123 | .ui-icon-arrow-1-w { background-position: -96px -32px; }
1124 | .ui-icon-arrow-1-nw { background-position: -112px -32px; }
1125 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
1126 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
1127 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
1128 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
1129 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
1130 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
1131 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
1132 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
1133 | .ui-icon-arrowthick-1-n { background-position: 1px -48px; }
1134 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
1135 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
1136 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
1137 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
1138 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
1139 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
1140 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
1141 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
1142 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
1143 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
1144 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
1145 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
1146 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
1147 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
1148 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
1149 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
1150 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
1151 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
1152 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
1153 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
1154 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
1155 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
1156 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
1157 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
1158 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
1159 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
1160 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
1161 | .ui-icon-arrow-4 { background-position: 0 -80px; }
1162 | .ui-icon-arrow-4-diag { background-position: -16px -80px; }
1163 | .ui-icon-extlink { background-position: -32px -80px; }
1164 | .ui-icon-newwin { background-position: -48px -80px; }
1165 | .ui-icon-refresh { background-position: -64px -80px; }
1166 | .ui-icon-shuffle { background-position: -80px -80px; }
1167 | .ui-icon-transfer-e-w { background-position: -96px -80px; }
1168 | .ui-icon-transferthick-e-w { background-position: -112px -80px; }
1169 | .ui-icon-folder-collapsed { background-position: 0 -96px; }
1170 | .ui-icon-folder-open { background-position: -16px -96px; }
1171 | .ui-icon-document { background-position: -32px -96px; }
1172 | .ui-icon-document-b { background-position: -48px -96px; }
1173 | .ui-icon-note { background-position: -64px -96px; }
1174 | .ui-icon-mail-closed { background-position: -80px -96px; }
1175 | .ui-icon-mail-open { background-position: -96px -96px; }
1176 | .ui-icon-suitcase { background-position: -112px -96px; }
1177 | .ui-icon-comment { background-position: -128px -96px; }
1178 | .ui-icon-person { background-position: -144px -96px; }
1179 | .ui-icon-print { background-position: -160px -96px; }
1180 | .ui-icon-trash { background-position: -176px -96px; }
1181 | .ui-icon-locked { background-position: -192px -96px; }
1182 | .ui-icon-unlocked { background-position: -208px -96px; }
1183 | .ui-icon-bookmark { background-position: -224px -96px; }
1184 | .ui-icon-tag { background-position: -240px -96px; }
1185 | .ui-icon-home { background-position: 0 -112px; }
1186 | .ui-icon-flag { background-position: -16px -112px; }
1187 | .ui-icon-calendar { background-position: -32px -112px; }
1188 | .ui-icon-cart { background-position: -48px -112px; }
1189 | .ui-icon-pencil { background-position: -64px -112px; }
1190 | .ui-icon-clock { background-position: -80px -112px; }
1191 | .ui-icon-disk { background-position: -96px -112px; }
1192 | .ui-icon-calculator { background-position: -112px -112px; }
1193 | .ui-icon-zoomin { background-position: -128px -112px; }
1194 | .ui-icon-zoomout { background-position: -144px -112px; }
1195 | .ui-icon-search { background-position: -160px -112px; }
1196 | .ui-icon-wrench { background-position: -176px -112px; }
1197 | .ui-icon-gear { background-position: -192px -112px; }
1198 | .ui-icon-heart { background-position: -208px -112px; }
1199 | .ui-icon-star { background-position: -224px -112px; }
1200 | .ui-icon-link { background-position: -240px -112px; }
1201 | .ui-icon-cancel { background-position: 0 -128px; }
1202 | .ui-icon-plus { background-position: -16px -128px; }
1203 | .ui-icon-plusthick { background-position: -32px -128px; }
1204 | .ui-icon-minus { background-position: -48px -128px; }
1205 | .ui-icon-minusthick { background-position: -64px -128px; }
1206 | .ui-icon-close { background-position: -80px -128px; }
1207 | .ui-icon-closethick { background-position: -96px -128px; }
1208 | .ui-icon-key { background-position: -112px -128px; }
1209 | .ui-icon-lightbulb { background-position: -128px -128px; }
1210 | .ui-icon-scissors { background-position: -144px -128px; }
1211 | .ui-icon-clipboard { background-position: -160px -128px; }
1212 | .ui-icon-copy { background-position: -176px -128px; }
1213 | .ui-icon-contact { background-position: -192px -128px; }
1214 | .ui-icon-image { background-position: -208px -128px; }
1215 | .ui-icon-video { background-position: -224px -128px; }
1216 | .ui-icon-script { background-position: -240px -128px; }
1217 | .ui-icon-alert { background-position: 0 -144px; }
1218 | .ui-icon-info { background-position: -16px -144px; }
1219 | .ui-icon-notice { background-position: -32px -144px; }
1220 | .ui-icon-help { background-position: -48px -144px; }
1221 | .ui-icon-check { background-position: -64px -144px; }
1222 | .ui-icon-bullet { background-position: -80px -144px; }
1223 | .ui-icon-radio-on { background-position: -96px -144px; }
1224 | .ui-icon-radio-off { background-position: -112px -144px; }
1225 | .ui-icon-pin-w { background-position: -128px -144px; }
1226 | .ui-icon-pin-s { background-position: -144px -144px; }
1227 | .ui-icon-play { background-position: 0 -160px; }
1228 | .ui-icon-pause { background-position: -16px -160px; }
1229 | .ui-icon-seek-next { background-position: -32px -160px; }
1230 | .ui-icon-seek-prev { background-position: -48px -160px; }
1231 | .ui-icon-seek-end { background-position: -64px -160px; }
1232 | .ui-icon-seek-start { background-position: -80px -160px; }
1233 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
1234 | .ui-icon-seek-first { background-position: -80px -160px; }
1235 | .ui-icon-stop { background-position: -96px -160px; }
1236 | .ui-icon-eject { background-position: -112px -160px; }
1237 | .ui-icon-volume-off { background-position: -128px -160px; }
1238 | .ui-icon-volume-on { background-position: -144px -160px; }
1239 | .ui-icon-power { background-position: 0 -176px; }
1240 | .ui-icon-signal-diag { background-position: -16px -176px; }
1241 | .ui-icon-signal { background-position: -32px -176px; }
1242 | .ui-icon-battery-0 { background-position: -48px -176px; }
1243 | .ui-icon-battery-1 { background-position: -64px -176px; }
1244 | .ui-icon-battery-2 { background-position: -80px -176px; }
1245 | .ui-icon-battery-3 { background-position: -96px -176px; }
1246 | .ui-icon-circle-plus { background-position: 0 -192px; }
1247 | .ui-icon-circle-minus { background-position: -16px -192px; }
1248 | .ui-icon-circle-close { background-position: -32px -192px; }
1249 | .ui-icon-circle-triangle-e { background-position: -48px -192px; }
1250 | .ui-icon-circle-triangle-s { background-position: -64px -192px; }
1251 | .ui-icon-circle-triangle-w { background-position: -80px -192px; }
1252 | .ui-icon-circle-triangle-n { background-position: -96px -192px; }
1253 | .ui-icon-circle-arrow-e { background-position: -112px -192px; }
1254 | .ui-icon-circle-arrow-s { background-position: -128px -192px; }
1255 | .ui-icon-circle-arrow-w { background-position: -144px -192px; }
1256 | .ui-icon-circle-arrow-n { background-position: -160px -192px; }
1257 | .ui-icon-circle-zoomin { background-position: -176px -192px; }
1258 | .ui-icon-circle-zoomout { background-position: -192px -192px; }
1259 | .ui-icon-circle-check { background-position: -208px -192px; }
1260 | .ui-icon-circlesmall-plus { background-position: 0 -208px; }
1261 | .ui-icon-circlesmall-minus { background-position: -16px -208px; }
1262 | .ui-icon-circlesmall-close { background-position: -32px -208px; }
1263 | .ui-icon-squaresmall-plus { background-position: -48px -208px; }
1264 | .ui-icon-squaresmall-minus { background-position: -64px -208px; }
1265 | .ui-icon-squaresmall-close { background-position: -80px -208px; }
1266 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
1267 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
1268 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
1269 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
1270 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
1271 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
1272 |
1273 |
1274 | /* Misc visuals
1275 | ----------------------------------*/
1276 |
1277 | /* Corner radius */
1278 | .ui-corner-all,
1279 | .ui-corner-top,
1280 | .ui-corner-left,
1281 | .ui-corner-tl {
1282 | border-top-left-radius: 3px;
1283 | }
1284 | .ui-corner-all,
1285 | .ui-corner-top,
1286 | .ui-corner-right,
1287 | .ui-corner-tr {
1288 | border-top-right-radius: 3px;
1289 | }
1290 | .ui-corner-all,
1291 | .ui-corner-bottom,
1292 | .ui-corner-left,
1293 | .ui-corner-bl {
1294 | border-bottom-left-radius: 3px;
1295 | }
1296 | .ui-corner-all,
1297 | .ui-corner-bottom,
1298 | .ui-corner-right,
1299 | .ui-corner-br {
1300 | border-bottom-right-radius: 3px;
1301 | }
1302 |
1303 | /* Overlays */
1304 | .ui-widget-overlay {
1305 | background: #aaaaaa;
1306 | opacity: .3;
1307 | filter: Alpha(Opacity=30); /* support: IE8 */
1308 | }
1309 | .ui-widget-shadow {
1310 | -webkit-box-shadow: 0px 0px 5px #666666;
1311 | box-shadow: 0px 0px 5px #666666;
1312 | }
1313 |
--------------------------------------------------------------------------------